st/dri: Set render_buffer in dri_fill_st_visual
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Wed, 9 Feb 2011 14:26:26 +0000 (15:26 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 11 Feb 2011 04:07:01 +0000 (23:07 -0500)
st/mesa/st_managaer.c needs render_buffer in order
to determinde which buffer should be rendered to.

src/gallium/state_trackers/dri/common/dri_screen.c

index f6e22c74b4e68fac3a7174c74c8f93d22241cd79..69c2e7e9ec83ed35ac22ad6464436e079e7b6833 100644 (file)
@@ -235,7 +235,6 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
       return;
 
    stvis->samples = mode->samples;
-   stvis->render_buffer = ST_ATTACHMENT_INVALID;
 
    if (mode->redBits == 8) {
       if (mode->alphaBits == 8)
@@ -274,8 +273,11 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
       PIPE_FORMAT_R16G16B16A16_SNORM : PIPE_FORMAT_NONE;
 
    stvis->buffer_mask |= ST_ATTACHMENT_FRONT_LEFT_MASK;
-   if (mode->doubleBufferMode)
+   stvis->render_buffer = ST_ATTACHMENT_FRONT_LEFT;
+   if (mode->doubleBufferMode) {
       stvis->buffer_mask |= ST_ATTACHMENT_BACK_LEFT_MASK;
+      stvis->render_buffer = ST_ATTACHMENT_BACK_LEFT;
+   }
    if (mode->stereoMode) {
       stvis->buffer_mask |= ST_ATTACHMENT_FRONT_RIGHT_MASK;
       if (mode->doubleBufferMode)