diff options
author | Lucas Stach <[email protected]> | 2016-11-21 11:54:25 +0100 |
---|---|---|
committer | Lucas Stach <[email protected]> | 2017-01-30 12:40:57 +0100 |
commit | e158b7497103f145a9236a70183e07c37a9e13f7 (patch) | |
tree | 940b3fc52cd2c30c174854424f38f0f64f7975d8 | |
parent | 33f418bd67a0ccd14de8764b5c2e419963a428d8 (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]>
-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 20ec8f85855..1f0582ce0bf 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; |