We haven't needed this ever since we started using NIR for lowering rectangle textures. --- src/mesa/drivers/dri/i965/brw_cs.c | 3 --- src/mesa/drivers/dri/i965/brw_wm.c | 3 --- 2 files changed, 6 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c index 0c505b3..41a5431 100644 --- a/src/mesa/drivers/dri/i965/brw_cs.c +++ b/src/mesa/drivers/dri/i965/brw_cs.c @@ -53,7 +53,6 @@ brw_codegen_cs_prog(struct brw_context *brw, struct brw_cs_prog_key *key) { const struct gen_device_info *devinfo = &brw->screen->devinfo; - struct gl_context *ctx = &brw->ctx; const GLuint *program; void *mem_ctx = ralloc_context(NULL); GLuint program_size; @@ -87,8 +86,6 @@ brw_codegen_cs_prog(struct brw_context *brw, /* The backend also sometimes add a param for the thread local id. */ prog_data.thread_local_id_index = param_count++; - /* The backend also sometimes adds params for texture size. */ - param_count += 2 * ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits; prog_data.base.param = rzalloc_array(NULL, uint32_t, param_count); prog_data.base.pull_param = rzalloc_array(NULL, uint32_t, param_count); prog_data.base.nr_params = param_count; diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 6f2f6f2..1b5774e 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -129,7 +129,6 @@ brw_codegen_wm_prog(struct brw_context *brw, struct brw_vue_map *vue_map) { const struct gen_device_info *devinfo = &brw->screen->devinfo; - struct gl_context *ctx = &brw->ctx; void *mem_ctx = ralloc_context(NULL); struct brw_wm_prog_data prog_data; const GLuint *program; @@ -150,8 +149,6 @@ brw_codegen_wm_prog(struct brw_context *brw, * by the state cache. */ int param_count = fp->program.nir->num_uniforms / 4; - /* The backend also sometimes adds params for texture size. */ - param_count += 2 * ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits; prog_data.base.param = rzalloc_array(NULL, uint32_t, param_count); prog_data.base.pull_param = rzalloc_array(NULL, uint32_t, param_count); prog_data.base.nr_params = param_count; -- 2.5.0.400.gff86faf _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev