1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 10:24:12 +01:00

[dxvk] Don't duplicate geometry shader system value outputs

Fixes #1121. The basic idea here is that all built-ins that can be
written by the GS will be consumed as built-ins by the FS anyway,
so we do not need to keep the o# variable around.
This commit is contained in:
Philip Rebohle 2019-07-24 18:18:20 +02:00
parent eaa41eb76c
commit 9c5102e257
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -723,6 +723,12 @@ namespace dxvk {
if (m_moduleInfo.xfb != nullptr)
info.sclass = spv::StorageClassPrivate;
// In geometry shaders, don't duplicate system value outputs
// to stay within device limits. The pixel shader will read
// all GS system value outputs as system value inputs.
if (m_programInfo.type() == DxbcProgramType::GeometryShader && sv != DxbcSystemValue::None)
info.sclass = spv::StorageClassPrivate;
const uint32_t varId = this->emitNewVariable(info);
m_module.setDebugName(varId, str::format("o", regIdx).c_str());