Exemplo n.º 1
0
void
program_resource_visitor::visit_field(const glsl_type *type, const char *name,
                                      bool row_major,
                                      const glsl_type *)
{
   visit_field(type, name, row_major);
}
Exemplo n.º 2
0
void
program_resource_visitor::visit_field(const glsl_type *type, const char *name,
                                      bool row_major,
                                      const glsl_type *,
                                      const unsigned,
                                      bool /* last_field */)
{
   visit_field(type, name, row_major);
}
Exemplo n.º 3
0
void PSIVisitor::visit_body(IBaseItem *p, const std::vector<IBaseItem *> &items) {
	std::vector<IBaseItem *>::const_iterator it = items.begin();

	for (int32_t i=0; i<items.size(); i++) {
		IBaseItem *it = items.at(i);
		m_removed = false;

		switch (it->getType()) {
		case IBaseItem::TypeBind:
			visit_bind(dynamic_cast<IBind *>(it));
			break;
		case IBaseItem::TypeConstraint:
			visit_constraint(dynamic_cast<IConstraintBlock *>(it));
			break;

		case IBaseItem::TypeField:
			visit_field(dynamic_cast<IField *>(it));
			break;

		case IBaseItem::TypeExec:
			visit_exec(dynamic_cast<IExec *>(it));
			break;

		case IBaseItem::TypeVendor:
			visit_vendor_item(it);
			break;

		default:
			fprintf(stdout, "Error: Unknown body item %d\n", it->getType());
		}

		if (m_removed) {
			ScopeItemImpl *s = dynamic_cast<ScopeItemImpl *>(p);
			s->remove(it);
			delete it;
		}
	}

	m_removed = false;
}
Exemplo n.º 4
0
void PSIVisitor::visit_body(IBaseItem *p, const std::vector<IBaseItem *> &items) {
	std::vector<IBaseItem *>::const_iterator it = items.begin();

	for (; it!=items.end(); it++) {
		IBaseItem *i = *it;

		switch (i->getType()) {
		case IBaseItem::TypeBind:
			visit_bind(static_cast<IBind *>(i));
			break;
		case IBaseItem::TypeConstraint:
			visit_constraint(static_cast<IConstraintBlock *>(i));
			break;

		case IBaseItem::TypeField:
			visit_field(static_cast<IField *>(i));
			break;

		default:
			fprintf(stdout, "Error: Unknown body item %d\n", i->getType());
		}
	}
}