mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
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 <l.stach@pengutronix.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This commit is contained in:
parent
33f418bd67
commit
e158b74971
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue