Mesa (staging/21.0): mesa/main: remove leftover bumpmap code

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 25 18:08:54 UTC 2021


Module: Mesa
Branch: staging/21.0
Commit: 1f6ae40f9e72c0c158f0ad19ebd004af36ce4006
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1f6ae40f9e72c0c158f0ad19ebd004af36ce4006

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Aug 26 18:40:02 2020 +0200

mesa/main: remove leftover bumpmap code

This variable is only ever written as NULL, so we can omit it entirely.

Fixes: 4000c0112a4 ("Remove the ATI_envmap_bumpmap extension")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6473>
(cherry picked from commit 92ff89f6f50c773f6d3531623db2997315d63c22)

---

 .pick_status.json                    |  2 +-
 src/mesa/main/ff_fragment_shader.cpp | 13 +------------
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 3d730e5173e..da477d77844 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -31,7 +31,7 @@
         "description": "mesa/main: remove leftover bumpmap code",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "4000c0112a49c28793844f454278b50e00943173"
     },
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index 94ed943ab77..a0d42864d67 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -347,13 +347,6 @@ public:
     * else undef.
     */
 
-   /* Texcoord override from bumpmapping. */
-   ir_variable *texcoord_tex[MAX_TEXTURE_COORD_UNITS];
-
-   /* Reg containing texcoord for a texture unit,
-    * needed for bump mapping, else undef.
-    */
-
    ir_rvalue *src_previous;	/**< Reg containing color from previous
 				 * stage.  May need to be decl'd.
 				 */
@@ -735,8 +728,6 @@ static void load_texture( texenv_fragment_program *p, GLuint unit )
 
    if (!(p->state->inputs_available & (VARYING_BIT_TEX0 << unit))) {
       texcoord = get_current_attrib(p, VERT_ATTRIB_TEX0 + unit);
-   } else if (p->texcoord_tex[unit]) {
-      texcoord = new(p->mem_ctx) ir_dereference_variable(p->texcoord_tex[unit]);
    } else {
       ir_variable *tc_array = p->shader->symbols->get_variable("gl_TexCoord");
       assert(tc_array);
@@ -1089,10 +1080,8 @@ create_new_program(struct gl_context *ctx, struct state_key *key)
    _mesa_glsl_initialize_types(state);
    _mesa_glsl_initialize_variables(p.instructions, state);
 
-   for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
+   for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++)
       p.src_texture[unit] = NULL;
-      p.texcoord_tex[unit] = NULL;
-   }
 
    p.src_previous = NULL;
 



More information about the mesa-commit mailing list