diff options
author | Timothy Arceri <timothy.arceri@collabora.com> | 2016-11-05 09:34:52 +1100 |
---|---|---|
committer | Timothy Arceri <timothy.arceri@collabora.com> | 2017-01-06 11:21:41 +1100 |
commit | 9ca14f583c2613643671c1d5a8bd2b98745f4c7c (patch) | |
tree | 91c2d6bbab62bb9d0537445b2db5955496d2ddf2 /src/mesa/drivers/dri | |
parent | f5bc127b2f140213a8ceb58c4ed2d9b9a4c0449c (diff) |
i965: stop passing gl_shader_program to brw_assign_common_binding_table_offsets()
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>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cs.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs.c | 9 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.cpp | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.h | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_tcs.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_tes.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 7 |
8 files changed, 13 insertions, 32 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c index f220846aa2c..c39637306eb 100644 --- a/src/mesa/drivers/dri/i965/brw_cs.c +++ b/src/mesa/drivers/dri/i965/brw_cs.c @@ -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 diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 7886737c7ab..53ed07b55b9 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -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 diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index cabaf622a6f..a07084364c3 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -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; diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h index 6b5ee3719a9..f6a9d1b58d9 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.h +++ b/src/mesa/drivers/dri/i965/brw_shader.h @@ -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); diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c index 3f8798a82ae..1ae116b47d0 100644 --- a/src/mesa/drivers/dri/i965/brw_tcs.c +++ b/src/mesa/drivers/dri/i965/brw_tcs.c @@ -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 = diff --git a/src/mesa/drivers/dri/i965/brw_tes.c b/src/mesa/drivers/dri/i965/brw_tes.c index 9adde20e5ab..d53c9c36b13 100644 --- a/src/mesa/drivers/dri/i965/brw_tes.c +++ b/src/mesa/drivers/dri/i965/brw_tes.c @@ -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) { diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 24b76a89ab6..f9044ebf3e3 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -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 diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 3a800ad96d9..e67208c1ee8 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -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 |