memset(&key, 0, sizeof(key));
key.program_string_id = bcp->id;
- brw_setup_tex_for_precompile(brw, &key.tex, prog);
+ brw_setup_tex_for_precompile(&brw->screen->devinfo, &key.tex, prog);
uint32_t old_prog_offset = brw->cs.base.prog_offset;
struct brw_stage_prog_data *old_prog_data = brw->cs.base.prog_data;
memset(&key, 0, sizeof(key));
- brw_setup_tex_for_precompile(brw, &key.tex, prog);
+ brw_setup_tex_for_precompile(&brw->screen->devinfo, &key.tex, prog);
key.program_string_id = bgp->id;
success = brw_codegen_gs_prog(brw, bgp, &key);
}
void
-brw_setup_tex_for_precompile(struct brw_context *brw,
+brw_setup_tex_for_precompile(const struct gen_device_info *devinfo,
struct brw_sampler_prog_key_data *tex,
struct gl_program *prog)
{
- const struct gen_device_info *devinfo = &brw->screen->devinfo;
const bool has_shader_channel_select = devinfo->is_haswell || devinfo->gen >= 8;
unsigned sampler_count = util_last_bit(prog->SamplersUsed);
for (unsigned i = 0; i < sampler_count; i++) {
void brw_shader_gather_info(nir_shader *nir, struct gl_program *prog);
-void brw_setup_tex_for_precompile(struct brw_context *brw,
+void brw_setup_tex_for_precompile(const struct gen_device_info *devinfo,
struct brw_sampler_prog_key_data *tex,
struct gl_program *prog);
memset(&key, 0, sizeof(key));
key.program_string_id = btcp->id;
- brw_setup_tex_for_precompile(brw, &key.tex, prog);
+ brw_setup_tex_for_precompile(&brw->screen->devinfo, &key.tex, prog);
/* Guess that the input and output patches have the same dimensionality. */
if (devinfo->gen < 8)
key.patch_inputs_read |= tcp->nir->info.patch_outputs_written;
}
- brw_setup_tex_for_precompile(brw, &key.tex, prog);
+ brw_setup_tex_for_precompile(&brw->screen->devinfo, &key.tex, prog);
success = brw_codegen_tes_prog(brw, btep, &key);
memset(&key, 0, sizeof(key));
- brw_setup_tex_for_precompile(brw, &key.tex, prog);
+ brw_setup_tex_for_precompile(&brw->screen->devinfo, &key.tex, prog);
key.program_string_id = bvp->id;
key.clamp_vertex_color =
(prog->info.outputs_written &
key.input_slots_valid = prog->info.inputs_read | VARYING_BIT_POS;
}
- brw_setup_tex_for_precompile(brw, &key.tex, prog);
+ brw_setup_tex_for_precompile(&brw->screen->devinfo, &key.tex, prog);
key.nr_color_regions = _mesa_bitcount_64(outputs_written &
~(BITFIELD64_BIT(FRAG_RESULT_DEPTH) |