We now get everything we need directly from gl_program so there is no need for this. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>tags/17.0-branchpoint
 Timothy Arceri
					
					9 years ago
						Timothy Arceri
					
					9 years ago
				| @@ -36,7 +36,6 @@ | |||
| static void | |||
| assign_cs_binding_table_offsets(const struct gen_device_info *devinfo, | |||
| const struct gl_shader_program *shader_prog, | |||
| const struct gl_program *prog, | |||
| struct brw_cs_prog_data *prog_data) | |||
| { | |||
| @@ -46,8 +45,7 @@ assign_cs_binding_table_offsets(const struct gen_device_info *devinfo, | |||
| prog_data->binding_table.work_groups_start = next_binding_table_offset; | |||
| next_binding_table_offset++; | |||
| brw_assign_common_binding_table_offsets(MESA_SHADER_COMPUTE, devinfo, | |||
| shader_prog, prog, &prog_data->base, | |||
| brw_assign_common_binding_table_offsets(devinfo, prog, &prog_data->base, | |||
| next_binding_table_offset); | |||
| } | |||
| @@ -81,7 +79,7 @@ brw_codegen_cs_prog(struct brw_context *brw, | |||
| prog_data.base.total_shared = cp->program.info.cs.shared_size; | |||
| } | |||
| assign_cs_binding_table_offsets(devinfo, prog, &cp->program, &prog_data); | |||
| assign_cs_binding_table_offsets(devinfo, &cp->program, &prog_data); | |||
| /* Allocate the references to the uniforms that will end up in the | |||
| * prog_data associated with the compiled program, and which will be freed | |||
| @@ -74,7 +74,6 @@ brw_gs_debug_recompile(struct brw_context *brw, struct gl_program *prog, | |||
| static void | |||
| assign_gs_binding_table_offsets(const struct gen_device_info *devinfo, | |||
| const struct gl_shader_program *shader_prog, | |||
| const struct gl_program *prog, | |||
| struct brw_gs_prog_data *prog_data) | |||
| { | |||
| @@ -83,10 +82,8 @@ assign_gs_binding_table_offsets(const struct gen_device_info *devinfo, | |||
| */ | |||
| uint32_t reserved = devinfo->gen == 6 ? BRW_MAX_SOL_BINDINGS : 0; | |||
| brw_assign_common_binding_table_offsets(MESA_SHADER_GEOMETRY, devinfo, | |||
| shader_prog, prog, | |||
| &prog_data->base.base, | |||
| reserved); | |||
| brw_assign_common_binding_table_offsets(devinfo, prog, | |||
| &prog_data->base.base, reserved); | |||
| } | |||
| bool | |||
| @@ -104,7 +101,7 @@ brw_codegen_gs_prog(struct brw_context *brw, | |||
| memset(&prog_data, 0, sizeof(prog_data)); | |||
| assign_gs_binding_table_offsets(devinfo, prog, &gp->program, &prog_data); | |||
| assign_gs_binding_table_offsets(devinfo, &gp->program, &prog_data); | |||
| /* Allocate the references to the uniforms that will end up in the | |||
| * prog_data associated with the compiled program, and which will be freed | |||
| @@ -1191,19 +1191,13 @@ backend_shader::calculate_cfg() | |||
| * trigger some of our asserts that surface indices are < BRW_MAX_SURFACES. | |||
| */ | |||
| uint32_t | |||
| brw_assign_common_binding_table_offsets(gl_shader_stage stage, | |||
| const struct gen_device_info *devinfo, | |||
| const struct gl_shader_program *shader_prog, | |||
| brw_assign_common_binding_table_offsets(const struct gen_device_info *devinfo, | |||
| const struct gl_program *prog, | |||
| struct brw_stage_prog_data *stage_prog_data, | |||
| uint32_t next_binding_table_offset) | |||
| { | |||
| const struct gl_linked_shader *shader = NULL; | |||
| int num_textures = util_last_bit(prog->SamplersUsed); | |||
| if (shader_prog) | |||
| shader = shader_prog->_LinkedShaders[stage]; | |||
| stage_prog_data->binding_table.texture_start = next_binding_table_offset; | |||
| next_binding_table_offset += num_textures; | |||
| @@ -272,9 +272,7 @@ struct brw_gs_compile | |||
| }; | |||
| uint32_t | |||
| brw_assign_common_binding_table_offsets(gl_shader_stage stage, | |||
| const struct gen_device_info *devinfo, | |||
| const struct gl_shader_program *shader_prog, | |||
| brw_assign_common_binding_table_offsets(const struct gen_device_info *devinfo, | |||
| const struct gl_program *prog, | |||
| struct brw_stage_prog_data *stage_prog_data, | |||
| uint32_t next_binding_table_offset); | |||
| @@ -210,8 +210,7 @@ brw_codegen_tcs_prog(struct brw_context *brw, | |||
| prog_data.base.base.nr_params = param_count; | |||
| if (tcp) { | |||
| brw_assign_common_binding_table_offsets(MESA_SHADER_TESS_CTRL, devinfo, | |||
| shader_prog, &tcp->program, | |||
| brw_assign_common_binding_table_offsets(devinfo, &tcp->program, | |||
| &prog_data.base.base, 0); | |||
| prog_data.base.base.image_param = | |||
| @@ -91,8 +91,7 @@ brw_codegen_tes_prog(struct brw_context *brw, | |||
| memset(&prog_data, 0, sizeof(prog_data)); | |||
| brw_assign_common_binding_table_offsets(MESA_SHADER_TESS_EVAL, devinfo, | |||
| shader_prog, &tep->program, | |||
| brw_assign_common_binding_table_offsets(devinfo, &tep->program, | |||
| &prog_data.base.base, 0); | |||
| switch (tep->program.info.tes.spacing) { | |||
| @@ -161,9 +161,8 @@ brw_codegen_vs_prog(struct brw_context *brw, | |||
| mem_ctx = ralloc_context(NULL); | |||
| brw_assign_common_binding_table_offsets(MESA_SHADER_VERTEX, devinfo, prog, | |||
| &vp->program, &prog_data.base.base, | |||
| 0); | |||
| brw_assign_common_binding_table_offsets(devinfo, &vp->program, | |||
| &prog_data.base.base, 0); | |||
| /* Allocate the references to the uniforms that will end up in the | |||
| * prog_data associated with the compiled program, and which will be freed | |||
| @@ -43,7 +43,6 @@ | |||
| static void | |||
| assign_fs_binding_table_offsets(const struct gen_device_info *devinfo, | |||
| const struct gl_shader_program *shader_prog, | |||
| const struct gl_program *prog, | |||
| const struct brw_wm_prog_key *key, | |||
| struct brw_wm_prog_data *prog_data) | |||
| @@ -57,8 +56,7 @@ assign_fs_binding_table_offsets(const struct gen_device_info *devinfo, | |||
| next_binding_table_offset += MAX2(key->nr_color_regions, 1); | |||
| next_binding_table_offset = | |||
| brw_assign_common_binding_table_offsets(MESA_SHADER_FRAGMENT, devinfo, | |||
| shader_prog, prog, &prog_data->base, | |||
| brw_assign_common_binding_table_offsets(devinfo, prog, &prog_data->base, | |||
| next_binding_table_offset); | |||
| if (prog->nir->info->outputs_read && !key->coherent_fb_fetch) { | |||
| @@ -156,8 +154,7 @@ brw_codegen_wm_prog(struct brw_context *brw, | |||
| if (!prog) | |||
| prog_data.base.use_alt_mode = true; | |||
| assign_fs_binding_table_offsets(devinfo, prog, &fp->program, key, | |||
| &prog_data); | |||
| assign_fs_binding_table_offsets(devinfo, &fp->program, key, &prog_data); | |||
| /* Allocate the references to the uniforms that will end up in the | |||
| * prog_data associated with the compiled program, and which will be freed | |||