summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/xlib
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-12-07 16:01:31 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-12-07 16:01:31 -0700
commit2067eed9d30bb5b260920a5650655579c1988202 (patch)
tree03d112483fa510bc618e9307d587bd38585efc8c /src/mesa/pipe/xlib
parent099bf3ffe932f4a8c1ddae064bce901555af35ce (diff)
Get rid of "duplicate" formats.
For example, replace PIPE_FORMAT_U_A8_R8_G8_B8 with PIPE_FORMAT_A8R8G8B8_UNORM
Diffstat (limited to 'src/mesa/pipe/xlib')
-rw-r--r--src/mesa/pipe/xlib/xm_api.c8
-rw-r--r--src/mesa/pipe/xlib/xm_winsys.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/pipe/xlib/xm_api.c b/src/mesa/pipe/xlib/xm_api.c
index 5cb9ca0d36..9c7713790b 100644
--- a/src/mesa/pipe/xlib/xm_api.c
+++ b/src/mesa/pipe/xlib/xm_api.c
@@ -406,7 +406,7 @@ choose_pixel_format(XMesaVisual v)
return 0 /* PIXEL_FORMAT_U_A8_B8_G8_R8 */;
}
else {
- return PIPE_FORMAT_U_R8_G8_B8_A8;
+ return PIPE_FORMAT_R8G8B8A8_UNORM;
}
}
else if ( GET_REDMASK(v) == 0xff0000
@@ -415,10 +415,10 @@ choose_pixel_format(XMesaVisual v)
&& v->BitsPerPixel == 32) {
if (CHECK_BYTE_ORDER(v)) {
/* no byteswapping needed */
- return PIPE_FORMAT_U_A8_R8_G8_B8;
+ return PIPE_FORMAT_A8R8G8B8_UNORM;
}
else {
- return PIPE_FORMAT_U_B8_G8_R8_A8;
+ return PIPE_FORMAT_B8G8R8A8_UNORM;
}
}
else if ( GET_REDMASK(v) == 0xf800
@@ -427,7 +427,7 @@ choose_pixel_format(XMesaVisual v)
&& CHECK_BYTE_ORDER(v)
&& v->BitsPerPixel == 16) {
/* 5-6-5 RGB */
- return PIPE_FORMAT_U_R5_G6_B5;
+ return PIPE_FORMAT_R5G6B5_UNORM;
}
assert(0);
diff --git a/src/mesa/pipe/xlib/xm_winsys.c b/src/mesa/pipe/xlib/xm_winsys.c
index e8cb36eced..408797c688 100644
--- a/src/mesa/pipe/xlib/xm_winsys.c
+++ b/src/mesa/pipe/xlib/xm_winsys.c
@@ -389,11 +389,11 @@ xmesa_is_format_supported(struct softpipe_winsys *sws, uint format)
else {
/* non-color / window surface format */
switch (format) {
- case PIPE_FORMAT_S_R16_G16_B16_A16:
- case PIPE_FORMAT_S8_Z24:
+ case PIPE_FORMAT_R16G16B16A16_SNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
case PIPE_FORMAT_U_S8:
- case PIPE_FORMAT_U_Z16:
- case PIPE_FORMAT_U_Z32:
+ case PIPE_FORMAT_Z16_UNORM:
+ case PIPE_FORMAT_Z32_UNORM:
return TRUE;
default:
return FALSE;