range = _range;
}
-
BufferCreateInfo::BufferCreateInfo (vk::VkDeviceSize _size,
vk::VkBufferUsageFlags _usage,
vk::VkSharingMode _sharingMode,
deUint32 _queueFamilyIndexCount,
const deUint32* _pQueueFamilyIndices,
vk::VkBufferCreateFlags _flags)
-{
+{
sType = vk::VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
pNext = DE_NULL;
size = _size;
else
{
pQueueFamilyIndices = _pQueueFamilyIndices;
- }
+ }
}
BufferCreateInfo::BufferCreateInfo (const BufferCreateInfo &other)
vk::VkImageUsageFlags _usage,
vk::VkSharingMode _sharingMode,
deUint32 _queueFamilyIndexCount,
- const deUint32* _pQueueFamilyIndices,
+ const deUint32* _pQueueFamilyIndices,
vk::VkImageCreateFlags _flags,
vk::VkImageLayout _initialLayout)
{
}
FramebufferCreateInfo::FramebufferCreateInfo (vk::VkRenderPass _renderPass,
- const std::vector<vk::VkImageView>& atachments,
+ const std::vector<vk::VkImageView>& atachments,
deUint32 _width,
deUint32 _height,
deUint32 _layers)
{
sType = vk::VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
pNext = DE_NULL;
- flags = 0;
+ flags = 0;
attachmentCount = static_cast<deUint32>(m_attachments.size());
pAttachments = &m_attachmentsStructs[0];
attachmentCount = static_cast<deUint32>(m_attachments.size());
- if (attachmentCount) {
+ if (attachmentCount)
+ {
pAttachments = &m_attachmentsStructs[0];
}
else
subpassCount = static_cast<deUint32>(m_subpasses.size());
- if (subpassCount) {
+ if (subpassCount)
+ {
pSubpasses = &m_subpassesStructs[0];
}
else
dependencyCount = static_cast<deUint32>(m_dependiences.size());
- if (dependencyCount) {
+ if (dependencyCount)
+ {
pDependencies = &m_dependiencesStructs[0];
}
else
RenderPassBeginInfo::RenderPassBeginInfo (vk::VkRenderPass _renderPass,
vk::VkFramebuffer _framebuffer,
vk::VkRect2D _renderArea,
- const std::vector<vk::VkClearValue>& _clearValues)
+ const std::vector<vk::VkClearValue>& _clearValues)
{
m_clearValues = _clearValues;
finalLayout = _finalLayout;
}
-AttachmentDescription::AttachmentDescription (const vk::VkAttachmentDescription &rhs)
+AttachmentDescription::AttachmentDescription (const vk::VkAttachmentDescription& rhs)
{
flags = rhs.flags;
format = rhs.format;
pPreserveAttachments = DE_NULL;
preserveAttachmentCount = _preserveAttachmentCount;
- if (m_inputAttachments.size()) {
+ if (m_inputAttachments.size())
+ {
pInputAttachments = &m_inputAttachments[0];
}
- if (m_colorAttachments.size()) {
+ if (m_colorAttachments.size())
+ {
pColorAttachments = &m_colorAttachments[0];
}
- if (m_resolveAttachments.size()) {
+ if (m_resolveAttachments.size())
+ {
pResolveAttachments = &m_resolveAttachments[0];
}
- if (m_preserveAttachments.size()) {
+ if (m_preserveAttachments.size())
+ {
pPreserveAttachments = &m_preserveAttachments[0];
}
}
m_colorAttachments = std::vector<vk::VkAttachmentReference>(
rhs.pColorAttachments, rhs.pColorAttachments + rhs.colorAttachmentCount);
- if (rhs.pResolveAttachments) {
+ if (rhs.pResolveAttachments)
+ {
m_resolveAttachments = std::vector<vk::VkAttachmentReference>(
rhs.pResolveAttachments, rhs.pResolveAttachments + rhs.colorAttachmentCount);
}
m_depthStencilAttachment = *rhs.pDepthStencilAttachment;
}
- if (m_inputAttachments.size()) {
+ if (m_inputAttachments.size())
+ {
pInputAttachments = &m_inputAttachments[0];
}
- if (m_colorAttachments.size()) {
+ if (m_colorAttachments.size())
+ {
pColorAttachments = &m_colorAttachments[0];
}
- if (m_resolveAttachments.size()) {
+ if (m_resolveAttachments.size())
+ {
pResolveAttachments = &m_resolveAttachments[0];
}
pDepthStencilAttachment = &m_depthStencilAttachment;
- if (m_preserveAttachments.size()) {
+ if (m_preserveAttachments.size())
+ {
pPreserveAttachments = &m_preserveAttachments[0];
}
}
-SubpassDescription::SubpassDescription (const SubpassDescription& rhs) {
+SubpassDescription::SubpassDescription (const SubpassDescription& rhs)
+{
*this = rhs;
}
m_preserveAttachments = rhs.m_preserveAttachments;
m_depthStencilAttachment = rhs.m_depthStencilAttachment;
- if (m_inputAttachments.size()) {
+ if (m_inputAttachments.size())
+ {
pInputAttachments = &m_inputAttachments[0];
}
- if (m_colorAttachments.size()) {
+ if (m_colorAttachments.size())
+ {
pColorAttachments = &m_colorAttachments[0];
}
- if (m_resolveAttachments.size()) {
+ if (m_resolveAttachments.size())
+ {
pResolveAttachments = &m_resolveAttachments[0];
}
pDepthStencilAttachment = &m_depthStencilAttachment;
- if (m_preserveAttachments.size()) {
+ if (m_preserveAttachments.size())
+ {
pPreserveAttachments = &m_preserveAttachments[0];
}
dependencyFlags = _dependencyFlags;
}
-SubpassDependency::SubpassDependency (const vk::VkSubpassDependency &rhs)
+SubpassDependency::SubpassDependency (const vk::VkSubpassDependency& rhs)
{
srcSubpass = rhs.srcSubpass;
dstSubpass = rhs.dstSubpass;
pBinding = _pBindings;
}
-
PipelineLayoutCreateInfo::PipelineLayoutCreateInfo (deUint32 _descriptorSetCount,
const vk::VkDescriptorSetLayout* _pSetLayouts,
deUint32 _pushConstantRangeCount,
pSetLayouts = setLayoutCount > 0 ? &m_setLayouts[0] : DE_NULL;
pushConstantRangeCount = static_cast<deUint32>(m_pushConstantRanges.size());
- if (m_pushConstantRanges.size()) {
+ if (m_pushConstantRanges.size())
+ {
pPushConstantRanges = &m_pushConstantRanges[0];
}
else
}
pushConstantRangeCount = static_cast<deUint32>(m_pushConstantRanges.size());
- if (pushConstantRangeCount) {
+ if (pushConstantRangeCount)
+ {
pPushConstantRanges = &m_pushConstantRanges[0];
}
else
}
}
-
PipelineCreateInfo::PipelineShaderStage::PipelineShaderStage (vk::VkShaderModule _module, const char* _pName, vk::VkShaderStageFlagBits _stage)
{
sType = vk::VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
flags = 0u;
viewportCount = _viewportCount;
scissorCount = _viewportCount;
-
+
if (!_viewports.size())
{
m_viewports.resize(viewportCount);
pScissors = &m_scissors[0];
}
-PipelineCreateInfo::ViewportState::ViewportState (const ViewportState &other)
+PipelineCreateInfo::ViewportState::ViewportState (const ViewportState& other)
{
sType = other.sType;
pNext = other.pNext;
pScissors = &m_scissors[0];
}
-PipelineCreateInfo::ViewportState & PipelineCreateInfo::ViewportState::operator= (const ViewportState &other)
+PipelineCreateInfo::ViewportState& PipelineCreateInfo::ViewportState::operator= (const ViewportState& other)
{
sType = other.sType;
pNext = other.pNext;
vk::VkBool32 _sampleShadingEnable,
float _minSampleShading,
const std::vector<vk::VkSampleMask>& _sampleMask,
- bool _alphaToCoverageEnable,
+ bool _alphaToCoverageEnable,
bool _alphaToOneEnable)
: m_sampleMask(_sampleMask)
{
alphaToOneEnable = _alphaToOneEnable;
}
-PipelineCreateInfo::MultiSampleState::MultiSampleState (const MultiSampleState &other)
+PipelineCreateInfo::MultiSampleState::MultiSampleState (const MultiSampleState& other)
{
sType = other.sType;
pNext = other.pNext;
rasterizationSamples = other.rasterizationSamples;
sampleShadingEnable = other.sampleShadingEnable;
minSampleShading = other.minSampleShading;
-
+
const size_t sampleMaskArrayLen = (sizeof(vk::VkSampleMask) * 8 + other.rasterizationSamples) / (sizeof(vk::VkSampleMask) * 8);
m_sampleMask = std::vector<vk::VkSampleMask>(other.pSampleMask, other.pSampleMask + sampleMaskArrayLen);
pSampleMask = &m_sampleMask[0];
}
-PipelineCreateInfo::MultiSampleState& PipelineCreateInfo::MultiSampleState::operator= (const MultiSampleState & other)
+PipelineCreateInfo::MultiSampleState& PipelineCreateInfo::MultiSampleState::operator= (const MultiSampleState& other)
{
sType = other.sType;
pNext = other.pNext;
: m_attachments(_attachments)
{
sType = vk::VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
- pNext = DE_NULL;
+ pNext = DE_NULL;
flags = 0u;
logicOpEnable = _logicOpEnable;
logicOp = _logicOp;
}
PipelineCreateInfo::ColorBlendState::ColorBlendState (deUint32 _attachmentCount,
- const vk::VkPipelineColorBlendAttachmentState* _attachments,
+ const vk::VkPipelineColorBlendAttachmentState* _attachments,
vk::VkBool32 _logicOpEnable,
vk::VkLogicOp _logicOp)
: m_attachments(_attachments, _attachments + _attachmentCount)
{
sType = vk::VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
- pNext = DE_NULL;
+ pNext = DE_NULL;
logicOpEnable = _logicOpEnable;
logicOp = _logicOp;
attachmentCount = static_cast<deUint32>(m_attachments.size());
pAttachments = &m_attachments[0];
}
-PipelineCreateInfo::ColorBlendState::ColorBlendState (const vk::VkPipelineColorBlendStateCreateInfo &createInfo)
+PipelineCreateInfo::ColorBlendState::ColorBlendState (const vk::VkPipelineColorBlendStateCreateInfo& createInfo)
: m_attachments (createInfo.pAttachments, createInfo.pAttachments + createInfo.attachmentCount)
{
sType = createInfo.sType;
pAttachments = &m_attachments[0];
}
-PipelineCreateInfo::ColorBlendState::ColorBlendState (const ColorBlendState &createInfo, std::vector<float> _blendConstants)
+PipelineCreateInfo::ColorBlendState::ColorBlendState (const ColorBlendState& createInfo, std::vector<float> _blendConstants)
: m_attachments (createInfo.pAttachments, createInfo.pAttachments + createInfo.attachmentCount)
{
sType = createInfo.sType;
pDynamicStates = &m_dynamicStates[0];
}
-PipelineCreateInfo::DynamicState & PipelineCreateInfo::DynamicState::operator= (const DynamicState &other)
+PipelineCreateInfo::DynamicState& PipelineCreateInfo::DynamicState::operator= (const DynamicState& other)
{
sType = other.sType;
pNext = other.pNext;
pDynamicState = DE_NULL;
}
-PipelineCreateInfo& PipelineCreateInfo::addShader (const vk::VkPipelineShaderStageCreateInfo &shader)
+PipelineCreateInfo& PipelineCreateInfo::addShader (const vk::VkPipelineShaderStageCreateInfo& shader)
{
m_shaders.push_back(shader);
}
SamplerCreateInfo::SamplerCreateInfo (vk::VkFilter _magFilter,
- vk::VkFilter _minFilter,
- vk::VkSamplerMipmapMode _mipmapMode,
- vk::VkSamplerAddressMode _addressModeU,
- vk::VkSamplerAddressMode _addressModeV,
- vk::VkSamplerAddressMode _addressModeW,
- float _mipLodBias,
- float _maxAnisotropy,
- vk::VkBool32 _compareEnable,
- vk::VkCompareOp _compareOp,
- float _minLod,
- float _maxLod,
- vk::VkBorderColor _borderColor,
- vk::VkBool32 _unnormalizedCoordinates)
+ vk::VkFilter _minFilter,
+ vk::VkSamplerMipmapMode _mipmapMode,
+ vk::VkSamplerAddressMode _addressModeU,
+ vk::VkSamplerAddressMode _addressModeV,
+ vk::VkSamplerAddressMode _addressModeW,
+ float _mipLodBias,
+ float _maxAnisotropy,
+ vk::VkBool32 _compareEnable,
+ vk::VkCompareOp _compareOp,
+ float _minLod,
+ float _maxLod,
+ vk::VkBorderColor _borderColor,
+ vk::VkBool32 _unnormalizedCoordinates)
{
sType = vk::VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
pNext = DE_NULL;