summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_gmem.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-06-15 16:32:42 -0400
committerRob Clark <[email protected]>2018-06-21 08:54:47 -0400
commitcf0c7258ee0524709ab6d05a9aafc7415361bd23 (patch)
tree1d22ac00b91293e71253373586dd79c1506a3442 /src/gallium/drivers/freedreno/freedreno_gmem.c
parentb6e690ef80f71cc62fa1095a2601087341be22a3 (diff)
freedreno/a5xx: MSAA
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_gmem.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_gmem.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c
index 37a2f33365d..1cd254b3629 100644
--- a/src/gallium/drivers/freedreno/freedreno_gmem.c
+++ b/src/gallium/drivers/freedreno/freedreno_gmem.c
@@ -135,6 +135,8 @@ calculate_tiles(struct fd_batch *batch)
cbuf_cpp[i] = util_format_get_blocksize(pfb->cbufs[i]->format);
else
cbuf_cpp[i] = 4;
+ /* if MSAA, color buffers are super-sampled in GMEM: */
+ cbuf_cpp[i] *= pfb->samples;
}
if (!memcmp(gmem->zsbuf_cpp, zsbuf_cpp, sizeof(zsbuf_cpp)) &&
@@ -393,9 +395,11 @@ fd_gmem_render_tiles(struct fd_batch *batch)
if (ctx->emit_sysmem_prep && !batch->nondraw) {
if (batch->cleared || batch->gmem_reason ||
- ((batch->num_draws > 5) && !batch->blit)) {
- DBG("GMEM: cleared=%x, gmem_reason=%x, num_draws=%u",
- batch->cleared, batch->gmem_reason, batch->num_draws);
+ ((batch->num_draws > 5) && !batch->blit) ||
+ (pfb->samples > 1)) {
+ DBG("GMEM: cleared=%x, gmem_reason=%x, num_draws=%u, samples=%u",
+ batch->cleared, batch->gmem_reason, batch->num_draws,
+ pfb->samples);
} else if (!(fd_mesa_debug & FD_DBG_NOBYPASS)) {
sysmem = true;
}