shader: force default format layout

With GLSL ES a format layout is requires, and with GL it doesn't hurt to
add it, so always emit rgba32f when no format is given.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Gert Wollny 6 years ago
parent 18081311fb
commit fcf9740960
  1. 2
      src/vrend_shader.c

@ -5188,7 +5188,7 @@ static void emit_image_decl(struct dump_ctx *ctx,
if (ctx->cfg->use_gles) { /* TODO: enable on OpenGL 4.2 and up also */
emit_hdrf(ctx, "layout(binding=%d%s%s) ",
i, formatstr[0] != '\0' ? ", " : "", formatstr);
i, formatstr[0] != '\0' ? ", " : ", rgba32f", formatstr);
} else if (formatstr[0] != '\0') {
emit_hdrf(ctx, "layout(%s) ", formatstr);
}

Loading…
Cancel
Save