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 <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10446>
This commit is contained in:
Timothy Arceri 2021-04-26 16:37:01 +10:00 committed by Marge Bot
parent db717677e7
commit 8d84a89cf6
2 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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,