struct gl_shader_program *prog;
private:
- virtual void visit_field(const glsl_type *type, const char *name,
- bool row_major)
- {
- (void) type;
- (void) name;
- (void) row_major;
- assert(!"Should not get here.");
- }
-
virtual void enter_record(const glsl_type *type, const char *,
bool row_major, const enum glsl_interface_packing packing) {
assert(type->is_record());
unsigned num_active_uniforms;
private:
- virtual void visit_field(const glsl_type *type, const char *name,
- bool row_major)
+ virtual void visit_field(const glsl_type * /* type */,
+ const char * /* name */,
+ bool /* row_major */,
+ const glsl_type * /* record_type */,
+ const enum glsl_interface_packing,
+ bool /* last_field */)
{
- (void) type;
- (void) name;
- (void) row_major;
this->num_active_uniforms++;
}
};
}
}
-void
-program_resource_visitor::visit_field(const glsl_type *type, const char *name,
- bool row_major,
- const glsl_type *,
- const enum glsl_interface_packing,
- bool /* last_field */)
-{
- visit_field(type, name, row_major);
-}
-
void
program_resource_visitor::visit_field(const glsl_struct_field *)
{
private:
virtual void visit_field(const glsl_type *type, const char *name,
- bool /* row_major */)
+ bool /* row_major */,
+ const glsl_type * /* record_type */,
+ const enum glsl_interface_packing,
+ bool /* last_field */)
{
assert(!type->without_array()->is_record());
assert(!type->without_array()->is_interface());
this->record_array_count = record_array_count;
}
- virtual void visit_field(const glsl_type *, const char *,
- bool /* row_major */)
- {
- assert(!"Should not get here.");
- }
-
virtual void enter_record(const glsl_type *type, const char *,
bool row_major,
const enum glsl_interface_packing packing)
private:
virtual void visit_field(const glsl_type *type, const char *name,
- bool row_major)
+ bool /* row_major */,
+ const glsl_type * /* record_type */,
+ const enum glsl_interface_packing,
+ bool /* last_field */)
{
assert(!type->without_array()->is_record());
assert(!type->without_array()->is_interface());
- (void) row_major;
-
tfeedback_candidate *candidate
= rzalloc(this->mem_ctx, tfeedback_candidate);
candidate->toplevel_var = this->toplevel_var;
* \param last_field Set if \c name is the last field of the structure
* containing it. This will always be false for items
* not contained in a structure or interface block.
- *
- * The default implementation just calls the other \c visit_field method.
*/
virtual void visit_field(const glsl_type *type, const char *name,
bool row_major, const glsl_type *record_type,
const enum glsl_interface_packing packing,
- bool last_field);
-
- /**
- * Method invoked for each leaf of the variable
- *
- * \param type Type of the field.
- * \param name Fully qualified name of the field.
- * \param row_major For a matrix type, is it stored row-major.
- */
- virtual void visit_field(const glsl_type *type, const char *name,
- bool row_major) = 0;
+ bool last_field) = 0;
/**
* Visit a record before visiting its fields
private:
virtual void visit_field(const glsl_type *type, const char *name,
- bool row_major);
+ bool row_major, const glsl_type *record_type,
+ const enum glsl_interface_packing packing,
+ bool last_field);
struct gl_shader_program *shader_program;
struct gl_program_parameter_list *params;
void
add_uniform_to_shader::visit_field(const glsl_type *type, const char *name,
- bool row_major)
+ bool /* row_major */,
+ const glsl_type * /* record_type */,
+ const enum glsl_interface_packing,
+ bool /* last_field */)
{
unsigned int size;
- (void) row_major;
-
/* atomics don't get real storage */
if (type->contains_atomic())
return;