diff options
author | Francisco Jerez <currojerez@riseup.net> | 2016-09-17 01:38:49 -0700 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2016-11-07 14:07:04 -0800 |
commit | e13442893cf0a63d855afaa6ec8a470b2305d5b6 (patch) | |
tree | 133d336ea63822a708185e2b4f63f8396b567a88 | |
parent | caa45f6c3345cec79aec04c161897e9e5e496b27 (diff) |
shader_runner: Take advantage of texture binding book-keeping in image binding command.
No need to do the glActiveTexture + glGetIntegerv dance to find out
which texture object is bound to a texture unit.
-rw-r--r-- | tests/shaders/shader_runner.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index a23889484..ed2e085ef 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -3023,12 +3023,8 @@ piglit_display(void) "image texture %d %31s", &tex, s) == 2) { const GLenum img_fmt = piglit_get_gl_enum_from_name(s); - GLint tex_num; - - glActiveTexture(GL_TEXTURE0 + tex); - glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex_num); - glBindImageTexture(tex, tex_num, 0, GL_FALSE, 0, - GL_READ_WRITE, img_fmt); + glBindImageTexture(tex, get_texture_binding(tex)->obj, 0, + GL_FALSE, 0, GL_READ_WRITE, img_fmt); } else if (sscanf(line, "memory barrier %s", s) == 1) { glMemoryBarrier(piglit_get_gl_memory_barrier_enum_from_name(s)); } else if (sscanf(line, "ortho %f %f %f %f", |