summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/xorg/xorg_dri2.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2009-08-27 18:57:29 +0100
committerJakob Bornecrantz <jakob@vmware.com>2009-08-28 13:38:23 +0100
commit1e5014f7dfabcaf1f4b5608eb08e97179446eb09 (patch)
tree75ab693e5e07467c36fd3593c440143d62ce907e /src/gallium/state_trackers/xorg/xorg_dri2.c
parent7d9af52bc59bfeb19d9bdb55258f4a830a1b0d04 (diff)
drm_api: Operate on textures instead of buffers
Most use cases just got the buffer from the texture and then called into one of the get_handle functions. Also with this patch it would be easier to move to a generic function for getting handles from textures and textures from handles, that is exposed via the screen.
Diffstat (limited to 'src/gallium/state_trackers/xorg/xorg_dri2.c')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_dri2.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
index c48fb30e7d..3b90421de9 100644
--- a/src/gallium/state_trackers/xorg/xorg_dri2.c
+++ b/src/gallium/state_trackers/xorg/xorg_dri2.c
@@ -44,7 +44,6 @@
typedef struct {
PixmapPtr pPixmap;
struct pipe_texture *tex;
- struct pipe_buffer *buf;
struct pipe_fence_handle *fence;
} *BufferPrivatePtr;
@@ -133,8 +132,7 @@ driCreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
if (!tex)
FatalError("NO TEXTURE IN DRI2\n");
- ms->api->buffer_from_texture(ms->api, tex, &buf, &stride);
- ms->api->global_handle_from_buffer(ms->api, ms->screen, buf, &handle);
+ ms->api->shared_handle_from_texture(ms->api, ms->screen, tex, &stride, &handle);
buffers[i].name = handle;
buffers[i].attachment = attachments[i];
@@ -143,7 +141,6 @@ driCreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
buffers[i].driverPrivate = &privates[i];
buffers[i].flags = 0; /* not tiled */
privates[i].pPixmap = pPixmap;
- privates[i].buf = buf;
privates[i].tex = tex;
}
@@ -169,7 +166,6 @@ driDestroyBuffers(DrawablePtr pDraw, DRI2BufferPtr buffers, int count)
private = buffers[i].driverPrivate;
pipe_texture_reference(&private->tex, NULL);
- pipe_buffer_reference(&private->buf, NULL);
ms->screen->fence_reference(ms->screen, &private->fence, NULL);
if (private->pPixmap)