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@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
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