diff options
author | Marek Olšák <marek.olsak@amd.com> | 2018-02-07 21:35:28 +0100 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2018-02-13 01:08:25 +0100 |
commit | 1c89f653c34c91f28bdf2fc3c664ce4db5fc54a6 (patch) | |
tree | 0b7c780f2539ef09044f185fd934a64fee0beeec | |
parent | 8671bb82416e5fb085ea477c5910de69d2bef2a9 (diff) |
texunits: don't test glTexEnv with unusable texture units
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.
Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r-- | tests/general/texunits.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/general/texunits.c b/tests/general/texunits.c index b68dcf71c..c6fbcb1cd 100644 --- a/tests/general/texunits.c +++ b/tests/general/texunits.c @@ -283,7 +283,7 @@ test_texture_env(void) 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)) { @@ -292,7 +292,7 @@ test_texture_env(void) } /* 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); |