Mesa (gallium-0.1): tgsi: Move stack assertions to bottom of tgsi_exec_machine_run.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Tue Sep 8 18:31:19 UTC 2009
Module: Mesa
Branch: gallium-0.1
Commit: 756021d3798c087c99e513b03e03069ca7a7a43f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=756021d3798c087c99e513b03e03069ca7a7a43f
Author: José Fonseca <jfonseca at vmware.com>
Date: Tue Sep 8 16:34:43 2009 +0100
tgsi: Move stack assertions to bottom of tgsi_exec_machine_run.
To detect the failures while still processing the shader in question.
---
src/gallium/auxiliary/tgsi/tgsi_exec.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 3ba1a66..466b6ce 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -2999,11 +2999,10 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach )
mach->FuncMask = 0xf;
mach->ExecMask = 0xf;
- mach->CondStackTop = 0; /* temporarily subvert this assertion */
- assert(mach->CondStackTop == 0);
- assert(mach->LoopStackTop == 0);
- assert(mach->ContStackTop == 0);
- assert(mach->CallStackTop == 0);
+ mach->CondStackTop = 0;
+ mach->LoopStackTop = 0;
+ mach->ContStackTop = 0;
+ 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;
@@ -3032,6 +3031,11 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach )
exec_instruction( mach, mach->Instructions + pc, &pc );
}
+ assert(mach->CondStackTop == 0);
+ assert(mach->LoopStackTop == 0);
+ assert(mach->ContStackTop == 0);
+ assert(mach->CallStackTop == 0);
+
#if 0
/* we scale from floats in [0,1] to Zbuffer ints in sp_quad_depth_test.c */
if (mach->Processor == TGSI_PROCESSOR_FRAGMENT) {
More information about the mesa-commit
mailing list