Module: vkd3d Branch: master Commit: 0dc174ebd719639f799c2ae954ccb67f862a3dfd URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/0dc174ebd719639f799c2ae954ccb6...
Author: Conor McCarthy cmccarthy@codeweavers.com Date: Wed Mar 13 14:25:49 2024 +1000
vkd3d-shader/spirv: Emit an error if a FIRSTBIT instruction has a 64-bit source.
---
libs/vkd3d-shader/spirv.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 86cf678a..bd0bfb8e 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -7169,6 +7169,16 @@ static void spirv_compiler_emit_ext_glsl_instruction(struct spirv_compiler *comp unsigned int i, component_count; enum GLSLstd450 glsl_inst;
+ if (src[0].reg.data_type == VKD3D_DATA_UINT64 && (instruction->handler_idx == VKD3DSIH_FIRSTBIT_HI + || instruction->handler_idx == VKD3DSIH_FIRSTBIT_LO || instruction->handler_idx == VKD3DSIH_FIRSTBIT_SHI)) + { + /* At least some drivers support this anyway, but if validation is enabled it will fail. */ + FIXME("Unsupported 64-bit source for handler %#x.\n", instruction->handler_idx); + spirv_compiler_error(compiler, VKD3D_SHADER_ERROR_SPV_NOT_IMPLEMENTED, + "64-bit source for handler %#x is not supported.", instruction->handler_idx); + return; + } + glsl_inst = spirv_compiler_map_ext_glsl_instruction(instruction); if (glsl_inst == GLSLstd450Bad) {