Anna (navi) Figueiredo Gomes
f09ac4959e
vkd3d-shader/hlsl: Implement the GatherCmp() methods.
2024-12-18 17:27:43 +01:00
Giovanni Mascellani
64126a00c3
vkd3d-shader/ir: Give more meaningful names to I/O normalisation levels.
...
The previous names "not normalised" and "fully normalised" have meanings
which are likely to change with time. OTOH including a description of the
normalisation level in the enumerant seems excessive. Relating
normalisation levels to shader model versions might be a reasonable
compromise.
2024-12-12 17:21:49 +01:00
Francisco Casas
65b67e84a8
vkd3d-shader/tpf: Remove hlsl_ctx from tpf_compiler.
...
This completes the hlsl->vsir->tpf translation.
2024-12-10 15:52:52 +01:00
Francisco Casas
f22729461e
vkd3d-shader/hlsl: Store hull and domain shader properties in vsir_program.
...
The alternative to adding the vsir_program->tess_output_primitive and
vsir_program->tess_partitioning fields would be to emit the vsir
DCL_TESSELLATOR_OUTPUT_PRIMITIVE and DCL_TESSELLATOR_PARTITIONING
instructions, like DXIL does, but I think that the preference is to store
these kind of data directly in the vsir_program.
2024-12-10 15:52:52 +01:00
Francisco Casas
ca9bb2e089
vkd3d-shader/hlsl: Generate RDEF outside tpf_compile().
2024-12-10 15:52:52 +01:00
Francisco Casas
ecddc39b31
vkd3d-shader/hlsl: Store SM4 constant buffer declarations in vsir program.
2024-12-10 15:52:52 +01:00
Francisco Casas
d2feb33b47
vkd3d-shader/hlsl: Store SM4 texture declarations in the vsir program.
2024-12-09 16:09:16 +01:00
Francisco Casas
1d290bf5db
vkd3d-shader/hlsl: Store SM4 sampler declarations in the vsir program.
...
Looking at the implementation of shader_sm4_read_dcl_sampler(), vsir
stores the resource index range both in
vkd3d_shader_instruction.declaration.sampler.range
and in the
vkd3d_shader_instruction.declaration.sampler.src.reg.idx[1-2]
indexes, so we do the same.
It is also worth noting that for shader models lower than 5.1, vsir
has a normalization on the ins->declaration src register indexes.
Refer to the following comment:
/* SM5.1 places a symbol identifier in idx[0] and moves
* other values up one slot. Normalize to SM5.1. */
on shader_sm4_read_param().
This normalization is also added to the generated vsir instructions.
2024-12-09 16:09:16 +01:00
Francisco Casas
37a61bf41a
vkd3d-shader/hlsl: Store the global flags in the vsir program.
2024-12-09 16:09:16 +01:00
Francisco Casas
d3108de72a
vkd3d-shader/hlsl: Store ROV feature requirement in the vsir_program.
2024-12-09 16:09:16 +01:00
Francisco Casas
d9c4a257c2
vkd3d-shader/dxbc: Parse the SFI0 ROV requirement.
2024-12-09 16:09:16 +01:00
Francisco Casas
d6d6f37578
vkd3d-shader/hlsl: Migrate SM4 control flow instructions to the vsir program.
...
Translate the instructions that contain hlsl_blocks. Also move
other control flow instructions such as HS_CONTROL_POINT_PHASE and
RET to the vsir_program so that we can directly iterate over it now.
2024-11-27 13:02:53 +01:00
Francisco Casas
81fa4d45b9
vkd3d-shader/tpf: Apply extra bits to all conditional ops.
2024-11-27 12:54:27 +01:00
Francisco Casas
28ad600b43
vkd3d-shader/hlsl: Store SM4 jumps in the vsir program.
2024-11-27 12:54:15 +01:00
Francisco Casas
4f549155c5
vkd3d-shader/hlsl: Store SM4 HLSL_RESOURCE_RESINFOs in the vsir program.
2024-11-24 00:01:03 +01:00
Francisco Casas
c89f503604
vkd3d-shader/hlsl: Store SM4 HLSL_RESOURCE_SAMPLE_INFOs in the vsir program.
2024-11-24 00:00:46 +01:00
Francisco Casas
4382af6e1b
vkd3d-shader/hlsl: Store SM4 HLSL_RESOURCE_GATHERs in the vsir program.
2024-11-23 23:55:07 +01:00
Francisco Casas
42ce821603
vkd3d-shader/hlsl: Store SM4 HLSL_RESOURCE_SAMPLEs in the vsir program.
2024-11-23 23:52:24 +01:00
Francisco Casas
52b81f42eb
vkd3d-shader/hlsl: Store SM4 HLSL_RESOURCE_LOADs in the vsir program.
2024-11-23 23:49:57 +01:00
Giovanni Mascellani
1ed8d907b3
vkd3d-shader/ir: Keep track of the tessellator domain in struct vsir_program.
2024-11-21 19:28:46 +01:00
Nikolay Sivov
1a6409cd5b
vkd3d-shader/hlsl: Add parser support for stream-output object types.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-11-21 19:28:46 +01:00
Francisco Casas
13dfccc1c6
vkd3d-shader/hlsl: Store SM4 resource stores in the vsir program.
2024-11-21 19:28:46 +01:00
Francisco Casas
5b4af411f5
vkd3d-shader/hlsl: Store SM4 loads in the vsir program.
2024-11-21 19:28:46 +01:00
Francisco Casas
874ca85a95
vkd3d-shader/hlsl: Store SM4 stores in the vsir program.
2024-11-21 19:28:46 +01:00
Francisco Casas
5dedcff665
vkd3d-shader/tpf: Remove HLSL_IR_SWIZZLE handling.
2024-11-21 19:28:46 +01:00
Francisco Casas
5df836c513
vkd3d-shader/hlsl: Store SM4 MOD in the vsir program.
2024-11-06 22:49:12 +01:00
Francisco Casas
30bc6965a2
vkd3d-shader/hlsl: Store SM4 DOT in the vsir program.
2024-11-06 22:48:13 +01:00
Francisco Casas
e8b373e3ff
vkd3d-shader/hlsl: Store SM4 DIV in the vsir program.
2024-11-06 22:47:42 +01:00
Francisco Casas
24f4308982
vkd3d-shader/hlsl: Store SM4 MUL in the vsir program.
2024-11-06 22:45:46 +01:00
Francisco Casas
e4d36bd855
vkd3d-shader/hlsl: Store SM4 SAT in the vsir program.
2024-11-06 22:45:23 +01:00
Francisco Casas
2e3f4a01bf
vkd3d-shader/hlsl: Store SM4 RCP in the vsir program.
2024-11-06 22:40:50 +01:00
Francisco Casas
3c4889add3
vkd3d-shader/hlsl: Store SM4 SIN and COS in the vsir program.
2024-11-06 22:38:04 +01:00
Francisco Casas
befba8e813
vkd3d-shader/hlsl: Store SM4 casts in the vsir program.
2024-11-06 22:27:49 +01:00
Nikolay Sivov
e5ba79b4f1
vkd3d-shader/hlsl: Implement the ByteAddressBuffer.Load*() methods.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-11-06 22:09:23 +01:00
Francisco Casas
90a07ada8e
vkd3d-shader/tpf: Use SCALAR swizzle dimension for RASTERIZER registers.
...
While we currently output instructions like this:
sampleinfo_uint r0.x, rasterizer.xxxx
> SAMPLE_INFO (111)
0 0000100[len:4] 0000000000001[1] 00001101111[opcode:111]
└─ 0 000[d3i:0] 000[d2i:0] 000[d1i:0] 01[idxs:1] 00000000[type:0] 0000[0] 0001[wmask:1] 00[swtype:0] 10[dim:2]
└─ 00000000000000000000000000000000[0|0.0]
└─ 0 000[d3i:0] 000[d2i:0] 000[d1i:0] 00[idxs:0] 00001110[type:14] 00000000[sw:0] 01[swtype:1] 10[dim:2]
FXC/d3dcompiler outputs instructions like this:
sampleinfo o0.x, rasterizer.x
> SAMPLE_INFO (111)
0 0000100[len:4] 0000000000000[0] 00001101111[opcode:111]
└─ 0 000[d3i:0] 000[d2i:0] 000[d1i:0] 01[idxs:1] 00000010[type:2] 0000[0] 0001[wmask:1] 00[swtype:0] 10[dim:2]
└─ 00000000000000000000000000000000[0|0.0]
└─ 0 000[d3i:0] 000[d2i:0] 000[d1i:0] 00[idxs:0] 00001110[type:14] 000000[0] 00[swcomp:0] 10[swtype:2] 10[dim:2]
Note the difference in swtype of the rasterizer src register.
2024-11-05 19:50:55 +01:00
Francisco Casas
950c381728
vkd3d-shader/hlsl: Store RASTERIZER_SAMPLE_COUNT in the vsir program.
...
Also, the profile check for GetRenderTargetSampleCount() is moved to
parse time.
2024-11-05 19:48:31 +01:00
Francisco Casas
ab60f4e082
vkd3d-shader/hlsl: Store simple SM4 expressions in the vsir program.
2024-11-05 19:35:52 +01:00
Francisco Casas
b4608e99e3
vkd3d-shader/tpf: Remove HLSL IR ABS handling.
2024-11-05 19:20:21 +01:00
Shaun Ren
64c4a3a442
vkd3d-shader/hlsl: Store SM4 semantic declarations in the vsir program.
2024-11-05 19:19:22 +01:00
Francisco Casas
6f52bb6b1a
vkd3d-shader/hlsl: Store SM4 swizzles in the vsir program.
2024-11-04 16:08:38 +01:00
Francisco Casas
2083d505c7
vkd3d-shader/tpf: Use instr.extra_bits for IF.
2024-11-04 15:37:46 +01:00
Nikolay Sivov
89e5912fd2
vkd3d-shader/hlsl: Implement RWByteAddressBuffer.Store*() methods.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-28 17:51:04 +01:00
Nikolay Sivov
5eff8bf918
vkd3d-shader/hlsl: Handle SV_GroupIndex.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-24 20:54:04 +02:00
Francisco Casas
23be6ed0dd
vkd3d-shader/hlsl: Store temp declarations in the vsir program.
...
Move the temp allocation back to hlsl_codegen.c.
Note that the DCL_TEMPS instructions wouldn't be necessary if we had the
capacity to store the temp_count for both the main program and the patch
constant program (or more generally speaking, a temp_count for all
phases).
The plan is to eventually also move the HS_CONTROL_POINT and
HS_FORK_PHASE markers to the vsir_program, making it able to contain
both functions.
2024-10-24 20:50:59 +02:00
Francisco Casas
cf7fade580
vkd3d-shader/hlsl: Store the thread group size in the vsir program.
2024-10-24 20:48:20 +02:00
Elizabeth Figura
32e6a1bb4d
vkd3d-shader: Validate the parsed shader in vsir_parse().
2024-10-23 16:02:09 +02:00
Henri Verbeet
1113d24a70
vkd3d-shader/ir: Store the global flags in struct vsir_program.
2024-10-22 20:40:31 +02:00
Nikolay Sivov
cf3e251a9f
vkd3d-shader/hlsl: Implement the f32tof16() intrinsic.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-10-22 20:28:33 +02:00
Francisco Casas
2a8c1b2823
vkd3d-shader/hlsl: Sort signature elements by register id.
2024-10-22 20:25:40 +02:00
Francisco Casas
7fd6c29ee8
vkd3d-shader/hlsl: Allow accounting for interpolation mode when allocating semantics.
...
For now this has no effect since semantics are allocated with reg_size
4, but will have effect when optimizing interstage signatures.
2024-10-22 20:03:39 +02:00