From 59d4556641118d41531b5bb0943e4e26b6372eb4 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 23 Oct 2019 15:14:51 +0200 Subject: [PATCH] [dxbc] Extend scalar constants to vectors if required Needed for ENB. Fixes #865. --- src/dxbc/dxbc_compiler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 25c455a08..c3029a637 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -5609,6 +5609,8 @@ namespace dxvk { result.type.ctype = DxbcScalarType::Uint32; result.type.ccount = 1; result.id = m_module.constu32(reg.imm.u32_1); + + result = emitRegisterExtend(result, writeMask.popCount()); } else if (reg.componentCount == DxbcComponentCount::Component4) { // Create a u32 vector with as many components as needed std::array indices = { };