<div dir="ltr">Nice to see the last remnants of this go.<div><br></div><div>For the series:</div><div><br></div><div>Reviewed-by: Chris Forbes <<a href="mailto:chrisforbes@google.com">chrisforbes@google.com</a>></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 1, 2017 at 9:53 AM, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In the past, we used this on Gen4-5 to transform non-normalized texture<br>
coordinates (for sampler2DRect) to normalized ones.  We also used it on<br>
Gen6-7.5 for sampler2DRect with GL_CLAMP.<br>
<br>
Jason dropped this code in 6c8ba59cff14a1a86273f4008ff2a8<wbr>e68335ab25<br>
in favor of using nir_lower_tex(), which just does a textureSize()<br>
call.  But we were still setting up these state references for<br>
useless uniform data.<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
 src/mesa/drivers/dri/i965/brw_<wbr>link.cpp  |  2 --<br>
 src/mesa/drivers/dri/i965/brw_<wbr>program.c | 23 -----------------------<br>
 src/mesa/drivers/dri/i965/brw_<wbr>program.h |  2 --<br>
 3 files changed, 27 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_link.cpp b/src/mesa/drivers/dri/i965/<wbr>brw_link.cpp<br>
index 977feb37fc2..261d8861c35 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_link.cpp<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_link.cpp<br>
@@ -224,8 +224,6 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)<br>
       prog->ShadowSamplers = shader->shadow_samplers;<br>
       _mesa_update_shader_textures_<wbr>used(shProg, prog);<br>
<br>
-      brw_add_texrect_params(prog);<br>
-<br>
       bool debug_enabled =<br>
          (INTEL_DEBUG & intel_debug_flag_for_shader_<wbr>stage(shader->Stage));<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_program.c b/src/mesa/drivers/dri/i965/<wbr>brw_program.c<br>
index 673dc502ad4..1d36b4b8938 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_program.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_program.c<br>
@@ -244,8 +244,6 @@ brwProgramStringNotify(struct gl_context *ctx,<br>
         brw->ctx.NewDriverState |= BRW_NEW_FRAGMENT_PROGRAM;<br>
       newFP->id = get_new_program_id(brw-><wbr>screen);<br>
<br>
-      brw_add_texrect_params(prog);<br>
-<br>
       prog->nir = brw_create_nir(brw, NULL, prog, MESA_SHADER_FRAGMENT, true);<br>
<br>
       brw_fs_precompile(ctx, prog);<br>
@@ -267,8 +265,6 @@ brwProgramStringNotify(struct gl_context *ctx,<br>
        */<br>
       _tnl_program_string(ctx, target, prog);<br>
<br>
-      brw_add_texrect_params(prog);<br>
-<br>
       prog->nir = brw_create_nir(brw, NULL, prog, MESA_SHADER_VERTEX,<br>
                                  compiler->scalar_stage[MESA_<wbr>SHADER_VERTEX]);<br>
<br>
@@ -346,25 +342,6 @@ brw_blend_barrier(struct gl_context *ctx)<br>
 }<br>
<br>
 void<br>
-brw_add_texrect_params(struct gl_program *prog)<br>
-{<br>
-   for (int texunit = 0; texunit < BRW_MAX_TEX_UNIT; texunit++) {<br>
-      if (!(prog->TexturesUsed[texunit] & (1 << TEXTURE_RECT_INDEX)))<br>
-         continue;<br>
-<br>
-      int tokens[STATE_LENGTH] = {<br>
-         STATE_INTERNAL,<br>
-         STATE_TEXRECT_SCALE,<br>
-         texunit,<br>
-         0,<br>
-         0<br>
-      };<br>
-<br>
-      _mesa_add_state_reference(<wbr>prog->Parameters, (gl_state_index *)tokens);<br>
-   }<br>
-}<br>
-<br>
-void<br>
 brw_get_scratch_bo(struct brw_context *brw,<br>
                   drm_intel_bo **scratch_bo, int size)<br>
 {<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_program.h b/src/mesa/drivers/dri/i965/<wbr>brw_program.h<br>
index 6eda165e875..55b9e5441d7 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_program.h<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_program.h<br>
@@ -48,8 +48,6 @@ void brw_populate_sampler_prog_key_<wbr>data(struct gl_context *ctx,<br>
 bool brw_debug_recompile_sampler_<wbr>key(struct brw_context *brw,<br>
                                      const struct brw_sampler_prog_key_data *old_key,<br>
                                      const struct brw_sampler_prog_key_data *key);<br>
-void brw_add_texrect_params(struct gl_program *prog);<br>
-<br>
 void<br>
 brw_mark_surface_used(struct brw_stage_prog_data *prog_data,<br>
                       unsigned surf_index);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.1<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>