-
126ff9a4
by Shaun Ren at 2026-03-04T15:52:54+01:00
vkd3d-shader/hlsl: Fix structured copy splitting in split_resource_load().
Previously, hlsl_block_add_resource_load() was used when the load is
determined to be a structured TGSM load. However, hlsl_new_resource_load()
expects that the resource parameter is a load, not a resource load. This
commit uses hlsl_clone_instr() instead.
Moreover, the logic previously used to determine whether the TGSM load is
structured is incorrect when the structured TGSM is a nested array. This is
corrected as well.
-
49288c49
by Shaun Ren at 2026-03-04T15:53:15+01:00
vkd3d-shader/hlsl: Lower stores to resources to resource stores during HLSL codegen.
Rather than generating resource stores directly during parsing, generate
ordinary stores to resources during parsing instead, and lower those stores to
resource stores during HLSL codegen.
Global variables using the "groupshared" modifier are not always TGSM objects.
As this modifier is ignored in non-compute shaders, it is not always possible
to determine whether a groupshared global variable is a TGSM object at parse
time, e.g. when declared in effect shaders. Moving the add_resource_store()
logic to HLSL codegen allows determining whether groupshared variables are
TGSM objects during codegen (in a future commit) before lowering stores to
them to resource stores.
Furthermore, moving this pass to codegen enables using the existing
split_copies() function, thus allowing support for composite-typed stores as
well.
-
a05222d0
by Shaun Ren at 2026-03-04T15:53:15+01:00
vkd3d-shader/hlsl: Support indexed and structured TGSM stores in lower_resource_stores().
-
da1c6b20
by Shaun Ren at 2026-03-04T15:53:15+01:00
vkd3d-shader/hlsl: Generate indexed and structured TGSM stores in VSIR.