Commit 90542135 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

d3dx9: Fix register index for the scalar op case in parse_preshader().

parent 733823c8
...@@ -758,9 +758,12 @@ static HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, u ...@@ -758,9 +758,12 @@ static HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, u
if (pres->ins[i].inputs[j].index_reg.table == PRES_REGTAB_COUNT) if (pres->ins[i].inputs[j].index_reg.table == PRES_REGTAB_COUNT)
{ {
unsigned int last_component_index = pres->ins[i].scalar_op && !j ? 0
: pres->ins[i].component_count - 1;
table = pres->ins[i].inputs[j].reg.table; table = pres->ins[i].inputs[j].reg.table;
reg_idx = get_reg_offset(table, pres->ins[i].inputs[j].reg.offset reg_idx = get_reg_offset(table, pres->ins[i].inputs[j].reg.offset
+ pres->ins[i].component_count - 1); + last_component_index);
} }
else else
{ {
......
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