From 47b89a4a63f1136a674fd6f77089701101ba9204 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 16 Aug 2018 09:06:21 +0200 Subject: [PATCH] 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 Reviewed-by: Erik Faye-Lund (v2) --- src/vrend_shader.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 4639556..ec8df1a 100644 --- a/src/vrend_shader.c +++ b/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) 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 "; if (ctx->cfg->use_gles) { /* TODO: enable on OpenGL 4.2 and up also */