summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/drm
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2010-05-17 21:34:03 +0200
committerRoland Scheidegger <[email protected]>2010-05-17 21:34:03 +0200
commitbf3c8ed481047d0c446d2d3d6d1de82403783fb0 (patch)
tree0fc37a75f1682c730ee9da51a2c80336881cb047 /src/gallium/state_trackers/dri/drm
parent685bb6941681f89f71a9169594d87c8e314b94d0 (diff)
st/dri: adapt to interface changes
Diffstat (limited to 'src/gallium/state_trackers/dri/drm')
-rw-r--r--src/gallium/state_trackers/dri/drm/dri1.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri1.c b/src/gallium/state_trackers/dri/drm/dri1.c
index 326ff8bcada..9f0b9257312 100644
--- a/src/gallium/state_trackers/dri/drm/dri1.c
+++ b/src/gallium/state_trackers/dri/drm/dri1.c
@@ -156,24 +156,22 @@ dri1_swap_copy(struct pipe_context *pipe,
struct drm_clip_rect clip;
struct drm_clip_rect *cur;
int i;
+ struct pipe_subresource subdst, subsrc;
+ subsrc.face = 0;
+ subsrc.level = 0;
+ subdst.face = 0;
+ subdst.level = 0;
cur = dPriv->pClipRects;
for (i = 0; i < dPriv->numClipRects; ++i) {
if (dri1_intersect_src_bbox(&clip, dPriv->x, dPriv->y, cur++, bbox)) {
- if (pipe->surface_copy) {
- pipe->surface_copy(pipe, dst, clip.x1, clip.y1,
- src,
- (int)clip.x1 - dPriv->x,
- (int)clip.y1 - dPriv->y,
- clip.x2 - clip.x1, clip.y2 - clip.y1);
- } else {
- util_surface_copy(pipe, FALSE, dst, clip.x1, clip.y1,
- src,
- (int)clip.x1 - dPriv->x,
- (int)clip.y1 - dPriv->y,
- clip.x2 - clip.x1, clip.y2 - clip.y1);
- }
+ pipe->resource_copy_region(pipe, dst->texture, subdst,
+ clip.x1, clip.y1, 0,
+ src->texture, subsrc,
+ (int)clip.x1 - dPriv->x,
+ (int)clip.y1 - dPriv->y, 0,
+ clip.x2 - clip.x1, clip.y2 - clip.y1);
}
}
}
@@ -204,6 +202,8 @@ dri1_present_texture_locked(__DRIdrawable * dPriv,
return;
pipe = dri1_get_pipe_context(screen);
+ /* XXX should probably use resources instead of surfaces in the api
+ - we get surface but only use the texture from it it seems... */
psurf = dri1_get_pipe_surface(drawable, ptex);
if (!pipe || !psurf)
return;