summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-08-26 14:30:54 +0200
committerJakob Bornecrantz <[email protected]>2009-08-26 14:30:54 +0200
commit53b3cdaee2654895dc90a25376ba29b64d166c54 (patch)
tree9305b3e2ac42f2632b184611e4b84569e6f1587a /src/gallium/state_trackers/dri
parent57230d96ed3dc231c47ed8765f30e0e34e988d31 (diff)
st/dri: Add some debug code
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index 62a7e239cf0..c7ca7f78a3d 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -57,8 +57,10 @@ dri_surface_from_handle(struct drm_api *api,
struct pipe_buffer *buf = NULL;
buf = api->buffer_from_handle(api, screen, "dri2 buffer", handle);
- if (!buf)
+ if (!buf) {
+ debug_printf("%s: Failed to get buffer from handle\n", __func__);
return NULL;
+ }
memset(&templat, 0, sizeof(templat));
templat.tex_usage |= PIPE_TEXTURE_USAGE_RENDER_TARGET;
@@ -75,8 +77,10 @@ dri_surface_from_handle(struct drm_api *api,
/* we don't need the buffer from this point on */
pipe_buffer_reference(&buf, NULL);
- if (!texture)
+ if (!texture) {
+ debug_printf("%s: Failed to blanket the buffer with a texture\n", __func__);
return NULL;
+ }
surface = screen->get_tex_surface(screen, texture, 0, 0, 0,
PIPE_BUFFER_USAGE_GPU_READ |