OSDN Git Service

virgl: do not map zero-sized resource
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 5 Sep 2018 13:34:51 +0000 (14:34 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 10 Sep 2018 08:35:42 +0000 (10:35 +0200)
commitc4017106bb8b5118b68e24d3f5b44c538033cfe3
tree148dff16444d7d12f42c6ba6e213ce5652ffdb34
parent80834640137228323b4c6d8e5909926e0b69bf70
virgl: do not map zero-sized resource

When creating textures, we avoid creating backing-store for all
multisampled textures, not just depth buffers.

So we can't try to map them later. That's just going to fail. So
let's take the blit-based code-path that seems to avoid this problem.

This make this piglit test-case no longer crash (although it still
fails):

bin/copyteximage 2D -samples=2 -auto

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/virgl/virgl_texture.c