isl: Use software programmable render compression format encoding
Instead of relying on hardcoded (legacy) encoding format, use software programmable encoding for render compression format. v2: (Nanley) - Fix param mismatch - Set RenderCompressionFormat unconditionally - Fix commit message Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12686>
This commit is contained in:
parent
dd54e9125a
commit
35fd101ad2
|
@ -125,6 +125,9 @@ isl_genX(emit_depth_stencil_hiz_s)(const struct isl_device *dev, void *batch,
|
||||||
#if GFX_VERx10 >= 125
|
#if GFX_VERx10 >= 125
|
||||||
db.TiledMode = isl_encode_tiling[info->depth_surf->tiling];
|
db.TiledMode = isl_encode_tiling[info->depth_surf->tiling];
|
||||||
db.MipTailStartLOD = 15;
|
db.MipTailStartLOD = 15;
|
||||||
|
db.CompressionMode = isl_aux_usage_has_ccs(info->hiz_usage);
|
||||||
|
db.RenderCompressionFormat =
|
||||||
|
isl_get_render_compression_format(info->depth_surf->format);
|
||||||
#elif GFX_VER <= 6
|
#elif GFX_VER <= 6
|
||||||
db.TiledSurface = info->depth_surf->tiling != ISL_TILING_LINEAR;
|
db.TiledSurface = info->depth_surf->tiling != ISL_TILING_LINEAR;
|
||||||
db.TileWalk = info->depth_surf->tiling == ISL_TILING_Y0 ? TILEWALK_YMAJOR :
|
db.TileWalk = info->depth_surf->tiling == ISL_TILING_Y0 ? TILEWALK_YMAJOR :
|
||||||
|
@ -169,6 +172,9 @@ isl_genX(emit_depth_stencil_hiz_s)(const struct isl_device *dev, void *batch,
|
||||||
#if GFX_VERx10 >= 125
|
#if GFX_VERx10 >= 125
|
||||||
sb.TiledMode = isl_encode_tiling[info->stencil_surf->tiling];
|
sb.TiledMode = isl_encode_tiling[info->stencil_surf->tiling];
|
||||||
sb.MipTailStartLOD = 15;
|
sb.MipTailStartLOD = 15;
|
||||||
|
sb.CompressionMode = isl_aux_usage_has_ccs(info->stencil_aux_usage);
|
||||||
|
sb.RenderCompressionFormat =
|
||||||
|
isl_get_render_compression_format(info->stencil_surf->format);
|
||||||
#endif
|
#endif
|
||||||
#if GFX_VER >= 12
|
#if GFX_VER >= 12
|
||||||
sb.StencilWriteEnable = true;
|
sb.StencilWriteEnable = true;
|
||||||
|
|
|
@ -705,6 +705,10 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GFX_VERx10 >= 125
|
||||||
|
s.RenderCompressionFormat =
|
||||||
|
isl_get_render_compression_format(info->surf->format);
|
||||||
|
#endif
|
||||||
#if GFX_VER >= 12
|
#if GFX_VER >= 12
|
||||||
s.MemoryCompressionEnable = info->aux_usage == ISL_AUX_USAGE_MC;
|
s.MemoryCompressionEnable = info->aux_usage == ISL_AUX_USAGE_MC;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue