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:
parent
eaa41eb76c
commit
9c5102e257
@ -723,6 +723,12 @@ namespace dxvk {
|
|||||||
if (m_moduleInfo.xfb != nullptr)
|
if (m_moduleInfo.xfb != nullptr)
|
||||||
info.sclass = spv::StorageClassPrivate;
|
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);
|
const uint32_t varId = this->emitNewVariable(info);
|
||||||
m_module.setDebugName(varId, str::format("o", regIdx).c_str());
|
m_module.setDebugName(varId, str::format("o", regIdx).c_str());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user