*/
+#include "compiler/nir/nir.h"
#include "main/context.h"
#include "main/macros.h"
#include "main/enums.h"
* BRW_NEW_FRAGMENT_PROGRAM
*/
if (brw->gen == 4 && !brw->is_g4x &&
- (brw->fragment_program->Base.InputsRead & (1 << VARYING_SLOT_POS))) {
+ (brw->fragment_program->Base.nir->info.inputs_read &
+ (1 << VARYING_SLOT_POS))) {
BEGIN_BATCH(2);
OUT_BATCH(_3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP << 16 | (2 - 2));
OUT_BATCH(0);
}
if (brw->gen < 8 && !brw->is_haswell) {
- GLbitfield64 mask = ctx->VertexProgram._Current->Base.InputsRead;
+ uint64_t mask = ctx->VertexProgram._Current->Base.nir->info.inputs_read;
/* Prior to Haswell, the hardware can't natively support GL_FIXED or
* 2_10_10_10_REV vertex formats. Set appropriate workaround flags.
*/
*/
#include "brw_state.h"
+#include "compiler/nir/nir.h"
static char const *get_qual_name(int mode)
{
if (varying == VARYING_SLOT_BFC0 || varying == VARYING_SLOT_BFC1)
frag_attrib = varying - VARYING_SLOT_BFC0 + VARYING_SLOT_COL0;
- if (!(fprog->Base.InputsRead & BITFIELD64_BIT(frag_attrib)))
+ if (!(fprog->Base.nir->info.inputs_read & BITFIELD64_BIT(frag_attrib)))
continue;
enum glsl_interp_mode mode = fprog->InterpQualifier[frag_attrib];
* Keith Whitwell <keithw@vmware.com>
*/
-
+#include "compiler/nir/nir.h"
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/enums.h"
if (key.do_point_sprite) {
key.point_sprite_coord_replace = ctx->Point.CoordReplace & 0xff;
}
- if (brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(VARYING_SLOT_PNTC))
+ if (brw->fragment_program->Base.nir->info.inputs_read &
+ BITFIELD64_BIT(VARYING_SLOT_PNTC)) {
key.do_point_coord = 1;
+ }
+
/*
* Window coordinates in a FBO are inverted, which means point
* sprite origin must be inverted, too.
brw_tcs_populate_key(struct brw_context *brw,
struct brw_tcs_prog_key *key)
{
- uint64_t per_vertex_slots = brw->tess_eval_program->Base.InputsRead;
- uint32_t per_patch_slots = brw->tess_eval_program->Base.PatchInputsRead;
+ uint64_t per_vertex_slots =
+ brw->tess_eval_program->Base.nir->info.inputs_read;
+ uint32_t per_patch_slots =
+ brw->tess_eval_program->Base.nir->info.patch_inputs_read;
struct brw_tess_ctrl_program *tcp =
(struct brw_tess_ctrl_program *) brw->tess_ctrl_program;
/* _NEW_TEXTURE */
brw_populate_sampler_prog_key_data(&brw->ctx, prog, &key->tex);
} else {
- key->outputs_written = tep->program.Base.InputsRead;
+ key->outputs_written = tep->program.Base.nir->info.inputs_read;
}
}
struct brw_tes_prog_key *key)
{
- uint64_t per_vertex_slots = brw->tess_eval_program->Base.InputsRead;
- uint32_t per_patch_slots = brw->tess_eval_program->Base.PatchInputsRead;
+ uint64_t per_vertex_slots =
+ brw->tess_eval_program->Base.nir->info.inputs_read;
+ uint32_t per_patch_slots =
+ brw->tess_eval_program->Base.nir->info.patch_inputs_read;
struct brw_tess_eval_program *tep =
(struct brw_tess_eval_program *) brw->tess_eval_program;
memset(&key, 0, sizeof(key));
key.program_string_id = btep->id;
- key.inputs_read = prog->InputsRead;
- key.patch_inputs_read = prog->PatchInputsRead;
+ key.inputs_read = prog->nir->info.inputs_read;
+ key.patch_inputs_read = prog->nir->info.patch_inputs_read;
if (shader_prog->_LinkedShaders[MESA_SHADER_TESS_CTRL]) {
struct gl_program *tcp =
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;
+ prog_data.inputs_read = vp->program.Base.nir->info.inputs_read;
if (key->copy_edgeflag) {
prog_data.inputs_read |= VERT_BIT_EDGEFLAG;
}
/* BRW_NEW_VUE_MAP_GEOM_OUT */
- if (brw->gen < 6 || _mesa_bitcount_64(fp->program.Base.InputsRead &
- BRW_FS_VARYING_INPUT_MASK) > 16)
+ if (brw->gen < 6 ||
+ _mesa_bitcount_64(fp->program.Base.nir->info.inputs_read &
+ BRW_FS_VARYING_INPUT_MASK) > 16) {
key->input_slots_valid = brw->vue_map_geom_out.slots_valid;
+ }
/* _NEW_COLOR | _NEW_BUFFERS */
key.iz_lookup |= IZ_DEPTH_WRITE_ENABLE_BIT;
}
- if (brw->gen < 6 || _mesa_bitcount_64(fp->Base.InputsRead &
- BRW_FS_VARYING_INPUT_MASK) > 16)
- key.input_slots_valid = fp->Base.InputsRead | VARYING_BIT_POS;
+ if (brw->gen < 6 || _mesa_bitcount_64(fp->Base.nir->info.inputs_read &
+ BRW_FS_VARYING_INPUT_MASK) > 16) {
+ key.input_slots_valid =
+ fp->Base.nir->info.inputs_read | VARYING_BIT_POS;
+ }
brw_setup_tex_for_precompile(brw, &key.tex, &fp->Base);
#include "brw_state.h"
#include "brw_defines.h"
#include "brw_util.h"
+#include "compiler/nir/nir.h"
#include "main/macros.h"
#include "main/fbobject.h"
#include "main/framebuffer.h"
* - VARYING_SLOT_{PSIZ,LAYER} and VARYING_SLOT_POS on gen6+
*/
- bool fs_needs_vue_header = brw->fragment_program->Base.InputsRead &
+ bool fs_needs_vue_header =
+ brw->fragment_program->Base.nir->info.inputs_read &
(VARYING_BIT_LAYER | VARYING_BIT_VIEWPORT);
*urb_entry_read_offset = fs_needs_vue_header ? 0 : 1;
* IN THE SOFTWARE.
*/
+#include "compiler/nir/nir.h"
#include "brw_context.h"
#include "brw_state.h"
#include "brw_defines.h"
/* prepare the active component dwords */
int input_index = 0;
for (int attr = 0; attr < VARYING_SLOT_MAX; attr++) {
- if (!(brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(attr)))
+ if (!(brw->fragment_program->Base.nir->info.inputs_read &
+ BITFIELD64_BIT(attr))) {
continue;
+ }
assert(input_index < 32);