static nir_variable *
get_var(struct exec_list *list, int driver_location)
{
- nir_foreach_variable(v, list) {
+ nir_foreach_variable (v, list) {
if (v->data.driver_location == driver_location) {
return v;
}
static void
build_primitive_map(nir_shader *shader, struct primitive_map *map, struct exec_list *list)
{
- nir_foreach_variable(var, list) {
+ nir_foreach_variable (var, list) {
switch (var->data.location) {
case VARYING_SLOT_TESS_LEVEL_OUTER:
case VARYING_SLOT_TESS_LEVEL_INNER:
static void
lower_vs_block(nir_block *block, nir_builder *b, struct state *state)
{
- nir_foreach_instr_safe(instr, block) {
+ nir_foreach_instr_safe (instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;
else
state.header = nir_load_gs_header_ir3(&b);
- nir_foreach_block_safe(block, impl)
+ nir_foreach_block_safe (block, impl)
lower_vs_block(block, &b, &state);
nir_metadata_preserve(impl, nir_metadata_block_index |
static void
lower_tess_ctrl_block(nir_block *block, nir_builder *b, struct state *state)
{
- nir_foreach_instr_safe(instr, block) {
+ nir_foreach_instr_safe (instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;
state.header = nir_load_tcs_header_ir3(&b);
- nir_foreach_block_safe(block, impl)
+ nir_foreach_block_safe (block, impl)
lower_tess_ctrl_block(block, &b, &state);
/* Now move the body of the TCS into a conditional:
static void
lower_tess_eval_block(nir_block *block, nir_builder *b, struct state *state)
{
- nir_foreach_instr_safe(instr, block) {
+ nir_foreach_instr_safe (instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;
nir_builder b;
nir_builder_init(&b, impl);
- nir_foreach_block_safe(block, impl)
+ nir_foreach_block_safe (block, impl)
lower_tess_eval_block(block, &b, &state);
nir_metadata_preserve(impl, 0);
{
nir_intrinsic_instr *outputs[32] = {};
- nir_foreach_instr_safe(instr, block) {
+ nir_foreach_instr_safe (instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;
{
uint32_t components[32] = {};
- nir_foreach_variable(var, list) {
+ nir_foreach_variable (var, list) {
uint32_t mask =
((1 << glsl_get_components(glsl_without_array(var->type))) - 1) << var->data.location_frac;
components[var->data.driver_location] |= mask;
}
- nir_foreach_variable_safe(var, list) {
+ nir_foreach_variable_safe (var, list) {
uint32_t mask =
((1 << glsl_get_components(glsl_without_array(var->type))) - 1) << var->data.location_frac;
bool subset =
build_primitive_map(shader, &state.map, &shader->inputs);
uint32_t loc = 0;
- nir_foreach_variable(var, &shader->outputs) {
+ nir_foreach_variable (var, &shader->outputs) {
uint32_t end = var->data.driver_location + glsl_count_attribute_slots(var->type, false);
loc = MAX2(loc, end);
}
state.header = nir_load_gs_header_ir3(&b);
- nir_foreach_variable(var, &shader->outputs) {
+ nir_foreach_variable (var, &shader->outputs) {
state.output_vars[var->data.driver_location] =
nir_local_variable_create(impl, var->type,
ralloc_asprintf(var, "%s:gs-temp", var->name));
nir_store_var(&b, state.emitted_vertex_var, nir_imm_int(&b, 0), 0x1);
nir_store_var(&b, state.vertex_flags_var, nir_imm_int(&b, 4), 0x1);
- nir_foreach_block_safe(block, impl)
+ nir_foreach_block_safe (block, impl)
lower_gs_block(block, &b, &state);
set_foreach(impl->end_block->predecessors, block_entry) {