shader: on GLES most image formats always require the specification of

ro/wo

Closes: #16

Fixes:
  dEQP-GLES31.functional.image_load_store.*.format_reinterpret.*
  dEQP-GLES31.functional.image_load_store.*.image_size.writeonly_*
  dEQP-GLES31.functional.image_load_store.*.load_store.*
  dEQP-GLES31.functional.image_load_store.*.qualifiers.restrict
  dEQP-GLES31.functional.image_load_store.*.store.*

v2: remove superfluous check (Erik)
v3: Only emit the writeonly tag for these image formats when on
    gles (Erik)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> (v2)
macos/master
Gert Wollny 6 years ago committed by Dave Airlie
parent 547beeaaec
commit 47b89a4a63
  1. 6
      src/vrend_shader.c

@ -4334,7 +4334,11 @@ static void *emit_image_decl(const struct dump_ctx *ctx, char *glsl_hdr,
if (!image->decl.Writable) if (!image->decl.Writable)
access = "readonly "; access = "readonly ";
else if (!image->decl.Format) else if (!image->decl.Format ||
(ctx->cfg->use_gles &&
(image->decl.Format != PIPE_FORMAT_R32_FLOAT) &&
(image->decl.Format != PIPE_FORMAT_R32_SINT) &&
(image->decl.Format != PIPE_FORMAT_R32_UINT)))
access = "writeonly "; access = "writeonly ";
if (ctx->cfg->use_gles) { /* TODO: enable on OpenGL 4.2 and up also */ if (ctx->cfg->use_gles) { /* TODO: enable on OpenGL 4.2 and up also */

Loading…
Cancel
Save