[Mesa-dev] [PATCH 03/13] mesa: add mesa_type_is_double helper function (v2)

Ilia Mirkin imirkin at alum.mit.edu
Thu Feb 5 19:17:13 PST 2015


On Thu, Feb 5, 2015 at 2:48 AM, Matt Turner <mattst88 at gmail.com> wrote:
> On Wed, Feb 4, 2015 at 11:27 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> From: Dave Airlie <airlied at gmail.com>
>>
>> This is a helper to return if a type is based on a double.
>>
>> v2: GLboolean->bool (Ian)
>>
>> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>> ---
>>  src/mesa/program/prog_parameter.h | 22 ++++++++++++++++++++++
>>  1 file changed, 22 insertions(+)
>>
>> diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h
>> index 6b3b3c2..bcbe142 100644
>> --- a/src/mesa/program/prog_parameter.h
>> +++ b/src/mesa/program/prog_parameter.h
>> @@ -151,6 +151,28 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list,
>>                                  const gl_constant_value v[], GLuint vSize,
>>                                  GLint *posOut, GLuint *swizzleOut);
>>
>> +static INLINE bool mesa_type_is_double(int dataType)
>
> Other places in this file we use 'inline' so it's safe to use here.
>
> Since it is static, I don't think we need the 'mesa_' prefix, but if
> we want the prefix shouldn't it start with an underscore?

Well, it's static inline. Kind of at the border between having the
_mesa and not. I'm opting for adding the _ to it, which is consistent
with the "function defined in another file" logic (even though it's
#included).


More information about the mesa-dev mailing list