Mesa (master): i915g: Turn an assert into a debug message, print more debug info for missing depth swz.
Stephane Marchesin
marcheu at kemper.freedesktop.org
Tue Dec 20 02:33:42 UTC 2011
Module: Mesa
Branch: master
Commit: 1981042341c6942bbd4d61508a47226c789bc25b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1981042341c6942bbd4d61508a47226c789bc25b
Author: Stéphane Marchesin <marcheu at chromium.org>
Date: Thu Dec 15 16:19:46 2011 -0800
i915g: Turn an assert into a debug message, print more debug info for missing depth swz.
Also fix indentation a bit.
---
src/gallium/drivers/i915/i915_state_sampler.c | 10 +++++++---
src/gallium/drivers/i915/i915_state_static.c | 3 ++-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/i915/i915_state_sampler.c b/src/gallium/drivers/i915/i915_state_sampler.c
index 5c74ffd..9eadf31 100644
--- a/src/gallium/drivers/i915/i915_state_sampler.c
+++ b/src/gallium/drivers/i915/i915_state_sampler.c
@@ -193,8 +193,8 @@ static uint translate_texture_format(enum pipe_format pipeFormat,
view->swizzle_g != PIPE_SWIZZLE_GREEN ||
view->swizzle_b != PIPE_SWIZZLE_BLUE ||
view->swizzle_a != PIPE_SWIZZLE_ALPHA ) &&
- pipeFormat != PIPE_FORMAT_Z24_UNORM_S8_UINT &&
- pipeFormat != PIPE_FORMAT_Z24X8_UNORM )
+ pipeFormat != PIPE_FORMAT_Z24_UNORM_S8_UINT &&
+ pipeFormat != PIPE_FORMAT_Z24X8_UNORM )
debug_printf("i915: unsupported texture swizzle for format %d\n", pipeFormat);
switch (pipeFormat) {
@@ -258,7 +258,11 @@ static uint translate_texture_format(enum pipe_format pipeFormat,
view->swizzle_b == PIPE_SWIZZLE_ZERO &&
view->swizzle_a == PIPE_SWIZZLE_RED)
return (MAPSURF_32BIT | MT_32BIT_xL824);
- debug_printf("i915: unsupported depth swizzle\n");
+ debug_printf("i915: unsupported depth swizzle %d %d %d %d\n",
+ view->swizzle_r,
+ view->swizzle_g,
+ view->swizzle_b,
+ view->swizzle_a);
return (MAPSURF_32BIT | MT_32BIT_xL824);
}
default:
diff --git a/src/gallium/drivers/i915/i915_state_static.c b/src/gallium/drivers/i915/i915_state_static.c
index f41c32e..9370f3d 100644
--- a/src/gallium/drivers/i915/i915_state_static.c
+++ b/src/gallium/drivers/i915/i915_state_static.c
@@ -126,7 +126,8 @@ static void update_framebuffer(struct i915_context *i915)
unsigned offset = i915_texture_offset(tex, depth_surface->u.tex.level,
depth_surface->u.tex.first_layer);
assert(tex);
- assert(offset == 0);
+ if (offset != 0)
+ debug_printf("Depth offset is %d\n",offset);
i915->current.depth_bo = tex->buffer;
i915->current.depth_flags = BUF_3D_ID_DEPTH |
More information about the mesa-commit
mailing list