summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/dri/intel/intel_screen.c4
-rw-r--r--src/gallium/winsys/dri/intel/intel_swapbuffers.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/winsys/dri/intel/intel_screen.c b/src/gallium/winsys/dri/intel/intel_screen.c
index 18427a4586f..89de188ada8 100644
--- a/src/gallium/winsys/dri/intel/intel_screen.c
+++ b/src/gallium/winsys/dri/intel/intel_screen.c
@@ -78,10 +78,10 @@ intelCreateSurface(struct intel_screen *intelScreen, struct pipe_winsys *winsys,
templat.last_level = 0;
templat.depth[0] = 1;
templat.format = PIPE_FORMAT_A8R8G8B8_UNORM;
- templat.cpp = intelScreen->front.cpp;
templat.width[0] = intelScreen->front.width;
templat.height[0] = intelScreen->front.height;
- pitch = intelScreen->front.pitch / intelScreen->front.cpp;
+ pf_get_block(templat.format, &templat.block);
+ pitch = intelScreen->front.pitch;
texture = screen->texture_blanket(screen,
&templat,
diff --git a/src/gallium/winsys/dri/intel/intel_swapbuffers.c b/src/gallium/winsys/dri/intel/intel_swapbuffers.c
index 7f3babd98ef..f58da97c64a 100644
--- a/src/gallium/winsys/dri/intel/intel_swapbuffers.c
+++ b/src/gallium/winsys/dri/intel/intel_swapbuffers.c
@@ -89,7 +89,7 @@ intelDisplaySurface(__DRIdrawablePrivate *dPriv,
const drm_clip_rect_t *pbox = dPriv->pClipRects;
const int pitch = intelScreen->front.pitch / intelScreen->front.cpp;
const int cpp = intelScreen->front.cpp;
- const int srcpitch = surf->pitch;
+ const int srcpitch = surf->stride / cpp;
int BR13, CMD;
int i;