From 9573b24ab41c285312c20e250d7434ccb9ca1cc7 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 19 Aug 2022 13:58:19 -0400 Subject: [PATCH] gallium: Remove util_make_fragment_tex_shader_xrbias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unused. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/util/u_simple_shaders.c | 47 ------------------- src/gallium/auxiliary/util/u_simple_shaders.h | 4 -- 2 files changed, 51 deletions(-) diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c index f3678872a21..4e53f2c687f 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/src/gallium/auxiliary/util/u_simple_shaders.c @@ -234,53 +234,6 @@ ureg_load_tex(struct ureg_program *ureg, struct ureg_dst out, } } -/** - * Make simple fragment texture shader, with xrbias->float conversion: - * IMM {1023/510, -384/510, 0, 1} - * TEX TEMP[0], IN[0], SAMP[0], 2D; - * MAD TEMP[0].xyz TEMP[0], IMM[0].xxxx, IMM[0].yyyy - * MOV OUT[0], TEMP[0] - * END; - * - * \param tex_target one of PIPE_TEXTURE_x - */ -void * -util_make_fragment_tex_shader_xrbias(struct pipe_context *pipe, - enum tgsi_texture_type tex_target) -{ - struct ureg_program *ureg; - struct ureg_src sampler; - struct ureg_src coord; - struct ureg_dst temp; - struct ureg_dst out; - struct ureg_src imm; - enum tgsi_return_type stype = TGSI_RETURN_TYPE_FLOAT; - - ureg = ureg_create(PIPE_SHADER_FRAGMENT); - if (!ureg) - return NULL; - - imm = ureg_imm4f(ureg, 1023.0f/510.0f, -384.0f/510.0f, 0.0f, 1.0f); - sampler = ureg_DECL_sampler(ureg, 0); - ureg_DECL_sampler_view(ureg, 0, tex_target, stype, stype, stype, stype); - coord = ureg_DECL_fs_input(ureg, - TGSI_SEMANTIC_GENERIC, 0, - TGSI_INTERPOLATE_LINEAR); - out = ureg_DECL_output(ureg, TGSI_SEMANTIC_COLOR, 0); - temp = ureg_DECL_temporary(ureg); - - ureg_TEX(ureg, temp, tex_target, coord, sampler); - ureg_MAD(ureg, ureg_writemask(temp, TGSI_WRITEMASK_XYZ), - ureg_src(temp), - ureg_scalar(imm, TGSI_SWIZZLE_X), - ureg_scalar(imm, TGSI_SWIZZLE_Y)); - ureg_MOV(ureg, out, ureg_src(temp)); - ureg_END(ureg); - - return ureg_create_shader_and_destroy(ureg, pipe); -} - - /** * Make simple fragment texture shader: * TEX TEMP[0], IN[0], SAMP[0], 2D; diff --git a/src/gallium/auxiliary/util/u_simple_shaders.h b/src/gallium/auxiliary/util/u_simple_shaders.h index b52ef242136..07c2055ad9c 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.h +++ b/src/gallium/auxiliary/util/u_simple_shaders.h @@ -68,10 +68,6 @@ util_make_layered_clear_helper_vertex_shader(struct pipe_context *pipe); extern void * util_make_layered_clear_geometry_shader(struct pipe_context *pipe); -void * -util_make_fragment_tex_shader_xrbias(struct pipe_context *pipe, - enum tgsi_texture_type tex_target); - extern void * util_make_fragment_tex_shader(struct pipe_context *pipe, enum tgsi_texture_type tex_target,