static bool
add_interface_variables(struct gl_shader_program *shProg,
- struct gl_shader *sh, GLenum interface)
+ struct gl_shader *sh, GLenum programInterface)
{
foreach_in_list(ir_instruction, node, sh->ir) {
ir_variable *var = node->as_variable();
var->data.location != SYSTEM_VALUE_INSTANCE_ID)
continue;
case ir_var_shader_in:
- if (interface != GL_PROGRAM_INPUT)
+ if (programInterface != GL_PROGRAM_INPUT)
continue;
break;
case ir_var_shader_out:
- if (interface != GL_PROGRAM_OUTPUT)
+ if (programInterface != GL_PROGRAM_OUTPUT)
continue;
break;
default:
continue;
};
- if (!add_program_resource(shProg, interface, var,
+ if (!add_program_resource(shProg, programInterface, var,
build_stageref(shProg, var->name)))
return false;
}
*/
struct gl_program_resource *
_mesa_program_resource_find_name(struct gl_shader_program *shProg,
- GLenum interface, const char *name)
+ GLenum programInterface, const char *name)
{
struct gl_program_resource *res = shProg->ProgramResourceList;
for (unsigned i = 0; i < shProg->NumProgramResourceList; i++, res++) {
- if (res->Type != interface)
+ if (res->Type != programInterface)
continue;
/* Resource basename. */
const char *rname = _mesa_program_resource_name(res);
unsigned baselen = strlen(rname);
- switch (interface) {
+ switch (programInterface) {
case GL_TRANSFORM_FEEDBACK_VARYING:
case GL_UNIFORM_BLOCK:
case GL_UNIFORM:
*/
struct gl_program_resource *
_mesa_program_resource_find_index(struct gl_shader_program *shProg,
- GLenum interface, GLuint index)
+ GLenum programInterface, GLuint index)
{
struct gl_program_resource *res = shProg->ProgramResourceList;
int idx = -1;
for (unsigned i = 0; i < shProg->NumProgramResourceList; i++, res++) {
- if (res->Type != interface)
+ if (res->Type != programInterface)
continue;
switch (res->Type) {
*/
bool
_mesa_get_program_resource_name(struct gl_shader_program *shProg,
- GLenum interface, GLuint index,
+ GLenum programInterface, GLuint index,
GLsizei bufSize, GLsizei *length,
GLchar *name, const char *caller)
{
/* Find resource with given interface and index. */
struct gl_program_resource *res =
- _mesa_program_resource_find_index(shProg, interface, index);
+ _mesa_program_resource_find_index(shProg, programInterface, index);
/* The error INVALID_VALUE is generated if <index> is greater than
* or equal to the number of entries in the active resource list for
* Note, that TCS outputs and TES inputs should not have index appended
* either.
*/
- bool add_index = !(((interface == GL_PROGRAM_INPUT) &&
+ bool add_index = !(((programInterface == GL_PROGRAM_INPUT) &&
res->StageReferences & (1 << MESA_SHADER_GEOMETRY)));
if (add_index && _mesa_program_resource_array_size(res)) {
*/
GLint
_mesa_program_resource_location(struct gl_shader_program *shProg,
- GLenum interface, const char *name)
+ GLenum programInterface, const char *name)
{
struct gl_program_resource *res =
- _mesa_program_resource_find_name(shProg, interface, name);
+ _mesa_program_resource_find_name(shProg, programInterface, name);
/* Resource not found. */
if (!res)
*/
GLint
_mesa_program_resource_location_index(struct gl_shader_program *shProg,
- GLenum interface, const char *name)
+ GLenum programInterface, const char *name)
{
struct gl_program_resource *res =
- _mesa_program_resource_find_name(shProg, interface, name);
+ _mesa_program_resource_find_name(shProg, programInterface, name);
/* Non-existent variable or resource is not referenced by fragment stage. */
if (!res || !(res->StageReferences & (1 << MESA_SHADER_FRAGMENT)))
extern void
_mesa_get_program_resourceiv(struct gl_shader_program *shProg,
- GLenum interface, GLuint index, GLsizei propCount,
+ GLenum programInterface, GLuint index, GLsizei propCount,
const GLenum *props, GLsizei bufSize,
GLsizei *length, GLint *params)
{
GLsizei amount = 0;
struct gl_program_resource *res =
- _mesa_program_resource_find_index(shProg, interface, index);
+ _mesa_program_resource_find_index(shProg, programInterface, index);
/* No such resource found or bufSize negative. */
if (!res || bufSize < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glGetProgramResourceiv(%s index %d bufSize %d)",
- _mesa_lookup_enum_by_nr(interface), index, bufSize);
+ _mesa_lookup_enum_by_nr(programInterface), index, bufSize);
return;
}
extern struct gl_program_resource *
_mesa_program_resource_find_name(struct gl_shader_program *shProg,
- GLenum interface, const char *name);
+ GLenum programInterface, const char *name);
extern struct gl_program_resource *
_mesa_program_resource_find_index(struct gl_shader_program *shProg,
- GLenum interface, GLuint index);
+ GLenum programInterface, GLuint index);
extern bool
_mesa_get_program_resource_name(struct gl_shader_program *shProg,
- GLenum interface, GLuint index,
+ GLenum programInterface, GLuint index,
GLsizei bufSize, GLsizei *length,
GLchar *name, const char *caller);
extern GLint
_mesa_program_resource_location(struct gl_shader_program *shProg,
- GLenum interface, const char *name);
+ GLenum programInterface, const char *name);
extern GLint
_mesa_program_resource_location_index(struct gl_shader_program *shProg,
- GLenum interface, const char *name);
+ GLenum programInterface, const char *name);
extern unsigned
_mesa_program_resource_prop(struct gl_shader_program *shProg,
extern void
_mesa_get_program_resourceiv(struct gl_shader_program *shProg,
- GLenum interface, GLuint index,
+ GLenum programInterface, GLuint index,
GLsizei propCount, const GLenum *props,
GLsizei bufSize, GLsizei *length,
GLint *params);