1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-21 04:54:15 +01:00

[dxbc] Improve code gen for zeroing workgroup memory

This commit is contained in:
Philip Rebohle 2025-01-11 14:55:32 +01:00 committed by Philip Rebohle
parent f17317061c
commit d5832c3075

View File

@ -6193,13 +6193,11 @@ namespace dxvk {
uint32_t threadId = m_module.opLoad(
intTypeId, m_cs.builtinLocalInvocationIndex);
uint32_t strideId = m_module.constu32(numThreads);
uint32_t zeroId = m_module.constu32(0);
uint32_t zeroId = m_module.constu32(0);
for (uint32_t e = 0; e < numElementsPerThread; e++) {
uint32_t ofsId = m_module.opIAdd(intTypeId, threadId,
m_module.opIMul(intTypeId, strideId, m_module.constu32(e)));
m_module.constu32(numThreads * e));
uint32_t ptrId = m_module.opAccessChain(
ptrTypeId, m_gRegs[i].varId, 1, &ofsId);
@ -6221,9 +6219,8 @@ namespace dxvk {
m_module.opLabel(cond.labelIf);
uint32_t ofsId = m_module.opIAdd(intTypeId,
m_module.constu32(numThreads * numElementsPerThread),
threadId);
uint32_t ofsId = m_module.opIAdd(intTypeId, threadId,
m_module.constu32(numThreads * numElementsPerThread));
uint32_t ptrId = m_module.opAccessChain(
ptrTypeId, m_gRegs[i].varId, 1, &ofsId);