swrast: Fix another warning from gcc 11

This is similar change as commit f535ab59e2.

[2/4] Compiling C object src/mesa/libmesa_classic.a.p/swrast_s_texfilter.c.o
../src/mesa/swrast/s_texfilter.c: In function ‘sample_2d_footprint’:
../src/mesa/swrast/s_texfilter.c:1817:7: warning: ‘sample_2d_linear’ reading 16 bytes from a region of size 8 [-Wstringop-overread]
 1817 |       sample_2d_linear(ctx, samp, img, newCoord, rgba);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/mesa/swrast/s_texfilter.c:1817:7: note: referencing argument 4 of type ‘const GLfloat *’ {aka ‘const float *’}
../src/mesa/swrast/s_texfilter.c:1150:1: note: in a call to function ‘sample_2d_linear’
 1150 | sample_2d_linear(struct gl_context *ctx,
      | ^~~~~~~~~~~~~~~~

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13245>
This commit is contained in:
Tapani Pälli 2021-10-07 13:18:13 +03:00 committed by Marge Bot
parent 3e36a20a34
commit 1c3d3bf84a

View file

@ -1150,7 +1150,7 @@ static void
sample_2d_linear(struct gl_context *ctx,
const struct gl_sampler_object *samp,
const struct gl_texture_image *img,
const GLfloat texcoord[4],
const GLfloat texcoord[2],
GLfloat rgba[])
{
const struct swrast_texture_image *swImg = swrast_texture_image_const(img);