mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
r300: add shared HyperZ pipe-count helper
Introduce r300_hyperz_pipe_count and use it in\nr300_setup_hyperz_properties.\n\nRV530 selects pipe topology from NUM_Z_PIPES, while other families use\nNUM_GB_PIPES. Keeping this in one helper avoids duplicated family checks\nand prepares follow-up HiZ clear sizing changes to reuse the same rule.
(cherry picked from commit e97ac38ff3)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
This commit is contained in:
parent
8292cf5563
commit
2b87cb01b2
3 changed files with 10 additions and 6 deletions
|
|
@ -664,7 +664,7 @@
|
|||
"description": "r300: add shared HyperZ pipe-count helper",
|
||||
"nominated": false,
|
||||
"nomination_type": 0,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -53,6 +53,14 @@ radeon_winsys(struct pipe_screen *screen) {
|
|||
return r300_screen(screen)->rws;
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
r300_hyperz_pipe_count(const struct r300_screen *screen)
|
||||
{
|
||||
if (screen->caps.family == CHIP_RV530)
|
||||
return screen->info.r300_num_z_pipes;
|
||||
return screen->info.r300_num_gb_pipes;
|
||||
}
|
||||
|
||||
/* Debug functionality. */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -366,11 +366,7 @@ static void r300_setup_hyperz_properties(struct r300_screen *screen,
|
|||
tex->tex.microtile) {
|
||||
unsigned i, pipes;
|
||||
|
||||
if (screen->caps.family == CHIP_RV530) {
|
||||
pipes = screen->info.r300_num_z_pipes;
|
||||
} else {
|
||||
pipes = screen->info.r300_num_gb_pipes;
|
||||
}
|
||||
pipes = r300_hyperz_pipe_count(screen);
|
||||
|
||||
for (i = 0; i <= tex->b.last_level; i++) {
|
||||
unsigned zcomp_numdw, zcompsize, hiz_numdw, stride, height;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue