vkd3d-shader: Introduce an interface to specify sm1 shadow samplers.

This commit is contained in:
Elizabeth Figura
2025-10-03 15:01:09 -05:00
committed by Henri Verbeet
parent 539a5be370
commit 0bb8272f26
Notes: Henri Verbeet 2025-10-13 19:31:51 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1769
3 changed files with 84 additions and 11 deletions

View File

@@ -2350,6 +2350,26 @@ struct vkd3d_shader_d3dbc_source_info
* This field is ignored for shader models 2 and higher.
*/
enum vkd3d_shader_resource_type texture_dimensions[6];
/**
* A mask indicating which samplers should be shadow (i.e. comparison-mode)
* samplers. When legacy Direct3D shaders are used with the Direct3D 8 and 9
* APIs, this is implied by the format of the sampled resource; e.g. a
* D3DFMT_D24S8 texture implies shadow sampling, while a D3DFMT_A8R8G8B8
* or D3DFMT_INTZ texture does not.
* This information is necessary when converting to other formats
* (e.g. SPIR-V, GLSL) which specify this in the shader.
*
* For example, if bit 1 is set (so the value is 0x2), this indicates that
* the sampler at bind point 1 (and no others) should be a shadow sampler.
*
* Bits in this mask corresponding to textures not used by the shader will
* be ignored.
*
* If this structure is not specified, no samplers will be considered to
* be shadow samplers.
*/
uint32_t shadow_samplers;
};
/**