mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
i915g: Improve debug printing for textures
Signed-off-by: Jakob Bornecrantz <wallbraker@gmail.com>
This commit is contained in:
parent
f6476822a0
commit
442e567aa0
1 changed files with 21 additions and 4 deletions
|
|
@ -106,6 +106,23 @@ get_pot_stride(enum pipe_format format, unsigned width)
|
|||
return util_next_power_of_two(util_format_get_stride(format, width));
|
||||
}
|
||||
|
||||
static INLINE const char*
|
||||
get_tiling_string(enum i915_winsys_buffer_tile tile)
|
||||
{
|
||||
switch(tile) {
|
||||
case I915_TILE_NONE:
|
||||
return "none";
|
||||
case I915_TILE_X:
|
||||
return "x";
|
||||
case I915_TILE_Y:
|
||||
return "y";
|
||||
default:
|
||||
assert(FALSE);
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* More advanced helper funcs
|
||||
*/
|
||||
|
|
@ -819,10 +836,10 @@ i915_texture_create(struct pipe_screen *screen,
|
|||
if (!tex->buffer)
|
||||
goto fail;
|
||||
|
||||
I915_DBG(DBG_TEXTURE, "%s: %p stride %u, blocks (%u, %u)\n", __func__,
|
||||
I915_DBG(DBG_TEXTURE, "%s: %p stride %u, blocks (%u, %u) tiling %s\n", __func__,
|
||||
tex, tex->stride,
|
||||
tex->stride / util_format_get_blocksize(tex->b.b.format),
|
||||
tex->total_nblocksy);
|
||||
tex->total_nblocksy, get_tiling_string(tex->tiling));
|
||||
|
||||
return &tex->b.b;
|
||||
|
||||
|
|
@ -873,10 +890,10 @@ i915_texture_from_handle(struct pipe_screen * screen,
|
|||
|
||||
tex->buffer = buffer;
|
||||
|
||||
I915_DBG(DBG_TEXTURE, "%s: %p stride %u, blocks (%ux%u)\n", __func__,
|
||||
I915_DBG(DBG_TEXTURE, "%s: %p stride %u, blocks (%u, %u) tiling %s\n", __func__,
|
||||
tex, tex->stride,
|
||||
tex->stride / util_format_get_blocksize(tex->b.b.format),
|
||||
tex->total_nblocksy);
|
||||
tex->total_nblocksy, get_tiling_string(tex->tiling));
|
||||
|
||||
return &tex->b.b;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue