summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl
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/egl
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/egl')
-rw-r--r--src/gallium/state_trackers/egl/egl_surface.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c
index 3ef1945b93..69e2d6b708 100644
--- a/src/gallium/state_trackers/egl/egl_surface.c
+++ b/src/gallium/state_trackers/egl/egl_surface.c
@@ -96,10 +96,6 @@ drm_create_texture(_EGLDisplay *dpy,
if (!texture)
goto err_tex;
- dev->api->buffer_from_texture(dev->api, texture, &buf, &pitch);
- if (!buf)
- goto err_buf;
-
surface = screen->get_tex_surface(screen,
texture,
0,
@@ -112,11 +108,11 @@ drm_create_texture(_EGLDisplay *dpy,
scrn->tex = texture;
scrn->surface = surface;
- scrn->buffer = buf;
scrn->front.width = w;
scrn->front.height = h;
scrn->front.pitch = pitch;
- dev->api->handle_from_buffer(dev->api, screen, scrn->buffer, &scrn->front.handle);
+ dev->api->local_handle_from_texture(dev->api, screen, texture,
+ &scrn->front.pitch, &scrn->front.handle);
if (0)
goto err_handle;
@@ -126,7 +122,6 @@ err_handle:
pipe_surface_reference(&surface, NULL);
err_surf:
pipe_texture_reference(&texture, NULL);
-err_buf:
err_tex:
pipe_buffer_reference(&buf, NULL);
return;