1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[dxbc] Always set geometry shader invocation count

Fixes validation errors when the DXBC shader does not specify
the invocation count itself.
This commit is contained in:
Philip Rebohle 2019-10-26 23:19:59 +02:00
parent 144f4badef
commit 6888a98c89
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 5 additions and 0 deletions

View File

@ -1391,6 +1391,7 @@ namespace dxvk {
// dcl_gs_instance_count has one operand:
// (imm0) Number of geometry shader invocations
m_module.setInvocations(m_entryPointId, ins.imm[0].u32);
m_gs.invocationCount = ins.imm[0].u32;
}
@ -6866,6 +6867,9 @@ namespace dxvk {
void DxbcCompiler::emitGsFinalize() {
if (!m_gs.invocationCount)
m_module.setInvocations(m_entryPointId, 1);
this->emitMainFunctionBegin();
this->emitInputSetup(
primitiveVertexCount(m_gs.inputPrimitive));

View File

@ -160,6 +160,7 @@ namespace dxvk {
uint32_t builtinLayer = 0;
uint32_t builtinViewportId = 0;
uint32_t builtinInvocationId = 0;
uint32_t invocationCount = 0;
};