mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
pan/crc: Introduce pan_fb_is_fully_covered()
Add function to retrieve whether the area of a pan_fb_info data structure is fully covered by the draw extent. Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
parent
b965adc60f
commit
7fe62246dd
3 changed files with 12 additions and 9 deletions
|
|
@ -1197,9 +1197,7 @@ pan_preload_emit_pre_frame_dcd(struct pan_fb_preload_cache *cache,
|
|||
* write even clean tiles to make sure CRC data is updated. */
|
||||
if (crc_rt >= 0) {
|
||||
bool *valid = fb->rts[crc_rt].crc_valid;
|
||||
bool full = !fb->draw_extent.minx && !fb->draw_extent.miny &&
|
||||
fb->draw_extent.maxx == (fb->width - 1) &&
|
||||
fb->draw_extent.maxy == (fb->height - 1);
|
||||
bool full = pan_fb_is_fully_covered(fb);
|
||||
|
||||
if (full && !(*valid))
|
||||
always_write = true;
|
||||
|
|
|
|||
|
|
@ -140,9 +140,7 @@ GENX(pan_select_crc_rt)(const struct pan_fb_info *fb, unsigned tile_size)
|
|||
continue;
|
||||
|
||||
bool valid = *(fb->rts[i].crc_valid);
|
||||
bool full = !fb->draw_extent.minx && !fb->draw_extent.miny &&
|
||||
fb->draw_extent.maxx == (fb->width - 1) &&
|
||||
fb->draw_extent.maxy == (fb->height - 1);
|
||||
bool full = pan_fb_is_fully_covered(fb);
|
||||
if (!full && !valid)
|
||||
continue;
|
||||
|
||||
|
|
@ -1256,9 +1254,7 @@ GENX(pan_emit_fbd)(const struct pan_fb_info *fb, unsigned layer_idx,
|
|||
|
||||
if (crc_rt >= 0) {
|
||||
bool *valid = fb->rts[crc_rt].crc_valid;
|
||||
bool full = !fb->draw_extent.minx && !fb->draw_extent.miny &&
|
||||
fb->draw_extent.maxx == (fb->width - 1) &&
|
||||
fb->draw_extent.maxy == (fb->height - 1);
|
||||
bool full = pan_fb_is_fully_covered(fb);
|
||||
|
||||
/* If the CRC was valid it stays valid, if it wasn't, we must ensure
|
||||
* the render operation covers the full frame, and clean tiles are
|
||||
|
|
|
|||
|
|
@ -162,6 +162,15 @@ struct pan_clean_tile {
|
|||
uint8_t write_zs : 1;
|
||||
};
|
||||
|
||||
static inline bool
|
||||
pan_fb_is_fully_covered(const struct pan_fb_info *fb)
|
||||
{
|
||||
return !fb->draw_extent.minx &&
|
||||
!fb->draw_extent.miny &&
|
||||
fb->draw_extent.maxx == (fb->width - 1) &&
|
||||
fb->draw_extent.maxy == (fb->height - 1);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
pan_clean_tile_write_rt_enabled(struct pan_clean_tile clean_tile,
|
||||
unsigned index)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue