diff options
author | Jakob Bornecrantz <[email protected]> | 2009-08-26 12:26:14 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2009-08-26 12:29:28 +0200 |
commit | aab0bedb8c791531256b9cf4ef165080ccc75e9b (patch) | |
tree | 9e79f1221c6fa0f404d5d2e72b06273b693af012 /src/gallium/state_trackers/dri/dri_drawable.c | |
parent | b2e1b258812167ce8d33f5978f877439e280a1e4 (diff) |
st/dri: Redo config generation
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_drawable.c')
-rw-r--r-- | src/gallium/state_trackers/dri/dri_drawable.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index acec7190374..62a7e239cf0 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -294,8 +294,14 @@ dri_create_buffer(__DRIscreenPrivate * sPriv, if (drawable == NULL) goto fail; - drawable->color_format = (visual->redBits == 8) ? - PIPE_FORMAT_A8R8G8B8_UNORM : PIPE_FORMAT_R5G6B5_UNORM; + if (visual->redBits == 8) { + if (visual->alphaBits == 8) + drawable->color_format = PIPE_FORMAT_A8R8G8B8_UNORM; + else + drawable->color_format = PIPE_FORMAT_X8R8G8B8_UNORM; + } else { + drawable->color_format = PIPE_FORMAT_R5G6B5_UNORM; + } switch(visual->depthBits) { default: @@ -316,6 +322,9 @@ dri_create_buffer(__DRIscreenPrivate * sPriv, PIPE_FORMAT_Z24S8_UNORM; } break; + case 32: + drawable->depth_format = PIPE_FORMAT_Z32_UNORM; + break; } switch(visual->stencilBits) { |