aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-02-28 11:44:26 -0800
committerKenneth Graunke <[email protected]>2017-03-01 10:27:36 -0800
commitf356d053935e81faf91905cf64dbdb91d0bc271d (patch)
tree358a9be0f75b07c88cfbc1d913f316b8ac744708 /src
parent4061bbccf2ad81612afbf8c3ded58c3b7146c5b2 (diff)
i965: Drop unused STATE_TEXRECT_SCALE code.
In the past, we used this on Gen4-5 to transform non-normalized texture coordinates (for sampler2DRect) to normalized ones. We also used it on Gen6-7.5 for sampler2DRect with GL_CLAMP. Jason dropped this code in 6c8ba59cff14a1a86273f4008ff2a8e68335ab25 in favor of using nir_lower_tex(), which just does a textureSize() call. But we were still setting up these state references for useless uniform data. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_link.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c23
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.h2
3 files changed, 0 insertions, 27 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
index 977feb37fc2..261d8861c35 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -224,8 +224,6 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
prog->ShadowSamplers = shader->shadow_samplers;
_mesa_update_shader_textures_used(shProg, prog);
- brw_add_texrect_params(prog);
-
bool debug_enabled =
(INTEL_DEBUG & intel_debug_flag_for_shader_stage(shader->Stage));
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 673dc502ad4..1d36b4b8938 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -244,8 +244,6 @@ brwProgramStringNotify(struct gl_context *ctx,
brw->ctx.NewDriverState |= BRW_NEW_FRAGMENT_PROGRAM;
newFP->id = get_new_program_id(brw->screen);
- brw_add_texrect_params(prog);
-
prog->nir = brw_create_nir(brw, NULL, prog, MESA_SHADER_FRAGMENT, true);
brw_fs_precompile(ctx, prog);
@@ -267,8 +265,6 @@ brwProgramStringNotify(struct gl_context *ctx,
*/
_tnl_program_string(ctx, target, prog);
- brw_add_texrect_params(prog);
-
prog->nir = brw_create_nir(brw, NULL, prog, MESA_SHADER_VERTEX,
compiler->scalar_stage[MESA_SHADER_VERTEX]);
@@ -346,25 +342,6 @@ brw_blend_barrier(struct gl_context *ctx)
}
void
-brw_add_texrect_params(struct gl_program *prog)
-{
- for (int texunit = 0; texunit < BRW_MAX_TEX_UNIT; texunit++) {
- if (!(prog->TexturesUsed[texunit] & (1 << TEXTURE_RECT_INDEX)))
- continue;
-
- int tokens[STATE_LENGTH] = {
- STATE_INTERNAL,
- STATE_TEXRECT_SCALE,
- texunit,
- 0,
- 0
- };
-
- _mesa_add_state_reference(prog->Parameters, (gl_state_index *)tokens);
- }
-}
-
-void
brw_get_scratch_bo(struct brw_context *brw,
drm_intel_bo **scratch_bo, int size)
{
diff --git a/src/mesa/drivers/dri/i965/brw_program.h b/src/mesa/drivers/dri/i965/brw_program.h
index 6eda165e875..55b9e5441d7 100644
--- a/src/mesa/drivers/dri/i965/brw_program.h
+++ b/src/mesa/drivers/dri/i965/brw_program.h
@@ -48,8 +48,6 @@ void brw_populate_sampler_prog_key_data(struct gl_context *ctx,
bool brw_debug_recompile_sampler_key(struct brw_context *brw,
const struct brw_sampler_prog_key_data *old_key,
const struct brw_sampler_prog_key_data *key);
-void brw_add_texrect_params(struct gl_program *prog);
-
void
brw_mark_surface_used(struct brw_stage_prog_data *prog_data,
unsigned surf_index);