Elizabeth Figura
0df5dea653
vkd3d-shader/d3d-asm: Define register names in a table.
2024-12-18 17:30:16 +01:00
Elizabeth Figura
65f3f56f63
vkd3d-shader/d3dbc: Normalize to a single VKD3DSPR_CONST register set when reading.
...
We don't need VKD3DSPR_CONST2 et al in the IR, even for disassembly.
2024-12-18 17:30:16 +01:00
Elizabeth Figura
118617916a
vkd3d-shader: Explicitly translate between d3dbc and vsir register types.
2024-12-18 17:30:16 +01:00
Elizabeth Figura
efe686105d
vkd3d-shader/spirv: Correctly implement DTOU.
2024-12-18 17:30:16 +01:00
Elizabeth Figura
4130ce5bb9
vkd3d-shader/spirv: Correctly implement DTOI.
2024-12-18 17:30:16 +01:00
Elizabeth Figura
f416713608
vkd3d-shader/spirv: Correctly implement DTOF.
2024-12-18 17:30:16 +01:00
Francisco Casas
825784322d
vkd3d-shader/ir: Properly lower texldp.
2024-12-18 17:30:15 +01:00
Francisco Casas
7cc802afd7
vkd3d-shader/ir: Properly lower texldb.
2024-12-18 17:27:43 +01:00
Francisco Casas
59df26af79
vkd3d-shader/hlsl: Lower sample lods for SM1.
...
For SM1 the lod bias should be in src0.w.
2024-12-18 17:27:43 +01:00
Anna (navi) Figueiredo Gomes
f09ac4959e
vkd3d-shader/hlsl: Implement the GatherCmp() methods.
2024-12-18 17:27:43 +01:00
Conor McCarthy
8d479d2ea6
vkd3d-shader/dxil: Implement DX intrinsic EvalCentroid.
2024-12-18 17:27:43 +01:00
Conor McCarthy
1bb3b13c0a
vkd3d-shader/dxil: Implement DX intrinsic EvalSampleIndex.
2024-12-18 17:27:43 +01:00
Giovanni Mascellani
a68fd1b0de
vkd3d-shader/ir: Simplify shader_register_normalise_arrayed_addressing().
...
The two branches do essentially the same thing, but in different
ways and each one omitting different details. In particular there
is no need to discriminate on whether the register is a relative
address, we can just copy the NULL pointer.
2024-12-17 16:44:00 +01:00
Giovanni Mascellani
3db458697e
vkd3d-shader/ir: Remove a redundant assignment.
...
The hull shader control point normalisation pass already ensures
that output registers in the control point phase have two
indices (the control point index and the register index).
2024-12-17 16:44:00 +01:00
Henri Verbeet
e8cc288426
vkd3d-shader/hlsl: Move CTAB generation to hlsl_codegen.c.
2024-12-17 16:42:53 +01:00
Henri Verbeet
c681673993
vkd3d-shader/d3dbc: Separate writing the comment bytecode from write_sm1_uniforms().
...
Consistent with how D3DXFindShaderComment() allows looking up comments
by tag. This also makes it a little easier to move CTAB generation out
of d3dbc.c.
2024-12-17 16:42:53 +01:00
Giovanni Mascellani
00538c377e
vkd3d-shader/ir: Validate OUTCONTROLPOINT destination parameters.
2024-12-17 16:39:32 +01:00
Giovanni Mascellani
3dc7f322cc
vkd3d-shader/ir: Validate INCONTROLPOINT destination parameters.
2024-12-17 16:39:32 +01:00
Giovanni Mascellani
7d87b4e869
vkd3d-shader/ir: Validate OUTPUT destination parameters.
2024-12-17 16:39:32 +01:00
Giovanni Mascellani
b194e5dc4e
vkd3d-shader/ir: Validate PATCHCONST destination parameters using a uniform helper.
2024-12-17 16:39:32 +01:00
Giovanni Mascellani
38a5c905db
vkd3d-shader/ir: Validate INPUT destination parameters using a uniform helper.
2024-12-17 16:39:32 +01:00
Giovanni Mascellani
8d4b790eb2
vkd3d-shader/ir: Represent information about I/O registers with a table.
...
It makes the code quite longer, but also easier to read and extend
with further properties.
A (desirable) side effect of this commit is that it is checked
whether I/O register types are legal depending on the shader type
and phase, while before that was assumed.
This commit introduces enum vsir_io_reg_type and enum vsir_phase
which shadow enum vkd3d_shader_register_type and enum
vkd3d_shader_opcode, with the goal of making the data tables
smaller.
2024-12-17 16:39:32 +01:00
Elizabeth Figura
de615609dc
vkd3d-shader/d3dbc: Use struct vkd3d_shader_instruction instead of struct sm1_instruction.
2024-12-16 17:11:57 +01:00
Elizabeth Figura
77ac13e6b9
vkd3d-shader/d3dbc: Use struct vkd3d_shader_src_param instead of struct sm1_src_register.
2024-12-16 17:11:57 +01:00
Elizabeth Figura
1e43088662
vkd3d-shader/d3dbc: Use struct vkd3d_shader_dst_param instead of struct sm1_dst_register.
2024-12-16 17:11:57 +01:00