vkd3d/libs/vkd3d-shader
Giovanni Mascellani d2f8a576a8 vkd3d-shader/hlsl: Avoid infinite loop and invalid derefs in copy-prop.
Co-authored-by: Francisco Casas <fcasas@codeweavers.com>
Co-authored-by: Zebediah Figura <zfigura@codeweavers.com>

Because copy_propagation_transform_object_load() replaces a deref
instead of an instruction, it is currently prone to two problems:

1- It can replace a deref with the same deref, returning true every
time and getting the compilation stuck in an endless loop of
copy-propagation iterations.

2- When performed multiple times in the same deref, the second time it
can replace the deref with a deref from a temp that is only valid in
another point of the program execution, resulting in an incorrect value.

This patch preempts this by avoiding replacing derefs when the new deref
doesn't point to a uniform variable. Because, uniform variables cannot
be written to.
2023-01-26 21:52:07 +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: Avoid infinite loop and invalid derefs in copy-prop. 2023-01-26 21:52:07 +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: Handle RSQ output for SM1. 2023-01-25 22:10:13 +01:00
hlsl_sm4.c vkd3d-shader/hlsl: Write SM4 thread ID registers. 2023-01-25 22:47:46 +01:00
hlsl.c vkd3d-shader/hlsl: Reinterpret minimum precision types as their regular counterparts. 2023-01-25 22:10:23 +01:00
hlsl.h vkd3d-shader/hlsl: Reinterpret minimum precision types as their regular counterparts. 2023-01-25 22:10:23 +01:00
hlsl.l vkd3d-shader/hlsl: Parse UAV types. 2022-10-19 21:59:55 +02:00
hlsl.y vkd3d-shader/hlsl: Reinterpret minimum precision types as their regular counterparts. 2023-01-25 22:10:23 +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: Pass a parser pointer to spirv_compiler_generate_spirv(). 2023-01-24 18:11:16 +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/spirv: Pass a parser pointer to spirv_compiler_generate_spirv(). 2023-01-24 18:11:16 +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