diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_fragprog.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_program.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_state_init.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_vertprog.c | 36 |
5 files changed, 36 insertions, 36 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 2ad9eb23e75..c5a8ac5532d 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -318,8 +318,8 @@ static bool calc_live_regs( struct i915_fragment_program *p ) uint8_t live_components[I915_MAX_TEMPORARY] = { 0, }; GLint i; - for (i = program->NumInstructions - 1; i >= 0; i--) { - struct prog_instruction *inst = &program->Instructions[i]; + for (i = program->arb.NumInstructions - 1; i >= 0; i--) { + struct prog_instruction *inst = &program->arb.Instructions[i]; int opArgs = _mesa_num_inst_src_regs(inst->Opcode); int a; @@ -362,7 +362,7 @@ static GLuint get_live_regs( struct i915_fragment_program *p, const struct prog_instruction *inst ) { const struct gl_program *program = &p->FragProg; - GLuint nr = inst - program->Instructions; + GLuint nr = inst - program->arb.Instructions; return p->usedRegs[nr]; } @@ -383,7 +383,7 @@ static void upload_program(struct i915_fragment_program *p) { const struct gl_program *program = &p->FragProg; - const struct prog_instruction *inst = program->Instructions; + const struct prog_instruction *inst = program->arb.Instructions; if (INTEL_DEBUG & DEBUG_WM) _mesa_print_program(program); @@ -402,9 +402,9 @@ upload_program(struct i915_fragment_program *p) return; } - if (program->NumInstructions > I915_MAX_INSN) { + if (program->arb.NumInstructions > I915_MAX_INSN) { i915_program_error(p, "Exceeded max instructions (%d out of %d)", - program->NumInstructions, I915_MAX_INSN); + program->arb.NumInstructions, I915_MAX_INSN); return; } diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index 0abc7e208db..a8f693f71af 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -517,18 +517,18 @@ i915_fini_program(struct i915_fragment_program *p) } if (p->error) { - p->FragProg.NumNativeInstructions = 0; - p->FragProg.NumNativeAluInstructions = 0; - p->FragProg.NumNativeTexInstructions = 0; - p->FragProg.NumNativeTexIndirections = 0; + p->FragProg.arb.NumNativeInstructions = 0; + p->FragProg.arb.NumNativeAluInstructions = 0; + p->FragProg.arb.NumNativeTexInstructions = 0; + p->FragProg.arb.NumNativeTexIndirections = 0; } else { - p->FragProg.NumNativeInstructions = (p->nr_alu_insn + + p->FragProg.arb.NumNativeInstructions = (p->nr_alu_insn + p->nr_tex_insn + p->nr_decl_insn); - p->FragProg.NumNativeAluInstructions = p->nr_alu_insn; - p->FragProg.NumNativeTexInstructions = p->nr_tex_insn; - p->FragProg.NumNativeTexIndirections = p->nr_tex_indirect; + p->FragProg.arb.NumNativeAluInstructions = p->nr_alu_insn; + p->FragProg.arb.NumNativeTexInstructions = p->nr_tex_insn; + p->FragProg.arb.NumNativeTexIndirections = p->nr_tex_indirect; } p->declarations[0] |= program_size + decl_size - 2; diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index 2f84e86adbe..a502b8e084f 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -183,7 +183,7 @@ brwProgramStringNotify(struct gl_context *ctx, GLenum target, struct gl_program *prog) { - assert(target == GL_VERTEX_PROGRAM_ARB || !prog->IsPositionInvariant); + assert(target == GL_VERTEX_PROGRAM_ARB || !prog->arb.IsPositionInvariant); struct brw_context *brw = brw_context(ctx); const struct brw_compiler *compiler = brw->screen->compiler; @@ -212,7 +212,7 @@ brwProgramStringNotify(struct gl_context *ctx, if (newVP == curVP) brw->ctx.NewDriverState |= BRW_NEW_VERTEX_PROGRAM; - if (newVP->program.IsPositionInvariant) { + if (newVP->program.arb.IsPositionInvariant) { _mesa_insert_mvp_code(ctx, &newVP->program); } newVP->id = get_new_program_id(brw->screen); diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c index f31a19150df..8e14ba73ff9 100644 --- a/src/mesa/drivers/dri/r200/r200_state_init.c +++ b/src/mesa/drivers/dri/r200/r200_state_init.c @@ -271,8 +271,8 @@ TCL_OR_VP_CHECK( tcl_or_vp, GL_TRUE, 0 ) TCL_OR_VP_CHECK( tcl_or_vp_add2, GL_TRUE, 2 ) VP_CHECK( tcl_vp, GL_TRUE, 0 ) VP_CHECK( tcl_vp_add4, GL_TRUE, 4 ) -VP_CHECK( tcl_vp_size_add4, ctx->VertexProgram.Current->NumNativeInstructions > 64, 4 ) -VP_CHECK( tcl_vpp_size_add4, ctx->VertexProgram.Current->NumNativeParameters > 96, 4 ) +VP_CHECK( tcl_vp_size_add4, ctx->VertexProgram.Current->arb.NumNativeInstructions > 64, 4 ) +VP_CHECK( tcl_vpp_size_add4, ctx->VertexProgram.Current->arb.NumNativeParameters > 96, 4 ) #define OUT_VEC(hdr, data) do { \ drm_radeon_cmd_header_t h; \ diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index 5965c6e8048..ded8e2af244 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -409,7 +409,7 @@ static GLboolean r200_translate_vertex_program(struct gl_context *ctx, struct r2 vp->translated = GL_TRUE; vp->fogmode = ctx->Fog.Mode; - if (mesa_vp->NumInstructions == 0) + if (mesa_vp->arb.NumInstructions == 0) return GL_FALSE; #if 0 @@ -445,7 +445,7 @@ static GLboolean r200_translate_vertex_program(struct gl_context *ctx, struct r2 struct prog_dst_register dst; /* FIXME: is changing the prog safe to do here? */ - if (mesa_vp->IsPositionInvariant && + if (mesa_vp->arb.IsPositionInvariant && /* make sure we only do this once */ !(mesa_vp->info.outputs_written & (1 << VARYING_SLOT_POS))) { _mesa_insert_mvp_code(ctx, mesa_vp); @@ -462,11 +462,11 @@ static GLboolean r200_translate_vertex_program(struct gl_context *ctx, struct r2 } vp->pos_end = 0; - mesa_vp->NumNativeInstructions = 0; + mesa_vp->arb.NumNativeInstructions = 0; if (mesa_vp->Parameters) - mesa_vp->NumNativeParameters = mesa_vp->Parameters->NumParameters; + mesa_vp->arb.NumNativeParameters = mesa_vp->Parameters->NumParameters; else - mesa_vp->NumNativeParameters = 0; + mesa_vp->arb.NumNativeParameters = 0; for(i = 0; i < VERT_ATTRIB_MAX; i++) vp->inputs[i] = -1; @@ -590,7 +590,7 @@ static GLboolean r200_translate_vertex_program(struct gl_context *ctx, struct r2 } o_inst = vp->instr; - for (vpi = mesa_vp->Instructions; vpi->Opcode != OPCODE_END; vpi++, o_inst++){ + for (vpi = mesa_vp->arb.Instructions; vpi->Opcode != OPCODE_END; vpi++, o_inst++){ operands = op_operands(vpi->Opcode); are_srcs_scalar = operands & SCALAR_FLAG; operands &= OP_MASK; @@ -1070,20 +1070,20 @@ else { } u_temp_used = (R200_VSF_MAX_TEMPS - 1) - u_temp_i; - if (mesa_vp->NumNativeTemporaries < - (mesa_vp->NumTemporaries + u_temp_used)) { - mesa_vp->NumNativeTemporaries = - mesa_vp->NumTemporaries + u_temp_used; + if (mesa_vp->arb.NumNativeTemporaries < + (mesa_vp->arb.NumTemporaries + u_temp_used)) { + mesa_vp->arb.NumNativeTemporaries = + mesa_vp->arb.NumTemporaries + u_temp_used; } - if ((mesa_vp->NumTemporaries + u_temp_used) > R200_VSF_MAX_TEMPS) { + if ((mesa_vp->arb.NumTemporaries + u_temp_used) > R200_VSF_MAX_TEMPS) { if (R200_DEBUG & RADEON_FALLBACKS) { - fprintf(stderr, "Ran out of temps, num temps %d, us %d\n", mesa_vp->NumTemporaries, u_temp_used); + fprintf(stderr, "Ran out of temps, num temps %d, us %d\n", mesa_vp->arb.NumTemporaries, u_temp_used); } return GL_FALSE; } u_temp_i = R200_VSF_MAX_TEMPS - 1; if(o_inst - vp->instr >= R200_VSF_MAX_INST) { - mesa_vp->NumNativeInstructions = 129; + mesa_vp->arb.NumNativeInstructions = 129; if (R200_DEBUG & RADEON_FALLBACKS) { fprintf(stderr, "more than 128 native instructions\n"); } @@ -1095,7 +1095,7 @@ else { } vp->native = GL_TRUE; - mesa_vp->NumNativeInstructions = (o_inst - vp->instr); + mesa_vp->arb.NumNativeInstructions = (o_inst - vp->instr); #if 0 fprintf(stderr, "hw program:\n"); for(i=0; i < vp->program.length; i++) @@ -1127,15 +1127,15 @@ void r200SetupVertexProg( struct gl_context *ctx ) { R200_STATECHANGE( rmesa, pvs ); rmesa->hw.pvs.cmd[PVS_CNTL_1] = (0 << R200_PVS_CNTL_1_PROGRAM_START_SHIFT) | - ((vp->mesa_program.NumNativeInstructions - 1) << R200_PVS_CNTL_1_PROGRAM_END_SHIFT) | + ((vp->mesa_program.arb.NumNativeInstructions - 1) << R200_PVS_CNTL_1_PROGRAM_END_SHIFT) | (vp->pos_end << R200_PVS_CNTL_1_POS_END_SHIFT); rmesa->hw.pvs.cmd[PVS_CNTL_2] = (0 << R200_PVS_CNTL_2_PARAM_OFFSET_SHIFT) | - (vp->mesa_program.NumNativeParameters << R200_PVS_CNTL_2_PARAM_COUNT_SHIFT); + (vp->mesa_program.arb.NumNativeParameters << R200_PVS_CNTL_2_PARAM_COUNT_SHIFT); /* maybe user clip planes just work with vertex progs... untested */ if (ctx->Transform.ClipPlanesEnabled) { R200_STATECHANGE( rmesa, tcl ); - if (vp->mesa_program.IsPositionInvariant) { + if (vp->mesa_program.arb.IsPositionInvariant) { rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= (ctx->Transform.ClipPlanesEnabled << 2); } else { @@ -1144,7 +1144,7 @@ void r200SetupVertexProg( struct gl_context *ctx ) { } if (vp != rmesa->curr_vp_hw) { - GLuint count = vp->mesa_program.NumNativeInstructions; + GLuint count = vp->mesa_program.arb.NumNativeInstructions; drm_radeon_cmd_header_t tmp; R200_STATECHANGE( rmesa, vpi[0] ); |