From 4ad63659c09499f4e538d71aec42035246747ffd Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 21 Apr 2011 15:13:34 +0200 Subject: galahad,util: warn on resource target mismatch in copy_region Reviewed-by: Jakob Bornecrantz --- src/gallium/auxiliary/util/u_surface.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/auxiliary/util') diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c index 43a026691d3..4c5cc4da182 100644 --- a/src/gallium/auxiliary/util/u_surface.c +++ b/src/gallium/auxiliary/util/u_surface.c @@ -157,6 +157,9 @@ util_resource_copy_region(struct pipe_context *pipe, unsigned h = src_box->height; assert(src && dst); + assert((src->target == PIPE_BUFFER && dst->target == PIPE_BUFFER) || + (src->target != PIPE_BUFFER && dst->target != PIPE_BUFFER)); + if (!src || !dst) return; -- cgit v1.2.3