summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_hw.h
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2018-06-29 12:39:06 +0200
committerGert Wollny <[email protected]>2018-07-02 09:33:55 +0200
commit91f48cdfe5c817158c533a8f67c60e9aabbe4479 (patch)
treed8bd63379f311917e7dff19bef4162bb49d25e8f /src/gallium/drivers/virgl/virgl_hw.h
parentba78e78cd56b0bf675c186d2489d16ec907a05cc (diff)
virgl: Add support for glGetMultisample
Use caps to obtain the multisample sample positions for up to 16 positions and implement the according Gallium interface. This implemenation (plus its counterpart in virglrenderer) assume that the fixed sample position are always the same for a given number of samples over the whole live time of a qemu session. It also assumes that sample series are only given for 2, 4, 8, and 16 samples, and for intermediate numbers N of samples the next higher supported set from above list is picked and the sample positions for the first N samples are returned accordingly. Fixes (when run on GL host): dEQP-GLES31.functional.texture.multisample.samples_1.sample_position dEQP-GLES31.functional.texture.multisample.samples_2.sample_position dEQP-GLES31.functional.texture.multisample.samples_3.sample_position dEQP-GLES31.functional.texture.multisample.samples_4.sample_position dEQP-GLES31.functional.texture.multisample.samples_8.sample_position dEQP-GLES31.functional.texture.multisample.samples_10.sample_position dEQP-GLES31.functional.texture.multisample.samples_12.sample_position dEQP-GLES31.functional.texture.multisample.samples_13.sample_position dEQP-GLES31.functional.texture.multisample.samples_16.sample_position v2: remove unrelated chunk (thanks Ilia Mirkin) v3: - also return positions for intermediate sample counts - fix unused varible warning - update description v4: explain better what this patch assumes and how it handles sample numbers that are not directly advertised (thanks go to Erik Faye-Lund for making me aware that this should be documented) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_hw.h')
-rw-r--r--src/gallium/drivers/virgl/virgl_hw.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_hw.h b/src/gallium/drivers/virgl/virgl_hw.h
index d338051d9b3..157267558ac 100644
--- a/src/gallium/drivers/virgl/virgl_hw.h
+++ b/src/gallium/drivers/virgl/virgl_hw.h
@@ -299,6 +299,7 @@ struct virgl_caps_v2 {
uint32_t uniform_buffer_offset_alignment;
uint32_t shader_buffer_offset_alignment;
uint32_t capability_bits;
+ uint32_t msaa_sample_positions[8];
};
union virgl_caps {