mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
mesa: inline _mesa_add_unnamed_constant()
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
fa9bd6b663
commit
ce9c042ab3
2 changed files with 6 additions and 24 deletions
|
|
@ -356,28 +356,6 @@ _mesa_add_typed_unnamed_constant(struct gl_program_parameter_list *paramList,
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a new unnamed constant to the parameter list. This will be used
|
|
||||||
* when a fragment/vertex program contains something like this:
|
|
||||||
* MOV r, { 0, 1, 2, 3 };
|
|
||||||
* If swizzleOut is non-null we'll search the parameter list for an
|
|
||||||
* existing instance of the constant which matches with a swizzle.
|
|
||||||
*
|
|
||||||
* \param paramList the parameter list
|
|
||||||
* \param values four float values
|
|
||||||
* \param swizzleOut returns swizzle mask for accessing the constant
|
|
||||||
* \return index/position of the new parameter in the parameter list.
|
|
||||||
* \sa _mesa_add_typed_unnamed_constant
|
|
||||||
*/
|
|
||||||
GLint
|
|
||||||
_mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList,
|
|
||||||
const gl_constant_value values[4], GLuint size,
|
|
||||||
GLuint *swizzleOut)
|
|
||||||
{
|
|
||||||
return _mesa_add_typed_unnamed_constant(paramList, values, size, GL_NONE,
|
|
||||||
swizzleOut);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new state reference to the parameter list.
|
* Add a new state reference to the parameter list.
|
||||||
|
|
|
||||||
|
|
@ -116,10 +116,14 @@ _mesa_add_typed_unnamed_constant(struct gl_program_parameter_list *paramList,
|
||||||
const gl_constant_value values[4], GLuint size,
|
const gl_constant_value values[4], GLuint size,
|
||||||
GLenum datatype, GLuint *swizzleOut);
|
GLenum datatype, GLuint *swizzleOut);
|
||||||
|
|
||||||
extern GLint
|
static inline GLint
|
||||||
_mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList,
|
_mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList,
|
||||||
const gl_constant_value values[4], GLuint size,
|
const gl_constant_value values[4], GLuint size,
|
||||||
GLuint *swizzleOut);
|
GLuint *swizzleOut)
|
||||||
|
{
|
||||||
|
return _mesa_add_typed_unnamed_constant(paramList, values, size, GL_NONE,
|
||||||
|
swizzleOut);
|
||||||
|
}
|
||||||
|
|
||||||
extern GLint
|
extern GLint
|
||||||
_mesa_add_state_reference(struct gl_program_parameter_list *paramList,
|
_mesa_add_state_reference(struct gl_program_parameter_list *paramList,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue