From 3467a274e0761f90a73dff65cd20c767d1f12632 Mon Sep 17 00:00:00 2001 From: Charmaine Lee Date: Mon, 4 Dec 2017 10:03:51 -0800 Subject: [PATCH] svga: no dma on multisample surface Force direct map on multisample surface. Fixes SVGA Driver Errors running multisample piglit tests on Linux VM v2: use texture for the check. Reviewed-by: Neha Bhende --- src/gallium/drivers/svga/svga_resource_texture.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index aaba3ac5f96..53cdb93c914 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -600,6 +600,13 @@ svga_texture_transfer_map(struct pipe_context *pipe, break; } + /* Force direct map for multisample surface */ + if (texture->nr_samples > 1) { + assert(svga_have_gb_objects(svga)); + assert(sws->have_sm4_1); + use_direct_map = TRUE; + } + st->use_direct_map = use_direct_map; pipe_resource_reference(&st->base.resource, texture); -- 2.30.2