Skip to content

Commit

Permalink
drm/asahi: render: Fix meta1_blocks calculation for MSAA
Browse files Browse the repository at this point in the history
Block count needs to be computed with an extra factor of the sample
count.

Signed-off-by: Asahi Lina <[email protected]>
  • Loading branch information
asahilina committed Jun 14, 2023
1 parent 185978b commit 51a96a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/asahi/hw/t600x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub(crate) const HWCONFIG_T6002: super::HwConfig = HwConfig {
preempt3_size: 0x20,
clustering: Some(HwClusteringConfig {
meta1_blocksize: 0x44,
meta2_size: 0x190 * 8, // CHECK
meta2_size: 0xc0 * 8,
meta3_size: 0x280 * 8,
meta4_size: 0x30 * 16,
max_splits: 16,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/asahi/queue/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl super::Queue::ver {
// No idea where this comes from, but it fits what macOS does...
// TODO: layers?
let meta1_blocks = if num_clusters > 1 {
div_ceil(align(tiles_x, 2) * align(tiles_y, 4), 0x1980)
div_ceil(align(tiles_x, 2) * align(tiles_y, 4) * cmdbuf.samples, 0x1980)
} else {
0
};
Expand Down

0 comments on commit 51a96a2

Please sign in to comment.