mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15: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. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40040>
This commit is contained in:
parent
3fc2627897
commit
e97ac38ff3
2 changed files with 9 additions and 5 deletions
|
|
@ -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