[PATCH 16/18] gallium/dri: fix unsetting of format when encountering depth/stencil

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ben Skeggs <bskeggs@xxxxxxxxxx>

Signed-off-by: Ben Skeggs <bskeggs@xxxxxxxxxx>
Signed-off-by: Keith Packard <keithp@xxxxxxxxxx>
---
 src/gallium/state_trackers/dri/drm/dri2.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 03b93ae..a9d6a10 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -517,6 +517,17 @@ dri_image_allocate_textures(struct dri_context *ctx,
       if (pf == PIPE_FORMAT_NONE)
          continue;
 
+      switch (statts[i]) {
+      case ST_ATTACHMENT_FRONT_LEFT:
+         buffer_mask |= __DRI_IMAGE_BUFFER_FRONT;
+         break;
+      case ST_ATTACHMENT_BACK_LEFT:
+         buffer_mask |= __DRI_IMAGE_BUFFER_BACK;
+         break;
+      default:
+         continue;
+      }
+
       switch (pf) {
       case PIPE_FORMAT_B5G6R5_UNORM:
          image_format = __DRI_IMAGE_FORMAT_RGB565;
@@ -534,17 +545,6 @@ dri_image_allocate_textures(struct dri_context *ctx,
          image_format = __DRI_IMAGE_FORMAT_NONE;
          break;
       }
-
-      switch (statts[i]) {
-      case ST_ATTACHMENT_FRONT_LEFT:
-         buffer_mask |= __DRI_IMAGE_BUFFER_FRONT;
-         break;
-      case ST_ATTACHMENT_BACK_LEFT:
-         buffer_mask |= __DRI_IMAGE_BUFFER_BACK;
-         break;
-      default:
-         continue;
-      }
    }
 
    (*sPriv->image.loader->getBuffers) (dPriv,
-- 
1.8.4.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux