shader: TXQ: also emit a write mask if only one bit is set.

v2: remove biotcount check since it is always >0 (Dave)

Closes: #58
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Gert Wollny 6 years ago committed by Dave Airlie
parent e07534645b
commit 70dedae465
  1. 2
      src/vrend_shader.c

@ -1896,7 +1896,7 @@ static int emit_txq(struct dump_ctx *ctx,
} }
if (inst->Dst[0].Register.WriteMask & 0x7) { if (inst->Dst[0].Register.WriteMask & 0x7) {
snprintf(buf, 255, "%s%s = %s(textureSize(%s%s))%s;\n", dsts[0], get_wm_string(twm), get_string(dtypeprefix), srcs[sampler_index], bias, util_bitcount(inst->Dst[0].Register.WriteMask) > 1 ? writemask : ""); snprintf(buf, 255, "%s%s = %s(textureSize(%s%s))%s;\n", dsts[0], get_wm_string(twm), get_string(dtypeprefix), srcs[sampler_index], bias, writemask);
EMIT_BUF_WITH_RET(ctx, buf); EMIT_BUF_WITH_RET(ctx, buf);
} }
return 0; return 0;

Loading…
Cancel
Save