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
aa3a716249
vkd3d-shader/hlsl: Allow lowering separate sampler arrays on deref offset 0.
2024-12-10 15:52:52 +01:00
Francisco Casas
2c9269ac3a
vkd3d-shader/hlsl: Allocate samplers by decreasing bind count in SM1.
2024-12-10 15:52:50 +01:00
Francisco Casas
455846a305
vkd3d-shader/hlsl: Support combined samplers from texture arrays.
2024-12-10 15:51:43 +01:00
Francisco Casas
3a6bf3be24
vkd3d-shader/hlsl: Lower separated samplers for SM1.
...
The combined sampler is created as a SAMPLER instead of a TEXTURE
because that fits all our current infrastructure. The only problem is
that in the CTAB it must appear as a Texture, so the new field
hlsl_type.is_combined_sampler is added.
Co-authored-by: Elizabeth Figura <zfigura@codeweavers.com>
2024-12-10 15:51:43 +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
198c3dc7b9
vkd3d-shader/hlsl: Remove hlsl_ir_vsir_instruction_ref, again.
2024-11-27 13:03:15 +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
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
Francisco Casas
64bc0515e0
vkd3d-shader/hlsl: Add special allocation rules for FFACE and SAMPLE.
2024-11-23 23:13:13 +01:00
Francisco Casas
ad5377f995
vkd3d-shader/hlsl: Add special allocation rules for PRIMID, RTINDEX, and VPINDEX.
...
These system values are bound to the same allocation rules as other
semantics: they can share registers with other semantics with the same
interpolation mode and they prefer forming shorter writemasks. However,
for some reason, these don't allow further semantics to share the same
register once allocated, except among themselves.
2024-11-23 23:10:46 +01:00
Anna (navi) Figueiredo Gomes
9f3bbab2f0
vkd3d-shader/hlsl: Implement cast from bool to int for SM1.
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
Elizabeth Figura
683e11aece
vkd3d-shader/hlsl: Silence a spurious -Wmaybe-uninitialized in sm4_generate_vsir_instr_dcl_semantic().
2024-11-14 14:12:13 +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
Elizabeth Figura
4290d85397
vkd3d-shader/hlsl: Write all writemask components for PSIZE and FOG outputs.
...
Matching fxc/d3dcompiler.
2024-11-05 19:58:49 +01:00
Elizabeth Figura
5a513ffcec
vkd3d-shader/hlsl: Enforce FOG component count for sm1 VS output.
2024-11-05 19:53:24 +01:00
Elizabeth Figura
f50b20ddd6
vkd3d-shader/hlsl: Enforce PSIZE component count for sm1 VS output.
2024-11-05 19:53:24 +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
6eda775047
vkd3d-shader/hlsl: Run sm4_generate_vsir_block() recursively.
...
This allows us to remove the HLSL IR version of an instruction when
the vsir version is properly implemented.
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
68311ef010
vkd3d-shader/hlsl: Store SM4 ABS instructions in the vsir program.
2024-11-04 17:00:54 +01:00
Francisco Casas
404644bad3
vkd3d-shader/hlsl: Introduce vsir_src_from_hlsl_node().
...
This allows constants to be inlined for sm4.
2024-11-04 16:36:28 +01:00
Francisco Casas
6f52bb6b1a
vkd3d-shader/hlsl: Store SM4 swizzles in the vsir program.
2024-11-04 16:08:38 +01:00
Elizabeth Figura
3511b54040
vkd3d-shader/hlsl: Use early return in allocate_register().
...
Partly to avoid a spurious maybe-uninitialized warning, and partly because it's a more idiomatic structure.
2024-10-28 18:01:06 +01:00
Francisco Casas
9d82915629
vkd3d-shader/hlsl: Make allocation functions static again.
2024-10-24 20:50:59 +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
158bf794e6
vkd3d-shader/hlsl: Introduce hlsl_ir_vsir_instruction_ref, again.
...
This node type will be deleted (again) once the hlsl->vsir->tpf
translation is complete. It serves the purpose of allowing to keep
both real hlsl_ir_nodes and vsir_instructions in the hlsl_block,
until all the former can be translated into the latter.
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
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