l_belev
06-09-2011, 11:41 AM
The latest catalyst (11.5) appears to have a bug with glBindSampler - it fails with INVALID_VALUE on totally valid arguments.
I traced the assembly code in the driver and found out that it does wrong argument validation - at the place where it checks if the first argument is between 0 and MAX_TEXTURE_IMAGE_UNITS-1 it also checks if the second argument is zero (which it is not) - if either of these two is false it generates INVALID_VALUE. Nonzero second argument is valid when it is taken from glGenSamplers.
When i nop-ed out the second condition in the driver dll, it works perfectly.
I am posting this, in case anyone else has encountered this problem too, to let him know how it can be fixed.
Also if any ATI driver guy is reading this forum, please fix this bug!
This bug is present in the older version 11.2 too.
I traced the assembly code in the driver and found out that it does wrong argument validation - at the place where it checks if the first argument is between 0 and MAX_TEXTURE_IMAGE_UNITS-1 it also checks if the second argument is zero (which it is not) - if either of these two is false it generates INVALID_VALUE. Nonzero second argument is valid when it is taken from glGenSamplers.
When i nop-ed out the second condition in the driver dll, it works perfectly.
I am posting this, in case anyone else has encountered this problem too, to let him know how it can be fixed.
Also if any ATI driver guy is reading this forum, please fix this bug!
This bug is present in the older version 11.2 too.