Conor McCarthy
05d516bb00
vkd3d-shader/dxil: Emit an error on allocation failure in dxil_record_to_string().
2023-10-11 22:21:22 +02:00
Conor McCarthy
52dc6f252c
vkd3d-shader/dxil: Read global constants in sm6_parser_globals_init().
...
These are needed for reading metadata.
2023-10-11 22:21:20 +02:00
Conor McCarthy
df4e1b7393
vkd3d-shader/dxil: Read immediate constant arrays.
2023-10-11 22:21:19 +02:00
Conor McCarthy
57280673e5
tests/shader-runner: Test shaders with dxcompiler.
...
The location of dxcompiler should be set during configuration with
'DXCOMPILER_LIBS=-L/path/to/dxcompiler', and then at runtime with
LD_LIBRARY_PATH, WINEPATH or PATH as applicable.
A new 'fail(sm<6)' decoration is needed on many shader declarations
because dxcompiler succeeds on many shaders which fail with fxc. The
opposite case is less common and is flagged with 'fail(sm>=6)'. A few
tests cause dxcompiler to crash or hang, so these are avoided using
[require], which now skips tests until reset instead of exiting. Also,
'todo(sm<6)' and 'todo(sm>=6)' are used to separate checking of results.
2023-10-11 22:21:14 +02:00
Conor McCarthy
d211160b89
tests/shader-runner: Replace immediate shader type strings with an enum.
2023-10-11 22:21:14 +02:00
Conor McCarthy
0ef0735999
tests/shader-runner: Do not exit if a 'require' directive is not met.
...
Tests are skipped until the next 'require' directive, which restores
the defaults before the new requirements are read.
2023-10-11 22:21:14 +02:00
Conor McCarthy
192f4dcb2b
tests/shader-runner: Handle individual keywords in shader directives.
...
Matching all possible combinations of keywords becomes too complex
if more keywords are added.
2023-10-11 22:21:14 +02:00
Nikolay Sivov
9c6c7cb78f
vkd3d: Add partial implementation for CreateCommittedResource1().
2023-10-10 22:11:46 +02:00
Zebediah Figura
72e8b6e0dc
include: Fix some confusingly structured documentation.
...
Fixes: 7a4ae434df
.
2023-10-10 22:11:37 +02:00
Zebediah Figura
6a942581db
vkd3d-shader/ir: Translate TEX instructions to SAMPLE.
2023-10-09 21:58:40 +02:00
Zebediah Figura
bd9eae6c22
vkd3d-shader: Scan combined sampler declarations.
...
This does not handle 1.x samplers yet.
2023-10-09 21:58:38 +02:00
Zebediah Figura
7a4ae434df
include: Define an API for mapping sm1 samplers to the target environment.
2023-10-09 21:58:38 +02:00
Zebediah Figura
2bcd6ea893
vkd3d-shader: Introduce a separate register type for combined samplers.
2023-10-09 21:58:38 +02:00
Nikolay Sivov
3af629cf8c
vkd3d-shader/tpf: Output interpolation modifiers for input declarations.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:31 +02:00
Nikolay Sivov
8479ceedfc
vkd3d-shader/hlsl: Propagate structure fields modifiers when copying shader inputs.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:29 +02:00
Nikolay Sivov
1930b51d97
vkd3d-shader/hlsl: Allow interpolation modifiers on structure fields.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:27 +02:00
Nikolay Sivov
de860c3cbf
vkd3d-shader/hlsl: Parse 'centroid' and 'noperspective' modifiers.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:24 +02:00
Nikolay Sivov
4b8a4809d1
tests: Add a test for interpolation modifiers specified on structure fields.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:24 +02:00
Nikolay Sivov
c5414fa92f
vkd3d-shader/tpf: Write 'continue' instruction.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:17 +02:00
Nikolay Sivov
e4b423d6b5
vkd3d-shader/hlsl: Handle 'continue' statements.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:14 +02:00
Nikolay Sivov
0e5749e78e
vkd3d-shader/hlsl: Allow 'break' instructions in loops.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:12 +02:00
Nikolay Sivov
89f493b900
tests: Add some tests for 'break'/'continue' in loops.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:12 +02:00
Nikolay Sivov
6ba75fd92f
vkd3d: Add partial implementation for CreateHeap1().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:07 +02:00
Conor McCarthy
75c2af3640
vkd3d-shader/spirv: When declaring a CBV initialise the register with the register index range.
...
The declaration instruction register contains id, range first, and range
last. The backend includes range first in the variable name. After commit
e8b3561252
it was always zero, and since commit 67f0196c33
it is
UINT_MAX, so constant buffers are named, e.g., "%cb0_4294967295".
2023-10-09 21:58:01 +02:00
Zebediah Figura
a4c5f3a798
vkd3d-shader/spirv: Add a debug name for the push constant buffer.
2023-10-09 21:57:53 +02:00
Henri Verbeet
98d158d004
vkd3d-shader/tpf: Get rid of the output map.
...
Map output registers in the backend instead, as needed.
2023-10-09 21:57:46 +02:00
Henri Verbeet
31ce7c3a38
vkd3d-shader/hlsl: Get rid of the vkd3d_sm4_* forward declarations in hlsl.h.
...
These are no longer needed outside of tpf.c.
2023-10-09 21:57:38 +02:00
Francisco Casas
014960b64b
vkd3d-shader/tpf: Use lookup table for opcode_info_from_sm4().
...
Makes get_opcode_info() and thus, tpf reading a little faster.
2023-10-05 16:16:27 +02:00
Francisco Casas
88b644a11d
vkd3d-shader/tpf: Don't store sm4 instruction extra bits in the opcode.
...
Adding extra bits to instr->opcode doesn't seem correct, given that it
is an enum.
For instance, get_opcode_info() would return NULL if additional bits are
added to instr->opcode. This is not a problem now because that function
is called when reading and not writing.
2023-10-05 16:16:24 +02:00
Francisco Casas
0a5fa80f02
vkd3d-shader/tpf: Apply mask to swizzle when swizzle type is scalar.
...
In native's output, for scalar swizzles only the first component of the
swizzle is written, the others are left as zero.
2023-10-05 16:16:21 +02:00
Francisco Casas
f06169afc5
vkd3d-shader/tpf: Don't calculate instruction size in advance.
...
Co-authored-by: Henri Verbeet <hverbeet@codeweavers.com>
2023-10-05 16:16:19 +02:00
Nikolay Sivov
7c378cc6f9
vkd3d-shader/hlsl: Remove conditional branching when condition is a compile time constant.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:16:09 +02:00
Nikolay Sivov
f3389789b2
vkd3d-shader: Add constant folding for 'rsq'.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:16:03 +02:00
Nikolay Sivov
a58c659b10
vkd3d-shader/hlsl: Add constant folding for binary complement operator.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:56 +02:00
Nikolay Sivov
8ebccad3c9
vkd3d-shader/hlsl: Add constant folding for rshift.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:54 +02:00
Nikolay Sivov
6e74819eb7
vkd3d-shader/hlsl: Add constant folding for lshift.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:52 +02:00
Nikolay Sivov
8c9d65d6b3
vkd3d-shader/hlsl: Add constant folding for logical 'not', for bools.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:50 +02:00
Francisco Casas
4ab6572be7
vkd3d-shader/hlsl: Replace hlsl_type_get_regset() uses with hlsl_deref_get_regset().
2023-10-05 16:15:37 +02:00
Francisco Casas
a214b7374b
vkd3d-shader/hlsl: Avoid hlsl_type_get_regset() in allocate_register_reservations().
2023-10-05 16:15:34 +02:00
Francisco Casas
e64e08b2b7
tests: Test register reservations on structs for SM5.
2023-10-05 16:15:30 +02:00
Francisco Casas
cd0e3786c3
vkd3d-shader/hlsl: Avoid hlsl_type_get_regset() in sm4_get_extern_resources().
2023-10-05 16:15:28 +02:00
Francisco Casas
dfce1e7f4a
vkd3d-shader/hlsl: Make regset an output argument in hlsl_type_get_component_offset().
...
Components only span across a single regset, so instead of expecting the
regset as input for the offset, hlsl_type_get_component_offset() can
actually retrieve it.
2023-10-05 16:15:26 +02:00
Nikolay Sivov
b5c0c9c22f
vkd3d-shader/hlsl: Add fwidth() function.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:10 +02:00
Andrey Gusev
8087cc01f7
vkd3d: Add ID3D12GraphicsCommandList5 interface stub.
2023-10-05 16:15:02 +02:00
Alistair Leslie-Hughes
71715cc434
vkd3d-shader: Fix compiler warning.
...
vkd3d-shader/tpf.c:3810:39: warning: passing argument 2 of ‘sm4_register_from_node’ from incompatible pointer type [-Wincompatible-pointer-types]
vkd3d-shader/tpf.c:4750:59: warning: passing argument 3 of ‘sm4_register_from_deref’ from incompatible pointer type [-Wincompatible-pointer-types]
Change to use uint32_t as requested.
2023-10-05 16:14:44 +02:00
Francisco Casas
c92772657f
vkd3d-shader/tpf: Replace sm4_src_register with vkd3d_shader_src_param.
2023-10-03 21:27:48 +02:00
Francisco Casas
13f62e60e1
vkd3d-shader/tpf: Remove sm4_src_register.swizzle_type.
2023-10-03 21:27:47 +02:00
Francisco Casas
32f03468fc
vkd3d-shader/tpf: Make sm4_src_register.mod a vkd3d_shader_src_modifier enum.
2023-10-03 21:27:45 +02:00
Andrey Gusev
679203f717
vkd3d: Add ID3D12GraphicsCommandList4 interface stub.
2023-10-03 21:27:34 +02:00
Giovanni Mascellani
d10e94d8d5
ci: Update the README with some recent changes.
2023-10-02 22:25:16 +02:00