static struct pipe_resource *
create_texture(struct pipe_screen *screen, enum pipe_format format,
+ unsigned nr_samples,
unsigned width, unsigned height, unsigned depth)
{
struct pipe_resource templ;
templ.height0 = height;
templ.depth0 = 1;
templ.array_size = depth;
+ templ.nr_samples = nr_samples;
templ.usage = PIPE_USAGE_DEFAULT;
templ.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
/* Use the temporary texture. Src is converted to a canonical format,
* then proceed the generic swizzled_copy.
*/
- temp = create_texture(pipe->screen, canon_format, src_box->width,
+ temp = create_texture(pipe->screen, canon_format, src->nr_samples,
+ src_box->width,
src_box->height, src_box->depth);
u_box_3d(0, 0, 0, src_box->width, src_box->height, src_box->depth,
/* Use the temporary texture. First, use the generic copy, but use
* a canonical format in the destination. Then convert */
- temp = create_texture(pipe->screen, canon_format, src_box->width,
+ temp = create_texture(pipe->screen, canon_format, dst->nr_samples,
+ src_box->width,
src_box->height, src_box->depth);
u_box_3d(0, 0, 0, src_box->width, src_box->height, src_box->depth,