diff options
author | Jason Ekstrand <[email protected]> | 2016-03-24 17:30:14 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-03-24 17:30:14 -0700 |
commit | 2c3f95d6aaab38cd66dd3dee1b089d5c91928eea (patch) | |
tree | 43423daf0da9c45f4054c5763a87f33dbfc7c4d5 /src/mesa/swrast/s_texture.c | |
parent | a5dc3c0f02aa523d1d3d123b62b9a187821079fe (diff) | |
parent | 22b343a8ec75a08dae6a6badbb261eab8437475d (diff) |
Merge remote-tracking branch 'public/master' into vulkan
Diffstat (limited to 'src/mesa/swrast/s_texture.c')
-rw-r--r-- | src/mesa/swrast/s_texture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 9ccd0e34702..d35bea96b92 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -60,7 +60,7 @@ _swrast_delete_texture_image(struct gl_context *ctx, } static unsigned int -texture_slices(struct gl_texture_image *texImage) +texture_slices(const struct gl_texture_image *texImage) { if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) return texImage->Height; @@ -188,6 +188,7 @@ check_map_teximage(const struct gl_texture_image *texImage, assert(y < texImage->Height || texImage->Height == 0); assert(x + w <= texImage->Width); assert(y + h <= texImage->Height); + assert(slice < texture_slices(texImage)); } /** @@ -240,7 +241,6 @@ _swrast_map_teximage(struct gl_context *ctx, assert(swImage->Buffer); assert(swImage->Buffer == swImage->ImageSlices[0]); - assert(slice < texture_slices(texImage)); map = swImage->ImageSlices[slice]; /* apply x/y offset to map address */ |