Patrick Baggett <baggett.patr...@gmail.com> writes: > On Mon, Apr 22, 2013 at 11:14 AM, Eric Anholt <e...@anholt.net> wrote: > >> This function going to get used a lot more in upcoming patches. >> --- >> src/mesa/swrast/s_texture.c | 16 ++++++++++++---- >> 1 file changed, 12 insertions(+), 4 deletions(-) >> >> diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c >> index 51048be..36a90dd 100644 >> --- a/src/mesa/swrast/s_texture.c >> +++ b/src/mesa/swrast/s_texture.c >> @@ -58,6 +58,14 @@ _swrast_delete_texture_image(struct gl_context *ctx, >> _mesa_delete_texture_image(ctx, texImage); >> } >> >> +static unsigned int >> +texture_slices(struct gl_texture_image *texImage) >> +{ >> + if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) >> + return texImage->Height; >> + else >> + return texImage->Depth; >> +} >> >> > I think you can const-qualify 'texImage'.
Given that const-qualification does nothing for generated code and just consumes developer time, I don't do it unless someone blocks review on it.
pgp1_ZCle7FO8.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev