|
|
|
|
|
|
|
|
if (!param) |
|
|
if (!param) |
|
|
return; |
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
const struct gl_uniform *const uni = &shProg->Uniforms->Uniforms[index]; |
|
|
|
|
|
|
|
|
if (nameOut) { |
|
|
if (nameOut) { |
|
|
_mesa_copy_string(nameOut, maxLength, length, param->Name); |
|
|
_mesa_copy_string(nameOut, maxLength, length, param->Name); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (size) { |
|
|
if (size) { |
|
|
GLint typeSize = _mesa_sizeof_glsl_type(param->DataType); |
|
|
|
|
|
|
|
|
GLint typeSize = _mesa_sizeof_glsl_type(uni->Type->gl_type); |
|
|
if ((GLint) param->Size > typeSize) { |
|
|
if ((GLint) param->Size > typeSize) { |
|
|
/* This is an array. |
|
|
/* This is an array. |
|
|
* Array elements are placed on vector[4] boundaries so they're |
|
|
* Array elements are placed on vector[4] boundaries so they're |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (type) { |
|
|
if (type) { |
|
|
*type = param->DataType; |
|
|
|
|
|
|
|
|
*type = uni->Type->gl_type; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |