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>
struct virgl_hw_res *hw_res;
const unsigned h = u_minify(vtex->base.u.b.height0, level);
const unsigned nblocksy = util_format_get_nblocksy(format, h);
- bool is_depth = util_format_has_depth(util_format_description(resource->format));
uint32_t l_stride;
bool doflushwait;
else
l_stride = trans->base.layer_stride;
- if (is_depth && resource->nr_samples > 1) {
+ if (resource->nr_samples > 1) {
struct pipe_resource tmp_resource;
virgl_init_temp_resource_from_box(&tmp_resource, resource, box,
level, 0);