virgl render complains about "Illegal resource" when running
dEQP-EGL.functional.color_clears.single_context.gles2.rgb888_window,
the reason is that a zero bind value was given for temp resource.

Signed-off-by: Lepton Wu <lep...@chromium.org>
---
 src/gallium/drivers/virgl/virgl_texture.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/virgl/virgl_texture.c 
b/src/gallium/drivers/virgl/virgl_texture.c
index 231319899e0..563dbacba7e 100644
--- a/src/gallium/drivers/virgl/virgl_texture.c
+++ b/src/gallium/drivers/virgl/virgl_texture.c
@@ -66,6 +66,7 @@ static void virgl_init_temp_resource_from_box(struct 
pipe_resource *res,
                                               unsigned level, unsigned flags)
 {
    memset(res, 0, sizeof(*res));
+   res->bind = orig->bind;
    res->format = orig->format;
    res->width0 = box->width;
    res->height0 = box->height;
-- 
2.21.0.225.g810b269d1ac-goog

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to