summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
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/program
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/program')
-rw-r--r--src/mesa/program/arbprogparse.c4
-rw-r--r--src/mesa/program/prog_print.c3
-rw-r--r--src/mesa/program/prog_to_nir.c5
-rw-r--r--src/mesa/program/program_parse.y2
-rw-r--r--src/mesa/program/programopt.c8
5 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c
index 53f661f64f4..e545d710e52 100644
--- a/src/mesa/program/arbprogparse.c
+++ b/src/mesa/program/arbprogparse.c
@@ -108,7 +108,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
program->NumNativeTexInstructions = prog.NumTexInstructions;
program->NumNativeTexIndirections = prog.NumTexIndirections;
program->info.inputs_read = prog.info.inputs_read;
- program->OutputsWritten = prog.OutputsWritten;
+ program->info.outputs_written = prog.info.outputs_written;
program->IndirectRegisterFiles = prog.IndirectRegisterFiles;
for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) {
program->TexturesUsed[i] = prog.TexturesUsed[i];
@@ -197,7 +197,7 @@ _mesa_parse_arb_vertex_program(struct gl_context *ctx, GLenum target,
program->NumNativeAttributes = prog.NumNativeAttributes;
program->NumNativeAddressRegs = prog.NumNativeAddressRegs;
program->info.inputs_read = prog.info.inputs_read;
- program->OutputsWritten = prog.OutputsWritten;
+ program->info.outputs_written = prog.info.outputs_written;
program->IndirectRegisterFiles = prog.IndirectRegisterFiles;
program->IsPositionInvariant = (state.option.PositionInvariant)
? GL_TRUE : GL_FALSE;
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index 19d578579ee..182da6df449 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -874,7 +874,8 @@ _mesa_fprint_program_parameters(FILE *f,
fprintf(f, "InputsRead: %" PRIx64 " (0b%s)\n",
(uint64_t) prog->info.inputs_read, binary(prog->info.inputs_read));
fprintf(f, "OutputsWritten: %" PRIx64 " (0b%s)\n",
- (uint64_t) prog->OutputsWritten, binary(prog->OutputsWritten));
+ (uint64_t) prog->info.outputs_written,
+ binary(prog->info.outputs_written));
fprintf(f, "NumInstructions=%d\n", prog->NumInstructions);
fprintf(f, "NumTemporaries=%d\n", prog->NumTemporaries);
fprintf(f, "NumParameters=%d\n", prog->NumParameters);
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 9c3ebc01644..3c62456106c 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -945,11 +945,11 @@ setup_registers_and_variables(struct ptn_compile *c)
}
/* Create output registers and variables. */
- int max_outputs = util_last_bit(c->prog->OutputsWritten);
+ int max_outputs = util_last_bit(c->prog->info.outputs_written);
c->output_regs = rzalloc_array(c, nir_register *, max_outputs);
for (int i = 0; i < max_outputs; i++) {
- if (!(c->prog->OutputsWritten & BITFIELD64_BIT(i)))
+ if (!(c->prog->info.outputs_written & BITFIELD64_BIT(i)))
continue;
/* Since we can't load from outputs in the IR, we make temporaries
@@ -1051,7 +1051,6 @@ prog_to_nir(const struct gl_program *prog,
s->info->num_abos = 0;
s->info->num_ssbos = 0;
s->info->num_images = 0;
- s->info->outputs_written = prog->OutputsWritten;
s->info->system_values_read = prog->SystemValuesRead;
s->info->uses_texture_gather = false;
s->info->uses_clip_distance_out = false;
diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y
index 2210c0ce8a8..41aeb241ffe 100644
--- a/src/mesa/program/program_parse.y
+++ b/src/mesa/program/program_parse.y
@@ -594,7 +594,7 @@ maskedDstReg: dstReg optionalMask
YYERROR;
}
- state->prog->OutputsWritten |= BITFIELD64_BIT($$.Index);
+ state->prog->info.outputs_written |= BITFIELD64_BIT($$.Index);
}
}
;
diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c
index 3c9839bf248..b4bbbdae76b 100644
--- a/src/mesa/program/programopt.c
+++ b/src/mesa/program/programopt.c
@@ -108,7 +108,7 @@ _mesa_insert_mvp_dp4_code(struct gl_context *ctx, struct gl_program *vprog)
vprog->Instructions = newInst;
vprog->NumInstructions = newLen;
vprog->info.inputs_read |= VERT_BIT_POS;
- vprog->OutputsWritten |= BITFIELD64_BIT(VARYING_SLOT_POS);
+ vprog->info.outputs_written |= BITFIELD64_BIT(VARYING_SLOT_POS);
}
@@ -209,7 +209,7 @@ _mesa_insert_mvp_mad_code(struct gl_context *ctx, struct gl_program *vprog)
vprog->Instructions = newInst;
vprog->NumInstructions = newLen;
vprog->info.inputs_read |= VERT_BIT_POS;
- vprog->OutputsWritten |= BITFIELD64_BIT(VARYING_SLOT_POS);
+ vprog->info.outputs_written |= BITFIELD64_BIT(VARYING_SLOT_POS);
}
@@ -264,7 +264,7 @@ _mesa_append_fog_code(struct gl_context *ctx, struct gl_program *fprog,
return;
}
- if (!(fprog->OutputsWritten & (1 << FRAG_RESULT_COLOR))) {
+ if (!(fprog->info.outputs_written & (1 << FRAG_RESULT_COLOR))) {
/* program doesn't output color, so nothing to do */
return;
}
@@ -409,7 +409,7 @@ _mesa_append_fog_code(struct gl_context *ctx, struct gl_program *fprog,
fprog->Instructions = newInst;
fprog->NumInstructions = inst - newInst;
fprog->info.inputs_read |= VARYING_BIT_FOGC;
- assert(fprog->OutputsWritten & (1 << FRAG_RESULT_COLOR));
+ assert(fprog->info.outputs_written & (1 << FRAG_RESULT_COLOR));
}