r300/compiler: Remove inst_offset from r500_fragment_program_code
authorNicolai Hähnle <nhaehnle@gmail.com>
Thu, 30 Jul 2009 20:26:02 +0000 (22:26 +0200)
committerNicolai Hähnle <nhaehnle@gmail.com>
Thu, 30 Jul 2009 21:42:59 +0000 (23:42 +0200)
The field is not used, and in any case it would be more interesting to
manipulate from *outside* the compiler if we ever wanted to load several
fragment programs at the same time or something.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
src/mesa/drivers/dri/r300/compiler/radeon_code.h
src/mesa/drivers/dri/r300/r300_state.c

index 3a527210c171bd091b01d93f773ef14e9df7a05b..d694725c9bb9df5ef728b7f7f1b6e9ea73684f49 100644 (file)
@@ -279,7 +279,6 @@ void r500BuildFragmentProgramHwCode(struct r300_fragment_program_compiler *compi
 
        _mesa_bzero(code, sizeof(*code));
        code->max_temp_idx = 1;
-       code->inst_offset = 0;
        code->inst_end = -1;
 
        radeonPairProgram(compiler, &pair_handler, compiler);
index 6f5bc288316d1b7c9b5d122406511d9407b58d07..0806fb1b5c60708d5bd5e3f44b4110022b84a4dd 100644 (file)
@@ -160,8 +160,7 @@ struct r500_fragment_program_code {
                uint32_t inst5;
        } inst[R500_PFS_MAX_INST];
 
-       int inst_offset;
-       int inst_end;
+       int inst_end; /* Number of instructions - 1; also, last instruction to be executed */
 
        int max_temp_idx;
 };
index 1ac14267d5e67abf47cd759c548ebb320cf38169..b868b62496034656c73b22cc4e00450523df0a8d 100644 (file)
@@ -2103,13 +2103,13 @@ static void r500SetupPixelShader(GLcontext *ctx)
        rmesa->hw.fp.cmd[R500_FP_PIXSIZE] = code->max_temp_idx;
 
        rmesa->hw.fp.cmd[R500_FP_CODE_ADDR] =
-           R500_US_CODE_START_ADDR(code->inst_offset) |
+           R500_US_CODE_START_ADDR(0) |
            R500_US_CODE_END_ADDR(code->inst_end);
        rmesa->hw.fp.cmd[R500_FP_CODE_RANGE] =
-           R500_US_CODE_RANGE_ADDR(code->inst_offset) |
+           R500_US_CODE_RANGE_ADDR(0) |
            R500_US_CODE_RANGE_SIZE(code->inst_end);
        rmesa->hw.fp.cmd[R500_FP_CODE_OFFSET] =
-           R500_US_CODE_OFFSET_ADDR(0); /* FIXME when we add flow control */
+           R500_US_CODE_OFFSET_ADDR(0);
 
        R300_STATECHANGE(rmesa, r500fp);
        /* Emit our shader... */