vkd3d/libs/vkd3d-shader
Giovanni Mascellani e2c6058734 vkd3d-shader/spirv: Do not specify depth for SPIR-V images.
SPIR-V images have a "depth" parameter that, as far as I understand
(the spec doesn't look terribly clear in that regard), specifies
whether the image can be used for depth-comparison operations.

In TPF (and therefore in VSIR) the same information is specified
on the sampler type instead of on the image type. This puts us in
a hard spot, because in principle an image can be used with
many different samplers, and the mapping might even be unknown
at compilation time, so it's not clear how we should define our
images.

We currently have some algorithms to deal with that, but they are
incomplete and lead to SPIR-V validation errors like:

    Expected Image to have the same type as Result Type Image
      %63 = OpSampledImage %62 %59 %61

The problem here is that the image has a non-depth type, but is
being sampled as a depth image. This check was added recently to
SPIRV-Tools, so we became aware of the problem.

As I said, it's not easy in general to decide whether an image is
going to be sampled with depth-comparison operators or not.
Fortunately the SPIR-V spec allow to mark the depth parameter as
unknown (using value 2), so until we come up with something better
we use that for all images to please the validator and avoid
giving misleading hints to the driver.
2024-09-24 13:19:17 +02:00
..
checksum.c vkd3d-shader: Use a hash to build the filename when dumping shaders. 2024-08-29 19:14:27 +02:00
d3d_asm.c vkd3d-shader/d3d-asm: Tweak some GS declaration names. 2024-09-16 13:58:57 +02:00
d3dbc.c vkd3d-shader/d3dbc: Write the actual constant info offset in write_sm1_uniforms(). 2024-09-23 15:42:25 +02:00
dxbc.c vkd3d-shader: Use a hash to build the filename when dumping shaders. 2024-08-29 19:14:27 +02:00
dxil.c vkd3d-shader/ir: Record the control flow type in the program. 2024-09-12 18:31:32 +02:00
fx.c vkd3d-shader/hlsl: Introduce the "error" type. 2024-09-23 15:28:47 +02:00
glsl.c vkd3d-shader/glsl: Implement VKD3DSIH_MOVC. 2024-09-23 15:41:07 +02:00
hlsl_codegen.c vkd3d-shader/hlsl: Introduce the "error" type. 2024-09-23 15:28:47 +02:00
hlsl_constant_ops.c vkd3d-shader/hlsl: Fold logic AND and logic OR identities. 2024-09-03 15:11:16 +02:00
hlsl.c vkd3d-shader/hlsl: Return an "error" expression when constructing an arithmetic expression from incompatible types. 2024-09-23 15:28:47 +02:00
hlsl.h vkd3d-shader/hlsl: Return an "error" expression when constructing an arithmetic expression from incompatible types. 2024-09-23 15:28:47 +02:00
hlsl.l vkd3d-shader/hlsl: Remove the 'double' keyword. 2024-09-23 15:26:35 +02:00
hlsl.y vkd3d-shader/hlsl: Fix a corner case in ternary type conversion. 2024-09-23 15:43:15 +02:00
ir.c vkd3d-shader/ir: Allow failure in shader_signature_find_element_for_reg(). 2024-09-20 17:01:29 +02:00
libvkd3d-shader.pc.in build: Build libvkd3d-shader as public library. 2018-11-02 11:19:00 +01:00
msl.c vkd3d-shader/msl: Implement VKD3DSIH_RET. 2024-09-18 15:02:57 +02:00
preproc.h vkd3d-shader: Replace assert() with VKD3D_ASSERT() in preproc.h. 2024-08-05 15:57:56 +02:00
preproc.l vkd3d-shader/preproc: Support namespaces in macro identifiers. 2024-09-24 13:17:24 +02:00
preproc.y vkd3d-shader: Replace assert() with VKD3D_ASSERT() in preproc.y. 2024-08-05 15:57:56 +02:00
spirv.c vkd3d-shader/spirv: Do not specify depth for SPIR-V images. 2024-09-24 13:19:17 +02:00
tpf.c vkd3d-shader/hlsl: Introduce the "error" type. 2024-09-23 15:28:47 +02:00
vkd3d_shader_main.c vkd3d-shader/glsl: Implement support for VKD3DSPR_CONSTBUFFER registers. 2024-09-19 14:29:46 +02:00
vkd3d_shader_private.h vkd3d-shader/spirv: Cache numeric types without through the general declaration cache. 2024-09-23 15:48:35 +02:00
vkd3d_shader.map vkd3d-shader: Implement scanning combined resource/sampler information. 2023-11-13 23:19:23 +01:00