diff options
author | Lucas Stach <[email protected]> | 2016-11-21 11:54:25 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-02-03 11:18:53 +0000 |
commit | 2fc362f14711981e98c920f2f278ad91bad89982 (patch) | |
tree | a9d6ba60a6d3e7c27da52dd6443d2f3d797a97fb | |
parent | 89b51c7e432268d8f5b5b4ae1870332ac4a3f202 (diff) |
etnaviv: force vertex buffers through the MMU
This fixes a vertex data corruption issue if some of the vertex streams
go through the MMU and some don't.
Signed-off-by: Lucas Stach <[email protected]>
Tested-by: Philipp Zabel <[email protected]>
Acked-by: Christian Gmeiner <[email protected]>
(cherry picked from commit e158b7497103f145a9236a70183e07c37a9e13f7)
Nominated-by: Christian Gmeiner <[email protected]>
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_resource.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index aefe65bf0e4..94a8a73997a 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -201,7 +201,10 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout, size = setup_miptree(rsc, paddingX, paddingY, msaa_xscale, msaa_yscale); - struct etna_bo *bo = etna_bo_new(screen->dev, size, DRM_ETNA_GEM_CACHE_WC); + uint32_t flags = DRM_ETNA_GEM_CACHE_WC; + if (templat->bind & PIPE_BIND_VERTEX_BUFFER) + flags |= DRM_ETNA_GEM_FORCE_MMU; + struct etna_bo *bo = etna_bo_new(screen->dev, size, flags); if (unlikely(bo == NULL)) { BUG("Problem allocating video memory for resource"); return NULL; |