Module: Mesa Branch: master Commit: 518f83236b90b21e08585ada4555655c8f14b0ba URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=518f83236b90b21e08585ada4555655c8f14b0ba
Author: Caio Marcelo de Oliveira Filho <[email protected]> Date: Thu May 23 01:08:15 2019 -0700 iris: Pull brw_nir_analyze_ubo_ranges() call out setup_uniforms We'll change iris to perform lowering of the binding table indices earlier (before the backend kick in), but the backend compiler uses the result of the analysis to identify load_ubo intrinsics, so we do the analysis after the lowering to have the right indices. Reviewed-by: Kenneth Graunke <[email protected]> --- src/gallium/drivers/iris/iris_program.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 87b887aa3b6..f925c07f464 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -548,9 +548,6 @@ iris_setup_uniforms(const struct brw_compiler *compiler, nir_validate_shader(nir, "after remap"); - if (nir->info.stage != MESA_SHADER_COMPUTE) - brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges); - /* We don't use params[], but fs_visitor::nir_setup_uniforms() asserts * about it for compute shaders, so go ahead and make some fake ones * which the backend will dead code eliminate. @@ -644,6 +641,8 @@ iris_compile_vs(struct iris_context *ice, assign_common_binding_table_offsets(devinfo, nir, prog_data, 0, num_system_values, num_cbufs); + brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges); + brw_compute_vue_map(devinfo, &vue_prog_data->vue_map, nir->info.outputs_written, nir->info.separate_shader); @@ -822,6 +821,7 @@ iris_compile_tcs(struct iris_context *ice, &num_system_values, &num_cbufs); assign_common_binding_table_offsets(devinfo, nir, prog_data, 0, num_system_values, num_cbufs); + brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges); } else { nir = brw_nir_create_passthrough_tcs(mem_ctx, compiler, options, key); @@ -953,6 +953,8 @@ iris_compile_tes(struct iris_context *ice, assign_common_binding_table_offsets(devinfo, nir, prog_data, 0, num_system_values, num_cbufs); + brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges); + struct brw_vue_map input_vue_map; brw_compute_tess_vue_map(&input_vue_map, key->inputs_read, key->patch_inputs_read); @@ -1059,6 +1061,8 @@ iris_compile_gs(struct iris_context *ice, assign_common_binding_table_offsets(devinfo, nir, prog_data, 0, num_system_values, num_cbufs); + brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges); + brw_compute_vue_map(devinfo, &vue_prog_data->vue_map, nir->info.outputs_written, nir->info.separate_shader); @@ -1161,6 +1165,9 @@ iris_compile_fs(struct iris_context *ice, assign_common_binding_table_offsets(devinfo, nir, prog_data, MAX2(key->nr_color_regions, 1), num_system_values, num_cbufs); + + brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges); + char *error_str = NULL; const unsigned *program = brw_compile_fs(compiler, &ice->dbg, mem_ctx, key, fs_prog_data, _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
