summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/drm/i965/gem
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-11-30 14:58:30 +0000
committerKeith Whitwell <[email protected]>2009-11-30 15:37:27 +0000
commit1fd3a2773b83c6b893b220a4e449f34e73adfe0b (patch)
tree9b6bfeb80692ab2bb5c467d22c78b396026a3ebe /src/gallium/winsys/drm/i965/gem
parent1dfdc0a615f378cb92e45d878d778bf01dffaa66 (diff)
ws/i965: more debug output
Diffstat (limited to 'src/gallium/winsys/drm/i965/gem')
-rw-r--r--src/gallium/winsys/drm/i965/gem/i965_drm_api.c9
-rw-r--r--src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c47
2 files changed, 44 insertions, 12 deletions
diff --git a/src/gallium/winsys/drm/i965/gem/i965_drm_api.c b/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
index 6279422067e..5172b5410b4 100644
--- a/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
+++ b/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
@@ -93,7 +93,8 @@ i965_libdrm_texture_from_shared_handle(struct drm_api *api,
struct i965_libdrm_buffer *buffer;
if (BRW_DUMP)
- debug_printf("%s\n", __FUNCTION__);
+ debug_printf("%s %s pitch %d handle 0x%x\n", __FUNCTION__,
+ name, pitch, handle);
buffer = i965_libdrm_buffer_from_handle(idws, name, handle);
if (!buffer)
@@ -128,6 +129,9 @@ i965_libdrm_shared_handle_from_texture(struct drm_api *api,
*handle = buf->flink;
+ if (BRW_DUMP)
+ debug_printf(" -> pitch %d handle 0x%x\n", *pitch, *handle);
+
return TRUE;
}
@@ -148,6 +152,9 @@ i965_libdrm_local_handle_from_texture(struct drm_api *api,
*handle = i965_libdrm_buffer(buffer)->bo->handle;
+ if (BRW_DUMP)
+ debug_printf(" -> pitch %d handle 0x%x\n", *pitch, *handle);
+
return TRUE;
}
diff --git a/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c b/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c
index d4a0c97262a..a4a72b372dd 100644
--- a/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c
+++ b/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c
@@ -71,7 +71,8 @@ i965_libdrm_bo_alloc(struct brw_winsys_screen *sws,
struct i965_libdrm_buffer *buf;
if (BRW_DUMP)
- debug_printf("%s\n", __FUNCTION__);
+ debug_printf("%s type %s sz %d align %d\n",
+ __FUNCTION__, names[type], size, alignment );
buf = CALLOC_STRUCT(i965_libdrm_buffer);
if (!buf)
@@ -213,7 +214,7 @@ i965_libdrm_bo_exec(struct brw_winsys_buffer *buffer,
int ret;
if (BRW_DUMP)
- debug_printf("%s\n", __FUNCTION__);
+ debug_printf("execute buffer %p, bytes %d\n", (void *)buffer, bytes_used);
if (idws->send_cmd) {
ret = dri_bo_exec(buf->bo, bytes_used, NULL, 0, 0);
@@ -240,7 +241,11 @@ i965_libdrm_bo_subdata(struct brw_winsys_buffer *buffer,
(void)data_type;
if (BRW_DUMP)
- debug_printf("%s\n", __FUNCTION__);
+ debug_printf("%s buf %p off %d sz %d %s relocs: %d\n",
+ __FUNCTION__,
+ (void *)buffer, offset, size,
+ data_types[data_type],
+ nr_reloc);
if (BRW_DUMP)
brw_dump_data( idws->id,
@@ -266,11 +271,17 @@ static boolean
i965_libdrm_bo_is_busy(struct brw_winsys_buffer *buffer)
{
struct i965_libdrm_buffer *buf = i965_libdrm_buffer(buffer);
+ boolean ret;
if (BRW_DUMP)
- debug_printf("%s\n", __FUNCTION__);
+ debug_printf("%s %p\n", __FUNCTION__, (void *)buffer);
+
+ ret = drm_intel_bo_busy(buf->bo);
- return drm_intel_bo_busy(buf->bo);
+ if (BRW_DUMP)
+ debug_printf(" --> %d\n", ret);
+
+ return ret;
}
static boolean
@@ -279,13 +290,17 @@ i965_libdrm_bo_references(struct brw_winsys_buffer *a,
{
struct i965_libdrm_buffer *bufa = i965_libdrm_buffer(a);
struct i965_libdrm_buffer *bufb = i965_libdrm_buffer(b);
+ boolean ret;
if (BRW_DUMP)
- debug_printf("%s\n", __FUNCTION__);
+ debug_printf("%s %p %p\n", __FUNCTION__, (void *)a, (void *)b);
- /* XXX: can't find this func:
- */
- return drm_intel_bo_references(bufa->bo, bufb->bo);
+ ret = drm_intel_bo_references(bufa->bo, bufb->bo);
+
+ if (BRW_DUMP)
+ debug_printf(" --> %d\n", ret);
+
+ return ret;
}
/* XXX: couldn't this be handled by returning true/false on
@@ -298,6 +313,7 @@ i965_libdrm_check_aperture_space(struct brw_winsys_screen *iws,
{
static drm_intel_bo *bos[128];
int i;
+ int ret;
if (BRW_DUMP)
debug_printf("%s\n", __FUNCTION__);
@@ -310,7 +326,14 @@ i965_libdrm_check_aperture_space(struct brw_winsys_screen *iws,
for (i = 0; i < count; i++)
bos[i] = i965_libdrm_buffer(buffers[i])->bo;
- return dri_bufmgr_check_aperture_space(bos, count);
+ /* XXX: converting from ??? to pipe_error:
+ */
+ ret = dri_bufmgr_check_aperture_space(bos, count);
+
+ if (BRW_DUMP)
+ debug_printf(" --> %d (ok == %d)\n", ret, PIPE_OK);
+
+ return ret;
}
static void *
@@ -358,7 +381,9 @@ i965_libdrm_bo_flush_range(struct brw_winsys_buffer *buffer,
struct i965_libdrm_winsys *idws = i965_libdrm_winsys(buffer->sws);
if (BRW_DUMP)
- debug_printf("%s offset %d len %d\n", __FUNCTION__, offset, length);
+ debug_printf("%s %s offset %d len %d\n", __FUNCTION__,
+ data_types[buf->data_type],
+ offset, length);
if (BRW_DUMP)
brw_dump_data( idws->id,