isl: fix range_B_tile end_tile_B value
Quoting the documentation :
"The returned range is a half-open interval where all of the
addresses within the subimage are < end_tile_B."
This is obviously not true with images smaller than a logical tile.
Currently the code return 1.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
This commit is contained in:
committed by
Marge Bot
parent
509606e56d
commit
bcc820950d
+8
-2
@@ -29,6 +29,7 @@
|
||||
#include "dev/intel_debug.h"
|
||||
#include "genxml/genX_bits.h"
|
||||
#include "util/log.h"
|
||||
#include "util/u_math.h"
|
||||
|
||||
#include "isl.h"
|
||||
#include "isl_gfx4.h"
|
||||
@@ -3838,10 +3839,15 @@ isl_surf_get_image_range_B_tile(const struct isl_surf *surf,
|
||||
&z_offset_el,
|
||||
&array_slice);
|
||||
|
||||
struct isl_tile_info tile_info;
|
||||
isl_surf_get_tile_info(surf, &tile_info);
|
||||
|
||||
/* We want the range we return to be exclusive but the tile containing the
|
||||
* last pixel (what we just calculated) is inclusive. Add one.
|
||||
* last pixel (what we just calculated) is inclusive. Add one and round up
|
||||
* to the tile size.
|
||||
*/
|
||||
(*end_tile_B)++;
|
||||
*end_tile_B = ALIGN_NPOT(*end_tile_B + 1, tile_info.phys_extent_B.w *
|
||||
tile_info.phys_extent_B.h);
|
||||
|
||||
assert(*end_tile_B <= surf->size_B);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user