Reviewed-by: Brian Paul <bri...@vmware.com>
On Thu, Feb 8, 2018 at 5:59 PM, Marek Olšák <mar...@gmail.com> wrote: > From: Marek Olšák <marek.ol...@amd.com> > > The GL limit is MaxTextureCombinedUnits, but the real usable limit is > MaxTextureCoordUnits. This is probably a spec bug. > > Mesa will ignore glTexEnv calls where unit >= MaxTextureCoordUnits. > --- > tests/general/texunits.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/general/texunits.c b/tests/general/texunits.c > index b68dcf7..c6fbcb1 100644 > --- a/tests/general/texunits.c > +++ b/tests/general/texunits.c > @@ -276,30 +276,30 @@ test_texture_params(void) > > static GLboolean > test_texture_env(void) > { > /* Texture Environment state is fixed-function; not used by shaders */ > int i; > > clear_errors(); > > /* set per-unit state */ > - for (i = 0; i < MaxTextureCombinedUnits; i++) { > + for (i = 0; i < MaxTextureCoordUnits; i++) { > glActiveTexture(GL_TEXTURE0 + i); > glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, Random[i]); > if (!piglit_check_gl_error(GL_NO_ERROR)) { > return GL_FALSE; > } > } > > /* check per-unit state */ > - for (i = 0; i < MaxTextureCombinedUnits; i++) { > + for (i = 0; i < MaxTextureCoordUnits; i++) { > GLfloat v[4]; > glActiveTexture(GL_TEXTURE0 + i); > glGetTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, v); > if (!equal4v(v, Random[i])) { > printf("Setting per-unit env state failed for unit %d\n", i); > report4v(Random[i], v); > return GL_FALSE; > } > } > > -- > 2.7.4 > > _______________________________________________ > Piglit mailing list > Piglit@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/piglit >
_______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit