summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/xorg/xorg_crtc.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-02-15 17:17:30 +0000
committerJakob Bornecrantz <jakob@vmware.com>2010-03-01 16:05:24 +0000
commitb2e94d05c9602e2814a513a51eed67d014b338f3 (patch)
treeed1b442663384771a7060847dfdba85d439b7bb4 /src/gallium/state_trackers/xorg/xorg_crtc.c
parentf54aecc4f2e83babd1883c2bbd0bba6906cdab07 (diff)
gallium: Expose a opaque winsys handle and functions on pipe_screen
Instead of having these functions on a side interface like on drm_api create a opaque winsys_handle that is to be passed down into the winsys. Currently the only thing ported to this new interface is drm_api, and of that only the components that builds by default is ported. All the drivers and any extra state trackers needs to be ported before this can go into master.
Diffstat (limited to 'src/gallium/state_trackers/xorg/xorg_crtc.c')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_crtc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index 221ce772af..4a77f54080 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -197,7 +197,7 @@ crtc_load_cursor_argb_ga3d(xf86CrtcPtr crtc, CARD32 * image)
if (!crtcp->cursor_tex) {
struct pipe_texture templat;
- unsigned pitch;
+ struct winsys_handle whandle;
memset(&templat, 0, sizeof(templat));
templat.tex_usage |= PIPE_TEXTURE_USAGE_RENDER_TARGET;
@@ -209,13 +209,14 @@ crtc_load_cursor_argb_ga3d(xf86CrtcPtr crtc, CARD32 * image)
templat.width0 = 64;
templat.height0 = 64;
+ memset(&whandle, 0, sizeof(whandle));
+ whandle.type = DRM_API_HANDLE_TYPE_KMS;
+
crtcp->cursor_tex = ms->screen->texture_create(ms->screen,
&templat);
- ms->api->local_handle_from_texture(ms->api,
- ms->screen,
- crtcp->cursor_tex,
- &pitch,
- &crtcp->cursor_handle);
+ ms->screen->texture_get_handle(ms->screen, crtcp->cursor_tex, &whandle);
+
+ crtcp->cursor_handle = whandle.handle;
}
transfer = ms->screen->get_tex_transfer(ms->screen, crtcp->cursor_tex,