From 8d84a89cf601b7d6306043c097f9976eb635eb58 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Mon, 26 Apr 2021 16:37:01 +1000 Subject: [PATCH] mesa: fix _mesa_add{_typed}_unnamed_constant() declarations The function may be passed in a single float or a vec4. Fixes gcc warnings. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/program/prog_parameter.c | 2 +- src/mesa/program/prog_parameter.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/program/prog_parameter.c b/src/mesa/program/prog_parameter.c index 7af2ace..e56a45f 100644 --- a/src/mesa/program/prog_parameter.c +++ b/src/mesa/program/prog_parameter.c @@ -375,7 +375,7 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, */ GLint _mesa_add_typed_unnamed_constant(struct gl_program_parameter_list *paramList, - const gl_constant_value values[4], GLuint size, + const gl_constant_value *values, GLuint size, GLenum datatype, GLuint *swizzleOut) { GLint pos; diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h index 2ea4f36..0457a0d 100644 --- a/src/mesa/program/prog_parameter.h +++ b/src/mesa/program/prog_parameter.h @@ -185,12 +185,12 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, extern GLint _mesa_add_typed_unnamed_constant(struct gl_program_parameter_list *paramList, - const gl_constant_value values[4], GLuint size, + const gl_constant_value *values, GLuint size, GLenum datatype, GLuint *swizzleOut); static inline GLint _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, - const gl_constant_value values[4], GLuint size, + const gl_constant_value *values, GLuint size, GLuint *swizzleOut) { return _mesa_add_typed_unnamed_constant(paramList, values, size, GL_NONE, -- 2.7.4