gallium: add RGBX formats for existing GL RGB texture formats
authorMarek Olšák <maraeo@gmail.com>
Sat, 19 Jan 2013 14:48:00 +0000 (15:48 +0100)
committerMarek Olšák <maraeo@gmail.com>
Wed, 6 Feb 2013 23:20:23 +0000 (00:20 +0100)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_format.csv
src/gallium/auxiliary/util/u_format.h
src/gallium/include/pipe/p_format.h

index 05f04b587caca042f31d5661a7126aa8ec92ec75..1d274076b0f84e37ce0badd806ba8d4efd4bc80b 100644 (file)
@@ -346,3 +346,17 @@ PIPE_FORMAT_L32_SINT                , plain, 1, 1, sp32, , , , xxx1, rgb
 PIPE_FORMAT_L32A32_SINT             , plain, 1, 1, sp32, sp32, , , xxxy, rgb
 
 PIPE_FORMAT_B10G10R10A2_UINT        , plain, 1, 1, up10, up10, up10, up2, zyxw, rgb
+
+PIPE_FORMAT_R8G8B8X8_SNORM          , plain, 1, 1, sn8,  sn8,  sn8,  x8,  xyz1, rgb
+PIPE_FORMAT_R8G8B8X8_SRGB           , plain, 1, 1, un8,  un8,  un8,  x8,  xyz1, srgb
+PIPE_FORMAT_R8G8B8X8_UINT           , plain, 1, 1, up8,  up8,  up8,  x8,  xyz1, rgb
+PIPE_FORMAT_R8G8B8X8_SINT           , plain, 1, 1, sp8,  sp8,  sp8,  x8,  xyz1, rgb
+PIPE_FORMAT_B10G10R10X2_UNORM       , plain, 1, 1, un10, un10, un10, x2,  zyx1, rgb
+PIPE_FORMAT_R16G16B16X16_UNORM      , plain, 1, 1, un16, un16, un16, x16, xyz1, rgb
+PIPE_FORMAT_R16G16B16X16_SNORM      , plain, 1, 1, sn16, sn16, sn16, x16, xyz1, rgb
+PIPE_FORMAT_R16G16B16X16_FLOAT      , plain, 1, 1, f16,  f16,  f16,  x16, xyz1, rgb
+PIPE_FORMAT_R16G16B16X16_UINT       , plain, 1, 1, up16, up16, up16, x16, xyz1, rgb
+PIPE_FORMAT_R16G16B16X16_SINT       , plain, 1, 1, sp16, sp16, sp16, x16, xyz1, rgb
+PIPE_FORMAT_R32G32B32X32_FLOAT      , plain, 1, 1, f32,  f32,  f32,  x32, xyz1, rgb
+PIPE_FORMAT_R32G32B32X32_UINT       , plain, 1, 1, up32, up32, up32, x32, xyz1, rgb
+PIPE_FORMAT_R32G32B32X32_SINT       , plain, 1, 1, sp32, sp32, sp32, x32, xyz1, rgb
index 156d5cf978ad5993121bcd5db94f56d6457f8cf5..63015dd50c11263fa6a039e8c4f28ace7fdb2e91 100644 (file)
@@ -798,6 +798,10 @@ util_format_srgb(enum pipe_format format)
       return PIPE_FORMAT_A8R8G8B8_SRGB;
    case PIPE_FORMAT_X8R8G8B8_UNORM:
       return PIPE_FORMAT_X8R8G8B8_SRGB;
+   case PIPE_FORMAT_R8G8B8A8_UNORM:
+      return PIPE_FORMAT_R8G8B8A8_SRGB;
+   case PIPE_FORMAT_R8G8B8X8_UNORM:
+      return PIPE_FORMAT_R8G8B8X8_SRGB;
    case PIPE_FORMAT_DXT1_RGB:
       return PIPE_FORMAT_DXT1_SRGB;
    case PIPE_FORMAT_DXT1_RGBA:
@@ -837,6 +841,10 @@ util_format_linear(enum pipe_format format)
       return PIPE_FORMAT_A8R8G8B8_UNORM;
    case PIPE_FORMAT_X8R8G8B8_SRGB:
       return PIPE_FORMAT_X8R8G8B8_UNORM;
+   case PIPE_FORMAT_R8G8B8A8_SRGB:
+      return PIPE_FORMAT_R8G8B8A8_UNORM;
+   case PIPE_FORMAT_R8G8B8X8_SRGB:
+      return PIPE_FORMAT_R8G8B8X8_UNORM;
    case PIPE_FORMAT_DXT1_SRGB:
       return PIPE_FORMAT_DXT1_RGB;
    case PIPE_FORMAT_DXT1_SRGBA:
index 4f0d1f273a9f56377254695d9ccfcd182a2e0e22..5a3d000bbe4567d0efbbc5422619052799ff7dd7 100644 (file)
@@ -314,6 +314,20 @@ enum pipe_format {
    PIPE_FORMAT_R8G8_R8B8_UNORM         = 227,
    PIPE_FORMAT_G8R8_B8R8_UNORM         = 228,
 
+   PIPE_FORMAT_R8G8B8X8_SNORM          = 229,
+   PIPE_FORMAT_R8G8B8X8_SRGB           = 230,
+   PIPE_FORMAT_R8G8B8X8_UINT           = 231,
+   PIPE_FORMAT_R8G8B8X8_SINT           = 232,
+   PIPE_FORMAT_B10G10R10X2_UNORM       = 233,
+   PIPE_FORMAT_R16G16B16X16_UNORM      = 234,
+   PIPE_FORMAT_R16G16B16X16_SNORM      = 235,
+   PIPE_FORMAT_R16G16B16X16_FLOAT      = 236,
+   PIPE_FORMAT_R16G16B16X16_UINT       = 237,
+   PIPE_FORMAT_R16G16B16X16_SINT       = 238,
+   PIPE_FORMAT_R32G32B32X32_FLOAT      = 239,
+   PIPE_FORMAT_R32G32B32X32_UINT       = 240,
+   PIPE_FORMAT_R32G32B32X32_SINT       = 241,
+
    PIPE_FORMAT_COUNT
 };