Conor McCarthy
3f98ca53ca
vkd3d: Access the current range via the declared pointer in d3d12_root_signature_init_root_descriptor_tables().
2024-10-17 17:23:04 +02:00
Conor McCarthy
b092fcfc46
tests/d3d12: Test buffer and texture SRVs in test_unbounded_resource_arrays().
...
On virtual heaps, SRV/UAV unbounded ranges are implemented using two
descriptor sets, one for buffers and another for textures, and this case
should be tested.
2024-10-17 17:23:04 +02:00
Giovanni Mascellani
c89e547e3e
ci: Use the macOS image from the master vkd3d repository.
...
The current URL is from my own testing repository and it's not
meant for general use.
2024-10-16 21:40:58 +02:00
Giovanni Mascellani
2b45878ff8
vkd3d-shader/ir: Validate the line density SV_TessFactor signature element for isolines domains.
2024-10-16 21:40:58 +02:00
Giovanni Mascellani
f470eb2a1a
vkd3d-shader/ir: Validate the line detail SV_TessFactor signature element for isolines domains.
2024-10-16 21:40:58 +02:00
Giovanni Mascellani
c5c3151414
vkd3d-shader/ir: Validate SV_InsideTessFactor signature elements for tri domains.
2024-10-16 21:40:58 +02:00
Giovanni Mascellani
4e8b34c075
vkd3d-shader/ir: Validate SV_TessFactor signature elements for tri domains.
2024-10-16 21:40:58 +02:00
Giovanni Mascellani
b2460a6794
vkd3d-shader/ir: Validate SV_InsideTessFactor signature elements for quad domains.
2024-10-16 21:40:58 +02:00
Giovanni Mascellani
a8b9a92c10
vkd3d-shader/ir: Validate SV_TessFactor signature elements for quad domains.
2024-10-16 21:40:58 +02:00
Shaun Ren
1ed5f1a4d0
vkd3d-shader/tpf: Write the patch constant function in hull shaders.
...
We use a single hs_fork_phase here for the patch constant function.
2024-10-16 21:40:40 +02:00
Shaun Ren
f771f081d9
tests: Test signature reflection for hull shaders.
2024-10-16 21:22:02 +02:00
Shaun Ren
ae2d86b99c
vkd3d-shader/tpf: Determine SIV from SV and index in write_sm4_dcl_semantic().
2024-10-16 21:12:29 +02:00
Shaun Ren
df3aaac7cf
vkd3d-shader/tpf: Introduce tpf_write_shader_function().
2024-10-16 21:12:13 +02:00
Shaun Ren
147f8898ca
vkd3d-shader/hlsl: Process the patch constant function in hlsl_emit_bytecode().
...
Also, support patch constant function semantics in sm4_sysval_semantic_from_semantic_name().
2024-10-16 21:10:24 +02:00
Shaun Ren
aee00ea55a
tests: Test hull shader uniform input parameters.
2024-10-16 21:07:53 +02:00
Shaun Ren
cbed70c60f
vkd3d-shader/tpf: Implement semantics for hull shaders.
2024-10-16 21:07:53 +02:00
Shaun Ren
beb342ed5f
vkd3d-shader/tpf: Write hull shader declarations.
2024-10-16 21:07:53 +02:00
Henri Verbeet
47fcbc335b
vkd3d-shader/d3dbc: Avoid D3DXSHADER_CONSTANTTABLE.
2024-10-16 21:07:53 +02:00
Shaun Ren
069b8aac64
vkd3d-shader/hlsl: Implement struct single inheritance.
...
Here, we implement single inheritance by inserting a field at the
beginning of the derived struct with name "$super".
For the following struct declarations
struct a
{
float4 aa;
float4 bb;
};
struct b : a
{
float4 cc;
};
struct c : b
{
float4 bb;
};
this commit generates the following:
struct a
{
float4 aa;
float4 bb;
};
struct b
{
struct a $super;
float4 cc;
};
struct c
{
struct b $super;
float4 bb;
};
2024-10-16 21:07:53 +02:00
Shaun Ren
013e354b46
tests: Test struct single inheritance.
2024-10-16 21:07:53 +02:00
Francisco Casas
7eee877dd4
vkd3d-shader/tpf: Make hlsl_sm4_register_from_semantic() independent of HLSL IR.
2024-10-16 21:07:51 +02:00
Francisco Casas
a243862b8c
vkd3d-shader/tpf: Make sysval_semantic_from_hlsl() independent of HLSL IR.
2024-10-16 21:05:10 +02:00
Francisco Casas
7cc8151b81
vkd3d-shader/tpf: Replace uses of ctx->profile with tpf->program->shader_version.
2024-10-16 18:50:15 +02:00
Francisco Casas
c75fbaf94e
vkd3d-shader/tpf: Use the I/O signatures from the vsir program in tpf_write_signature().
2024-10-16 17:40:26 +02:00
Francisco Casas
10442369d8
vkd3d-shader/tpf: Pass a tpf_compiler structure to tpf_compile() callees.
2024-10-16 17:26:47 +02:00
Francisco Casas
16d9a10dd5
vkd3d-shader/tpf: Rename "tpf_writer" to "tpf_compiler".
...
Analog to d3dbc_compiler.
2024-10-16 17:09:15 +02:00
Francisco Casas
5b21cc67f1
vkd3d-shader/hlsl: Split hlsl_sm4_write().
...
Similarly to the already done split from
HLSL IR -> d3dbc
to
HLSL IR -> vsir -> d3bc
we now start splitting the
HLSL IR -> tpf
translation into
HLSL IR -> vsir -> tpf
So hlsl_sm4_write is split into two functions, sm4_generate_vsir() and
tpf_compile().
This translation should be completed once tpf_compile() no longer needs
the hlsl_ctx and entry_func parameters.
2024-10-16 17:08:50 +02:00
Francisco Casas
3601397703
vkd3d-shader/d3dbc: Remove the "hlsl_" prefix from external functions.
...
They no longer rely on HLSL IR.
Also, rename them from "_from_semantic" to "from_semantic_name".
2024-10-16 16:52:45 +02:00
Francisco Casas
0ab5e1cb03
tests: Test interstage signature with arrays.
2024-10-16 16:49:55 +02:00
Francisco Casas
d3c464212d
tests: Test interstage signature optimizations.
2024-10-16 16:47:41 +02:00
Giovanni Mascellani
bc351f4b70
tests/shader-runner: Make geometry shaders optional.
...
This allows the Vulkan runner to execute in environments which do
not support geometry shaders, most notably MoltenVK. In particular,
that enables SM<4 shaders to run in such environments
2024-10-15 16:55:15 +02:00
Giovanni Mascellani
7f834f57e5
vkd3d-shader/ir: Validate that signatures are sensible for shader type.
2024-10-15 16:47:04 +02:00
Giovanni Mascellani
859b911b3a
vkd3d-shader/ir: Validate the output control point count.
2024-10-15 16:47:04 +02:00
Giovanni Mascellani
bd3ba87747
vkd3d-shader/ir: Validate the input control point count.
2024-10-15 16:47:04 +02:00
Henri Verbeet
90616be301
vkd3d-shader/dxil: Shift register write masks by the component index in sm6_parser_emit_dx_store_output().
...
To account for the change we made in commit
c571a45e65
on the SPIR-V side.
2024-10-15 16:45:28 +02:00
Henri Verbeet
2d848cf001
tests: Add a basic shader model 6 interface packing test as well.
2024-10-15 16:45:28 +02:00
Francisco Casas
104435df5f
vkd3d-shader/tpf: Use dcl_input_ps_sgv for sv_isfrontface.
...
As the native compiler does.
2024-10-15 16:44:38 +02:00
Francisco Casas
ad2f821ff5
vkd3d-shader/tpf: Write sysval semantic consistently.
...
Specifically we should write the sysval semantic as an instruction idx
for the following instructions:
VKD3D_SM4_OP_DCL_INPUT_SGV
VKD3D_SM4_OP_DCL_INPUT_PS_SGV
VKD3D_SM4_OP_DCL_INPUT_SIV
VKD3D_SM4_OP_DCL_INPUT_PS_SIV
VKD3D_SM4_OP_DCL_OUTPUT_SIV
and not the following ones:
VKD3D_SM4_OP_DCL_INPUT
VKD3D_SM4_OP_DCL_PS_INPUT
VKD3D_SM4_OP_DCL_OUTPUT
Which is consistent with what we do when reading these instructions in
the following functions:
shader_sm4_read_declaration_register_semantic()
shader_sm4_read_dcl_input_ps_siv()
and
shader_sm4_read_dcl_input_ps()
shader_sm4_read_declaration_dst()
for the non-SGV and non-SIV cases.
Note that the non-SGV and non-SIV instructions don't need/use this
extra information because they rely on the dst register type and index.
I suggest to introduce this change because the here replaced check is
brittle, and we might be omitting the sysval semantic in some cases.
2024-10-15 16:44:38 +02:00
Nikolay Sivov
5fb3a91276
vkd3d-shader/hlsl: Implement the modf() intrinsic.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-15 16:43:33 +02:00
Shaun Ren
cb55ba5b9b
vkd3d-shader/hlsl: Invoke prepend_uniform_copy() only once for global uniforms.
...
We store the copy instructions in a separate block that is cloned for
each function processed.
2024-10-15 16:42:47 +02:00
Shaun Ren
0c5dc53fd2
vkd3d-shader/hlsl: Allocate temporary registers separately for each entry function.
2024-10-15 16:39:50 +02:00
Shaun Ren
5f8570b933
vkd3d-shader/hlsl: Track whether a variable is read in any entry function.
2024-10-15 16:18:36 +02:00
Shaun Ren
f15a1c0b23
vkd3d-shader/hlsl: Record semantic extern vars separately for each entry function.
...
This is required in order to process the entry point function and the
patch constant function in hull shaders.
2024-10-15 16:18:27 +02:00
Shaun Ren
bbc6b56ab0
vkd3d-shader/hlsl: Clone static_initializers for each entry function.
2024-10-15 16:13:31 +02:00
Shaun Ren
5571522efe
vkd3d-shader/hlsl: Introduce process_entry_function() helper.
...
This will be used in order to process both the entry point function
and the patch constant function in hull shaders.
2024-10-15 16:10:56 +02:00
Henri Verbeet
9dd42d15dd
build: Actually run interface-packing.shader_test and tessellation-patch-vars.shader_test.
2024-10-14 19:40:13 +02:00
Giovanni Mascellani
5dfaa26990
vkd3d-shader/ir: Validate the allowed data type and component count for SV_CullDistance.
2024-10-14 19:39:12 +02:00
Giovanni Mascellani
cd5718f59d
vkd3d-shader/ir: Validate the allowed signatures and stages for SV_CullDistance.
2024-10-14 19:39:12 +02:00
Giovanni Mascellani
33972998a9
vkd3d-shader/ir: Validate the allowed data type and component count for SV_ClipDistance.
2024-10-14 19:39:12 +02:00
Giovanni Mascellani
0465549c9d
vkd3d-shader/ir: Validate the allowed signatures and stages for SV_ClipDistance.
2024-10-14 19:39:12 +02:00