mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxbc] Do not emit GS system values if rasterization is disabled
Fixes issue in Star Citizen, which declares a max output vertex count of 128 in a geometry shader which emits eight components per vertex, which becomes 12 components in DXVK due to the gl_Position builtin. This should keep us below the magic limit of 1024 output components.
This commit is contained in:
parent
f9e56c97cf
commit
35a2a02714
@ -2196,7 +2196,8 @@ namespace dxvk {
|
|||||||
bool doCut = ins.op != DxbcOpcode::Emit && ins.op != DxbcOpcode::EmitStream;
|
bool doCut = ins.op != DxbcOpcode::Emit && ins.op != DxbcOpcode::EmitStream;
|
||||||
|
|
||||||
if (doEmit) {
|
if (doEmit) {
|
||||||
emitOutputSetup();
|
if (m_perVertexOut)
|
||||||
|
emitOutputSetup();
|
||||||
emitClipCullStore(DxbcSystemValue::ClipDistance, m_clipDistances);
|
emitClipCullStore(DxbcSystemValue::ClipDistance, m_clipDistances);
|
||||||
emitClipCullStore(DxbcSystemValue::CullDistance, m_cullDistances);
|
emitClipCullStore(DxbcSystemValue::CullDistance, m_cullDistances);
|
||||||
emitXfbOutputSetup(streamId, false);
|
emitXfbOutputSetup(streamId, false);
|
||||||
@ -6427,14 +6428,16 @@ namespace dxvk {
|
|||||||
// Declare the per-vertex output block. Outputs are not
|
// Declare the per-vertex output block. Outputs are not
|
||||||
// declared as arrays, instead they will be flushed when
|
// declared as arrays, instead they will be flushed when
|
||||||
// calling EmitVertex.
|
// calling EmitVertex.
|
||||||
const uint32_t perVertexStruct = this->getPerVertexBlockId();
|
if (!m_moduleInfo.xfb || m_moduleInfo.xfb->rasterizedStream >= 0) {
|
||||||
const uint32_t perVertexPointer = m_module.defPointerType(
|
const uint32_t perVertexStruct = this->getPerVertexBlockId();
|
||||||
perVertexStruct, spv::StorageClassOutput);
|
const uint32_t perVertexPointer = m_module.defPointerType(
|
||||||
|
perVertexStruct, spv::StorageClassOutput);
|
||||||
m_perVertexOut = m_module.newVar(
|
|
||||||
perVertexPointer, spv::StorageClassOutput);
|
m_perVertexOut = m_module.newVar(
|
||||||
m_entryPointInterfaces.push_back(m_perVertexOut);
|
perVertexPointer, spv::StorageClassOutput);
|
||||||
m_module.setDebugName(m_perVertexOut, "gs_vertex_out");
|
m_entryPointInterfaces.push_back(m_perVertexOut);
|
||||||
|
m_module.setDebugName(m_perVertexOut, "gs_vertex_out");
|
||||||
|
}
|
||||||
|
|
||||||
// Cull/clip distances as outputs
|
// Cull/clip distances as outputs
|
||||||
m_clipDistances = emitDclClipCullDistanceArray(
|
m_clipDistances = emitDclClipCullDistanceArray(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user