[virglrenderer-devel] [PATCH] images: add max image samples to the interface

Dave Airlie airlied at gmail.com
Wed Jul 25 00:59:36 UTC 2018


From: Dave Airlie <airlied at redhat.com>

---
 src/virgl_hw.h       | 1 +
 src/vrend_renderer.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/virgl_hw.h b/src/virgl_hw.h
index a0269da..69b9394 100644
--- a/src/virgl_hw.h
+++ b/src/virgl_hw.h
@@ -336,6 +336,7 @@ struct virgl_caps_v2 {
         uint32_t max_shader_buffer_other_stages;
         uint32_t max_shader_image_frag_compute;
         uint32_t max_shader_image_other_stages;
+        uint32_t max_image_samples;
 };
 
 union virgl_caps {
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 9923d4c..7c4ad9e 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -8057,6 +8057,8 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
       if (max > PIPE_MAX_SHADER_IMAGES)
          max = PIPE_MAX_SHADER_IMAGES;
       caps->v2.max_shader_image_frag_compute = max;
+
+      glGetIntegerv(GL_MAX_IMAGE_SAMPLES, (GLint*)&caps->v2.max_image_samples);
    }
 
    caps->v1.max_samples = vrend_renderer_query_multisample_caps(max, &caps->v2);
-- 
2.14.3



More information about the virglrenderer-devel mailing list