mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
intel/isl: Fix QPitch of arrayed MCS
From RENDER_SURFACE_STATE::AuxiliarySurfaceQPitch on BDW+,
This field must be set to an integer multiple of the Surface
Vertical Alignment
Accomplish this by aligning the height of each MCS layer to main
surface's vertical alignment. Prevents the following test group from
failing on Xe2 when a future commit enables multi-layer fast-clears in
anv:
dEQP-VK.api.image_clearing.*.
clear_color_attachment.multiple_layers.
*_clamp_input_sample_count_*
The main test I used to debug this:
dEQP-VK.api.image_clearing.core.
clear_color_attachment.multiple_layers.
a8b8g8r8_unorm_pack32_64x11_clamp_input_sample_count_2
Backport-to: 25.3
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
(cherry picked from commit eb4a581e44)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39745>
This commit is contained in:
parent
82e682e3c0
commit
b9d7b5e3f8
3 changed files with 18 additions and 4 deletions
|
|
@ -174,7 +174,7 @@
|
|||
"description": "intel/isl: Fix QPitch of arrayed MCS",
|
||||
"nominated": true,
|
||||
"nomination_type": 4,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -3844,11 +3844,18 @@ isl_surf_get_mcs_surf(const struct isl_device *dev,
|
|||
UNREACHABLE("Invalid sample count");
|
||||
}
|
||||
|
||||
/* isl_genX(surf_fill_state_s) will assert on us if the QPitch is not
|
||||
* aligned by the main surface's vertical alignment. Align the height of
|
||||
* the image so that the QPitch follows.
|
||||
*/
|
||||
const uint32_t aligned_height = isl_align(surf->logical_level0_px.height,
|
||||
surf->image_alignment_el.height);
|
||||
|
||||
return isl_surf_init(dev, mcs_surf,
|
||||
.dim = ISL_SURF_DIM_2D,
|
||||
.format = mcs_format,
|
||||
.width = surf->logical_level0_px.width,
|
||||
.height = surf->logical_level0_px.height,
|
||||
.height = aligned_height,
|
||||
.depth = 1,
|
||||
.levels = 1,
|
||||
.array_len = surf->logical_level0_px.array_len,
|
||||
|
|
|
|||
|
|
@ -888,8 +888,15 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
|
|||
* doesn't expect our definition of the compression, it expects qpitch
|
||||
* in units of samples on the main surface.
|
||||
*/
|
||||
s.AuxiliarySurfaceQPitch =
|
||||
isl_surf_get_array_pitch_sa_rows(info->aux_surf) >> 2;
|
||||
uint32_t aux_qpitch = isl_surf_get_array_pitch_sa_rows(info->aux_surf);
|
||||
|
||||
/* From RENDER_SURFACE_STATE::AuxiliarySurfaceQPitch on BDW+,
|
||||
*
|
||||
* This field must be set to an integer multiple of the Surface
|
||||
* Vertical Alignment
|
||||
*/
|
||||
assert(aux_qpitch % image_align.h == 0);
|
||||
s.AuxiliarySurfaceQPitch = aux_qpitch >> 2;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue