diff options
author | Rob Clark <[email protected]> | 2018-10-29 15:44:13 -0400 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2018-12-06 16:55:59 -0800 |
commit | 913eb7fa58c8208722ec71e653262fb66cfeeeab (patch) | |
tree | 34591edd28ccf43c100947bbca662b8de5ed4711 /src/gallium/drivers/freedreno/freedreno_resource.c | |
parent | 14ea811c67357f319c9c72a608c2d555f7a3ec34 (diff) |
freedreno/a6xx: MSAA
Reviewed-by: Kristian H. Kristensen <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_resource.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_resource.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 252fd84b456..85bbbe271f9 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -853,6 +853,15 @@ fd_resource_create(struct pipe_screen *pscreen, DRM_FREEDRENO_GEM_TYPE_KMEM; /* TODO */ unsigned lrz_pitch = align(DIV_ROUND_UP(tmpl->width0, 8), 64); unsigned lrz_height = DIV_ROUND_UP(tmpl->height0, 8); + + /* LRZ buffer is super-sampled: */ + switch (prsc->nr_samples) { + case 4: + lrz_pitch *= 2; + case 2: + lrz_height *= 2; + } + unsigned size = lrz_pitch * lrz_height * 2; size += 0x1000; /* for GRAS_LRZ_FAST_CLEAR_BUFFER */ |