mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
intel/isl: Strengthen MCS SINT format restriction
The gfx7 MCS restriction for SINT formats actually applies to multisampling in general. Place the stronger restriction in the format support check and assert this in isl_surf_get_mcs_surf. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14464>
This commit is contained in:
parent
bf9466e285
commit
531b1b7511
2 changed files with 16 additions and 14 deletions
|
|
@ -2065,20 +2065,7 @@ isl_surf_get_mcs_surf(const struct isl_device *dev,
|
|||
assert(surf->dim == ISL_SURF_DIM_2D);
|
||||
assert(surf->levels == 1);
|
||||
assert(surf->logical_level0_px.depth == 1);
|
||||
|
||||
/* From the Ivy Bridge PRM, Vol4 Part1 p77 ("MCS Enable"):
|
||||
*
|
||||
* This field must be set to 0 for all SINT MSRTs when all RT channels
|
||||
* are not written
|
||||
*
|
||||
* In practice this means that we have to disable MCS for all signed
|
||||
* integer MSAA buffers. The alternative, to disable MCS only when one
|
||||
* of the render target channels is disabled, is impractical because it
|
||||
* would require converting between CMS and UMS MSAA layouts on the fly,
|
||||
* which is expensive.
|
||||
*/
|
||||
if (ISL_GFX_VER(dev) == 7 && isl_format_has_sint_channel(surf->format))
|
||||
return false;
|
||||
assert(isl_format_supports_multisampling(dev->info, surf->format));
|
||||
|
||||
enum isl_format mcs_format;
|
||||
switch (surf->samples) {
|
||||
|
|
|
|||
|
|
@ -900,6 +900,21 @@ isl_format_supports_multisampling(const struct intel_device_info *devinfo,
|
|||
* is multisampled. See also isl_surf_get_hiz_surf().
|
||||
*/
|
||||
return devinfo->ver <= 8;
|
||||
} else if (devinfo->ver == 7 && isl_format_has_sint_channel(format)) {
|
||||
/* From the Ivy Bridge PRM, Vol4 Part1 p73 ("Number of Multisamples"):
|
||||
*
|
||||
* This field must be set to MULTISAMPLECOUNT_1 for SINT MSRTs when
|
||||
* all RT channels are not written
|
||||
*
|
||||
* From the Ivy Bridge PRM, Vol4 Part1 p77 ("MCS Enable"):
|
||||
*
|
||||
* This field must be set to 0 for all SINT MSRTs when all RT channels
|
||||
* are not written
|
||||
*
|
||||
* Disable multisampling support now as we don't handle the case when
|
||||
* one of the render target channels is disabled.
|
||||
*/
|
||||
return false;
|
||||
} else if (devinfo->ver < 7 && isl_format_get_layout(format)->bpb > 64) {
|
||||
return false;
|
||||
} else if (isl_format_is_compressed(format)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue