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

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Paul Gofman 2017-04-28 00:10:15 +02:00 committed by Alexandre Julliard
parent 733823c890
commit 905421351f
1 changed files with 4 additions and 1 deletions

View File

@ -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)
{
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;
reg_idx = get_reg_offset(table, pres->ins[i].inputs[j].reg.offset
+ pres->ins[i].component_count - 1);
+ last_component_index);
}
else
{