aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/common/utils.c10
-rw-r--r--src/mesa/main/framebuffer.c4
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c2
3 files changed, 15 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index e944754a424..1cffd3ad08e 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -177,6 +177,10 @@ driCreateConfigs(mesa_format format,
{ 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 },
/* MESA_FORMAT_R8G8B8X8_UNORM */
{ 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 },
+ /* MESA_FORMAT_R10G10B10X2_UNORM */
+ { 0x000003FF, 0x000FFC00, 0x3FF00000, 0x00000000 },
+ /* MESA_FORMAT_R10G10B10A2_UNORM */
+ { 0x000003FF, 0x000FFC00, 0x3FF00000, 0xC0000000 },
};
const uint32_t * masks;
@@ -215,6 +219,12 @@ driCreateConfigs(mesa_format format,
case MESA_FORMAT_B10G10R10A2_UNORM:
masks = masks_table[4];
break;
+ case MESA_FORMAT_R10G10B10X2_UNORM:
+ masks = masks_table[7];
+ break;
+ case MESA_FORMAT_R10G10B10A2_UNORM:
+ masks = masks_table[8];
+ break;
default:
fprintf(stderr, "[%s:%u] Unknown framebuffer type %s (%d).\n",
__func__, __LINE__,
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index e103f313e45..249e775f8cb 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -890,7 +890,9 @@ _mesa_get_color_read_type(struct gl_context *ctx,
return GL_UNSIGNED_SHORT_5_6_5;
if (format == MESA_FORMAT_B10G10R10A2_UNORM ||
- format == MESA_FORMAT_B10G10R10X2_UNORM)
+ format == MESA_FORMAT_B10G10R10X2_UNORM ||
+ format == MESA_FORMAT_R10G10B10A2_UNORM ||
+ format == MESA_FORMAT_R10G10B10X2_UNORM)
return GL_UNSIGNED_INT_2_10_10_10_REV;
switch (data_type) {
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 0800f5b3d29..02ae8e1380e 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -288,8 +288,10 @@ st_new_renderbuffer_fb(enum pipe_format format, unsigned samples, boolean sw)
switch (format) {
case PIPE_FORMAT_B10G10R10A2_UNORM:
+ case PIPE_FORMAT_R10G10B10A2_UNORM:
strb->Base.InternalFormat = GL_RGB10_A2;
break;
+ case PIPE_FORMAT_R10G10B10X2_UNORM:
case PIPE_FORMAT_B10G10R10X2_UNORM:
strb->Base.InternalFormat = GL_RGB10;
break;