diff options
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 56e9b64fc47..0925333236a 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -558,6 +558,8 @@ struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe, { struct r600_surface *surface = CALLOC_STRUCT(r600_surface); + assert(templ->u.tex.first_layer <= u_max_layer(texture, templ->u.tex.level)); + assert(templ->u.tex.last_layer <= u_max_layer(texture, templ->u.tex.level)); assert(templ->u.tex.first_layer == templ->u.tex.last_layer); if (surface == NULL) return NULL; |