Henri Verbeet
940c67f521
vkd3d: Avoid freeing the input signature twice on error paths in d3d12_pipeline_state_init_graphics().
...
This used to be safe enough before commit
b5ac6ac636 , although that was never guaranteed
by the API.
2025-02-12 19:44:10 +01:00
Elizabeth Figura
fe52e69662
vkd3d-shader/hlsl: Use a block in hlsl_normalize_binary_exprs().
2025-02-05 13:53:53 +01:00
Elizabeth Figura
d7cd33fd88
vkd3d-shader/hlsl: Use a block in prepend_input_var_copy().
2025-02-05 13:53:53 +01:00
Elizabeth Figura
b7d7deb983
vkd3d-shader/hlsl: Pass the block to add_zero_mipmap_level().
2025-02-05 13:18:42 +01:00
Elizabeth Figura
602103dcf0
vkd3d-shader/hlsl: Handle error instructions in add_switch().
2025-02-05 13:18:42 +01:00
Elizabeth Figura
fb290f3847
vkd3d-shader/hlsl: Add an add_switch() helper.
2025-02-05 13:18:42 +01:00
Shaun Ren
ec6b4ed4ff
vkd3d-shader/hlsl: Generate vsir registers from patch variable derefs.
2025-02-03 16:36:16 +01:00
Shaun Ren
2a1e3b100b
vkd3d-shader/hlsl: Allocate semantic registers for patch variables.
2025-02-03 16:15:11 +01:00
Shaun Ren
2ddbc69f1a
vkd3d-shader/hlsl: Declare semantics for patch variables in vsir.
2025-02-03 16:15:03 +01:00
Shaun Ren
f127f0849e
vkd3d-shader/hlsl: Generate vsir signature entries for patch variables.
2025-02-03 16:04:21 +01:00
Shaun Ren
aa29d0a2e5
vkd3d-shader/tpf: Improve readability of compat mapping in sm4_sysval_semantic_from_semantic_name().
2025-02-03 16:04:21 +01:00
Shaun Ren
29abe73918
vkd3d-shader/hlsl: Implement input semantic variable copies for patch variables.
...
The semantic variables from a patch parameter are split as usual, with
the difference being that the semantic variable being added is a patch
variable itself, with the type being the split variable type, and its
number of control points being equal to the original patch variable's
number of control points. It is then stored in the original patch
variable as follows:
for (i = 0; i < n; ++i)
patch[i][f] := <inputpatch-sem-var>[i]
where n is the number of control points of "patch", and f is the field
index in patch corresponding to "<inputpatch-sem-var>".
We use special prefixes, "inputpatch-" or "outputpatch-", when adding
the semantic patch variables, in order to distinguish them from
non-patch semantic variables of the same name.
2025-02-03 16:04:11 +01:00
Shaun Ren
f5d216835a
vkd3d-shader/hlsl: Add an "is_patch_constant_func" field to struct hlsl_ctx.
...
In anticipation of the need for is_patch_constant_func in
sm4_generate_vsir_reg_from_deref(), in order to generate vsir
registers from InputPatch/OutputPatch dereferences.
2025-02-03 16:00:38 +01:00
Elizabeth Figura
f1412e422c
vkd3d-shader/hlsl: Handle error instructions in add_shader_compilation().
2025-01-29 17:58:00 +01:00
Elizabeth Figura
fbd17266cf
vkd3d-shader/hlsl: Do not abort on variable redefinition.
...
There is no harm in defining two variables with the same name.
2025-01-29 17:58:00 +01:00
Elizabeth Figura
e40d4a0e12
vkd3d-shader/hlsl: Factor out the error message into hlsl_add_var().
2025-01-29 17:58:00 +01:00
Elizabeth Figura
2863d86bcc
vkd3d-shader/hlsl: Do not define a separate scope for function parameters.
...
Remove the no longer needed code to detect redefinition in this case.
2025-01-29 17:58:00 +01:00
Shaun Ren
f064a4022a
vkd3d-shader/hlsl: Validate and record InputPatch/OutputPatch types.
2025-01-29 17:45:46 +01:00
Shaun Ren
f4d5e05d96
vkd3d-shader/hlsl: Parse InputPatch and OutputPatch objects.
2025-01-29 17:41:51 +01:00
Shaun Ren
a77dca528a
vkd3d-shader/hlsl: Forbid declaring const variables with no initializer.
2025-01-29 17:36:58 +01:00
Elizabeth Figura
25c6d16b45
vkd3d-shader/hlsl: Use the casted value in exp().
2025-01-28 13:14:50 +01:00
Elizabeth Figura
40c225095f
vkd3d-utils: Fix matrix packing precedence in D3DCompile2VKD3D().
...
D3DCOMPILE_PACK_MATRIX_ROW_MAJOR takes precedence over
D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR.
2025-01-27 15:00:26 +01:00
Conor McCarthy
f63254d905
vkd3d-shader/dxil: Handle SV_RenderTargetArrayIndex.
2025-01-27 14:52:28 +01:00
Elizabeth Figura
d049ea640f
vkd3d-shader/hlsl: Implement broadcasts in constant folding.
...
Normally lower_broadcasts() takes care of this, but loop unrolling executes before other constant passes.
2025-01-27 14:48:03 +01:00
Giovanni Mascellani
d36864500f
vkd3d-common: Write a thread id in the log on macOS too.
2025-01-22 14:54:52 +01:00