} lower_tess_io_state;
static bool
-match_mask(nir_intrinsic_instr *intrin,
+match_mask(gl_shader_stage stage,
+ nir_intrinsic_instr *intrin,
uint64_t mask,
bool match_indirect)
{
return match_indirect;
uint64_t slot = nir_intrinsic_io_semantics(intrin).location;
- if (intrin->intrinsic != nir_intrinsic_load_per_vertex_input &&
+ if (stage == MESA_SHADER_TESS_CTRL &&
+ intrin->intrinsic != nir_intrinsic_load_per_vertex_input &&
intrin->intrinsic != nir_intrinsic_store_per_vertex_output)
slot -= VARYING_SLOT_PATCH0;
? st->tes_inputs_read
: st->tes_patch_inputs_read;
- return match_mask(intrin, mask, true);
+ return match_mask(MESA_SHADER_TESS_CTRL, intrin, mask, true);
}
static bool
? shader->info.outputs_read
: shader->info.patch_outputs_read;
- return match_mask(intrin, mask, true);
+ return match_mask(MESA_SHADER_TESS_CTRL, intrin, mask, true);
}
static bool
lower_tess_io_state *st = (lower_tess_io_state *) state;
/* If this is a temp-only TCS input, we don't need to use shared memory at all. */
- if (match_mask(intrin, st->tcs_temp_only_inputs, false))
+ if (match_mask(MESA_SHADER_VERTEX, intrin, st->tcs_temp_only_inputs, false))
return false;
b->cursor = nir_before_instr(instr);