[Piglit] [PATCH 7/9] trinity-fp1: use glGenTextures() instead of hard-coded texture IDs

Brian Paul brianp at vmware.com
Fri Oct 13 20:08:05 UTC 2017


This allows the test to run with -fbo
---
 tests/shaders/trinity-fp1.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tests/shaders/trinity-fp1.c b/tests/shaders/trinity-fp1.c
index 0ea32ad..89a201e 100644
--- a/tests/shaders/trinity-fp1.c
+++ b/tests/shaders/trinity-fp1.c
@@ -37,10 +37,10 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
 PIGLIT_GL_TEST_CONFIG_END
 
-static GLuint TexDiffuse = 1;
-static GLuint TexNormal = 2;
-static GLuint TexSpecular = 3;
-static GLuint TexLookup = 4;
+static GLuint TexDiffuse;
+static GLuint TexNormal;
+static GLuint TexSpecular;
+static GLuint TexLookup;
 
 static GLuint FragProg;
 
@@ -240,6 +240,11 @@ piglit_init(int argc, char **argv)
 	piglit_require_fragment_program();
 	FragProg = piglit_compile_program(GL_FRAGMENT_PROGRAM_ARB, fragProgramText);
 
+	glGenTextures(1, &TexDiffuse);
+	glGenTextures(1, &TexNormal);
+	glGenTextures(1, &TexSpecular);
+	glGenTextures(1, &TexLookup);
+
 	/*
 	 * Initialize textures
 	 */
-- 
1.9.1



More information about the Piglit mailing list