[PATCH vkd3d 11/12] vkd3d-shader/hlsl: Replace register offsets with index paths in input/output copies.
Francisco Casas
fcasas at codeweavers.com
Thu Jul 14 19:02:37 CDT 2022
On 14-07-22 08:01, Giovanni Mascellani wrote:
>> + if (type->type == HLSL_CLASS_MATRIX)
>> + {
>> + if (!(c = hlsl_new_uint_constant(ctx, i, &var->loc)))
>> + return;
>> + list_add_after(&load->node.entry, &c->node.entry);
>> - if (!(store = hlsl_new_store(ctx, var, &offset->node,
>> &load->node, 0, var->loc)))
>> - return;
>> - list_add_after(&offset->node.entry, &store->node.entry);
>> + if (!(store = hlsl_new_store_index(ctx, &lhs->src,
>> &c->node, &load->node, 0, var->loc)))
>> + return;
>> + list_add_after(&c->node.entry, &store->node.entry);
>> + }
>> + else
>> + {
>> + if (!(store = hlsl_new_store_index(ctx, &lhs->src, NULL,
>> &load->node, 0, var->loc)))
>> + return;
>> + list_add_after(&load->node.entry, &store->node.entry);
>
> This branch (i.e., not a matrix) can only happen when i == 0, right? In
> this case, I'd put an "assert(i == 0);", just to give a little help to
> the reader wandering around here.
>
> Same thing for output variables.
>
Indeed, that's the case.
I agree; I will add the asserts.
>> + }
>> + }
>> }
>
> Thanks, Giovanni.
>
More information about the wine-devel
mailing list