mesa: Drop unused STATE_TEXRECT_SCALE program statevars.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 28 Feb 2017 19:48:51 +0000 (11:48 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 1 Mar 2017 18:27:38 +0000 (10:27 -0800)
The last user is now gone.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
src/mesa/program/prog_statevars.c
src/mesa/program/prog_statevars.h

index 5b073ac34bbdd6b442452696f2d09b24b59bb535..803d0afd8d37e7d5e42a282e14a68f5a7bbba886 100644 (file)
@@ -458,24 +458,6 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
                    1);
          return;
 
-      case STATE_TEXRECT_SCALE:
-         /* Value = { 1/texWidth, 1/texHeight, 0, 1 }.
-          * Used to convert unnormalized texcoords to normalized texcoords.
-          */
-         {
-            const int unit = (int) state[2];
-            const struct gl_texture_object *texObj
-               = ctx->Texture.Unit[unit]._Current;
-            if (texObj) {
-               struct gl_texture_image *texImage = texObj->Image[0][0];
-               ASSIGN_4V(value,
-                         (GLfloat) (1.0 / texImage->Width),
-                         (GLfloat) (1.0 / texImage->Height),
-                         0.0f, 1.0f);
-            }
-         }
-         return;
-
       case STATE_FOG_PARAMS_OPTIMIZED:
          /* for simpler per-vertex/pixel fog calcs. POW (for EXP/EXP2 fog)
           * might be more expensive than EX2 on some hw, plus it needs
@@ -709,8 +691,6 @@ _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH])
       case STATE_NORMAL_SCALE:
          return _NEW_MODELVIEW;
 
-      case STATE_TEXRECT_SCALE:
-        return _NEW_TEXTURE;
       case STATE_FOG_PARAMS_OPTIMIZED:
         return _NEW_FOG;
       case STATE_POINT_SIZE_CLAMPED:
@@ -905,9 +885,6 @@ append_token(char *dst, gl_state_index k)
    case STATE_NORMAL_SCALE:
       append(dst, "normalScale");
       break;
-   case STATE_TEXRECT_SCALE:
-      append(dst, "texrectScale");
-      break;
    case STATE_FOG_PARAMS_OPTIMIZED:
       append(dst, "fogParamsOptimized");
       break;
index 7fecb37212d538d25463a701d0392476b5bad675..3fdb413c42104a16c1b2b53b1aacd9f372cbffa9 100644 (file)
@@ -117,7 +117,6 @@ typedef enum gl_state_index_ {
    STATE_CURRENT_ATTRIB,        /* ctx->Current vertex attrib value */
    STATE_CURRENT_ATTRIB_MAYBE_VP_CLAMPED,        /* ctx->Current vertex attrib value after passthrough vertex processing */
    STATE_NORMAL_SCALE,
-   STATE_TEXRECT_SCALE,
    STATE_FOG_PARAMS_OPTIMIZED,  /* for faster fog calc */
    STATE_POINT_SIZE_CLAMPED,    /* includes implementation dependent size clamp */
    STATE_LIGHT_SPOT_DIR_NORMALIZED,   /* pre-normalized spot dir */