i = 0;
uint64_t processed_inputs = 0;
- nir_foreach_variable (variable, &nir->inputs) {
+ nir_foreach_shader_in_variable (variable, nir) {
unsigned semantic_name, semantic_index;
const struct glsl_type *type = variable->type;
}
}
- nir_foreach_variable (variable, &nir->outputs) {
+ nir_foreach_shader_out_variable (variable, nir) {
const struct glsl_type *type = variable->type;
if (nir_is_per_vertex_io(variable, nir->info.stage)) {
assert(glsl_type_is_array(type));
info->constbuf0_num_slots = nir->num_uniforms;
info->shader_buffers_declared = u_bit_consecutive(0, nir->info.num_ssbos);
- info->const_buffers_declared = u_bit_consecutive(1, nir->info.num_ubos);
- if (nir->num_uniforms > 0)
- info->const_buffers_declared |= 1;
+ info->const_buffers_declared = u_bit_consecutive(0, nir->info.num_ubos);
info->images_declared = u_bit_consecutive(0, nir->info.num_images);
- info->msaa_images_declared = u_bit_consecutive(0, nir->info.last_msaa_image + 1);
+ info->msaa_images_declared = nir->info.msaa_images;
+ info->image_buffers = nir->info.image_buffers;
info->samplers_declared = nir->info.textures_used;
info->num_written_clipdistance = nir->info.clip_distance_array_size;
void si_nir_adjust_driver_locations(struct nir_shader *nir)
{
- /* Adjust the driver location of inputs and outputs. The state tracker
+ /* Adjust the driver location of inputs and outputs. the gallium frontend
* interprets them as slots, while the ac/nir backend interprets them
* as individual components.
*/
if (nir->info.stage != MESA_SHADER_FRAGMENT) {
- nir_foreach_variable (variable, &nir->inputs)
+ nir_foreach_shader_in_variable (variable, nir)
variable->data.driver_location *= 4;
}
- nir_foreach_variable (variable, &nir->outputs)
+ nir_foreach_shader_out_variable (variable, nir)
variable->data.driver_location *= 4;
}
si_nir_opts(nir);
NIR_PASS_V(nir, nir_lower_bool_to_int32);
- NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_function_temp);
+ NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_function_temp, NULL);
if (sscreen->debug_flags & DBG(FS_CORRECT_DERIVS_AFTER_KILL))
NIR_PASS_V(nir, nir_lower_discard_to_demote);