vkd3d/libs/vkd3d-shader
Francisco Casas 61a17643a2 vkd3d-shader/hlsl: Split deref-offset into a node and a constant uint.
This uint will be used for the following:

- Since SM4's relative addressing (the capability of passing a register
  as an index to another register) only has whole-register granularity,
  we will need to make the offset node express the offset in
  whole-registers and specify the register component in this uint,
  otherwise we would have to add additional / and % operations in the
  output binary.

- If, after we apply constant folding and copy propagation, we determine
  that the offset is a single constant node, we can store all the offset
  in this uint constant, and remove the offset src.

  This allows DCE to remove a good bunch of the nodes previously required
  only for the offset constants, which makes the output more liteweight
  and readable, and simplifies the implementation of relative addressing
  when writing tpf in the following patches.

In dump_deref(), we use "c" to indicate components instead of whole
registers. Since now both the offset node and the offset uint are in
components a lowered deref would look like:

    var[@42c + 2c]

But, once we express the offset node in whole registers we will remove
the "c" from the node part:

    var[@22 + 3c]
2023-10-31 21:59:14 +01:00
..
checksum.c vkd3d-shader: Introduce vkd3d_make_u{16, 32}() helpers. 2021-08-11 20:58:24 +02:00
d3d_asm.c vkd3d-shader: Emit IR CBV declaration sizes in bytes. 2023-10-19 23:07:43 +02:00
d3dbc.c vkd3d-shader/d3dbc: Use D3DSIO_TEXKILL instead of VKD3D_SM1_OP_TEXKILL (clangd). 2023-10-12 23:27:24 +02:00
dxbc.c vkd3d-shader/dxil: Read the DXIL input and output signatures. 2023-10-16 22:36:29 +02:00
dxil.c vkd3d-shader/dxil: Read CBV descriptors. 2023-10-19 23:07:45 +02:00
glsl.c vkd3d-shader/glsl: Update the current source location in vkd3d_glsl_generator_generate(). 2023-03-13 22:09:58 +01:00
hlsl_codegen.c vkd3d-shader/hlsl: Split deref-offset into a node and a constant uint. 2023-10-31 21:59:14 +01:00
hlsl_constant_ops.c vkd3d-shader: Add constant folding for 'rsq'. 2023-10-05 16:16:03 +02:00
hlsl.c vkd3d-shader/hlsl: Split deref-offset into a node and a constant uint. 2023-10-31 21:59:14 +01:00
hlsl.h vkd3d-shader/hlsl: Split deref-offset into a node and a constant uint. 2023-10-31 21:59:14 +01:00
hlsl.l vkd3d-shader/hlsl: Add initial support for parsing 'switch' statements. 2023-10-31 21:58:57 +01:00
hlsl.y vkd3d-shader/hlsl: Validate break/continue context. 2023-10-31 21:59:01 +01:00
ir.c vkd3d-shader/ir: Translate TEX instructions to SAMPLE. 2023-10-09 21:58:40 +02: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: Append spaces between tokens in macro invocations. 2023-08-02 20:19:21 +09:00
preproc.y vkd3d-shader/hlsl: Handle over/underflow when parsing integer literals. 2022-05-12 19:33:56 +02:00
spirv.c vkd3d-shader/spirv: Align constant buffer sizes to 16 bytes. 2023-10-19 23:07:40 +02:00
tpf.c vkd3d-shader/tpf: Write out 'switch' statements. 2023-10-31 21:59:05 +01:00
vkd3d_shader_main.c vkd3d-shader: Emit IR CBV declaration sizes in bytes. 2023-10-19 23:07:43 +02:00
vkd3d_shader_private.h vkd3d-shader/hlsl: Check for duplicate case statements. 2023-10-31 21:58:59 +01:00
vkd3d_shader.map vkd3d-shader: Export vkd3d_shader_build_varying_map. 2023-09-19 21:30:35 +02:00