summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_blit.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_blit.c b/src/mesa/drivers/dri/intel_winsys/intel_blit.c
index 48bbbbeac9b..aa4135ed2d8 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_blit.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_blit.c
@@ -38,6 +38,7 @@
#include "vblank.h"
#include "pipe/p_context.h"
+#include "state_tracker/st_cb_fbo.h"
#define FILE_DEBUG_FLAG DEBUG_BLIT
@@ -106,12 +107,17 @@ intelCopyBuffer(__DRIdrawablePrivate * dPriv,
const struct pipe_surface *backSurf;
const struct pipe_region *backRegion;
int srcpitch;
+ struct st_renderbuffer *strb;
/* blit from back color buffer if it exists, else front buffer */
- if (intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer)
- backSurf = intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer->surface;
- else
- backSurf = intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer->surface;
+ strb = st_renderbuffer(intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer);
+ if (strb) {
+ backSurf = strb->surface;
+ }
+ else {
+ strb = st_renderbuffer(intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
+ backSurf = strb->surface;
+ }
backRegion = backSurf->region;
srcpitch = backRegion->pitch;