Module: vkd3d Branch: master Commit: a64eb75c1dd01b4e8b0774b1796dad30b5748132 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/a64eb75c1dd01b4e8b0774b1796dad...
Author: Conor McCarthy cmccarthy@codeweavers.com Date: Wed Mar 13 14:24:22 2024 +1000
vkd3d-shader/spirv: Emit an error if COUNTBITS has a 64-bit source.
---
libs/vkd3d-shader/spirv.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 56c89f76..86cf678a 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -7020,6 +7020,15 @@ static enum vkd3d_result spirv_compiler_emit_alu_instruction(struct spirv_compil SpvOp op = SpvOpMax; unsigned int i;
+ if (src->reg.data_type == VKD3D_DATA_UINT64 && instruction->handler_idx == VKD3DSIH_COUNTBITS) + { + /* At least some drivers support this anyway, but if validation is enabled it will fail. */ + FIXME("Unsupported 64-bit source for bit count.\n"); + spirv_compiler_error(compiler, VKD3D_SHADER_ERROR_SPV_NOT_IMPLEMENTED, + "64-bit source for bit count is not supported."); + return VKD3D_ERROR_INVALID_SHADER; + } + if (src->reg.data_type == VKD3D_DATA_BOOL) { if (dst->reg.data_type == VKD3D_DATA_BOOL)