示例#1
0
	inline DescriptorSetLayoutBuilder&			addArraySamplerBinding		(VkDescriptorType	descriptorType,
																			 deUint32			descriptorCount,
																			 VkShaderStageFlags	stageFlags,
																			 const VkSampler*	pImmutableSamplers)
	{
		return addBinding(descriptorType, descriptorCount, stageFlags, pImmutableSamplers);
	}
示例#2
0
static
defineSyntax(OBJ env, CONTFUNC code, char *name, int nArgs) {
    OBJ f;

    f = newSchemeBuiltinSyntax( code, name, nArgs );
    addBinding(env, newSchemeSymbol(name), f);
}
示例#3
0
文件: Class.cpp 项目: aopui/gnash
// TODO: Figure out how this differs from addMethod
bool
Class::addSlotFunction(string_table::key name, Namespace *ns,
	std::uint32_t slotId, Method *method, bool isstatic)
{
	if (!isstatic)
		return addBinding(name, asBinding(ns, method, slotId, isstatic));
	return addStaticBinding(name, asBinding(ns, method, slotId, isstatic));
}
示例#4
0
文件: Class.cpp 项目: aopui/gnash
bool
Class::addMemberScript(string_table::key name, Namespace *ns,
	std::uint32_t slotId, Class *type, bool isstatic)
{
	if (!isstatic)
		return addBinding(name, asBinding(ns, type, slotId, isstatic));
	return addStaticBinding(name, asBinding(ns, type, slotId, isstatic));
}
示例#5
0
	inline DescriptorSetLayoutBuilder&			addSingleSamplerBinding		(VkDescriptorType	descriptorType,
																			 VkShaderStageFlags	stageFlags,
																			 const VkSampler*	immutableSampler)	//!< \note: Using pointer to sampler to clarify that handle is not
																													//!<        copied and argument lifetime is expected to cover build()
																													//!<        call.
	{
		return addBinding(descriptorType, 1u, stageFlags, immutableSampler);
	}
示例#6
0
文件: Class.cpp 项目: aopui/gnash
bool
Class::addMethod(string_table::key name, Namespace *ns, Method *method,
	bool isstatic)
{
	if (!isstatic)
		return addBinding(name, asBinding(ns, method, isstatic));
	else
		return addStaticBinding(name, asBinding(ns, method, isstatic));
}
示例#7
0
文件: Class.cpp 项目: aopui/gnash
bool
Class::addSlot(string_table::key name, Namespace *ns, std::uint32_t slotId,
	Class *type, bool isstatic, ClassHierarchy *CH)
{
	asBoundValue *bv = CH->newBoundValue();
	bv->setType(type);
	if (!isstatic)
		return addBinding(name, asBinding(ns, bv, slotId, isstatic));
	return addStaticBinding(name, asBinding(ns, bv, slotId, isstatic));
}
void QRenderPass::copy(const QNode *ref)
{
    QNode::copy(ref);
    const QRenderPass *other = static_cast<const QRenderPass*>(ref);
    d_func()->m_shader = qobject_cast<QShaderProgram *>(QNode::clone(other->d_func()->m_shader));

    Q_FOREACH (QAnnotation *crit, other->d_func()->m_annotationList)
        addAnnotation(qobject_cast<QAnnotation *>(QNode::clone(crit)));
    Q_FOREACH (QParameterMapping *binding, other->d_func()->m_bindings)
        addBinding(qobject_cast<QParameterMapping *>(QNode::clone(binding)));
    Q_FOREACH (QRenderState *renderState, other->d_func()->m_renderStates)
        addRenderState(qobject_cast<QRenderState *>(QNode::clone(renderState)));
}
示例#9
0
CONT
schemeBuiltin_define2(CONT cont) {
    OBJ evaluatedExpr = cont->retVal;

    addBinding(env, arg1, evaluatedExpr);
    C_RETURN( SCHEME_VOID );

    #undef argList
    #undef env

    #undef arg1
    #undef rest
}
 virtual void createBindingList()
 {
    /* As we now how many devices we have and how many helper threads we
     * need, reserve a PE for them */
    for ( unsigned i = 0; i < OpenCLConfig::getOpenCLDevicesCount(); ++i )
    {
       // As we don't have NUMA info, don't request an specific node
       bool numa = false;
       // TODO: if HWLOC is available, use it.
       int node = sys.getNumSockets() - 1;
       bool reserved;
       unsigned pe = sys.reservePE( numa, node, reserved );
       
       // Now add this node to the binding list
       addBinding( pe );
    }
 }
示例#11
0
CONT
schemeBuiltin_define(CONT cont) {
    #define argList cont->args[0]
    #define env     cont->args[2]

    #define arg1    car(argList)
    #define rest    cdr(argList)

    if (argList == SCHEME_NIL) {
	schemeError("(define): missing argument");
    }

    if (isSchemeSymbol(arg1)) {
	// (define var expr)
	OBJ unevaluatedExpression;

	if (rest == SCHEME_NIL) {
	    schemeError("(define): missing expression argument");
	}
	C_CALL2(schemeEval, car(rest), env, schemeBuiltin_define2);
	// not reached
    }

    if (!isSchemeCons(arg1)) {
	schemeError("(define): invalid argument");
    }

    // (define (f argList) bodyList)
    {
	OBJ functionNamePlusLambdaArgList = arg1;
	OBJ bodyList = rest;
	OBJ lambdaArgList;
	OBJ func;
	OBJ funcName;

	funcName = car(functionNamePlusLambdaArgList);
	lambdaArgList = cdr(functionNamePlusLambdaArgList);
	func = newSchemeUserDefinedFunction(lambdaArgList, bodyList, env);
	addBinding(env, funcName, func);
	// dumpEnvironment(env);
	C_RETURN( SCHEME_VOID );
    }
}
示例#12
0
const BindingPtr Bindings::addBinding(
        const QString& conn /*= QString::null*/,
        const QString& var /*= QString::null*/,
        const QString& view /*= QString::null*/,
        const QString& panel /*= QString::null*/,
        const QString& templ /*= QString::null*/,
        const QString& iopin /*= QString::null*/)
{
    Q_ASSERT(d);

    BindingPtr bp = binding(conn, var, view, panel, templ, iopin);
    if(!bp.isNull()) {
        return bp;
    }

    bp = BindingPtr(new Binding(conn, var, view, panel, templ, iopin));
    addBinding(bp);

    return bp;
}
示例#13
0
	inline DescriptorSetLayoutBuilder&			addArrayBinding				(VkDescriptorType	descriptorType,
																			 deUint32			descriptorCount,
																			 VkShaderStageFlags	stageFlags)
	{
		return addBinding(descriptorType, descriptorCount, stageFlags, (VkSampler*)DE_NULL);
	}
示例#14
0
	inline DescriptorSetLayoutBuilder&			addSingleBinding			(VkDescriptorType	descriptorType,
																			 VkShaderStageFlags	stageFlags)
	{
		return addBinding(descriptorType, 1u, stageFlags, (VkSampler*)DE_NULL);
	}
示例#15
0
void MidiRouter::initBindings() {
  _bindings.clear();
  for (const auto& mapping : _mappings) {
    addBinding(mapping);
  }
}