mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
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:
parent
50967402cc
commit
b77d694223
2 changed files with 9 additions and 4 deletions
|
|
@ -1983,10 +1983,6 @@ isl_surf_get_hiz_surf(const struct isl_device *dev,
|
|||
if (!isl_surf_usage_is_depth(surf->usage))
|
||||
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. */
|
||||
switch (surf->format) {
|
||||
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) {
|
||||
assert(ISL_DEV_USE_SEPARATE_STENCIL(dev));
|
||||
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;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue