vkd3d/libs/vkd3d-shader
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
..