On Wed, Apr 6, 2016 at 6:10 PM, Nicolai Hähnle <nhaeh...@gmail.com> wrote: > From: Nicolai Hähnle <nicolai.haeh...@amd.com> > > --- > tests/shaders/shader_runner.c | 17 +++++++++++++++++ > tests/util/piglit-util-gl.c | 35 +++++++++++++++++++++++++++++++++++ > tests/util/piglit-util-gl.h | 1 + > 3 files changed, 53 insertions(+) > > diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c > index 8d2a9bd..206258c 100644 > --- a/tests/shaders/shader_runner.c > +++ b/tests/shaders/shader_runner.c > @@ -3102,6 +3102,23 @@ piglit_display(void) > GL_UNSIGNED_NORMALIZED); > if (!piglit_is_core_profile) > glEnable(GL_TEXTURE_2D); > + } else if (sscanf(line, "texture integer %d ( %d", &tex, &w) > == 2) { > + GLenum int_fmt; > + int b, a; > + int num_scanned = > + sscanf(line, > + "texture integer %d ( %d , %d ) ( %d, > %d ) %31s", > + &tex, &w, &h, &b, &a, s); > + if (num_scanned < 6) { > + fprintf(stderr, > + "invalid texture integer command!\n"); > + piglit_report_result(PIGLIT_FAIL); > + } > + > + int_fmt = piglit_get_gl_enum_from_name(s); > + > + glActiveTexture(GL_TEXTURE0 + tex); > + piglit_integer_texture(int_fmt, w, h, b, a); > } else if (sscanf(line, "texture miptree %d", &tex) == 1) { > glActiveTexture(GL_TEXTURE0 + tex); > piglit_miptree_texture(); > diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c > index dbdfb13..e8a47c5 100644 > --- a/tests/util/piglit-util-gl.c > +++ b/tests/util/piglit-util-gl.c > @@ -2494,6 +2494,41 @@ piglit_rgbw_texture(GLenum internalFormat, int w, int > h, GLboolean mip, > } > > /** > + * Generates a texture with the given integer internal format. > + * Pixel data will be filled as R = x, G = y, B = b, A = a. > + */ > +GLuint piglit_integer_texture(GLenum internalFormat, int w, int h, int b, > int a)
Returns GLuint, but there's no return in the function, and the call site doesn't use the result. I think you meant to make this void. _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit