summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorJonathan Marek <jonathan@marek.ca>2018-11-19 16:02:15 -0500
committerRob Clark <robdclark@gmail.com>2018-11-27 15:44:03 -0500
commite68cd912518b924e025947adf7c3accc69993bba (patch)
tree2116f3e888af09b44da860adf612a6bab6b944ff /src/gallium/drivers/freedreno
parent3ed4aad524b32d999ee3a999ef60da0ecb727a49 (diff)
freedreno: use MSM_BO_SCANOUT with scanout buffers
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 54d73858962..bd7be94c859 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -99,7 +99,9 @@ realloc_bo(struct fd_resource *rsc, uint32_t size)
{
struct fd_screen *screen = fd_screen(rsc->base.screen);
uint32_t flags = DRM_FREEDRENO_GEM_CACHE_WCOMBINE |
- DRM_FREEDRENO_GEM_TYPE_KMEM; /* TODO */
+ DRM_FREEDRENO_GEM_TYPE_KMEM |
+ COND(rsc->base.bind & PIPE_BIND_SCANOUT, DRM_FREEDRENO_GEM_SCANOUT);
+ /* TODO other flags? */
/* if we start using things other than write-combine,
* be sure to check for PIPE_RESOURCE_FLAG_MAP_COHERENT