From: Jason Ekstrand Date: Fri, 29 Sep 2017 17:12:12 +0000 (-0700) Subject: intel/compiler: Stop adding params for texture sizes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0435b204a51ae2d3409416fe11122f3b7c88bc3;p=mesa.git intel/compiler: Stop adding params for texture sizes We haven't needed this ever since we started using NIR for lowering rectangle textures. Reviewed-by: Jordan Justen Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c index 0c505b3e505..41a543138ba 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 6f2f6f224ce..1b5774e4e8a 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;