diff options
author | Marek Olšák <[email protected]> | 2012-09-12 22:29:23 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-09-30 18:57:56 +0200 |
commit | 9cc257ad401feaf5bb94ad8d063523ea98b9d44a (patch) | |
tree | 4aaff695271d5d4f1606ea02221a7c3d4576760b /src/gallium/auxiliary/util | |
parent | c4df2e333765164e0d4926f03b969a3c9fdca691 (diff) |
gallium/u_blitter: check PIPE_CAP_TEXTURE_MULTISAMPLE
Tested-by: Michel Dänzer <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 35b8edba75c..b94366b998d 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -121,6 +121,7 @@ struct blitter_context_priv boolean vertex_has_integers; boolean has_stream_out; boolean has_stencil_export; + boolean has_texture_multisample; }; @@ -169,6 +170,9 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe) pipe->screen->get_param(pipe->screen, PIPE_CAP_SHADER_STENCIL_EXPORT); + ctx->has_texture_multisample = + pipe->screen->get_param(pipe->screen, PIPE_CAP_TEXTURE_MULTISAMPLE); + /* blend state objects */ memset(&blend, 0, sizeof(blend)); ctx->blend_keep_color = pipe->create_blend_state(pipe, &blend); @@ -1057,6 +1061,10 @@ boolean util_blitter_is_copy_supported(struct blitter_context *blitter, } if (src) { + if (src->nr_samples > 1 && !ctx->has_texture_multisample) { + return FALSE; + } + if (!screen->is_format_supported(screen, src->format, src->target, src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) { return FALSE; |