Home | History | Annotate | Download | only in nir

Lines Matching refs:state

83 setup_inputs(lower_2side_state *state)
88 nir_foreach_variable(var, &state->shader->inputs) {
99 assert(state->colors_count < ARRAY_SIZE(state->colors));
100 state->colors[state->colors_count].front = var;
101 state->colors_count++;
107 if (state->colors_count == 0)
111 for (int i = 0; i < state->colors_count; i++) {
114 if (state->colors[i].front->data.location == VARYING_SLOT_COL0)
119 state->colors[i].back = create_input(state->shader, ++maxloc, slot);
127 lower_2side_state *state)
129 nir_builder *b = &state->b;
141 for (idx = 0; idx < state->colors_count; idx++) {
143 state->colors[idx].front->data.driver_location;
150 if (idx == state->colors_count)
158 nir_ssa_def *front = load_input(b, state->colors[idx].front);
159 nir_ssa_def *back = load_input(b, state->colors[idx].back);
171 lower_2side_state *state)
173 nir_builder *b = &state->b;
178 nir_lower_two_sided_color_block(block, state);
188 lower_2side_state state = {
195 if (setup_inputs(&state) != 0)
200 nir_lower_two_sided_color_impl(function->impl, &state);