st/mesa: fix format query for GL_ARB_texture_rg
authorBrian Paul <brianp@vmware.com>
Thu, 14 Feb 2013 19:24:02 +0000 (12:24 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 15 Feb 2013 16:25:14 +0000 (09:25 -0700)
The GL_ARB_texture_rg spec says that we need to support both texturing
and rendering for the GL_RED and GL_RG formats.  So move the format
check up into the rendertarget_mapping[] list.  Also, add
PIPE_FORMAT_R8_UNORM to the list of formats required.

Note: This is a candidate for the stable branches.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
src/mesa/state_tracker/st_extensions.c

index 4d2d43d7e0a56531560a853f10388bca991af1d6..11db9d3f318f1687c9a6e9653a0697f1fda89f7e 100644 (file)
@@ -421,6 +421,10 @@ void st_init_extensions(struct st_context *st)
       { { o(EXT_texture_integer) },
         { PIPE_FORMAT_R32G32B32A32_UINT,
           PIPE_FORMAT_R32G32B32A32_SINT } },
+
+      { { o(ARB_texture_rg) },
+        { PIPE_FORMAT_R8_UNORM,
+          PIPE_FORMAT_R8G8_UNORM } },
    };
 
    /* Required: depth stencil and sampler support */
@@ -444,9 +448,6 @@ void st_init_extensions(struct st_context *st)
           PIPE_FORMAT_RGTC2_UNORM,
           PIPE_FORMAT_RGTC2_SNORM } },
 
-      { { o(ARB_texture_rg) },
-        { PIPE_FORMAT_R8G8_UNORM } },
-
       { { o(EXT_texture_compression_latc) },
         { PIPE_FORMAT_LATC1_UNORM,
           PIPE_FORMAT_LATC1_SNORM,