From e9dd776ef91b1454be31a86d716c46240454d26e Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Tue, 7 Dec 2021 09:52:18 -0800 Subject: [PATCH] r300: Remove the non_normalized_coords from the shader key. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TexSrcTarget has to be RECT when this is set, anyway. Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/r300/compiler/radeon_code.h | 7 ------- src/gallium/drivers/r300/compiler/radeon_program_tex.c | 3 +-- src/gallium/drivers/r300/r300_fs.c | 2 -- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/gallium/drivers/r300/compiler/radeon_code.h b/src/gallium/drivers/r300/compiler/radeon_code.h index 47f46d0791c..0c90a7ccb52 100644 --- a/src/gallium/drivers/r300/compiler/radeon_code.h +++ b/src/gallium/drivers/r300/compiler/radeon_code.h @@ -155,13 +155,6 @@ struct r300_fragment_program_external_state { */ unsigned compare_mode_enabled : 1; - /** - * If the sampler will receive non-normalized coords, - * this field is set. The scaling factor is given by - * RC_STATE_R300_TEXRECT_FACTOR. - */ - unsigned non_normalized_coords : 1; - /** * This field specifies wrapping modes for the sampler. * diff --git a/src/gallium/drivers/r300/compiler/radeon_program_tex.c b/src/gallium/drivers/r300/compiler/radeon_program_tex.c index a7b3ad74809..4882527bf44 100644 --- a/src/gallium/drivers/r300/compiler/radeon_program_tex.c +++ b/src/gallium/drivers/r300/compiler/radeon_program_tex.c @@ -127,8 +127,7 @@ int radeonTransformTEX( struct r300_fragment_program_compiler *compiler = (struct r300_fragment_program_compiler*)data; rc_wrap_mode wrapmode = compiler->state.unit[inst->U.I.TexSrcUnit].wrap_mode; - int is_rect = inst->U.I.TexSrcTarget == RC_TEXTURE_RECT || - compiler->state.unit[inst->U.I.TexSrcUnit].non_normalized_coords; + int is_rect = inst->U.I.TexSrcTarget == RC_TEXTURE_RECT; if (inst->U.I.Opcode != RC_OPCODE_TEX && inst->U.I.Opcode != RC_OPCODE_TXB && diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index 99d9aba76d9..d1904c5dafc 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -169,8 +169,6 @@ static void get_external_state( state->unit[i].texture_compare_func = s->state.compare_func; } - state->unit[i].non_normalized_coords = !s->state.normalized_coords; - /* Pass texture swizzling to the compiler, some lowering passes need it. */ if (state->unit[i].compare_mode_enabled) { state->unit[i].texture_swizzle =