mesa: Allow sampling from units >= MAX_TEXTURE_UNITS in shaders.
The total number of units used by a shader is limited to MAX_TEXTURE_UNITS, but the actual indices are only limited by MAX_COMBINED_TEXTURE_IMAGE_UNITS, since they're shared between vertex and fragment shaders. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Henri Verbeet <hverbeet@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
@@ -1032,7 +1032,7 @@ validate_samplers(const struct gl_program *prog, char *errMsg)
|
||||
"TEXTURE_2D",
|
||||
"TEXTURE_1D",
|
||||
};
|
||||
GLint targetUsed[MAX_TEXTURE_IMAGE_UNITS];
|
||||
GLint targetUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS];
|
||||
GLbitfield samplersUsed = prog->SamplersUsed;
|
||||
GLuint i;
|
||||
|
||||
|
Reference in New Issue
Block a user