diff options
author | Charmaine Lee <charmainel@vmware.com> | 2017-11-16 19:46:35 -0800 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2018-09-10 13:07:30 -0600 |
commit | 7187a2f7ffecacf63fe68dfe1b651f792c974241 (patch) | |
tree | 07cf19a461b5137c6c25db6b9be3fe8f8034de58 | |
parent | 73c850fb9a75cba07dbd45572d7a060a7bdb24bc (diff) |
svga: add sample positions for 2 samples
Fixes piglit tests spec@arb_sample_shading@builtin-gl-sample-position 2
spec@arb_texture_multisample@fb-completeness@2
Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r-- | src/gallium/drivers/svga/svga_surface.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index 9b9bc9ed6a3..bc1212f8302 100644 --- a/src/gallium/drivers/svga/svga_surface.c +++ b/src/gallium/drivers/svga/svga_surface.c @@ -918,6 +918,10 @@ svga_get_sample_position(struct pipe_context *context, static const float pos1[1][2] = { { 0.5, 0.5 } }; + static const float pos2[2][2] = { + { 0.75, 0.75 }, + { 0.25, 0.25 } + }; static const float pos4[4][2] = { { 0.375000, 0.125000 }, { 0.875000, 0.375000 }, @@ -955,6 +959,9 @@ svga_get_sample_position(struct pipe_context *context, const float (*positions)[2]; switch (sample_count) { + case 2: + positions = pos2; + break; case 4: positions = pos4; break; |