diff options
author | Dave Airlie <[email protected]> | 2017-12-05 08:38:26 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-12-05 20:07:08 +0000 |
commit | a256506b762620d0fe7fde81ebd3756c5e14d9ec (patch) | |
tree | 976fc89827c5c9af32852e5e378996e5ff0ecc79 /src/gallium/drivers/r600 | |
parent | 989697eccce9c8f4b5403b2218c9614e34b86baf (diff) |
r600/ssbo: fix multi-dword buffer loads.
This fixes loading from different channels.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 93b86eae263..02e8354baa2 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -8005,17 +8005,19 @@ static int tgsi_load_buffer(struct r600_shader_ctx *ctx) vtx.format_comp_all = 1; vtx.srf_mode_all = 0; - if (inst->Dst[0].Register.WriteMask == 0xf) { + if (inst->Dst[0].Register.WriteMask & 8) { vtx.data_format = FMT_32_32_32_32; vtx.use_const_fields = 0; - } else if (inst->Dst[0].Register.WriteMask == 0x7) { + } else if (inst->Dst[0].Register.WriteMask & 4) { vtx.data_format = FMT_32_32_32; vtx.use_const_fields = 0; - } else if (inst->Dst[0].Register.WriteMask == 0x3) { + } else if (inst->Dst[0].Register.WriteMask & 2) { vtx.data_format = FMT_32_32; vtx.use_const_fields = 0; - } else - vtx.use_const_fields = 1; + } else { + vtx.data_format = FMT_32; + vtx.use_const_fields = 0; + } r = r600_bytecode_add_vtx_tc(ctx->bc, &vtx); if (r) |