From 5346630593bec80efa732c40b63e0e95a00af074 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 20 Oct 2016 15:27:35 +1100 Subject: r200/glsl/st/mesa: use common outputs written field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And set outputs written directly in shader_info. st/mesa changes where: Reviewed-by: Marek Olšák Reviewed-by: Jason Ekstrand --- src/mesa/drivers/dri/r200/r200_tcl.c | 2 +- src/mesa/drivers/dri/r200/r200_vertprog.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c index b556c866503..26968afc644 100644 --- a/src/mesa/drivers/dri/r200/r200_tcl.c +++ b/src/mesa/drivers/dri/r200/r200_tcl.c @@ -427,7 +427,7 @@ static GLboolean r200_run_tcl_render( struct gl_context *ctx, We only need to change compsel. */ GLuint out_compsel = 0; const GLbitfield64 vp_out = - rmesa->curr_vp_hw->mesa_program.OutputsWritten; + rmesa->curr_vp_hw->mesa_program.info.outputs_written; vimap_rev = &rmesa->curr_vp_hw->inputmap_rev[0]; assert(vp_out & BITFIELD64_BIT(VARYING_SLOT_POS)); diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index b4574a7eed5..3f1d53e7270 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -425,14 +425,14 @@ static GLboolean r200_translate_vertex_program(struct gl_context *ctx, struct r2 } #endif - if ((mesa_vp->OutputsWritten & + if ((mesa_vp->info.outputs_written & ~((1 << VARYING_SLOT_POS) | (1 << VARYING_SLOT_COL0) | (1 << VARYING_SLOT_COL1) | (1 << VARYING_SLOT_FOGC) | (1 << VARYING_SLOT_TEX0) | (1 << VARYING_SLOT_TEX1) | (1 << VARYING_SLOT_TEX2) | (1 << VARYING_SLOT_TEX3) | (1 << VARYING_SLOT_TEX4) | (1 << VARYING_SLOT_TEX5) | (1 << VARYING_SLOT_PSIZ))) != 0) { if (R200_DEBUG & RADEON_FALLBACKS) { fprintf(stderr, "can't handle vert prog outputs 0x%llx\n", - (unsigned long long) mesa_vp->OutputsWritten); + (unsigned long long) mesa_vp->info.outputs_written); } return GL_FALSE; } @@ -447,13 +447,14 @@ static GLboolean r200_translate_vertex_program(struct gl_context *ctx, struct r2 /* FIXME: is changing the prog safe to do here? */ if (mesa_vp->IsPositionInvariant && /* make sure we only do this once */ - !(mesa_vp->OutputsWritten & (1 << VARYING_SLOT_POS))) { + !(mesa_vp->info.outputs_written & (1 << VARYING_SLOT_POS))) { _mesa_insert_mvp_code(ctx, mesa_vp); } /* for fogc, can't change mesa_vp, as it would hose swtnl, and exp with base e isn't directly available neither. */ - if ((mesa_vp->OutputsWritten & (1 << VARYING_SLOT_FOGC)) && !vp->fogpidx) { + if ((mesa_vp->info.outputs_written & (1 << VARYING_SLOT_FOGC)) && + !vp->fogpidx) { struct gl_program_parameter_list *paramList; gl_state_index tokens[STATE_LENGTH] = { STATE_FOG_PARAMS, 0, 0, 0, 0 }; paramList = mesa_vp->Parameters; @@ -575,7 +576,7 @@ static GLboolean r200_translate_vertex_program(struct gl_context *ctx, struct r2 } } - if (!(mesa_vp->OutputsWritten & (1 << VARYING_SLOT_POS))) { + if (!(mesa_vp->info.outputs_written & (1 << VARYING_SLOT_POS))) { if (R200_DEBUG & RADEON_FALLBACKS) { fprintf(stderr, "can't handle vert prog without position output\n"); } -- cgit v1.2.3