Conor McCarthy
bad4c74002
vkd3d-shader: Match only UAV descriptors in vkd3d_shader_scan_add_uav_flag().
...
Fixes compilation failures in Cyberpunk 2077 due to missing UAV counter
flag.
2023-09-04 20:25:31 +02:00
Giovanni Mascellani
367cf10cdc
ci: Briefly document the CI setup.
2023-08-31 22:07:21 +02:00
Giovanni Mascellani
229a34b93c
ci: Execute the tests.
2023-08-31 22:07:21 +02:00
Giovanni Mascellani
52d52ad1b9
ci: Execute CI also an a runner with an AMD GPU.
...
In order for this to work it is expected that the Docker host exposes
the devices in /dev/dri to the guest system, and that the render nodes
have GID 800 (usually that would be the "render" group, but the GID
for that group is dynamically assigned, so we explicitly agree on a
fixed number).
2023-08-31 22:07:16 +02:00
Zebediah Figura
a597dc8755
vkd3d-shader/hlsl: Define lit() in HLSL.
2023-08-30 22:49:03 +02:00
Zebediah Figura
9ab77658f2
vkd3d-shader/hlsl: Define smoothstep() in HLSL.
2023-08-30 22:49:01 +02:00
Zebediah Figura
d396c4ce27
vkd3d-shader/hlsl: Store the internal name counter in struct hlsl_ctx.
...
This is minutely more efficient than using a global variable and atomic instructions.
2023-08-30 22:48:59 +02:00
Zebediah Figura
f22e52f358
vkd3d-shader/hlsl: Separate an add_user_call() helper.
2023-08-30 22:48:57 +02:00
Zebediah Figura
63e056512d
vkd3d-shader/hlsl: Introduce an hlsl_sprintf_alloc() helper.
2023-08-30 22:48:55 +02:00
Conor McCarthy
d27b8eb2c0
vkd3d-shader/dxil: Implement DX instruction StoreOutput.
2023-08-30 22:48:52 +02:00
Conor McCarthy
bf49a1a95b
vkd3d-shader/dxil: Declare shader outputs.
2023-08-30 22:48:50 +02:00
Conor McCarthy
e54f770669
vkd3d-shader/dxil: Implement the DXIL CALL instruction.
2023-08-30 22:48:48 +02:00
Conor McCarthy
720a087c28
vkd3d-shader/dxil: Replace the result type enum with a bool.
...
Changes to failure handling make the enum unnecessary.
2023-08-30 22:48:47 +02:00
Conor McCarthy
58d6e44501
vkd3d-shader/dxil: Validate the function block count.
2023-08-30 22:48:45 +02:00
Conor McCarthy
61a550017f
vkd3d-shader/spirv: Handle signature element mask left shift in spirv_compiler_emit_output().
...
Element masks can have a left shift in DXIL, but these must start at
bit 0 in the register info. The SPIR-V declaration will either be a
builtin or have SpvDecorationComponent.
2023-08-30 22:48:43 +02:00
Conor McCarthy
ebc461f795
vkd3d-shader/spirv: Handle signature element mask left shift in calculate_clip_or_cull_distance_mask().
...
In DXIL these masks can have a left shift.
2023-08-30 22:48:41 +02:00
Giovanni Mascellani
4a3ad750e0
ci: Introduce a CI pipeline for GitLab.
2023-08-29 22:07:56 +02:00
Nikolay Sivov
c39c5b3907
vkd3d-shader/hlsl: Add texCUBE() function.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-29 22:07:56 +02:00
Nikolay Sivov
269747dbf3
tests: Enable compiler backwards compatibility mode only for shaders that require it.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-28 20:40:06 +02:00
Zebediah Figura
9624e2f904
vkd3d-shader/spirv: Declare SRVs and UAVs from the descriptor info.
2023-08-28 20:40:02 +02:00
Zebediah Figura
e8b3561252
vkd3d-shader/spirv: Declare constant buffers from the descriptor info.
2023-08-28 20:40:01 +02:00
Zebediah Figura
547768bcdd
vkd3d-shader/spirv: Declare samplers from the descriptor info.
2023-08-28 20:39:59 +02:00
Zebediah Figura
a1e10e5c90
vkd3d-shader/spirv: Split spirv_compiler_has_combined_sampler() into two functions.
...
These functions do not really share any code in common.
2023-08-28 20:39:57 +02:00
Nikolay Sivov
18c1477464
vkd3d-shader/hlsl: Ignore 'inline' modifier for functions.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-28 20:39:53 +02:00
Nikolay Sivov
30be83f911
tests: Add some 'inline' function modifier tests.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-28 20:39:53 +02:00
Conor McCarthy
61841e9423
vkd3d-shader/tpf: Handle the swizzle type bitfield in dst param tokens.
2023-08-28 20:39:49 +02:00
Conor McCarthy
eddae47062
vkd3d-shader/tpf: Handle the dimension bitfield in dst param tokens.
...
A zero mask is still emitted for some scalar registers. This has no
effect on current tests, but keeping the correction is probably a good
idea.
2023-08-28 20:39:48 +02:00
Conor McCarthy
92021b7a3c
vkd3d-shader/tpf: Use the default vec4 swizzle if a src param contains a mask.
2023-08-28 20:39:46 +02:00
Conor McCarthy
7e5d9e3b6f
vkd3d-shader/tpf: Handle the dimension bitfield in src param tokens.
2023-08-28 20:39:45 +02:00
Conor McCarthy
5c706152fa
vkd3d-shader/tpf: Validate the src register of case conditions.
...
Case values are constants in TPF.
2023-08-28 20:39:43 +02:00
Conor McCarthy
5c09752194
vkd3d: Do not flush descriptor heaps stored in the command list when the array size is exceeded.
...
An earlier patch introduced a bug which overflows the descriptor heap
array. The array should not be emptied here in case the list is
resubmitted, so just flush the new heap.
2023-08-24 21:44:03 +02:00
Evan Tang
f374934281
tests: Test CopyResource depth to color.
2023-08-24 21:43:59 +02:00
Francisco Casas
ed9e236b01
vkd3d-shader/tpf: Avoid reading constant value components beyond type's width (Valgrind).
...
We are passing map writemasks that may have more components than the
constant's data type, so a (j < width) check is added to avoid reading
components from the constant that are not intended to be used.
Remaining values in the register are initialized to zero.
2023-08-24 21:43:55 +02:00
Nikolay Sivov
89eda51855
vkd3d-shader/hlsl: Change warning code for unknown loop attributes.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-24 21:43:50 +02:00
Nikolay Sivov
1153f6bb34
vkd3d-shader/hlsl: Parse "if" statement attributes.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-24 21:43:49 +02:00
Nikolay Sivov
9605993af3
tests: Add some tests for "if" statement attributes.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-24 21:43:49 +02:00
Zebediah Figura
926575a6f3
vkd3d-shader/hlsl: Force sm1 inputs to be 4-component only for vertex shaders.
...
Pixel shaders still have an appropriate writemask.
2023-08-24 21:43:44 +02:00
Giovanni Mascellani
39e62ed2be
configure: Require widl >= 3.21.
...
Commit b7402ddbbecdfaa81daa657fbb5d37661f401434 from wine is required,
which was first released with 3.21, not 3.20.
2023-08-24 21:43:34 +02:00
Zebediah Figura
622311da8e
vkd3d-shader: Add a flag marking raw buffers to struct vkd3d_shader_descriptor_info.
2023-08-23 22:45:04 +02:00
Zebediah Figura
c1ebba9515
vkd3d-shader: Add structure stride to struct vkd3d_shader_descriptor_info1.
2023-08-23 22:45:04 +02:00
Zebediah Figura
88f85ffb50
vkd3d-shader: Add constant buffer size to struct vkd3d_shader_descriptor_info1.
2023-08-23 22:45:04 +02:00
Zebediah Figura
8c465c81cf
vkd3d-shader: Add sample count to struct vkd3d_shader_descriptor_info1.
2023-08-23 22:45:04 +02:00
Zebediah Figura
ccedb7f711
vkd3d-shader: Set descriptor flags in the caller to vkd3d_shader_scan_add_descriptor().
...
Return the vkd3d_shader_descriptor_info1 from that function.
2023-08-23 22:45:02 +02:00
Conor McCarthy
f3baf55d97
vkd3d: Implement ID3D12Device1 with stubs.
2023-08-23 22:44:58 +02:00
Giovanni Mascellani
8f8c89fb87
vkd3d: Update a warning so that it aligns with the check that triggers it.
2023-08-23 22:44:52 +02:00
Conor McCarthy
3ca2259807
vkd3d: Fix invalid atomic behaviour in the view cache linked list.
...
The list suffers from the ABA problem, where comparison with the head
succeeds but the head's `next` pointer has changed. Occurs in Cyberpunk
2077, on NVIDIA at least.
2023-08-23 22:44:45 +02:00
Nikolay Sivov
4f2e07a45d
vkd3d-shader/hlsl: Allow 'const' modifier without initializer in the global scope.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-15 21:51:50 +02:00
Nikolay Sivov
7fd10bb6bc
tests: Add some tests for a 'const' modifier.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-15 21:51:50 +02:00
Zebediah Figura
240b9424fb
vkd3d-shader/hlsl: Pass an hlsl_block pointer to append_output_copy().
2023-08-15 21:51:47 +02:00
Zebediah Figura
a04e3a51dd
vkd3d-shader/hlsl: Pass an hlsl_block pointer to prepend_input_copy().
2023-08-15 21:51:39 +02:00