Mesa (master): i965/blorp: Explain why Z24 can't use a sensible format.
Kenneth Graunke
kwg at kemper.freedesktop.org
Wed Oct 9 23:36:31 UTC 2013
Module: Mesa
Branch: master
Commit: 0589eaecde2fc0fa35fb2e0c54d76db7b6467498
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0589eaecde2fc0fa35fb2e0c54d76db7b6467498
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Mon Oct 7 11:27:22 2013 -0700
i965/blorp: Explain why Z24 can't use a sensible format.
We could conceivably use BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS for
Z24 source images, allowing conversions from Z24 to either Z16 or Z32F.
Unfortunately, we can't use it for destination images since it isn't
supported as a render target.
Using different formats for sources or destinations would be painful,
so for now, punt.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
src/mesa/drivers/dri/i965/brw_blorp.cpp | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp
index f71db4f..c59bb66 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp
@@ -86,7 +86,11 @@ brw_blorp_surface_info::set(struct brw_context *brw,
this->brw_surfaceformat = BRW_SURFACEFORMAT_R8_UNORM;
break;
case MESA_FORMAT_X8_Z24:
- /* The miptree consists of 32 bits per pixel, arranged as 24-bit depth
+ /* It would make sense to use BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS
+ * here, but unfortunately it isn't supported as a render target, which
+ * would prevent us from blitting to 24-bit depth.
+ *
+ * The miptree consists of 32 bits per pixel, arranged as 24-bit depth
* values interleaved with 8 "don't care" bits. Since depth values don't
* require any blending, it doesn't matter how we interpret the bit
* pattern as long as we copy the right amount of data, so just map it
More information about the mesa-commit
mailing list