&prog_data.base.base,
compiler->scalar_stage[MESA_SHADER_GEOMETRY]);
- GLbitfield64 outputs_written = gp->program.Base.OutputsWritten;
+ uint64_t outputs_written = gp->program.Base.nir->info.outputs_written;
prog_data.base.cull_distance_mask =
((1 << gp->program.Base.CullDistanceArraySize) - 1) <<
memset(key, 0, sizeof(*key));
if (brw->tess_ctrl_program) {
- per_vertex_slots |= brw->tess_ctrl_program->Base.OutputsWritten;
- per_patch_slots |= brw->tess_ctrl_program->Base.PatchOutputsWritten;
+ per_vertex_slots |=
+ brw->tess_ctrl_program->Base.nir->info.outputs_written;
+ per_patch_slots |=
+ brw->tess_ctrl_program->Base.nir->info.patch_outputs_written;
}
if (brw->gen < 8 || !tcp)
key.tes_primitive_mode = GL_TRIANGLES;
}
- key.outputs_written = prog->OutputsWritten;
- key.patch_outputs_written = prog->PatchOutputsWritten;
+ key.outputs_written = prog->nir->info.outputs_written;
+ key.patch_outputs_written = prog->nir->info.patch_outputs_written;
success = brw_codegen_tcs_prog(brw, shader_prog, btcp, &key);
* be stored in the Patch URB Entry as well.
*/
if (brw->tess_ctrl_program) {
- per_vertex_slots |= brw->tess_ctrl_program->Base.OutputsWritten;
- per_patch_slots |= brw->tess_ctrl_program->Base.PatchOutputsWritten;
+ per_vertex_slots |=
+ brw->tess_ctrl_program->Base.nir->info.outputs_written;
+ per_patch_slots |=
+ brw->tess_ctrl_program->Base.nir->info.patch_outputs_written;
}
/* Ignore gl_TessLevelInner/Outer - we treat them as system values,
if (shader_prog->_LinkedShaders[MESA_SHADER_TESS_CTRL]) {
struct gl_program *tcp =
shader_prog->_LinkedShaders[MESA_SHADER_TESS_CTRL]->Program;
- key.inputs_read |= tcp->OutputsWritten;
- key.patch_inputs_read |= tcp->PatchOutputsWritten;
+ key.inputs_read |= tcp->nir->info.outputs_written;
+ key.patch_inputs_read |= tcp->nir->info.patch_outputs_written;
}
/* Ignore gl_TessLevelInner/Outer - they're system values. */
&prog_data.base.base);
}
- GLbitfield64 outputs_written =
- brw_vs_outputs_written(brw, key, vp->program.Base.OutputsWritten);
+ uint64_t outputs_written =
+ brw_vs_outputs_written(brw, key,
+ vp->program.Base.nir->info.outputs_written);
prog_data.inputs_read = vp->program.Base.InputsRead;
if (key->copy_edgeflag) {
}
}
- if (prog->OutputsWritten & (VARYING_BIT_COL0 | VARYING_BIT_COL1 |
- VARYING_BIT_BFC0 | VARYING_BIT_BFC1)) {
+ if (prog->nir->info.outputs_written &
+ (VARYING_BIT_COL0 | VARYING_BIT_COL1 | VARYING_BIT_BFC0 |
+ VARYING_BIT_BFC1)) {
/* _NEW_LIGHT | _NEW_BUFFERS */
key->clamp_vertex_color = ctx->Light._ClampVertexColor;
}
brw_setup_tex_for_precompile(brw, &key.tex, prog);
key.program_string_id = bvp->id;
key.clamp_vertex_color =
- (prog->OutputsWritten & (VARYING_BIT_COL0 | VARYING_BIT_COL1 |
- VARYING_BIT_BFC0 | VARYING_BIT_BFC1));
+ (prog->nir->info.outputs_written &
+ (VARYING_BIT_COL0 | VARYING_BIT_COL1 | VARYING_BIT_BFC0 |
+ VARYING_BIT_BFC1));
success = brw_codegen_vs_prog(brw, shader_prog, bvp, &key);
lookup |= IZ_PS_KILL_ALPHATEST_BIT;
}
- if (fp->program.Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH))
+ if (fp->program.Base.nir->info.outputs_written &
+ BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
lookup |= IZ_PS_COMPUTES_DEPTH_BIT;
+ }
/* _NEW_DEPTH */
if (ctx->Depth.Test)
memset(&key, 0, sizeof(key));
+ uint64_t outputs_written = fp->Base.nir->info.outputs_written;
+
if (brw->gen < 6) {
if (fp->Base.nir->info.fs.uses_discard)
key.iz_lookup |= IZ_PS_KILL_ALPHATEST_BIT;
- if (fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH))
+ if (outputs_written & BITFIELD64_BIT(FRAG_RESULT_DEPTH))
key.iz_lookup |= IZ_PS_COMPUTES_DEPTH_BIT;
/* Just assume depth testing. */
brw_setup_tex_for_precompile(brw, &key.tex, &fp->Base);
- key.nr_color_regions = _mesa_bitcount_64(fp->Base.OutputsWritten &
+ key.nr_color_regions = _mesa_bitcount_64(outputs_written &
~(BITFIELD64_BIT(FRAG_RESULT_DEPTH) |
BITFIELD64_BIT(FRAG_RESULT_STENCIL) |
BITFIELD64_BIT(FRAG_RESULT_SAMPLE_MASK)));
#include "brw_state.h"
#include "brw_defines.h"
#include "brw_wm.h"
+#include "compiler/nir/nir.h"
/***********************************************************************
* WM unit - fragment programs and rasterization
/* _NEW_BUFFERS */
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[i];
+ uint64_t outputs_written = fp->Base.nir->info.outputs_written;
/* _NEW_COLOR */
- if (rb &&
- (fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_COLOR) ||
- fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DATA0 + i)) &&
+ if (rb && (outputs_written & BITFIELD64_BIT(FRAG_RESULT_COLOR) ||
+ outputs_written & BITFIELD64_BIT(FRAG_RESULT_DATA0 + i)) &&
(ctx->Color.ColorMask[i][0] ||
ctx->Color.ColorMask[i][1] ||
ctx->Color.ColorMask[i][2] ||
/* BRW_NEW_FRAGMENT_PROGRAM */
wm->wm5.program_uses_depth = prog_data->uses_src_depth;
- wm->wm5.program_computes_depth = (fp->Base.OutputsWritten &
+ wm->wm5.program_computes_depth = (fp->Base.nir->info.outputs_written &
BITFIELD64_BIT(FRAG_RESULT_DEPTH)) != 0;
/* _NEW_BUFFERS
* Override for NULL depthbuffer case, required by the Pixel Shader Computed