diff options
author | Pyry Haulos <phaulos@google.com> | 2016-02-26 10:32:07 -0800 |
---|---|---|
committer | Pyry Haulos <phaulos@google.com> | 2016-02-26 10:32:07 -0800 |
commit | b087b530237ace3c0ed7d7c9e3bff112d342742b (patch) | |
tree | 980f4906e67f993639406d9f4adbc2f8b6fa6f5e /external | |
parent | 934a32027f38a4c7c27b7151478cf7ab803499f9 (diff) | |
parent | b800afa2aa91b5657880829dca72afd925601c82 (diff) | |
download | VK-GL-CTS-b087b530237ace3c0ed7d7c9e3bff112d342742b.tar.gz VK-GL-CTS-b087b530237ace3c0ed7d7c9e3bff112d342742b.tar.bz2 VK-GL-CTS-b087b530237ace3c0ed7d7c9e3bff112d342742b.zip |
Merge vulkan-cts-1.0 to master
Diffstat (limited to 'external')
5 files changed, 30 insertions, 53 deletions
diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp index 118b917b2..7cd6619fb 100644..100755 --- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp @@ -631,21 +631,14 @@ VkFormatFeatureFlags getRequiredOptimalTilingFeatures (VkFormat format) VK_FORMAT_A8B8G8R8_UINT_PACK32, VK_FORMAT_A8B8G8R8_SINT_PACK32, VK_FORMAT_A8B8G8R8_SRGB_PACK32, - VK_FORMAT_A2R10G10B10_UNORM_PACK32, VK_FORMAT_A2B10G10R10_UNORM_PACK32, VK_FORMAT_A2B10G10R10_UINT_PACK32, - VK_FORMAT_R16_UNORM, - VK_FORMAT_R16_SNORM, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R16_SFLOAT, - VK_FORMAT_R16G16_UNORM, - VK_FORMAT_R16G16_SNORM, VK_FORMAT_R16G16_UINT, VK_FORMAT_R16G16_SINT, VK_FORMAT_R16G16_SFLOAT, - VK_FORMAT_R16G16B16A16_UNORM, - VK_FORMAT_R16G16B16A16_SNORM, VK_FORMAT_R16G16B16A16_UINT, VK_FORMAT_R16G16B16A16_SINT, VK_FORMAT_R16G16B16A16_SFLOAT, @@ -692,39 +685,29 @@ VkFormatFeatureFlags getRequiredOptimalTilingFeatures (VkFormat format) VK_FORMAT_R5G6B5_UNORM_PACK16, VK_FORMAT_A1R5G5B5_UNORM_PACK16, VK_FORMAT_R8_UNORM, - VK_FORMAT_R8_SNORM, VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R8G8_UNORM, - VK_FORMAT_R8G8_SNORM, VK_FORMAT_R8G8_UINT, VK_FORMAT_R8G8_SINT, VK_FORMAT_R8G8B8A8_UNORM, - VK_FORMAT_R8G8B8A8_SNORM, VK_FORMAT_R8G8B8A8_UINT, VK_FORMAT_R8G8B8A8_SINT, VK_FORMAT_R8G8B8A8_SRGB, VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_SRGB, VK_FORMAT_A8B8G8R8_UNORM_PACK32, - VK_FORMAT_A8B8G8R8_SNORM_PACK32, VK_FORMAT_A8B8G8R8_UINT_PACK32, VK_FORMAT_A8B8G8R8_SINT_PACK32, VK_FORMAT_A8B8G8R8_SRGB_PACK32, VK_FORMAT_A2B10G10R10_UNORM_PACK32, VK_FORMAT_A2B10G10R10_UINT_PACK32, - VK_FORMAT_R16_UNORM, - VK_FORMAT_R16_SNORM, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R16_SFLOAT, - VK_FORMAT_R16G16_UNORM, - VK_FORMAT_R16G16_SNORM, VK_FORMAT_R16G16_UINT, VK_FORMAT_R16G16_SINT, VK_FORMAT_R16G16_SFLOAT, - VK_FORMAT_R16G16B16A16_UNORM, - VK_FORMAT_R16G16B16A16_SNORM, VK_FORMAT_R16G16B16A16_UINT, VK_FORMAT_R16G16B16A16_SINT, VK_FORMAT_R16G16B16A16_SFLOAT, @@ -743,26 +726,16 @@ VkFormatFeatureFlags getRequiredOptimalTilingFeatures (VkFormat format) VK_FORMAT_R5G6B5_UNORM_PACK16, VK_FORMAT_A1R5G5B5_UNORM_PACK16, VK_FORMAT_R8_UNORM, - VK_FORMAT_R8_SNORM, VK_FORMAT_R8G8_UNORM, - VK_FORMAT_R8G8_SNORM, VK_FORMAT_R8G8B8A8_UNORM, - VK_FORMAT_R8G8B8A8_SNORM, VK_FORMAT_R8G8B8A8_SRGB, VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_SRGB, VK_FORMAT_A8B8G8R8_UNORM_PACK32, - VK_FORMAT_A8B8G8R8_SNORM_PACK32, VK_FORMAT_A8B8G8R8_SRGB_PACK32, VK_FORMAT_A2B10G10R10_UNORM_PACK32, - VK_FORMAT_R16_UNORM, - VK_FORMAT_R16_SNORM, VK_FORMAT_R16_SFLOAT, - VK_FORMAT_R16G16_UNORM, - VK_FORMAT_R16G16_SNORM, VK_FORMAT_R16G16_SFLOAT, - VK_FORMAT_R16G16B16A16_UNORM, - VK_FORMAT_R16G16B16A16_SNORM, VK_FORMAT_R16G16B16A16_SFLOAT }; static const VkFormat s_requiredDepthStencilAttachmentFormats[] = @@ -864,18 +837,12 @@ VkFormatFeatureFlags getRequiredBufferFeatures (VkFormat format) VK_FORMAT_A8B8G8R8_SINT_PACK32, VK_FORMAT_A2B10G10R10_UNORM_PACK32, VK_FORMAT_A2B10G10R10_UINT_PACK32, - VK_FORMAT_R16_UNORM, - VK_FORMAT_R16_SNORM, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R16_SFLOAT, - VK_FORMAT_R16G16_UNORM, - VK_FORMAT_R16G16_SNORM, VK_FORMAT_R16G16_UINT, VK_FORMAT_R16G16_SINT, VK_FORMAT_R16G16_SFLOAT, - VK_FORMAT_R16G16B16A16_UNORM, - VK_FORMAT_R16G16B16A16_SNORM, VK_FORMAT_R16G16B16A16_UINT, VK_FORMAT_R16G16B16A16_SINT, VK_FORMAT_R16G16B16A16_SFLOAT, diff --git a/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateBaseClass.cpp b/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateBaseClass.cpp index 4e7c96313..3f47dd0c1 100644 --- a/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateBaseClass.cpp +++ b/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateBaseClass.cpp @@ -58,7 +58,7 @@ void DynamicStateBaseClass::initialize (void) const vk::VkExtent3D targetImageExtent = { WIDTH, HEIGHT, 1 }; const ImageCreateInfo targetImageCreateInfo(vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, targetImageExtent, 1, 1, vk::VK_SAMPLE_COUNT_1_BIT, - vk::VK_IMAGE_TILING_OPTIMAL, vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT); + vk::VK_IMAGE_TILING_OPTIMAL, vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT | vk::VK_IMAGE_USAGE_TRANSFER_DST_BIT); m_colorTargetImage = Image::createAndAlloc(m_vk, device, targetImageCreateInfo, m_context.getDefaultAllocator()); diff --git a/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateDSTests.cpp b/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateDSTests.cpp index c64fc7b5b..b08ffe5f8 100644 --- a/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateDSTests.cpp +++ b/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateDSTests.cpp @@ -143,8 +143,10 @@ protected: const vk::VkExtent3D imageExtent = { WIDTH, HEIGHT, 1 }; const ImageCreateInfo targetImageCreateInfo(vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, imageExtent, 1, 1, vk::VK_SAMPLE_COUNT_1_BIT, - vk::VK_IMAGE_TILING_OPTIMAL, vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | - vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT | vk::VK_IMAGE_USAGE_TRANSFER_DST_BIT); + vk::VK_IMAGE_TILING_OPTIMAL, + vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | + vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT | + vk::VK_IMAGE_USAGE_TRANSFER_DST_BIT); m_colorTargetImage = Image::createAndAlloc(m_vk, device, targetImageCreateInfo, m_context.getDefaultAllocator()); diff --git a/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateRSTests.cpp b/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateRSTests.cpp index d8f2cecef..6ad540fdf 100644 --- a/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateRSTests.cpp +++ b/external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateRSTests.cpp @@ -133,13 +133,13 @@ protected: const vk::VkExtent3D imageExtent = { WIDTH, HEIGHT, 1 }; ImageCreateInfo targetImageCreateInfo(vk::VK_IMAGE_TYPE_2D, m_colorAttachmentFormat, imageExtent, 1, 1, vk::VK_SAMPLE_COUNT_1_BIT, vk::VK_IMAGE_TILING_OPTIMAL, - vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT); + vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT | vk::VK_IMAGE_USAGE_TRANSFER_DST_BIT); m_colorTargetImage = Image::createAndAlloc(m_vk, device, targetImageCreateInfo, m_context.getDefaultAllocator()); const ImageCreateInfo depthStencilImageCreateInfo(vk::VK_IMAGE_TYPE_2D, m_depthStencilAttachmentFormat, imageExtent, 1, 1, vk::VK_SAMPLE_COUNT_1_BIT, vk::VK_IMAGE_TILING_OPTIMAL, - vk::VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT); + vk::VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | vk::VK_IMAGE_USAGE_TRANSFER_DST_BIT); m_depthStencilImage = Image::createAndAlloc(m_vk, device, depthStencilImageCreateInfo, m_context.getDefaultAllocator()); diff --git a/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp b/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp index 9817caadb..b9e6415df 100644 --- a/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp +++ b/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp @@ -1221,14 +1221,10 @@ string generateComputeShader (const ShaderInterface& interface, const BufferLayo src << glu::declare(*structIter) << ";\n"; { - int bindingPoint = 1; - for (int blockNdx = 0; blockNdx < interface.getNumBlocks(); blockNdx++) { const BufferBlock& block = interface.getBlock(blockNdx); - generateDeclaration(src, block, bindingPoint); - - bindingPoint += block.isArray() ? block.getArraySize() : 1; + generateDeclaration(src, block, 1 + blockNdx); } } @@ -1863,11 +1859,23 @@ tcu::TestStatus SSBOLayoutCaseInstance::iterate (void) setLayoutBuilder .addSingleBinding(vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, vk::VK_SHADER_STAGE_COMPUTE_BIT); - const int numBlocks = (int)m_refLayout.blocks.size(); - for (int blockNdx = 0; blockNdx < numBlocks; blockNdx++) + int numBlocks = 0; + const int numBindings = m_interface.getNumBlocks(); + for (int bindingNdx = 0; bindingNdx < numBindings; bindingNdx++) { - setLayoutBuilder - .addSingleBinding(vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, vk::VK_SHADER_STAGE_COMPUTE_BIT); + const BufferBlock& block = m_interface.getBlock(bindingNdx); + if (block.isArray()) + { + setLayoutBuilder + .addArrayBinding(vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, block.getArraySize(), vk::VK_SHADER_STAGE_COMPUTE_BIT); + numBlocks += block.getArraySize(); + } + else + { + setLayoutBuilder + .addSingleBinding(vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, vk::VK_SHADER_STAGE_COMPUTE_BIT); + numBlocks += 1; + } } poolBuilder @@ -1923,10 +1931,10 @@ tcu::TestStatus SSBOLayoutCaseInstance::iterate (void) m_uniformBuffers.push_back(VkBufferSp(new vk::Unique<vk::VkBuffer>(buffer))); m_uniformAllocs.push_back(AllocationSp(alloc.release())); - - setUpdateBuilder.writeSingle(*descriptorSet, vk::DescriptorSetUpdateBuilder::Location::binding(blockNdx + 1), - vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &descriptors[blockNdx]); } + + setUpdateBuilder.writeArray(*descriptorSet, vk::DescriptorSetUpdateBuilder::Location::binding(1), + vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, numBlocks, &descriptors[0]); } else { @@ -1960,11 +1968,11 @@ tcu::TestStatus SSBOLayoutCaseInstance::iterate (void) const deUint32 offset = blockLocations[blockNdx].offset; descriptors[blockNdx] = makeDescriptorBufferInfo(*buffer, offset, bufferSize); - - setUpdateBuilder.writeSingle(*descriptorSet, vk::DescriptorSetUpdateBuilder::Location::binding(blockNdx + 1), - vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &descriptors[blockNdx]); } + setUpdateBuilder.writeArray(*descriptorSet, vk::DescriptorSetUpdateBuilder::Location::binding(1), + vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, numBlocks, &descriptors[0]); + m_uniformBuffers.push_back(VkBufferSp(new vk::Unique<vk::VkBuffer>(buffer))); m_uniformAllocs.push_back(AllocationSp(alloc.release())); } |