summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-08-19 04:30:25 -0700
committerJason Ekstrand <[email protected]>2016-08-29 12:17:34 -0700
commit3e46f11409fde40f2d445b81e5697eafd0b23973 (patch)
treedec9f5e52d4709c62ad41eea91a876722383886d /src/mesa
parent555b22a446362a2b0f9bae3c57cdaa330be89edb (diff)
i965/blorp: Use isl_format_get_depth_format for setting depth formats
Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/blorp.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/blorp.c b/src/mesa/drivers/dri/i965/blorp.c
index 1c4102f7333..28045d37c39 100644
--- a/src/mesa/drivers/dri/i965/blorp.c
+++ b/src/mesa/drivers/dri/i965/blorp.c
@@ -284,20 +284,7 @@ blorp_gen6_hiz_op(struct blorp_batch *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);
batch->blorp->exec(batch, &params);
}