Mesa (master): virgl: Support VIRGL_BIND_SHARED

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 19 16:19:03 UTC 2019


Module: Mesa
Branch: master
Commit: 11e74daae5eb51520cc43efa817a4435516bfb8a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=11e74daae5eb51520cc43efa817a4435516bfb8a

Author: David Riley <davidriley at chromium.org>
Date:   Wed Jun 12 17:16:35 2019 -0700

virgl: Support VIRGL_BIND_SHARED

Support a new virgl bind type for shared buffers.

Signed-off-by: David Riley <davidriley at chormium.org>
Reviewed-By: Gert Wollny <gert.wollny at collabora.com>

---

 src/gallium/drivers/virgl/virgl_hw.h       | 1 +
 src/gallium/drivers/virgl/virgl_resource.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/gallium/drivers/virgl/virgl_hw.h b/src/gallium/drivers/virgl/virgl_hw.h
index 7f300e5cd15..3104e1bb1b1 100644
--- a/src/gallium/drivers/virgl/virgl_hw.h
+++ b/src/gallium/drivers/virgl/virgl_hw.h
@@ -277,6 +277,7 @@ enum virgl_formats {
  * are only read by the host.
  */
 #define VIRGL_BIND_STAGING       (1 << 19)
+#define VIRGL_BIND_SHARED        (1 << 20)
 
 struct virgl_caps_bool_set1 {
         unsigned indep_blend_enable:1;
diff --git a/src/gallium/drivers/virgl/virgl_resource.h b/src/gallium/drivers/virgl/virgl_resource.h
index c3374fbef70..f9439a9489f 100644
--- a/src/gallium/drivers/virgl/virgl_resource.h
+++ b/src/gallium/drivers/virgl/virgl_resource.h
@@ -152,6 +152,8 @@ static inline unsigned pipe_to_virgl_bind(const struct virgl_screen *vs,
    }
    if (pbind & PIPE_BIND_SCANOUT)
       outbind |= VIRGL_BIND_SCANOUT;
+   if (pbind & PIPE_BIND_SHARED)
+      outbind |= VIRGL_BIND_SHARED;
    if (pbind & PIPE_BIND_SHADER_BUFFER)
       outbind |= VIRGL_BIND_SHADER_BUFFER;
    if (pbind & PIPE_BIND_QUERY_BUFFER)




More information about the mesa-commit mailing list