Mesa (master): virgl: make sure bind is set for non-buffers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 17 07:41:24 UTC 2019


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue Mar 12 13:57:14 2019 +0100

virgl: make sure bind is set for non-buffers

Otherwise, virglrenderer will reject the resource.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh at chromium.org>

---

 src/gallium/drivers/virgl/virgl_texture.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c
index e0c152dd562..5cb01cb18a0 100644
--- a/src/gallium/drivers/virgl/virgl_texture.c
+++ b/src/gallium/drivers/virgl/virgl_texture.c
@@ -97,6 +97,9 @@ static void virgl_init_temp_resource_from_box(struct pipe_resource *res,
    else
       res->target = PIPE_TEXTURE_2D;
 
+   if (res->target != PIPE_BUFFER)
+      res->bind = PIPE_BIND_RENDER_TARGET;
+
    switch (res->target) {
    case PIPE_TEXTURE_1D_ARRAY:
    case PIPE_TEXTURE_2D_ARRAY:




More information about the mesa-commit mailing list