ARB_texture_rg: Handle RED and RG the same as RGB for tex env
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 28 Sep 2010 20:58:28 +0000 (13:58 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 1 Oct 2010 22:49:13 +0000 (15:49 -0700)
src/mesa/main/texstate.c

index dae173d1bde047c3965325c5c7d8090611fabb2a..30c978c1cdda9f6372894667f9649b777e6dcb8d 100644 (file)
@@ -179,6 +179,8 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state,
       break;
 
    case GL_LUMINANCE:
+   case GL_RED:
+   case GL_RG:
    case GL_RGB:
    case GL_YCBCR_MESA:
    case GL_DUDV_ATI:
@@ -219,6 +221,8 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state,
       case GL_INTENSITY:
         state->SourceRGB[0] = GL_PREVIOUS;
         break;
+      case GL_RED:
+      case GL_RG:
       case GL_RGB:
       case GL_YCBCR_MESA:
       case GL_DUDV_ATI:
@@ -244,6 +248,8 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state,
         state->OperandA[2] = GL_SRC_ALPHA;
         /* FALLTHROUGH */
       case GL_LUMINANCE:
+      case GL_RED:
+      case GL_RG:
       case GL_RGB:
       case GL_LUMINANCE_ALPHA:
       case GL_RGBA: