vrend_shader: Make the emission of uniform atomic_uint more concise

Cleanup and make things a little more concise by handling atomic_uint
arrays separately.

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Rohan Garg 3 years ago committed by Gert Wollny
parent cada1db3d4
commit a758b61afe
  1. 6
      src/vrend_shader.c

@ -6081,10 +6081,10 @@ static int emit_ios_common(const struct dump_ctx *ctx,
}
for (i = 0; i < ctx->num_abo; i++){
emit_hdrf(glsl_strbufs, "layout (binding = %d, offset = %d) uniform atomic_uint ac%d_%d", ctx->abo_idx[i], ctx->abo_offsets[i] * 4, ctx->abo_idx[i], ctx->abo_offsets[i] * 4);
if (ctx->abo_sizes[i] > 1)
emit_hdrf(glsl_strbufs, "layout (binding = %d, offset = %d) uniform atomic_uint ac%d_%d[%d];\n", ctx->abo_idx[i], ctx->abo_offsets[i] * 4, ctx->abo_idx[i], ctx->abo_offsets[i] * 4, ctx->abo_sizes[i]);
else
emit_hdrf(glsl_strbufs, "layout (binding = %d, offset = %d) uniform atomic_uint ac%d_%d;\n", ctx->abo_idx[i], ctx->abo_offsets[i] * 4, ctx->abo_idx[i], ctx->abo_offsets[i] * 4);
emit_hdrf(glsl_strbufs, "[%d]", ctx->abo_sizes[i]);
emit_hdrf(glsl_strbufs, ";\n");
}
if (ctx->info.indirect_files & (1 << TGSI_FILE_BUFFER)) {

Loading…
Cancel
Save