<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 16. juli 2018 13:34, Gert Wollny wrote:<br>
    <blockquote type="cite"
      cite="mid:1531740899.13043.14.camel@collabora.com">
      <pre wrap="">Am Montag, den 16.07.2018, 12:23 +0200 schrieb Erik Faye-Lund:
</pre>
      <blockquote type="cite">
        <pre wrap="">virglrenderer's virgl_hw.h doesn't contain these, and it's the
virgl winsys that cares about these, so let's move them there.

This reduces the diff between the two different versions of
virgl_hw.h, and should make it easier to upgrade the file in
the future.

Signed-off-by: Erik Faye-Lund <a class="moz-txt-link-rfc2396E" href="mailto:erik.faye-lund@collabora.com"><erik.faye-lund@collabora.com></a>
---
 src/gallium/drivers/virgl/virgl_hw.h       | 12 ------------
 src/gallium/drivers/virgl/virgl_resource.h |  2 ++
 src/gallium/drivers/virgl/virgl_winsys.h   | 12 ++++++++++++
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/gallium/drivers/virgl/virgl_hw.h
b/src/gallium/drivers/virgl/virgl_hw.h
index 157267558a..d0df23e2f6 100644
--- a/src/gallium/drivers/virgl/virgl_hw.h
+++ b/src/gallium/drivers/virgl/virgl_hw.h
@@ -202,18 +202,6 @@ enum virgl_formats {
 #define VIRGL_CAP_TGSI_INVARIANT       (1 << 0)
 #define VIRGL_CAP_TEXTURE_VIEW         (1 << 1)
 
-#define VIRGL_BIND_DEPTH_STENCIL (1 << 0)
-#define VIRGL_BIND_RENDER_TARGET (1 << 1)
-#define VIRGL_BIND_SAMPLER_VIEW  (1 << 3)
-#define VIRGL_BIND_VERTEX_BUFFER (1 << 4)
-#define VIRGL_BIND_INDEX_BUFFER  (1 << 5)
-#define VIRGL_BIND_CONSTANT_BUFFER (1 << 6)
-#define VIRGL_BIND_DISPLAY_TARGET (1 << 7)
-#define VIRGL_BIND_STREAM_OUTPUT (1 << 11)
-#define VIRGL_BIND_CURSOR        (1 << 16)
-#define VIRGL_BIND_CUSTOM        (1 << 17)
-#define VIRGL_BIND_SCANOUT       (1 << 18)
-
</pre>
      </blockquote>
      <pre wrap="">
In virglrenderer there is a set of VREND_RES_* that are mostly the
same, so I assume that they should be in sync (I wouldn't bet on it
though). If it can be resolved that these two sets are independent of
each other then the patch is 
  Reviewed-By: Gert Wollny <a class="moz-txt-link-rfc2396E" href="mailto:gert.wollny@collabora.com"><gert.wollny@collabora.com></a>

Otherwise it might be better to move the VREND_RES_* defines into
virgl_hw.h in virglrenderer and rename so that at one point the two
virgl_hw.h files will have the same content.</pre>
    </blockquote>
    <br>
    Oh, thanks for noticing. Yeah, these need to be the same. They get
    passed through virgl_drm_winsys_resource_cache_create() to the <span
      class="n" style="box-sizing: inherit;">VIRTGPU_RESOURCE_CREATE</span><span
      class="p" style="box-sizing: inherit; color: rgb(102, 102, 102);"></span>
    ioctl, to VIRTIO_GPU_CMD_RESOURCE_CREATE_3D in qemu, and in turn
    gets interpreted by vrend_renderer_resource_create...<br>
    <br>
    So yeah, these needs to be in sync. I guess the pragmatic choice
    would be to use these definitions in virglrenderer's copy here. I'll
    send a new proposal to virglrenderer for this bit, and drop this
    patch from this series.<br>
  </body>
</html>