intel/isl: Allow HiZ with Tile4/64 surfaces
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Francisco Jerez <currojerez@riseup.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14091>
This commit is contained in:
@@ -1983,10 +1983,6 @@ isl_surf_get_hiz_surf(const struct isl_device *dev,
|
|||||||
if (!isl_surf_usage_is_depth(surf->usage))
|
if (!isl_surf_usage_is_depth(surf->usage))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* HiZ only works with Y-tiled depth buffers */
|
|
||||||
if (!isl_tiling_is_any_y(surf->tiling))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* On SNB+, compressed depth buffers cannot be interleaved with stencil. */
|
/* On SNB+, compressed depth buffers cannot be interleaved with stencil. */
|
||||||
switch (surf->format) {
|
switch (surf->format) {
|
||||||
case ISL_FORMAT_R24_UNORM_X8_TYPELESS:
|
case ISL_FORMAT_R24_UNORM_X8_TYPELESS:
|
||||||
|
|||||||
@@ -153,6 +153,15 @@ isl_genX(emit_depth_stencil_hiz_s)(const struct isl_device *dev, void *batch,
|
|||||||
if (separate_stencil || info->hiz_usage == ISL_AUX_USAGE_HIZ) {
|
if (separate_stencil || info->hiz_usage == ISL_AUX_USAGE_HIZ) {
|
||||||
assert(ISL_DEV_USE_SEPARATE_STENCIL(dev));
|
assert(ISL_DEV_USE_SEPARATE_STENCIL(dev));
|
||||||
db.SeparateStencilBufferEnable = true;
|
db.SeparateStencilBufferEnable = true;
|
||||||
|
|
||||||
|
/* From the IronLake PRM, Vol 2 Part 1,
|
||||||
|
* 3DSTATE_DEPTH_BUFFER::Tiled Surface,
|
||||||
|
*
|
||||||
|
* When Hierarchical Depth Buffer is enabled, this bit must be set.
|
||||||
|
*
|
||||||
|
* HiZ only works on tiled depth buffers.
|
||||||
|
*/
|
||||||
|
assert(info->depth_surf->tiling != ISL_TILING_LINEAR);
|
||||||
db.HierarchicalDepthBufferEnable = true;
|
db.HierarchicalDepthBufferEnable = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user