mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/dxil: Do not encode the offset twice for structured TGSM loads.
Currently structured TGSM loads are encoded to something like this:
ld_structured sr12 <s:float>, sr1 <s:uint>, l(0) <s:uint>, g0[sr1 <s:uint> + 0] <s:float>
Notice how the TGSM offset, expressed by sr1, is encoded twice in
the instruction. In TPF there is no expectation of two indices
in the resource source, so let's avoid producing it for DXIL as
well. The same instruction will therefore become:
ld_structured sr12 <s:float>, sr1 <s:uint>, l(0) <s:uint>, g0 <s:float>
This commit is contained in:
committed by
Henri Verbeet
parent
9fdaee1529
commit
4289ec60a1
Notes:
Henri Verbeet
2025-05-05 15:28:43 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1481
@@ -7348,6 +7348,8 @@ static void sm6_parser_emit_load(struct sm6_parser *sm6, const struct dxil_recor
|
||||
src_param_make_constant_uint(&src_params[1], 0);
|
||||
src_param_init_from_value(&src_params[2], ptr);
|
||||
src_params[2].reg.alignment = alignment;
|
||||
/* The offset is already in src_params[0]. */
|
||||
src_params[2].reg.idx_count = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user