mesa: Move DepthMode to texture object

GL_DEPTH_TEXTURE_MODE isn't meant to be part of sampler state based on
compatibility profile specifications.

OpenGL specification 4.1 compatibility 20100725 3.9.2:
"... The values accepted in the pname parameter
are TEXTURE_WRAP_S, TEXTURE_WRAP_T, TEXTURE_WRAP_R, TEXTURE_MIN_-
FILTER, TEXTURE_MAG_FILTER, TEXTURE_BORDER_COLOR, TEXTURE_MIN_-
LOD, TEXTURE_MAX_LOD, TEXTURE_LOD_BIAS, TEXTURE_COMPARE_MODE, and
TEXTURE_COMPARE_FUNC. Texture state listed in table 6.25 but not listed here and
in the sampler state in table 6.26 is not part of the sampler state, and remains in the
texture object."

The list of states is in Table 6.24 "Textures (state per texture
object)" instead of 6.25 mentioned in the specification text.

Same can be found from 3.3 compatibility specification.

Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 1376219..9213499 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -383,14 +383,14 @@
 
    case GL_DEPTH_TEXTURE_MODE_ARB:
       if (ctx->Extensions.ARB_depth_texture) {
-         if (texObj->Sampler.DepthMode == params[0])
+         if (texObj->DepthMode == params[0])
             return GL_FALSE;
          if (params[0] == GL_LUMINANCE ||
              params[0] == GL_INTENSITY ||
              params[0] == GL_ALPHA ||
              (ctx->Extensions.ARB_texture_rg && params[0] == GL_RED)) {
             flush(ctx);
-            texObj->Sampler.DepthMode = params[0];
+            texObj->DepthMode = params[0];
             return GL_TRUE;
          }
          goto invalid_param;
@@ -1157,7 +1157,7 @@
       case GL_DEPTH_TEXTURE_MODE_ARB:
          if (!ctx->Extensions.ARB_depth_texture)
             goto invalid_pname;
-         *params = (GLfloat) obj->Sampler.DepthMode;
+         *params = (GLfloat) obj->DepthMode;
          break;
       case GL_TEXTURE_LOD_BIAS:
          *params = obj->Sampler.LodBias;
@@ -1303,7 +1303,7 @@
       case GL_DEPTH_TEXTURE_MODE_ARB:
          if (!ctx->Extensions.ARB_depth_texture)
             goto invalid_pname;
-         *params = (GLint) obj->Sampler.DepthMode;
+         *params = (GLint) obj->DepthMode;
          break;
       case GL_TEXTURE_LOD_BIAS:
          *params = (GLint) obj->Sampler.LodBias;