Commit 300b9145 authored by Gert Wollny's avatar Gert Wollny

shader: Create dst with a constant index on GLES and actually use it

Fixes: 368d950e
  shader: emulate indirect ssbo write access on GLES using a switch statement

Thanks Erik for catching this.
Signed-off-by: Gert Wollny's avatarGert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund 's avatarErik Faye-Lund <erik.faye-lund@collabora.com>
parent 2e07b3b9
Pipeline #33204 passed with stages
in 6 minutes and 20 seconds
......@@ -2759,9 +2759,9 @@ translate_store(struct dump_ctx *ctx,
emit_buff(ctx, "switch (addr%d + %d) {\n", inst->Dst[0].Indirect.Index, inst->Dst[0].Register.Index - base);
for (int i = 0; i < array_count; ++i) {
snprintf(dst, 128, "%simg%d[addr%d + %d]", cname, basearrayidx, inst->Dst[0].Indirect.Index, inst->Dst[0].Register.Index - basearrayidx);
emit_buff(ctx, "case %d:\n", i);
emit_store_mem(ctx, dsts[0], inst->Dst[0].Register.WriteMask, srcs, conversion);
snprintf(dst, 128, "%simg%d[%d]", cname, basearrayidx, i);
emit_store_mem(ctx, dst, inst->Dst[0].Register.WriteMask, srcs, conversion);
emit_buff(ctx, "break;\n");
}
emit_buf(ctx, "}\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment