diff options
author | Zack Rusin <[email protected]> | 2010-06-15 16:37:32 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2010-06-15 16:37:32 -0400 |
commit | 3560652ccf0d88bcc23c326ea99bbc7091b45f39 (patch) | |
tree | a718f08ab026ce939681d55f36c939762cffc31b /src/gallium/auxiliary/tgsi/tgsi_exec.c | |
parent | 215e10ac2615359065cc264c68f08f39533bafd4 (diff) |
gs: make sure we end primitives when finishing executing shaders
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index f66f72d257a..2b0809b6eba 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -1541,6 +1541,19 @@ emit_primitive(struct tgsi_exec_machine *mach) } } +static void +conditional_emit_primitive(struct tgsi_exec_machine *mach) +{ + if (TGSI_PROCESSOR_GEOMETRY == mach->Processor) { + int emitted_verts = + mach->Primitives[mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0]]; + if (emitted_verts) { + emit_primitive(mach); + } + } +} + + /* * Fetch four texture samples using STR texture coordinates. */ @@ -3190,6 +3203,9 @@ exec_instruction( break; case TGSI_OPCODE_END: + /* make sure we end primitives which haven't + * been explicitly emitted */ + conditional_emit_primitive(mach); /* halt execution */ *pc = -1; break; |