summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/shader/slang/slang_execute.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/shader/slang/slang_execute.c b/src/mesa/shader/slang/slang_execute.c
index 9e82ef580b..e45d2a4bc2 100644
--- a/src/mesa/shader/slang/slang_execute.c
+++ b/src/mesa/shader/slang/slang_execute.c
@@ -183,7 +183,7 @@ static void dump (const slang_assembly_file *file)
int _slang_execute (const slang_assembly_file *file)
{
slang_machine mach;
-FILE *f;
+ FILE *f;
mach.ip = 0;
mach.sp = SLANG_MACHINE_STACK_SIZE;
@@ -197,22 +197,22 @@ FILE *f;
static_assert(sizeof (GLuint) == 4);
static_assert(sizeof (GLuint *) == 4);
-dump (file);
+ dump (file);
-f = fopen ("~mesa-slang-assembly-execution.txt", "w");
+ f = fopen ("~mesa-slang-assembly-execution.txt", "w");
while (!mach.exit)
{
slang_assembly *a = file->code + mach.ip;
-if (f != NULL)
-{
-unsigned int i;
-dump_instruction (f, a, mach.ip);
-fprintf (f, "\t\tsp=%u bp=%u\n", mach.sp, mach.bp);
-for (i = mach.sp; i < SLANG_MACHINE_STACK_SIZE; i++)
-fprintf (f, "\t%.5u\t%6f\t%u\n", i, mach.stack._float[i], mach.stack._addr[i]);
-fflush (f);
-}
+ if (f != NULL)
+ {
+ unsigned int i;
+ dump_instruction (f, a, mach.ip);
+ fprintf (f, "\t\tsp=%u bp=%u\n", mach.sp, mach.bp);
+ for (i = mach.sp; i < SLANG_MACHINE_STACK_SIZE; i++)
+ fprintf (f, "\t%.5u\t%6f\t%u\n", i, mach.stack._float[i], mach.stack._addr[i]);
+ fflush (f);
+ }
mach.ip++;
switch (a->type)
@@ -341,8 +341,8 @@ fflush (f);
}
}
-if (f != NULL)
-fclose (f);
+ if (f != NULL)
+ fclose (f);
return 0;
}