diff options
author | Stéphane Marchesin <[email protected]> | 2014-11-22 00:11:40 -0800 |
---|---|---|
committer | Stéphane Marchesin <[email protected]> | 2014-11-22 00:13:41 -0800 |
commit | 3d9c1a9dd64282ab10a01cfa87a4e6b877faf8b3 (patch) | |
tree | e9c4c58f8f3c69db9eec2fa05ed97b48db72d606 /src | |
parent | 90207340c7ea0d729c8738fd0171316ada6f0ad7 (diff) |
i915g: Fallback copy_render for ZS formats
These don't work out of the box, need more work, maybe with a proxy
format?
Signed-off-by: Stéphane Marchesin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/i915/i915_surface.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_surface.c b/src/gallium/drivers/i915/i915_surface.c index b5161722701..24e01560110 100644 --- a/src/gallium/drivers/i915/i915_surface.c +++ b/src/gallium/drivers/i915/i915_surface.c @@ -89,9 +89,19 @@ i915_surface_copy_render(struct pipe_context *pipe, struct pipe_box dstbox; struct pipe_sampler_view src_templ, *src_view; struct pipe_surface dst_templ, *dst_view; + const struct util_format_description *desc; /* Fallback for buffers. */ - if ((dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER)) + if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) + goto fallback; + + /* Fallback for depth&stencil. XXX: see if we can use a proxy format */ + desc = util_format_description(src->format); + if (desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) + goto fallback; + + desc = util_format_description(dst->format); + if (desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) goto fallback; util_blitter_default_dst_texture(&dst_templ, dst, dst_level, dstz); |