[PATCH 6/7] wined3d: Update UAV read bitmask for ld_raw and ld_structured instructions.
Józef Kucia
jkucia at codeweavers.com
Fri Feb 24 05:27:40 CST 2017
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/wined3d/shader.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 14cb243..fa61674 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -1331,11 +1331,15 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
|| (WINED3DSIH_IMM_ATOMIC_AND <= ins.handler_idx
&& ins.handler_idx <= WINED3DSIH_IMM_ATOMIC_XOR
&& ins.handler_idx != WINED3DSIH_IMM_ATOMIC_CONSUME)
- || ins.handler_idx == WINED3DSIH_LD_UAV_TYPED)
+ || ins.handler_idx == WINED3DSIH_LD_UAV_TYPED
+ || (ins.handler_idx == WINED3DSIH_LD_RAW && ins.src[1].reg.type == WINED3DSPR_UAV)
+ || (ins.handler_idx == WINED3DSIH_LD_STRUCTURED && ins.src[2].reg.type == WINED3DSPR_UAV))
{
unsigned int reg_idx;
- if (ins.handler_idx == WINED3DSIH_LD_UAV_TYPED)
+ if (ins.handler_idx == WINED3DSIH_LD_UAV_TYPED || ins.handler_idx == WINED3DSIH_LD_RAW)
reg_idx = ins.src[1].reg.idx[0].offset;
+ else if (ins.handler_idx == WINED3DSIH_LD_STRUCTURED)
+ reg_idx = ins.src[2].reg.idx[0].offset;
else if (WINED3DSIH_ATOMIC_AND <= ins.handler_idx && ins.handler_idx <= WINED3DSIH_ATOMIC_XOR)
reg_idx = ins.dst[0].reg.idx[0].offset;
else
--
2.10.2
More information about the wine-patches
mailing list