virtual void cmdSetScissor (VkCmdBuffer cmdBuffer, deUint32 scissorCount, const VkRect2D* pScissors) const;
virtual void cmdSetLineWidth (VkCmdBuffer cmdBuffer, float lineWidth) const;
virtual void cmdSetDepthBias (VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias) const;
-virtual void cmdSetBlendConstants (VkCmdBuffer cmdBuffer, const float blendConst) const;
+virtual void cmdSetBlendConstants (VkCmdBuffer cmdBuffer, const float blendConst[4]) const;
virtual void cmdSetDepthBounds (VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds) const;
virtual void cmdSetStencilCompareMask (VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, deUint32 stencilCompareMask) const;
virtual void cmdSetStencilWriteMask (VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, deUint32 stencilWriteMask) const;
m_vk.cmdSetDepthBias(cmdBuffer, depthBias, depthBiasClamp, slopeScaledDepthBias);
}
-void DeviceDriver::cmdSetBlendConstants (VkCmdBuffer cmdBuffer, const float blendConst) const
+void DeviceDriver::cmdSetBlendConstants (VkCmdBuffer cmdBuffer, const float blendConst[4]) const
{
m_vk.cmdSetBlendConstants(cmdBuffer, blendConst);
}
typedef VK_APICALL void (VK_APIENTRY* CmdSetScissorFunc) (VkCmdBuffer cmdBuffer, deUint32 scissorCount, const VkRect2D* pScissors);
typedef VK_APICALL void (VK_APIENTRY* CmdSetLineWidthFunc) (VkCmdBuffer cmdBuffer, float lineWidth);
typedef VK_APICALL void (VK_APIENTRY* CmdSetDepthBiasFunc) (VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias);
-typedef VK_APICALL void (VK_APIENTRY* CmdSetBlendConstantsFunc) (VkCmdBuffer cmdBuffer, const float blendConst);
+typedef VK_APICALL void (VK_APIENTRY* CmdSetBlendConstantsFunc) (VkCmdBuffer cmdBuffer, const float blendConst[4]);
typedef VK_APICALL void (VK_APIENTRY* CmdSetDepthBoundsFunc) (VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds);
typedef VK_APICALL void (VK_APIENTRY* CmdSetStencilCompareMaskFunc) (VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, deUint32 stencilCompareMask);
typedef VK_APICALL void (VK_APIENTRY* CmdSetStencilWriteMaskFunc) (VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, deUint32 stencilWriteMask);
DE_UNREF(slopeScaledDepthBias);
}
-void cmdSetBlendConstants (VkCmdBuffer cmdBuffer, const float blendConst)
+void cmdSetBlendConstants (VkCmdBuffer cmdBuffer, const float blendConst[4])
{
DE_UNREF(cmdBuffer);
DE_UNREF(blendConst);
virtual void cmdSetScissor (VkCmdBuffer cmdBuffer, deUint32 scissorCount, const VkRect2D* pScissors) const = 0;
virtual void cmdSetLineWidth (VkCmdBuffer cmdBuffer, float lineWidth) const = 0;
virtual void cmdSetDepthBias (VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias) const = 0;
-virtual void cmdSetBlendConstants (VkCmdBuffer cmdBuffer, const float blendConst) const = 0;
+virtual void cmdSetBlendConstants (VkCmdBuffer cmdBuffer, const float blendConst[4]) const = 0;
virtual void cmdSetDepthBounds (VkCmdBuffer cmdBuffer, float minDepthBounds, float maxDepthBounds) const = 0;
virtual void cmdSetStencilCompareMask (VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, deUint32 stencilCompareMask) const = 0;
virtual void cmdSetStencilWriteMask (VkCmdBuffer cmdBuffer, VkStencilFaceFlags faceMask, deUint32 stencilWriteMask) const = 0;
self.values = values
class Variable:
- def __init__ (self, type, name):
- self.type = type
- self.name = name
+ def __init__ (self, type, name, arraySize = None):
+ self.type = type
+ self.name = name
+ self.arraySize = arraySize
class CompositeType:
CLASS_STRUCT = 0
return type
def fixupFunction (function):
- fixedArgs = [Variable(fixupType(a.type), a.name) for a in function.arguments]
+ fixedArgs = [Variable(fixupType(a.type), a.name, a.arraySize) for a in function.arguments]
fixedReturnType = fixupType(function.returnType)
return Function(function.name, fixedReturnType, fixedArgs)
return handles
def parseArgList (src):
- typeNamePtrn = r'(' + TYPE_PTRN + ')(\s' + IDENT_PTRN + r')'
+ typeNamePtrn = r'(' + TYPE_PTRN + ')(\s' + IDENT_PTRN + r')(\[[^\]]+\])?'
args = []
for rawArg in src.split(','):
m = re.search(typeNamePtrn, rawArg)
- args.append(Variable(m.group(1).strip(), m.group(2).strip()))
+ args.append(Variable(m.group(1).strip(), m.group(2).strip(), m.group(3)))
return args
writeInlFile(filename, INL_HEADER, gen())
def argListToStr (args):
- return ", ".join("%s %s" % (v.type, v.name) for v in args)
+ return ", ".join("%s %s%s" % (v.type, v.name, v.arraySize if v.arraySize != None else "") for v in args)
def writeInterfaceDecl (api, filename, functionTypes, concrete):
def genProtos ():