r300: Remove GLcontext requirement from radeonLocalTransform
authorNicolai Hähnle <nhaehnle@gmail.com>
Thu, 16 Jul 2009 20:39:16 +0000 (22:39 +0200)
committerNicolai Hähnle <nhaehnle@gmail.com>
Mon, 27 Jul 2009 18:32:03 +0000 (20:32 +0200)
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
src/mesa/drivers/dri/r300/compiler/radeon_program.c
src/mesa/drivers/dri/r300/compiler/radeon_program.h

index 8b8c957e5c4cc6f092e9adf2ccc44e663a139011..daef20fe675a5472617d48842b0900aee0909d26 100644 (file)
@@ -259,14 +259,14 @@ GLboolean r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c
                        { &radeonTransformDeriv, 0 },
                        { &radeonTransformTrigScale, 0 }
                };
-               radeonLocalTransform(c->ctx, c->program, 4, transformations);
+               radeonLocalTransform(c->program, 4, transformations);
        } else {
                struct radeon_program_transformation transformations[] = {
                        { &r300_transform_TEX, c },
                        { &radeonTransformALU, 0 },
                        { &radeonTransformTrigSimple, 0 }
                };
-               radeonLocalTransform(c->ctx, c->program, 3, transformations);
+               radeonLocalTransform(c->program, 3, transformations);
        }
 
        if (c->debug) {
index da5e7aefce5f4889008b5763b2242cb9bdda454d..0022d0a76ce92f90f892abf24270b5ef24fa87f8 100644 (file)
@@ -46,7 +46,6 @@
  * one instruction at a time.
  */
 void radeonLocalTransform(
-       GLcontext *Ctx,
        struct gl_program *program,
        int num_transformations,
        struct radeon_program_transformation* transformations)
@@ -54,7 +53,6 @@ void radeonLocalTransform(
        struct radeon_transform_context ctx;
        int ip;
 
-       ctx.Ctx = Ctx;
        ctx.Program = program;
        ctx.OldInstructions = program->Instructions;
        ctx.OldNumInstructions = program->NumInstructions;
index 3d4dbfecf725c5ea580cdd9dfad3bbe671b6bda8..5b42883812a209f503f8e2a92886630f717a06fa 100644 (file)
@@ -85,7 +85,6 @@ static inline GLuint combine_swizzles(GLuint src, GLuint swz)
  * e.g. finding new temporary registers must use @ref radeonFindFreeTemporary
  */
 struct radeon_transform_context {
-       GLcontext *Ctx;
        struct gl_program *Program;
        struct prog_instruction *OldInstructions;
        GLuint OldNumInstructions;
@@ -110,7 +109,6 @@ struct radeon_program_transformation {
 };
 
 void radeonLocalTransform(
-       GLcontext* ctx,
        struct gl_program *program,
        int num_transformations,
        struct radeon_program_transformation* transformations);