Henri Verbeet
96556a8834
vkd3d-shader/hlsl: Add support for RWTexture2DArray.
2023-10-19 23:07:31 +02:00
Henri Verbeet
2c71c18879
vkd3d-shader/hlsl: Add support for RWTexture1DArray.
2023-10-19 23:07:30 +02:00
Nikolay Sivov
e242b46922
vkd3d-shader/tpf: Convert some of the semantic names to system values names when in compatibility mode.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-19 23:03:23 +02:00
Conor McCarthy
a4ed06bc5b
vkd3d-shader/d3d-asm: Recognise the 'rasteriser ordered view' UAV flag.
2023-10-18 20:58:27 +02:00
Henri Verbeet
b63c853688
vkd3d-utils: Implement D3DGetBlobPart().
...
This was largely adapted from Wine's d3dcompiler_43, with some style
adjustments.
2023-10-18 20:58:22 +02:00
Henri Verbeet
4e8ba62481
vkd3d-shader/spirv: Initialise "symbol.descriptor_array" in spirv_compiler_emit_combined_sampler_declarations().
...
Besides simply avoiding carrying around some uninitialised data, we
check "symbol->descriptor_array" in spirv_compiler_prepare_image(), both
for separate resources and for combined resource/sampler symbols.
2023-10-17 22:18:44 +02:00
Conor McCarthy
85c165ff39
vkd3d-shader/dxil: Read DXIL compute shader thread group dimensions.
2023-10-17 22:18:26 +02:00
Conor McCarthy
4b7ca0c294
vkd3d-shader/dxil: Read DXIL global flags.
2023-10-17 22:18:25 +02:00
Conor McCarthy
06f8a88466
vkd3d-shader: Define more global flags.
2023-10-17 22:18:23 +02:00
Conor McCarthy
e0d0a04b79
vkd3d-shader/dxil: Handle multi-row signature elements.
2023-10-16 22:36:38 +02:00
Conor McCarthy
7113064a19
vkd3d-shader/dxil: Handle signature element additional tag/value pairs.
2023-10-16 22:36:36 +02:00
Conor McCarthy
8648ca0e77
vkd3d-shader/dxil: Read the DXIL input and output signatures.
...
These can differ from the DXBC signatures by having multiple rows, and
load/store instructions reference them by id instead of register index.
2023-10-16 22:36:29 +02:00
Conor McCarthy
62badbff7a
vkd3d-shader/dxil: Validate the entry point info.
2023-10-16 22:36:28 +02:00
Francisco Casas
38a7309758
vkd3d-shader/d3dbc: Use D3DSIO_TEXKILL instead of VKD3D_SM1_OP_TEXKILL (clangd).
2023-10-12 23:27:24 +02:00
Francisco Casas
7960836551
vkd3d-shader/hlsl: Remove enum hlsl_error_level (clangd).
...
It is only used once for calling hlsl_note(), and it expects an enum
vkd3d_shader_log_level values instead.
2023-10-12 23:27:22 +02:00
Francisco Casas
432fa8fa8f
vkd3d-shader/tpf: Avoid translations to D3DDECLUSAGE and back (clangd).
2023-10-12 23:27:19 +02:00
Francisco Casas
f0da419a8c
vkd3d-shader: Remove unnecessary fallthroughs (clangd).
2023-10-12 23:27:19 +02:00
Conor McCarthy
6034f4a976
vkd3d-shader/dxil: Read DXIL metadata named nodes.
2023-10-12 18:23:33 +02:00
Conor McCarthy
4ac201788d
vkd3d-shader/dxil: Read DXIL metadata kinds.
2023-10-12 18:23:32 +02:00
Conor McCarthy
cba3e18c45
vkd3d-shader/dxil: Read DXIL metadata values.
2023-10-12 18:23:31 +02:00
Conor McCarthy
5817fabc30
vkd3d-shader/dxil: Read DXIL metadata nodes.
2023-10-12 18:23:30 +02:00
Conor McCarthy
a62343f544
vkd3d-shader/dxil: Read DXIL metadata strings.
2023-10-12 18:23:29 +02:00
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
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
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
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
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