prog_data.base.nr_params = param_count;
prog_data.base.nr_image_params = cp->program.info.num_images;
- brw_nir_setup_glsl_uniforms(cp->program.nir, prog, &cp->program,
- &prog_data.base, true);
+ brw_nir_setup_glsl_uniforms(cp->program.nir, &cp->program,&prog_data.base,
+ true);
if (unlikely(brw->perf_debug)) {
start_busy = (brw->batch.last_bo &&
prog_data.base.base.nr_params = param_count;
prog_data.base.base.nr_image_params = gp->program.info.num_images;
- brw_nir_setup_glsl_uniforms(gp->program.nir, prog, &gp->program,
+ brw_nir_setup_glsl_uniforms(gp->program.nir, &gp->program,
&prog_data.base.base,
compiler->scalar_stage[MESA_SHADER_GEOMETRY]);
enum glsl_base_type brw_glsl_base_type_for_nir_type(nir_alu_type type);
void brw_nir_setup_glsl_uniforms(nir_shader *shader,
- struct gl_shader_program *shader_prog,
const struct gl_program *prog,
struct brw_stage_prog_data *stage_prog_data,
bool is_scalar);
static void
brw_nir_setup_glsl_uniform(gl_shader_stage stage, nir_variable *var,
- struct gl_shader_program *shader_prog,
+ const struct gl_program *prog,
struct brw_stage_prog_data *stage_prog_data,
bool is_scalar)
{
* with our name, or the prefix of a component that starts with our name.
*/
unsigned uniform_index = var->data.driver_location / 4;
- for (unsigned u = 0; u < shader_prog->data->NumUniformStorage; u++) {
+ for (unsigned u = 0; u < prog->sh.data->NumUniformStorage; u++) {
struct gl_uniform_storage *storage =
- &shader_prog->data->UniformStorage[u];
+ &prog->sh.data->UniformStorage[u];
if (storage->builtin)
continue;
}
void
-brw_nir_setup_glsl_uniforms(nir_shader *shader,
- struct gl_shader_program *shader_prog,
- const struct gl_program *prog,
+brw_nir_setup_glsl_uniforms(nir_shader *shader, const struct gl_program *prog,
struct brw_stage_prog_data *stage_prog_data,
bool is_scalar)
{
brw_nir_setup_glsl_builtin_uniform(var, prog, stage_prog_data,
is_scalar);
} else {
- brw_nir_setup_glsl_uniform(shader->stage, var, shader_prog,
- stage_prog_data, is_scalar);
+ brw_nir_setup_glsl_uniform(shader->stage, var, prog, stage_prog_data,
+ is_scalar);
}
}
}
tcp->program.info.num_images);
prog_data.base.base.nr_image_params = tcp->program.info.num_images;
- brw_nir_setup_glsl_uniforms(nir, shader_prog, &tcp->program,
- &prog_data.base.base,
+ brw_nir_setup_glsl_uniforms(nir, &tcp->program, &prog_data.base.base,
compiler->scalar_stage[MESA_SHADER_TESS_CTRL]);
} else {
/* Upload the Patch URB Header as the first two uniforms.
prog_data.base.base.nr_params = param_count;
prog_data.base.base.nr_image_params = tep->program.info.num_images;
- brw_nir_setup_glsl_uniforms(nir, shader_prog, &tep->program,
- &prog_data.base.base,
+ brw_nir_setup_glsl_uniforms(nir, &tep->program, &prog_data.base.base,
compiler->scalar_stage[MESA_SHADER_TESS_EVAL]);
int st_index = -1;
stage_prog_data->nr_params = param_count;
if (prog) {
- brw_nir_setup_glsl_uniforms(vp->program.nir, prog, &vp->program,
+ brw_nir_setup_glsl_uniforms(vp->program.nir, &vp->program,
&prog_data.base.base,
compiler->scalar_stage[MESA_SHADER_VERTEX]);
} else {
prog_data.base.nr_params = param_count;
if (prog) {
- brw_nir_setup_glsl_uniforms(fp->program.nir, prog, &fp->program,
+ brw_nir_setup_glsl_uniforms(fp->program.nir, &fp->program,
&prog_data.base, true);
} else {
brw_nir_setup_arb_uniforms(fp->program.nir, &fp->program,