[Mesa-dev] [PATCH 29/31] i965/blorp: Use isl_format_get_depth_format for setting depth formats

Jason Ekstrand jason at jlekstrand.net
Fri Aug 19 16:56:06 UTC 2016


---
 src/mesa/drivers/dri/i965/blorp.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/blorp.c b/src/mesa/drivers/dri/i965/blorp.c
index ffc9c7c..1b00ccc 100644
--- a/src/mesa/drivers/dri/i965/blorp.c
+++ b/src/mesa/drivers/dri/i965/blorp.c
@@ -393,20 +393,7 @@ blorp_gen6_hiz_op(struct blorp_context *blorp, void *batch,
 
    params.dst.surf.samples = params.depth.surf.samples;
    params.dst.surf.logical_level0_px = params.depth.surf.logical_level0_px;
-
-   switch (surf->surf->format) {
-   case ISL_FORMAT_R16_UNORM:
-      params.depth_format = BRW_DEPTHFORMAT_D16_UNORM;
-      break;
-   case ISL_FORMAT_R32_FLOAT:
-      params.depth_format = BRW_DEPTHFORMAT_D32_FLOAT;
-      break;
-   case ISL_FORMAT_R24_UNORM_X8_TYPELESS:
-      params.depth_format = BRW_DEPTHFORMAT_D24_UNORM_X8_UINT;
-      break;
-   default:
-      unreachable("not reached");
-   }
+   params.depth_format = isl_format_get_depth_format(surf->surf->format, false);
 
    blorp->exec(blorp, batch, &params);
 }
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list