[dxbc] Fixed TGSM size with dcl_tgsm_raw

https://msdn.microsoft.com/en-us/library/windows/desktop/hh446929(v=vs.85).aspx
This commit is contained in:
Philip Rebohle 2018-03-09 22:01:19 +01:00
parent b7a964e15e
commit 3efd437310
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 2 additions and 2 deletions

View File

@ -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