From cd63ff6d76447d2c41205065dc2818ce79eba1a4 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 22 Apr 2018 16:43:16 +0200 Subject: [PATCH] [dxbc] Fix operand type of resinfo_rcp_float division Fixes invalid SPIR-V generated for this instruction. --- src/dxbc/dxbc_compiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index d8c67c6d..d2e2bb9f 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -2630,7 +2630,8 @@ namespace dxvk { if (resinfoType == DxbcResinfoType::RcpFloat) { imageSize.id = m_module.opFDiv( getVectorTypeId(imageSize.type), - m_module.constvec4f32(1.0f, 1.0f, 1.0f, 1.0f), + emitBuildConstVecf32(1.0f, 1.0f, 1.0f, 1.0f, + DxbcRegMask::firstN(imageSize.type.ccount)).id, imageSize.id); }