From 2a4b019239ea74c5573322881d663529bfd8191a Mon Sep 17 00:00:00 2001 From: Charmaine Lee Date: Mon, 12 Sep 2016 14:21:40 -0700 Subject: svga: single sample surface can be created as non-multisamples surface With this patch, single sample surface will be created as non-multisamples surface. Tested with piglit, glretrace. Reviewed-by: Brian Paul --- src/gallium/drivers/svga/svga_resource_texture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/svga/svga_resource_texture.c') diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index 2086afab52a..484a24049d9 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -841,7 +841,9 @@ svga_texture_create(struct pipe_screen *screen, tex->key.size.depth = template->depth0; tex->key.arraySize = 1; tex->key.numFaces = 1; - tex->key.sampleCount = template->nr_samples; + + /* single sample texture can be treated as non-multisamples texture */ + tex->key.sampleCount = template->nr_samples > 1 ? template->nr_samples : 0; if (template->nr_samples > 1) { tex->key.flags |= SVGA3D_SURFACE_MASKABLE_ANTIALIAS; -- cgit v1.2.3