vkd3d-shader/hlsl: Replace register offsets with index paths in resource loads initialization.

At this point, the parse code is free of offsets; it only uses index
paths.

Signed-off-by: Francisco Casas <fcasas@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
This commit is contained in:
Francisco Casas
2022-07-12 16:58:40 -04:00
committed by Alexandre Julliard
parent 5b664c7a5c
commit 349aab2a6a
Notes: Alexandre Julliard 2022-10-18 00:13:00 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/5
4 changed files with 33 additions and 37 deletions

View File

@@ -31,6 +31,9 @@ static void replace_deref_path_with_offset(struct hlsl_ctx *ctx, struct hlsl_der
if (!deref->var)
return;
/* register offsets shouldn't be used before this point is reached. */
assert(!deref->offset.node);
if (!(offset = hlsl_new_offset_instr_from_deref(ctx, &block, deref, &instr->loc)))
return;
list_move_before(&instr->entry, &block.instrs);