diff options
author | Zack Rusin <[email protected]> | 2013-04-10 15:28:01 -0700 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-04-16 23:38:46 -0700 |
commit | 93627e33cc4c4e8f800fdb61693c1107e6cdcd2e (patch) | |
tree | 458dc1d84eb17b3e696758a44166bf4d0d2fdb35 | |
parent | 88db6f0a73cd988b14e95e5f506b4e5ac355f065 (diff) |
tgsi/exec: geometry shaders are executed on a single primitive
which means that our execution mask in GS is equal to 1 not 0xf.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 3de15730e75..8b46785d66c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -4422,14 +4422,25 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach ) { uint i; int pc = 0; + uint default_mask = 0xf; - mach->CondMask = 0xf; - mach->LoopMask = 0xf; - mach->ContMask = 0xf; - mach->FuncMask = 0xf; - mach->ExecMask = 0xf; + mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] = 0; + mach->Temps[TEMP_OUTPUT_I].xyzw[TEMP_OUTPUT_C].u[0] = 0; + + if( mach->Processor == TGSI_PROCESSOR_GEOMETRY ) { + mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0] = 0; + mach->Primitives[0] = 0; + /* GS runs on a single primitive for now */ + default_mask = 0x1; + } + + mach->CondMask = default_mask; + mach->LoopMask = default_mask; + mach->ContMask = default_mask; + mach->FuncMask = default_mask; + mach->ExecMask = default_mask; - mach->Switch.mask = 0xf; + mach->Switch.mask = default_mask; assert(mach->CondStackTop == 0); assert(mach->LoopStackTop == 0); @@ -4438,13 +4449,6 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach ) assert(mach->BreakStackTop == 0); assert(mach->CallStackTop == 0); - mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] = 0; - mach->Temps[TEMP_OUTPUT_I].xyzw[TEMP_OUTPUT_C].u[0] = 0; - - if( mach->Processor == TGSI_PROCESSOR_GEOMETRY ) { - mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0] = 0; - mach->Primitives[0] = 0; - } /* execute declarations (interpolants) */ for (i = 0; i < mach->NumDeclarations; i++) { |