vkd3d/libs/vkd3d-shader
Francisco Casas 902ddee557 vkd3d-shader/hlsl: Fix SM1 dp2add swizzles.
SM1 dp2add doesn't map src swizzles to the dst writemask, also it
expects the last argument to have a replicate swizzle.

Before this patch we were writing the operation as:
```
dp2add r0.x, r1.x, r0.x, r2.x
```

and now it is:
```
dp2add r0.x, r1.xyxx, r0.xyxx, r2.x
```

dp2add now has its own function, write_sm1_dp2add(), since it seems to
be the only instruction with this structure.

Ideally we would be using the default swizzles for the first two src
arguments:
```
dp2add r0.x, r1, r0, r2.x
```
since, according to native's documentation, these are supported for all
sm < 4.

But this change -- along with following the convention of repeating the
last component of the swizzle when fewer than 4 components are to be
specified -- would require more global changes, probably in
hlsl_swizzle_from_writemask() and hlsl_map_swizzle().
2023-02-08 22:09:42 +01:00
..
checksum.c vkd3d-shader: Introduce vkd3d_make_u{16, 32}() helpers. 2021-08-11 20:58:24 +02:00
d3dbc.c vkd3d-shader/sm4: Use the instruction array interface in compile_dxbc_tpf(). 2023-01-24 18:11:14 +01:00
dxbc.c vkd3d-shader/sm4: Use the instruction array interface in compile_dxbc_tpf(). 2023-01-24 18:11:14 +01:00
glsl.c vkd3d-shader/glsl: Use the instruction array interface in vkd3d_glsl_generator_generate(). 2023-01-24 18:11:13 +01:00
hlsl_codegen.c vkd3d-shader/hlsl: Set writemasks correctly for SM1 scalar and vector types. 2023-02-08 22:09:39 +01:00
hlsl_constant_ops.c vkd3d-shader/hlsl: Add some swizzle manipulation definitions. 2023-01-24 18:10:39 +01:00
hlsl_sm1.c vkd3d-shader/hlsl: Fix SM1 dp2add swizzles. 2023-02-08 22:09:42 +01:00
hlsl_sm4.c vkd3d-shader/hlsl: Emit a hlsl_fixme() for HLSL_IR_CALL instructions. 2023-01-31 22:27:00 +01:00
hlsl.c vkd3d-shader/hlsl: Use the original hlsl_ir_function_decl struct rather than allocating a new one for each definition. 2023-02-07 22:15:06 +01:00
hlsl.h vkd3d-shader/hlsl: Put synthetic variables into a dummy scope. 2023-02-07 22:15:06 +01:00
hlsl.l vkd3d-shader/hlsl: Parse UAV types. 2022-10-19 21:59:55 +02:00
hlsl.y vkd3d-shader/hlsl: Add functions to the global list inside the func_prototype rule. 2023-02-07 22:15:06 +01:00
libvkd3d-shader.pc.in build: Build libvkd3d-shader as public library. 2018-11-02 11:19:00 +01:00
preproc.h build: Make the default symbol visibility "hidden". 2021-08-09 21:43:22 +02:00
preproc.l vkd3d-shader/preproc: Don't add additional spaces after whitespace tokens. 2022-03-31 21:24:56 +02:00
preproc.y vkd3d-shader/hlsl: Handle over/underflow when parsing integer literals. 2022-05-12 19:33:56 +02:00
sm4.h vkd3d-shader/sm4: Recognise the msad opcode. 2022-03-14 18:31:08 +01:00
spirv.c vkd3d-shader/spirv: Introduce an option to control whether point size is written. 2023-02-02 20:51:18 +01:00
trace.c vkd3d-shader/trace: Use the instruction array interface in vkd3d_dxbc_binary_to_text(). 2023-01-24 18:11:10 +01:00
vkd3d_shader_main.c vkd3d-shader: Initialize the parameter allocator head. 2023-02-07 22:15:08 +01:00
vkd3d_shader_private.h vkd3d-shader/spirv: Pass a parser pointer to spirv_compiler_generate_spirv(). 2023-01-24 18:11:16 +01:00
vkd3d_shader.map vkd3d-shader: Allow writing log output via a custom callback. 2022-06-07 19:38:49 +02:00