summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-20 15:27:35 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commit5346630593bec80efa732c40b63e0e95a00af074 (patch)
treec321e7220a3a7b08b2b70f86f84bcccbb5cbaba2 /src/mesa/state_tracker
parentb4b450a5cbd22690b221d0252e6d11f4c0e02ab8 (diff)
r200/glsl/st/mesa: use common outputs written field
And set outputs written directly in shader_info. st/mesa changes where: Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atifs_to_tgsi.c2
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c6
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c2
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp3
-rw-r--r--src/mesa/state_tracker/st_program.c6
5 files changed, 11 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_atifs_to_tgsi.c b/src/mesa/state_tracker/st_atifs_to_tgsi.c
index 2f2876b9a63..aaa7a4b79ec 100644
--- a/src/mesa/state_tracker/st_atifs_to_tgsi.c
+++ b/src/mesa/state_tracker/st_atifs_to_tgsi.c
@@ -548,7 +548,7 @@ st_init_atifs_prog(struct gl_context *ctx, struct gl_program *prog)
{STATE_FOG_COLOR, 0, 0, 0, 0};
prog->info.inputs_read = 0;
- prog->OutputsWritten = BITFIELD64_BIT(FRAG_RESULT_COLOR);
+ prog->info.outputs_written = BITFIELD64_BIT(FRAG_RESULT_COLOR);
prog->SamplersUsed = 0;
prog->Parameters = _mesa_new_parameter_list();
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index a97a5ac5bc3..85030414a8e 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -195,7 +195,8 @@ static void update_raster_state( struct st_context *st )
*/
if (vertProg) {
if (vertProg->Id == 0) {
- if (vertProg->OutputsWritten & BITFIELD64_BIT(VARYING_SLOT_PSIZ)) {
+ if (vertProg->info.outputs_written &
+ BITFIELD64_BIT(VARYING_SLOT_PSIZ)) {
/* generated program which emits point size */
raster->point_size_per_vertex = TRUE;
}
@@ -216,7 +217,8 @@ static void update_raster_state( struct st_context *st )
last = ctx->VertexProgram._Current;
if (last)
raster->point_size_per_vertex =
- !!(last->OutputsWritten & BITFIELD64_BIT(VARYING_SLOT_PSIZ));
+ !!(last->info.outputs_written &
+ BITFIELD64_BIT(VARYING_SLOT_PSIZ));
}
}
if (!raster->point_size_per_vertex) {
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index b77000e38be..8c10ac91c5b 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -190,7 +190,7 @@ update_vp( struct st_context *st )
key.clamp_color = st->clamp_vert_color_in_shader &&
st->ctx->Light._ClampVertexColor &&
- (stvp->Base.OutputsWritten &
+ (stvp->Base.info.outputs_written &
(VARYING_SLOT_COL0 |
VARYING_SLOT_COL1 |
VARYING_SLOT_BFC0 |
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 98c80aa6b08..dba0e9c8bc4 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -6509,7 +6509,8 @@ get_mesa_program_tgsi(struct gl_context *ctx,
prog->info.double_inputs_read,
&prog->PatchInputsRead);
shrink_array_declarations(v->outputs, v->num_outputs,
- &prog->OutputsWritten, 0ULL, &prog->PatchOutputsWritten);
+ &prog->info.outputs_written, 0ULL,
+ &prog->PatchOutputsWritten);
count_resources(v, prog);
/* The GLSL IR won't be needed anymore. */
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 28b7bf6433e..b1ca0c6d6a2 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -269,7 +269,7 @@ st_translate_vertex_program(struct st_context *st,
/* Compute mapping of vertex program outputs to slots.
*/
for (attr = 0; attr < VARYING_SLOT_MAX; attr++) {
- if ((stvp->Base.OutputsWritten & BITFIELD64_BIT(attr)) == 0) {
+ if ((stvp->Base.info.outputs_written & BITFIELD64_BIT(attr)) == 0) {
stvp->result_to_output[attr] = ~0;
}
else {
@@ -754,7 +754,7 @@ st_translate_fragment_program(struct st_context *st,
* Semantics and mapping for outputs
*/
{
- GLbitfield64 outputsWritten = stfp->Base.OutputsWritten;
+ GLbitfield64 outputsWritten = stfp->Base.info.outputs_written;
/* if z is written, emit that first */
if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
@@ -1325,7 +1325,7 @@ st_translate_program_common(struct st_context *st,
* mapping and the semantic information for each output.
*/
for (attr = 0; attr < VARYING_SLOT_MAX; attr++) {
- if (prog->OutputsWritten & BITFIELD64_BIT(attr)) {
+ if (prog->info.outputs_written & BITFIELD64_BIT(attr)) {
GLuint slot = num_outputs++;
outputMapping[attr] = slot;