diff --git a/src/intel/compiler/brw/brw_generator.cpp b/src/intel/compiler/brw/brw_generator.cpp index 11f266acf79..b71fab04269 100644 --- a/src/intel/compiler/brw/brw_generator.cpp +++ b/src/intel/compiler/brw/brw_generator.cpp @@ -1546,19 +1546,6 @@ brw_generator::get_assembly() return brw_get_program(p, &prog_data->program_size); } -void brw_prog_data_init(struct brw_stage_prog_data *prog_data, - const struct brw_compile_params *params) -{ - /* Do not memset the structure to 0, the driver might have put some bits of - * information in there. - */ - prog_data->ray_queries = params->nir->info.ray_queries; - prog_data->stage = params->nir->info.stage; - prog_data->source_hash = params->source_hash; - prog_data->total_scratch = 0; - prog_data->total_shared = params->nir->info.shared_size; -} - /* After program generation, go back and update the UIP and JIP of * BREAK, CONT, ENDIF and HALT instructions to their correct locations. */ diff --git a/src/intel/compiler/brw/brw_generator.h b/src/intel/compiler/brw/brw_generator.h index 3fcbe785259..a3285ea9b5b 100644 --- a/src/intel/compiler/brw/brw_generator.h +++ b/src/intel/compiler/brw/brw_generator.h @@ -74,6 +74,3 @@ private: mesa_shader_stage stage; void *mem_ctx; }; - -void brw_prog_data_init(struct brw_stage_prog_data *prog_data, - const struct brw_compile_params *params); diff --git a/src/intel/compiler/brw/brw_private.h b/src/intel/compiler/brw/brw_private.h index 8fda6eb5cb1..aa060c39b24 100644 --- a/src/intel/compiler/brw/brw_private.h +++ b/src/intel/compiler/brw/brw_private.h @@ -154,4 +154,7 @@ int brw_simd_select_for_workgroup_size(const struct intel_device_info *devinfo, bool brw_should_print_shader(const nir_shader *shader, uint64_t debug_flag, uint32_t source_hash); +void brw_prog_data_init(struct brw_stage_prog_data *prog_data, + const struct brw_compile_params *params); + #endif // __cplusplus diff --git a/src/intel/compiler/brw/brw_shader.cpp b/src/intel/compiler/brw/brw_shader.cpp index eac2b3207a9..5241365964a 100644 --- a/src/intel/compiler/brw/brw_shader.cpp +++ b/src/intel/compiler/brw/brw_shader.cpp @@ -1048,3 +1048,16 @@ brw_allocate_vgrf_units(brw_shader &s, unsigned units_of_REGSIZE) { return brw_vgrf(brw_allocate_vgrf_number(s, units_of_REGSIZE), BRW_TYPE_UD); } + +void brw_prog_data_init(struct brw_stage_prog_data *prog_data, + const struct brw_compile_params *params) +{ + /* Do not memset the structure to 0, the driver might have put some bits of + * information in there. + */ + prog_data->ray_queries = params->nir->info.ray_queries; + prog_data->stage = params->nir->info.stage; + prog_data->source_hash = params->source_hash; + prog_data->total_scratch = 0; + prog_data->total_shared = params->nir->info.shared_size; +}