If called for an unsupported number of samples, always return (.5, .5).
Fixes the Piglit arb_texture_multisample-fb-completeness test for
unsupported sample counts, such as 2.

Ideally, this function should not get called for unsupported sample
counts, but that'll be additional work...
---
 src/gallium/drivers/svga/svga_surface.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/svga/svga_surface.c 
b/src/gallium/drivers/svga/svga_surface.c
index d7c9850..64a85cf 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -899,6 +899,7 @@ svga_get_sample_position(struct pipe_context *context,
       break;
    default:
       positions = pos1;
+      sample_index = 0;
    }
 
    pos_out[0] = positions[sample_index][0];
-- 
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to