vrend_renderer: Zero out tex parameters for TBOs

In certain cases, specifying level and layer for TBOs causes
tests to fail.  Don't do this.

Fixes:
  dEQP-GLES31.functional.image_load_store.buffer.image_size.writeonly_12
  dEQP-GLES31.functional.image_load_store.buffer.image_size.writeonly_1
  dEQP-GLES31.functional.image_load_store.buffer.image_size.readonly_writeonly_12
  dEQP-GLES31.functional.image_load_store.buffer.image_size.readonly_writeonly_1
  dEQP-GLES31.functional.image_load_store.buffer.image_size.readonly_12
  dEQP-GLES31.functional.image_load_store.buffer.image_size.readonly_1
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Gurchetan Singh 6 years ago committed by Dave Airlie
parent 845dab3d54
commit f32948d782
  1. 22
      src/vrend_renderer.c

@ -3608,10 +3608,10 @@ static void vrend_draw_bind_ssbo_shader(struct vrend_context *ctx, int shader_ty
static void vrend_draw_bind_images_shader(struct vrend_context *ctx, int shader_type) static void vrend_draw_bind_images_shader(struct vrend_context *ctx, int shader_type)
{ {
struct vrend_image_view *iview;
uint32_t mask;
uint32_t tex_id;
GLenum access; GLenum access;
GLboolean layered;
struct vrend_image_view *iview;
uint32_t mask, tex_id, level, first_layer;
if (!has_feature(feat_images)) if (!has_feature(feat_images))
return; return;
@ -3638,11 +3638,16 @@ static void vrend_draw_bind_images_shader(struct vrend_context *ctx, int shader_
glBindTexture(GL_TEXTURE_BUFFER, iview->texture->tbo_tex_id); glBindTexture(GL_TEXTURE_BUFFER, iview->texture->tbo_tex_id);
glTexBuffer(GL_TEXTURE_BUFFER, iview->format, iview->texture->id); glTexBuffer(GL_TEXTURE_BUFFER, iview->format, iview->texture->id);
tex_id = iview->texture->tbo_tex_id; tex_id = iview->texture->tbo_tex_id;
level = first_layer = 0;
layered = GL_TRUE;
} else {
level = iview->u.tex.level;
first_layer = iview->u.tex.first_layer;
layered = !((iview->texture->base.array_size > 1 ||
iview->texture->base.depth0 > 1) && (iview->u.tex.first_layer == iview->u.tex.last_layer));
} }
glUniform1i(ctx->sub->prog->img_locs[shader_type][i], i); glUniform1i(ctx->sub->prog->img_locs[shader_type][i], i);
GLboolean layered = !((iview->texture->base.array_size > 1 ||
iview->texture->base.depth0 > 1) && (iview->u.tex.first_layer == iview->u.tex.last_layer));
switch (iview->access) { switch (iview->access) {
case PIPE_IMAGE_ACCESS_READ: case PIPE_IMAGE_ACCESS_READ:
@ -3659,12 +3664,7 @@ static void vrend_draw_bind_images_shader(struct vrend_context *ctx, int shader_
return; return;
} }
glBindImageTexture(i, tex_id, glBindImageTexture(i, tex_id, level, layered, first_layer, access, iview->format);
iview->u.tex.level,
layered,
iview->u.tex.first_layer,
access,
iview->format);
} }
} }

Loading…
Cancel
Save