mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
e2c6058734
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. |
||
---|---|---|
.. | ||
checksum.c | ||
d3d_asm.c | ||
d3dbc.c | ||
dxbc.c | ||
dxil.c | ||
fx.c | ||
glsl.c | ||
hlsl_codegen.c | ||
hlsl_constant_ops.c | ||
hlsl.c | ||
hlsl.h | ||
hlsl.l | ||
hlsl.y | ||
ir.c | ||
libvkd3d-shader.pc.in | ||
msl.c | ||
preproc.h | ||
preproc.l | ||
preproc.y | ||
spirv.c | ||
tpf.c | ||
vkd3d_shader_main.c | ||
vkd3d_shader_private.h | ||
vkd3d_shader.map |