mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-20 12:10:36 +02:00
gallium/u_blitter: check PIPE_CAP_TEXTURE_MULTISAMPLE
Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
c4df2e3337
commit
9cc257ad40
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue