mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-24 06:18:10 +02:00
intel/blorp: Halve max bpp for some redescribed blits
We cannot use 128bpp formats with Y-tiling on gfx6 and prior.
Fixes: eb8883f3ef ("intel/blorp: Redescribe surfaces for copies")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15435
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41650>
This commit is contained in:
parent
8a68ae989d
commit
da547a1a4d
1 changed files with 12 additions and 1 deletions
|
|
@ -3258,8 +3258,19 @@ get_max_format_scale(const struct isl_device *isl_dev,
|
|||
uint32_t lod1_w = u_minify(info->surf.logical_level0_px.width, 1);
|
||||
uint32_t phys_lod1_w = align(lod1_w, info->surf.image_alignment_el.w);
|
||||
|
||||
int max_bpb = 128;
|
||||
/* From the Sandybridge PRM, Volume 1, Part 2, page 32:
|
||||
*
|
||||
* "NOTE: 128BPE Format Color Buffer ( render target ) MUST be either
|
||||
* TileX or Linear."
|
||||
*
|
||||
* This is necessary all the way back to 965, but is permitted on Gfx7+.
|
||||
*/
|
||||
if (ISL_GFX_VER(isl_dev) < 7 && info->surf.tiling == ISL_TILING_Y0)
|
||||
max_bpb = 64;
|
||||
|
||||
/* Find the format size which satisfies alignment requirements. */
|
||||
for (int max_bpb = 128; max_bpb >= surf_fmtl->bpb; max_bpb /= 2) {
|
||||
for (; max_bpb >= surf_fmtl->bpb; max_bpb /= 2) {
|
||||
if (info->view.base_level >= 1 &&
|
||||
phys_lod1_w * surf_fmtl->bpb % max_bpb)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue