[Mesa-dev] [PATCH] virgl: Add missing texture transfer_inline_write

Rob Herring robh at kernel.org
Fri May 20 17:51:00 UTC 2016


transfer_inline_write cannot be NULL and the virgl renderer doesn't support
inline writes for textures, so add the default version.

This fixes a crash in st_TexSubImage since commit fb9fe352ea41 ("st/mesa:
use transfer_inline_write for memcpy TexSubImage path").

Cc: Marek Olšák <marek.olsak at amd.com>
Cc: Dave Airlie <airlied at redhat.com>
Signed-off-by: Rob Herring <robh at kernel.org>
---
 src/gallium/drivers/virgl/virgl_texture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c
index f395f1f..34db056 100644
--- a/src/gallium/drivers/virgl/virgl_texture.c
+++ b/src/gallium/drivers/virgl/virgl_texture.c
@@ -304,7 +304,7 @@ static const struct u_resource_vtbl virgl_texture_vtbl =
    virgl_texture_transfer_map,          /* transfer_map */
    NULL,                                /* transfer_flush_region */
    virgl_texture_transfer_unmap,        /* transfer_unmap */
-   NULL                                 /* transfer_inline_write */
+   u_default_transfer_inline_write      /* transfer_inline_write */
 };
 
 struct pipe_resource *
-- 
2.7.4



More information about the mesa-dev mailing list