crocus: Pass devinfo directly in crocus_setup_uniforms
Instead of reaching through brw_compiler. This will make easy future changes on brw_compiler side. Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19834>
This commit is contained in:
parent
5a5bc3dd52
commit
4239512210
1 changed files with 7 additions and 9 deletions
|
|
@ -436,7 +436,7 @@ setup_vec4_image_sysval(uint32_t *sysvals, uint32_t idx,
|
|||
* ideal situation (though the backend can reduce this).
|
||||
*/
|
||||
static void
|
||||
crocus_setup_uniforms(const struct brw_compiler *compiler,
|
||||
crocus_setup_uniforms(ASSERTED const struct intel_device_info *devinfo,
|
||||
void *mem_ctx,
|
||||
nir_shader *nir,
|
||||
struct brw_stage_prog_data *prog_data,
|
||||
|
|
@ -444,8 +444,6 @@ crocus_setup_uniforms(const struct brw_compiler *compiler,
|
|||
unsigned *out_num_system_values,
|
||||
unsigned *out_num_cbufs)
|
||||
{
|
||||
UNUSED const struct intel_device_info *devinfo = compiler->devinfo;
|
||||
|
||||
const unsigned CROCUS_MAX_SYSTEM_VALUES =
|
||||
PIPE_MAX_SHADER_IMAGES * BRW_IMAGE_PARAM_SIZE;
|
||||
enum brw_param_builtin *system_values =
|
||||
|
|
@ -1208,7 +1206,7 @@ crocus_compile_vs(struct crocus_context *ice,
|
|||
|
||||
prog_data->use_alt_mode = nir->info.use_legacy_math_rules;
|
||||
|
||||
crocus_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values,
|
||||
crocus_setup_uniforms(devinfo, mem_ctx, nir, prog_data, &system_values,
|
||||
&num_system_values, &num_cbufs);
|
||||
|
||||
crocus_lower_swizzles(nir, &key->base.tex);
|
||||
|
|
@ -1420,7 +1418,7 @@ crocus_compile_tcs(struct crocus_context *ice,
|
|||
if (ish) {
|
||||
nir = nir_shader_clone(mem_ctx, ish->nir);
|
||||
|
||||
crocus_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values,
|
||||
crocus_setup_uniforms(devinfo, mem_ctx, nir, prog_data, &system_values,
|
||||
&num_system_values, &num_cbufs);
|
||||
|
||||
crocus_lower_swizzles(nir, &key->base.tex);
|
||||
|
|
@ -1592,7 +1590,7 @@ crocus_compile_tes(struct crocus_context *ice,
|
|||
if (key->clamp_pointsize)
|
||||
nir_lower_point_size(nir, 1.0, 255.0);
|
||||
|
||||
crocus_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values,
|
||||
crocus_setup_uniforms(devinfo, mem_ctx, nir, prog_data, &system_values,
|
||||
&num_system_values, &num_cbufs);
|
||||
crocus_lower_swizzles(nir, &key->base.tex);
|
||||
struct crocus_binding_table bt;
|
||||
|
|
@ -1732,7 +1730,7 @@ crocus_compile_gs(struct crocus_context *ice,
|
|||
if (key->clamp_pointsize)
|
||||
nir_lower_point_size(nir, 1.0, 255.0);
|
||||
|
||||
crocus_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values,
|
||||
crocus_setup_uniforms(devinfo, mem_ctx, nir, prog_data, &system_values,
|
||||
&num_system_values, &num_cbufs);
|
||||
crocus_lower_swizzles(nir, &key->base.tex);
|
||||
struct crocus_binding_table bt;
|
||||
|
|
@ -1858,7 +1856,7 @@ crocus_compile_fs(struct crocus_context *ice,
|
|||
|
||||
prog_data->use_alt_mode = nir->info.use_legacy_math_rules;
|
||||
|
||||
crocus_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values,
|
||||
crocus_setup_uniforms(devinfo, mem_ctx, nir, prog_data, &system_values,
|
||||
&num_system_values, &num_cbufs);
|
||||
|
||||
/* Lower output variables to load_output intrinsics before setting up
|
||||
|
|
@ -2555,7 +2553,7 @@ crocus_compile_cs(struct crocus_context *ice,
|
|||
|
||||
NIR_PASS_V(nir, brw_nir_lower_cs_intrinsics);
|
||||
|
||||
crocus_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values,
|
||||
crocus_setup_uniforms(devinfo, mem_ctx, nir, prog_data, &system_values,
|
||||
&num_system_values, &num_cbufs);
|
||||
crocus_lower_swizzles(nir, &key->base.tex);
|
||||
struct crocus_binding_table bt;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue