i915g: Support PIPE_FORMAT_B10G10R10A2_UNORM.
authorStéphane Marchesin <marcheu@chromium.org>
Tue, 28 Jun 2011 08:41:57 +0000 (01:41 -0700)
committerStéphane Marchesin <marcheu@chromium.org>
Tue, 28 Jun 2011 08:41:57 +0000 (01:41 -0700)
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/i915/i915_state_sampler.c
src/gallium/drivers/i915/i915_state_static.c

index 5e62b8250e06a8dfb2e2c646fce1b0d361bfe48a..e743f6031eb765609d2b82aea85461c25c58614c 100644 (file)
@@ -266,6 +266,7 @@ i915_is_format_supported(struct pipe_screen *screen,
       PIPE_FORMAT_R8G8B8A8_UNORM,
       PIPE_FORMAT_R8G8B8X8_UNORM,
       PIPE_FORMAT_B5G6R5_UNORM,
+      PIPE_FORMAT_B10G10R10A2_UNORM,
       PIPE_FORMAT_L8_UNORM,
       PIPE_FORMAT_A8_UNORM,
       PIPE_FORMAT_I8_UNORM,
@@ -286,6 +287,7 @@ i915_is_format_supported(struct pipe_screen *screen,
       PIPE_FORMAT_B8G8R8A8_UNORM,
       PIPE_FORMAT_R8G8B8A8_UNORM,
       PIPE_FORMAT_B5G6R5_UNORM,
+      PIPE_FORMAT_B10G10R10A2_UNORM,
       PIPE_FORMAT_L8_UNORM,
       PIPE_FORMAT_A8_UNORM,
       PIPE_FORMAT_I8_UNORM,
index 5b2abda88a12df9599f890408e546b50cce8cd50..0103f7c35309fe44670d935efb9639bae020a0a8 100644 (file)
@@ -212,6 +212,8 @@ static uint translate_texture_format(enum pipe_format pipeFormat,
       return MAPSURF_16BIT | MT_16BIT_ARGB1555;
    case PIPE_FORMAT_B4G4R4A4_UNORM:
       return MAPSURF_16BIT | MT_16BIT_ARGB4444;
+   case PIPE_FORMAT_B10G10R10A2_UNORM:
+      return MAPSURF_32BIT | MT_32BIT_ARGB2101010;
    case PIPE_FORMAT_B8G8R8A8_UNORM:
       return MAPSURF_32BIT | MT_32BIT_ARGB8888;
    case PIPE_FORMAT_B8G8R8X8_UNORM:
index 7116c0a5ca13c583668cf1252aa1f82895a8301b..0e4000bc2abe96bd8b13d1150c1108402e4199d1 100644 (file)
@@ -42,8 +42,14 @@ static unsigned translate_format(enum pipe_format format)
       return COLOR_BUF_ARGB8888;
    case PIPE_FORMAT_B5G6R5_UNORM:
       return COLOR_BUF_RGB565;
+   case PIPE_FORMAT_B5G5R5A1_UNORM:
+      return COLOR_BUF_ARGB1555;
    case PIPE_FORMAT_R8G8B8A8_UNORM:
       return COLOR_BUF_ARGB8888;
+   case PIPE_FORMAT_B4G4R4A4_UNORM:
+      return COLOR_BUF_ARGB4444;
+   case PIPE_FORMAT_B10G10R10A2_UNORM:
+      return COLOR_BUF_ARGB2101010;
    case PIPE_FORMAT_L8_UNORM:
    case PIPE_FORMAT_A8_UNORM:
    case PIPE_FORMAT_I8_UNORM: