From 3efd437310d560d46b05179e8eb3ad7229c5adae Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 9 Mar 2018 22:01:19 +0100 Subject: [PATCH] [dxbc] Fixed TGSM size with dcl_tgsm_raw https://msdn.microsoft.com/en-us/library/windows/desktop/hh446929(v=vs.85).aspx --- src/dxbc/dxbc_compiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 515cf171..858f5202 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -994,7 +994,7 @@ namespace dxvk { void DxbcCompiler::emitDclThreadGroupSharedMemory(const DxbcShaderInstruction& ins) { // dcl_tgsm_raw takes two arguments: // (dst0) The resource register ID - // (imm0) Block size, in DWORDs + // (imm0) Block size, in bytes // dcl_tgsm_structured takes three arguments: // (dst0) The resource register ID // (imm0) Structure stride, in bytes @@ -1014,7 +1014,7 @@ namespace dxvk { varInfo.type.ccount = 1; varInfo.type.alength = isStructured ? elementCount * elementStride / 4 - : elementCount; + : elementCount / 4; varInfo.sclass = spv::StorageClassWorkgroup; m_gRegs[regId].type = isStructured