nvfx: add RGB framebuffer format support in addition to BGR
authorLuca Barbieri <luca@luca-barbieri.com>
Fri, 24 Sep 2010 12:28:24 +0000 (14:28 +0200)
committerLuca Barbieri <luca@luca-barbieri.com>
Fri, 24 Sep 2010 13:12:19 +0000 (15:12 +0200)
src/gallium/drivers/nvfx/nvfx_screen.c
src/gallium/drivers/nvfx/nvfx_state_fb.c

index 3f177b7ed0723c51ca0be99865bbcdcd1496939b..8024800bd09dc29d8ca464856d7e323e8876aeeb 100644 (file)
@@ -194,6 +194,8 @@ nvfx_screen_is_format_supported(struct pipe_screen *pscreen,
                switch (format) {
                case PIPE_FORMAT_B8G8R8A8_UNORM:
                case PIPE_FORMAT_B8G8R8X8_UNORM:
+               case PIPE_FORMAT_R8G8B8A8_UNORM:
+               case PIPE_FORMAT_R8G8B8X8_UNORM:
                case PIPE_FORMAT_B5G6R5_UNORM:
                        break;
                case PIPE_FORMAT_R16G16B16A16_FLOAT:
index 4ffc4de45208b486b7ec4eb86c7ac65dbcd0055f..30e48c807354c59d560d37561453802849d928e1 100644 (file)
@@ -140,6 +140,12 @@ nvfx_framebuffer_validate(struct nvfx_context *nvfx, unsigned prepare_result)
                case 0:
                        rt_format |= NV30_3D_RT_FORMAT_COLOR_A8R8G8B8;
                        break;
+               case PIPE_FORMAT_R8G8B8X8_UNORM:
+                       rt_format |= NV30_3D_RT_FORMAT_COLOR_X8B8G8R8;
+                       break;
+               case PIPE_FORMAT_R8G8B8A8_UNORM:
+                       rt_format |= NV30_3D_RT_FORMAT_COLOR_A8B8G8R8;
+                       break;
                case PIPE_FORMAT_B5G6R5_UNORM:
                        rt_format |= NV30_3D_RT_FORMAT_COLOR_R5G6B5;
                        break;