i915g: Correct and add supperted texture formats
authorJakob Bornecrantz <wallbraker@gmail.com>
Wed, 24 Mar 2010 23:41:21 +0000 (00:41 +0100)
committerJakob Bornecrantz <wallbraker@gmail.com>
Wed, 24 Mar 2010 23:45:31 +0000 (00:45 +0100)
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/i915/i915_state_sampler.c

index e5bf4a20bd0e97f7b0f1c996371fae52fb63ac2d..48a39edad20ebfa8e1335e317572a28b1afb03ff 100644 (file)
@@ -165,8 +165,12 @@ i915_is_format_supported(struct pipe_screen *screen,
                          unsigned geom_flags)
 {
    static const enum pipe_format tex_supported[] = {
-      PIPE_FORMAT_A8B8G8R8_UNORM,
       PIPE_FORMAT_B8G8R8A8_UNORM,
+      PIPE_FORMAT_B8G8R8X8_UNORM,
+      PIPE_FORMAT_R8G8B8A8_UNORM,
+#if 0
+      PIPE_FORMAT_R8G8B8X8_UNORM,
+#endif
       PIPE_FORMAT_B5G6R5_UNORM,
       PIPE_FORMAT_L8_UNORM,
       PIPE_FORMAT_A8_UNORM,
index d6da82254907dfd386ba11a3ad98eb6a3100efde..4c326561cb9ab860348a9469d83106928251a6a7 100644 (file)
@@ -192,6 +192,14 @@ translate_texture_format(enum pipe_format pipeFormat)
       return MAPSURF_16BIT | MT_16BIT_ARGB4444;
    case PIPE_FORMAT_B8G8R8A8_UNORM:
       return MAPSURF_32BIT | MT_32BIT_ARGB8888;
+   case PIPE_FORMAT_B8G8R8X8_UNORM:
+      return MAPSURF_32BIT | MT_32BIT_XRGB8888;
+   case PIPE_FORMAT_R8G8B8A8_UNORM:
+      return MAPSURF_32BIT | MT_32BIT_ABGR8888;
+#if 0
+   case PIPE_FORMAT_R8G8B8X8_UNORM:
+      return MAPSURF_32BIT | MT_32BIT_XBGR8888;
+#endif
    case PIPE_FORMAT_YUYV:
       return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
    case PIPE_FORMAT_UYVY: