Merge vk-gl-cts/vulkan-cts-1.2.7 into vk-gl-cts/vulkan-cts-1.2.8
Change-Id: I867eda5f06e1a9df38b95d604b1d98ee5691e552
diff --git a/android/cts/master/src/vk-incremental-deqp.txt b/android/cts/master/src/vk-incremental-deqp.txt
index fd0f838..965cae8 100644
--- a/android/cts/master/src/vk-incremental-deqp.txt
+++ b/android/cts/master/src/vk-incremental-deqp.txt
@@ -26,7 +26,6 @@
dEQP-VK.api.smoke.create_sampler
dEQP-VK.api.smoke.create_shader
dEQP-VK.api.smoke.triangle
-dEQP-VK.api.smoke.triangle_ext_structs
dEQP-VK.api.smoke.asm_triangle
dEQP-VK.api.smoke.asm_triangle_no_opname
dEQP-VK.api.smoke.unused_resolve_attachment
diff --git a/android/cts/master/src/vk-master-2020-03-01.txt b/android/cts/master/src/vk-master-2020-03-01.txt
index 53c4f57..d4bd91b 100644
--- a/android/cts/master/src/vk-master-2020-03-01.txt
+++ b/android/cts/master/src/vk-master-2020-03-01.txt
@@ -1,6 +1,5 @@
dEQP-VK.info.device_memory_budget
dEQP-VK.info.device_mandatory_features
-dEQP-VK.api.smoke.triangle_ext_structs
dEQP-VK.api.info.vulkan1p2.features
dEQP-VK.api.info.vulkan1p2.properties
dEQP-VK.api.info.vulkan1p2.feature_extensions_consistency
diff --git a/android/cts/master/vk-incremental-deqp/api.txt b/android/cts/master/vk-incremental-deqp/api.txt
index 6ee42d2..6059d60 100644
--- a/android/cts/master/vk-incremental-deqp/api.txt
+++ b/android/cts/master/vk-incremental-deqp/api.txt
@@ -7,7 +7,6 @@
dEQP-VK.api.smoke.create_sampler
dEQP-VK.api.smoke.create_shader
dEQP-VK.api.smoke.triangle
-dEQP-VK.api.smoke.triangle_ext_structs
dEQP-VK.api.smoke.asm_triangle
dEQP-VK.api.smoke.asm_triangle_no_opname
dEQP-VK.api.smoke.unused_resolve_attachment
diff --git a/android/cts/master/vk-master-2020-03-01/api.txt b/android/cts/master/vk-master-2020-03-01/api.txt
index a147e8a..c2832b7 100644
--- a/android/cts/master/vk-master-2020-03-01/api.txt
+++ b/android/cts/master/vk-master-2020-03-01/api.txt
@@ -1,4 +1,3 @@
-dEQP-VK.api.smoke.triangle_ext_structs
dEQP-VK.api.info.vulkan1p2.features
dEQP-VK.api.info.vulkan1p2.properties
dEQP-VK.api.info.vulkan1p2.feature_extensions_consistency
diff --git a/android/cts/master/vk-master/api.txt b/android/cts/master/vk-master/api.txt
index b295492..21588c8 100644
--- a/android/cts/master/vk-master/api.txt
+++ b/android/cts/master/vk-master/api.txt
@@ -7,7 +7,6 @@
dEQP-VK.api.smoke.create_sampler
dEQP-VK.api.smoke.create_shader
dEQP-VK.api.smoke.triangle
-dEQP-VK.api.smoke.triangle_ext_structs
dEQP-VK.api.smoke.asm_triangle
dEQP-VK.api.smoke.asm_triangle_no_opname
dEQP-VK.api.smoke.unused_resolve_attachment
diff --git a/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp
index 4a72c7a..0af8a71 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp
@@ -590,603 +590,6 @@
const void* pNext;
};
-tcu::TestStatus renderTriangleUnusedExtStructTest (Context& context)
-{
- const VkDevice vkDevice = context.getDevice();
- const DeviceInterface& vk = context.getDeviceInterface();
- const VkQueue queue = context.getUniversalQueue();
- const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex();
- SimpleAllocator memAlloc (vk, vkDevice, getPhysicalDeviceMemoryProperties(context.getInstanceInterface(), context.getPhysicalDevice()));
- const tcu::IVec2 renderSize (256, 256);
- const VkFormat colorFormat = VK_FORMAT_R8G8B8A8_UNORM;
- const tcu::Vec4 clearColor (0.125f, 0.25f, 0.75f, 1.0f);
-
- // This structure will stand in as an unknown extension structure that must be ignored by implementations.
- VoidVulkanStruct unusedExtStruct =
- {
- VK_STRUCTURE_TYPE_MAX_ENUM, // sType
- DE_NULL // pNext
- };
-
- const tcu::Vec4 vertices[] =
- {
- tcu::Vec4(-0.5f, -0.5f, 0.0f, 1.0f),
- tcu::Vec4(+0.5f, -0.5f, 0.0f, 1.0f),
- tcu::Vec4( 0.0f, +0.5f, 0.0f, 1.0f)
- };
-
- const VkBufferCreateInfo vertexBufferParams =
- {
- VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, // sType
- &unusedExtStruct, // pNext
- 0u, // flags
- (VkDeviceSize)sizeof(vertices), // size
- VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, // usage
- VK_SHARING_MODE_EXCLUSIVE, // sharingMode
- 1u, // queueFamilyIndexCount
- &queueFamilyIndex, // pQueueFamilyIndices
- };
- const Unique<VkBuffer> vertexBuffer (createBuffer(vk, vkDevice, &vertexBufferParams));
- const UniquePtr<Allocation> vertexBufferMemory (memAlloc.allocate(getBufferMemoryRequirements(vk, vkDevice, *vertexBuffer), MemoryRequirement::HostVisible));
-
- VK_CHECK(vk.bindBufferMemory(vkDevice, *vertexBuffer, vertexBufferMemory->getMemory(), vertexBufferMemory->getOffset()));
-
- const VkDeviceSize imageSizeBytes = (VkDeviceSize)(sizeof(deUint32)*renderSize.x()*renderSize.y());
- const VkBufferCreateInfo readImageBufferParams =
- {
- VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, // sType
- &unusedExtStruct, // pNext
- (VkBufferCreateFlags)0u, // flags
- imageSizeBytes, // size
- VK_BUFFER_USAGE_TRANSFER_DST_BIT, // usage
- VK_SHARING_MODE_EXCLUSIVE, // sharingMode
- 1u, // queueFamilyIndexCount
- &queueFamilyIndex, // pQueueFamilyIndices
- };
- const Unique<VkBuffer> readImageBuffer (createBuffer(vk, vkDevice, &readImageBufferParams));
- const UniquePtr<Allocation> readImageBufferMemory (memAlloc.allocate(getBufferMemoryRequirements(vk, vkDevice, *readImageBuffer), MemoryRequirement::HostVisible));
-
- VK_CHECK(vk.bindBufferMemory(vkDevice, *readImageBuffer, readImageBufferMemory->getMemory(), readImageBufferMemory->getOffset()));
-
- const VkImageCreateInfo imageParams =
- {
- VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // sType
- &unusedExtStruct, // pNext
- 0u, // flags
- VK_IMAGE_TYPE_2D, // imageType
- VK_FORMAT_R8G8B8A8_UNORM, // format
- { (deUint32)renderSize.x(), (deUint32)renderSize.y(), 1 }, // extent
- 1u, // mipLevels
- 1u, // arraySize
- VK_SAMPLE_COUNT_1_BIT, // samples
- VK_IMAGE_TILING_OPTIMAL, // tiling
- VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT|VK_IMAGE_USAGE_TRANSFER_SRC_BIT, // usage
- VK_SHARING_MODE_EXCLUSIVE, // sharingMode
- 1u, // queueFamilyIndexCount
- &queueFamilyIndex, // pQueueFamilyIndices
- VK_IMAGE_LAYOUT_UNDEFINED, // initialLayout
- };
-
- const Unique<VkImage> image (createImage(vk, vkDevice, &imageParams));
- const UniquePtr<Allocation> imageMemory (memAlloc.allocate(getImageMemoryRequirements(vk, vkDevice, *image), MemoryRequirement::Any));
-
- VK_CHECK(vk.bindImageMemory(vkDevice, *image, imageMemory->getMemory(), imageMemory->getOffset()));
-
- // Render pass
- const VkAttachmentDescription colorAttachmentDescription =
- {
- (VkAttachmentDescriptionFlags)0, // VkAttachmentDescriptionFlags flags
- VK_FORMAT_R8G8B8A8_UNORM, // VkFormat format
- VK_SAMPLE_COUNT_1_BIT, // VkSampleCountFlagBits samples
- VK_ATTACHMENT_LOAD_OP_CLEAR, // VkAttachmentLoadOp loadOp
- VK_ATTACHMENT_STORE_OP_STORE, // VkAttachmentStoreOp storeOp
- VK_ATTACHMENT_LOAD_OP_DONT_CARE, // VkAttachmentLoadOp stencilLoadOp
- VK_ATTACHMENT_STORE_OP_DONT_CARE, // VkAttachmentStoreOp stencilStoreOp
- VK_IMAGE_LAYOUT_UNDEFINED, // VkImageLayout initialLayout
- VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL // VkImageLayout finalLayout
- };
-
- const VkAttachmentReference colorAttachmentRef =
- {
- 0u, // deUint32 attachment
- VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL // VkImageLayout layout
- };
-
- const VkSubpassDescription subpassDescription =
- {
- (VkSubpassDescriptionFlags)0, // VkSubpassDescriptionFlags flags
- VK_PIPELINE_BIND_POINT_GRAPHICS, // VkPipelineBindPoint pipelineBindPoint
- 0u, // deUint32 inputAttachmentCount
- DE_NULL, // const VkAttachmentReference* pInputAttachments
- 1u, // deUint32 colorAttachmentCount
- &colorAttachmentRef, // const VkAttachmentReference* pColorAttachments
- DE_NULL, // const VkAttachmentReference* pResolveAttachments
- DE_NULL, // const VkAttachmentReference* pDepthStencilAttachment
- 0u, // deUint32 preserveAttachmentCount
- DE_NULL // const deUint32* pPreserveAttachments
- };
-
- const VkRenderPassCreateInfo renderPassInfo =
- {
- VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, // VkStructureType sType
- &unusedExtStruct, // const void* pNext
- (VkRenderPassCreateFlags)0, // VkRenderPassCreateFlags flags
- 1u, // deUint32 attachmentCount
- &colorAttachmentDescription, // const VkAttachmentDescription* pAttachments
- 1u, // deUint32 subpassCount
- &subpassDescription, // const VkSubpassDescription* pSubpasses
- 0u, // deUint32 dependencyCount
- DE_NULL // const VkSubpassDependency* pDependencies
- };
-
- const Unique<VkRenderPass> renderPass (createRenderPass(vk, vkDevice, &renderPassInfo, DE_NULL));
-
- // Color attachment view
- const VkImageViewCreateInfo colorAttViewParams =
- {
- VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, // sType
- &unusedExtStruct, // pNext
- 0u, // flags
- *image, // image
- VK_IMAGE_VIEW_TYPE_2D, // viewType
- VK_FORMAT_R8G8B8A8_UNORM, // format
- {
- VK_COMPONENT_SWIZZLE_R,
- VK_COMPONENT_SWIZZLE_G,
- VK_COMPONENT_SWIZZLE_B,
- VK_COMPONENT_SWIZZLE_A
- }, // components
- {
- VK_IMAGE_ASPECT_COLOR_BIT, // aspectMask
- 0u, // baseMipLevel
- 1u, // levelCount
- 0u, // baseArrayLayer
- 1u, // layerCount
- }, // subresourceRange
- };
- const Unique<VkImageView> colorAttView (createImageView(vk, vkDevice, &colorAttViewParams));
-
- // Pipeline layout
- const VkPipelineLayoutCreateInfo pipelineLayoutParams =
- {
- VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, // sType
- &unusedExtStruct, // pNext
- (vk::VkPipelineLayoutCreateFlags)0,
- 0u, // setLayoutCount
- DE_NULL, // pSetLayouts
- 0u, // pushConstantRangeCount
- DE_NULL, // pPushConstantRanges
- };
- const Unique<VkPipelineLayout> pipelineLayout (createPipelineLayout(vk, vkDevice, &pipelineLayoutParams));
-
- // Shader modules
- const ProgramBinary vertBin = context.getBinaryCollection().get("vert");
- const ProgramBinary fragBin = context.getBinaryCollection().get("frag");
-
- const struct VkShaderModuleCreateInfo vertModuleInfo =
- {
- VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
- &unusedExtStruct,
- 0,
- (deUintptr)vertBin.getSize(),
- (const deUint32*)vertBin.getBinary(),
- };
-
- const struct VkShaderModuleCreateInfo fragModuleInfo =
- {
- VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
- &unusedExtStruct,
- 0,
- (deUintptr)fragBin.getSize(),
- (const deUint32*)fragBin.getBinary(),
- };
-
- const Unique<VkShaderModule> vertShaderModule (createShaderModule(vk, vkDevice, &vertModuleInfo));
- const Unique<VkShaderModule> fragShaderModule (createShaderModule(vk, vkDevice, &fragModuleInfo));
-
- // Pipeline
- const std::vector<VkViewport> viewports (1, makeViewport(renderSize));
- const std::vector<VkRect2D> scissors (1, makeRect2D(renderSize));
-
- VkPipelineShaderStageCreateInfo stageCreateInfo =
- {
- VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, // VkStructureType sType
- &unusedExtStruct, // const void* pNext
- 0u, // VkPipelineShaderStageCreateFlags flags
- VK_SHADER_STAGE_VERTEX_BIT, // VkShaderStageFlagBits stage
- DE_NULL, // VkShaderModule module
- "main", // const char* pName
- DE_NULL // const VkSpecializationInfo* pSpecializationInfo
- };
-
- std::vector<VkPipelineShaderStageCreateInfo> pipelineShaderStageParams;
-
- stageCreateInfo.stage = VK_SHADER_STAGE_VERTEX_BIT;
- stageCreateInfo.module = *vertShaderModule;
- pipelineShaderStageParams.push_back(stageCreateInfo);
-
- stageCreateInfo.stage = VK_SHADER_STAGE_FRAGMENT_BIT;
- stageCreateInfo.module = *fragShaderModule;
- pipelineShaderStageParams.push_back(stageCreateInfo);
-
- const VkVertexInputBindingDescription vertexInputBindingDescription =
- {
- 0u, // deUint32 binding
- sizeof(tcu::Vec4), // deUint32 stride
- VK_VERTEX_INPUT_RATE_VERTEX, // VkVertexInputRate inputRate
- };
-
- const VkVertexInputAttributeDescription vertexInputAttributeDescription =
- {
- 0u, // deUint32 location
- 0u, // deUint32 binding
- VK_FORMAT_R32G32B32A32_SFLOAT, // VkFormat format
- 0u // deUint32 offset
- };
-
- const VkPipelineVertexInputStateCreateInfo vertexInputStateCreateInfo =
- {
- VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, // VkStructureType sType
- &unusedExtStruct, // const void* pNext
- (VkPipelineVertexInputStateCreateFlags)0, // VkPipelineVertexInputStateCreateFlags flags
- 1u, // deUint32 vertexBindingDescriptionCount
- &vertexInputBindingDescription, // const VkVertexInputBindingDescription* pVertexBindingDescriptions
- 1u, // deUint32 vertexAttributeDescriptionCount
- &vertexInputAttributeDescription // const VkVertexInputAttributeDescription* pVertexAttributeDescriptions
- };
-
- const VkPipelineInputAssemblyStateCreateInfo inputAssemblyStateCreateInfo =
- {
- VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, // VkStructureType sType
- &unusedExtStruct, // const void* pNext
- 0u, // VkPipelineInputAssemblyStateCreateFlags flags
- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, // VkPrimitiveTopology topology
- VK_FALSE // VkBool32 primitiveRestartEnable
- };
-
- const VkPipelineViewportStateCreateInfo viewportStateCreateInfo =
- {
- VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, // VkStructureType sType
- &unusedExtStruct, // const void* pNext
- (VkPipelineViewportStateCreateFlags)0, // VkPipelineViewportStateCreateFlags flags
- (deUint32)viewports.size(), // deUint32 viewportCount
- viewports.data(), // const VkViewport* pViewports
- (deUint32)scissors.size(), // deUint32 scissorCount
- scissors.data() // const VkRect2D* pScissors
- };
-
- const VkPipelineRasterizationStateCreateInfo rasterizationStateCreateInfo =
- {
- VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, // VkStructureType sType
- &unusedExtStruct, // const void* pNext
- 0u, // VkPipelineRasterizationStateCreateFlags flags
- VK_FALSE, // VkBool32 depthClampEnable
- VK_FALSE, // VkBool32 rasterizerDiscardEnable
- VK_POLYGON_MODE_FILL, // VkPolygonMode polygonMode
- VK_CULL_MODE_NONE, // VkCullModeFlags cullMode
- VK_FRONT_FACE_COUNTER_CLOCKWISE, // VkFrontFace frontFace
- VK_FALSE, // VkBool32 depthBiasEnable
- 0.0f, // float depthBiasConstantFactor
- 0.0f, // float depthBiasClamp
- 0.0f, // float depthBiasSlopeFactor
- 1.0f // float lineWidth
- };
-
- const VkPipelineMultisampleStateCreateInfo multisampleStateCreateInfo =
- {
- VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, // VkStructureType sType
- &unusedExtStruct, // const void* pNext
- 0u, // VkPipelineMultisampleStateCreateFlags flags
- VK_SAMPLE_COUNT_1_BIT, // VkSampleCountFlagBits rasterizationSamples
- VK_FALSE, // VkBool32 sampleShadingEnable
- 1.0f, // float minSampleShading
- DE_NULL, // const VkSampleMask* pSampleMask
- VK_FALSE, // VkBool32 alphaToCoverageEnable
- VK_FALSE // VkBool32 alphaToOneEnable
- };
-
- const VkStencilOpState stencilOpState =
- {
- VK_STENCIL_OP_KEEP, // VkStencilOp failOp
- VK_STENCIL_OP_KEEP, // VkStencilOp passOp
- VK_STENCIL_OP_KEEP, // VkStencilOp depthFailOp
- VK_COMPARE_OP_NEVER, // VkCompareOp compareOp
- 0, // deUint32 compareMask
- 0, // deUint32 writeMask
- 0 // deUint32 reference
- };
-
- const VkPipelineDepthStencilStateCreateInfo depthStencilStateCreateInfo =
- {
- VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, // VkStructureType sType
- &unusedExtStruct, // const void* pNext
- 0u, // VkPipelineDepthStencilStateCreateFlags flags
- VK_FALSE, // VkBool32 depthTestEnable
- VK_FALSE, // VkBool32 depthWriteEnable
- VK_COMPARE_OP_LESS_OR_EQUAL, // VkCompareOp depthCompareOp
- VK_FALSE, // VkBool32 depthBoundsTestEnable
- VK_FALSE, // VkBool32 stencilTestEnable
- stencilOpState, // VkStencilOpState front
- stencilOpState, // VkStencilOpState back
- 0.0f, // float minDepthBounds
- 1.0f, // float maxDepthBounds
- };
-
- const VkPipelineColorBlendAttachmentState colorBlendAttachmentState =
- {
- VK_FALSE, // VkBool32 blendEnable
- VK_BLEND_FACTOR_ZERO, // VkBlendFactor srcColorBlendFactor
- VK_BLEND_FACTOR_ZERO, // VkBlendFactor dstColorBlendFactor
- VK_BLEND_OP_ADD, // VkBlendOp colorBlendOp
- VK_BLEND_FACTOR_ZERO, // VkBlendFactor srcAlphaBlendFactor
- VK_BLEND_FACTOR_ZERO, // VkBlendFactor dstAlphaBlendFactor
- VK_BLEND_OP_ADD, // VkBlendOp alphaBlendOp
- VK_COLOR_COMPONENT_R_BIT // VkColorComponentFlags colorWriteMask
- | VK_COLOR_COMPONENT_G_BIT
- | VK_COLOR_COMPONENT_B_BIT
- | VK_COLOR_COMPONENT_A_BIT
- };
-
- const VkPipelineColorBlendStateCreateInfo colorBlendStateCreateInfo =
- {
- VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, // VkStructureType sType
- &unusedExtStruct, // const void* pNext
- 0u, // VkPipelineColorBlendStateCreateFlags flags
- VK_FALSE, // VkBool32 logicOpEnable
- VK_LOGIC_OP_CLEAR, // VkLogicOp logicOp
- 1u, // deUint32 attachmentCount
- &colorBlendAttachmentState, // const VkPipelineColorBlendAttachmentState* pAttachments
- { 0.0f, 0.0f, 0.0f, 0.0f } // float blendConstants[4]
- };
-
- const VkGraphicsPipelineCreateInfo pipelineCreateInfo =
- {
- VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, // VkStructureType sType
- &unusedExtStruct, // const void* pNext
- 0u, // VkPipelineCreateFlags flags
- (deUint32)pipelineShaderStageParams.size(), // deUint32 stageCount
- &pipelineShaderStageParams[0], // const VkPipelineShaderStageCreateInfo* pStages
- &vertexInputStateCreateInfo, // const VkPipelineVertexInputStateCreateInfo* pVertexInputState
- &inputAssemblyStateCreateInfo, // const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
- DE_NULL, // const VkPipelineTessellationStateCreateInfo* pTessellationState
- &viewportStateCreateInfo, // const VkPipelineViewportStateCreateInfo* pViewportState
- &rasterizationStateCreateInfo, // const VkPipelineRasterizationStateCreateInfo* pRasterizationState
- &multisampleStateCreateInfo, // const VkPipelineMultisampleStateCreateInfo* pMultisampleState
- &depthStencilStateCreateInfo, // const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
- &colorBlendStateCreateInfo, // const VkPipelineColorBlendStateCreateInfo* pColorBlendState
- DE_NULL, // const VkPipelineDynamicStateCreateInfo* pDynamicState
- *pipelineLayout, // VkPipelineLayout layout
- *renderPass, // VkRenderPass renderPass
- 0u, // deUint32 subpass
- DE_NULL, // VkPipeline basePipelineHandle
- 0 // deInt32 basePipelineIndex
- };
-
- const Unique<VkPipeline> pipeline (createGraphicsPipeline(vk, vkDevice, DE_NULL, &pipelineCreateInfo));
-
- // Framebuffer
- const VkFramebufferCreateInfo framebufferParams =
- {
- VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, // sType
- &unusedExtStruct, // pNext
- 0u, // flags
- *renderPass, // renderPass
- 1u, // attachmentCount
- &*colorAttView, // pAttachments
- (deUint32)renderSize.x(), // width
- (deUint32)renderSize.y(), // height
- 1u, // layers
- };
- const Unique<VkFramebuffer> framebuffer (createFramebuffer(vk, vkDevice, &framebufferParams));
-
- // Command buffer
- const VkCommandPoolCreateInfo cmdPoolParams =
- {
- VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, // sType
- &unusedExtStruct, // pNext
- VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, // flags
- queueFamilyIndex, // queueFamilyIndex
- };
- const Unique<VkCommandPool> cmdPool (createCommandPool(vk, vkDevice, &cmdPoolParams));
-
- const VkCommandBufferAllocateInfo cmdBufParams =
- {
- VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, // sType
- &unusedExtStruct, // pNext
- *cmdPool, // pool
- VK_COMMAND_BUFFER_LEVEL_PRIMARY, // level
- 1u, // bufferCount
- };
- const Unique<VkCommandBuffer> cmdBuf (allocateCommandBuffer(vk, vkDevice, &cmdBufParams));
-
- // Record commands
- const VkCommandBufferBeginInfo commandBufBeginParams =
- {
- VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, // VkStructureType sType;
- &unusedExtStruct, // const void* pNext;
- VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, // VkCommandBufferUsageFlags flags;
- (const VkCommandBufferInheritanceInfo*)DE_NULL,
- };
- VK_CHECK(vk.beginCommandBuffer(*cmdBuf, &commandBufBeginParams));
-
- const VkMemoryBarrier vertFlushBarrier =
- {
- VK_STRUCTURE_TYPE_MEMORY_BARRIER, // sType
- &unusedExtStruct, // pNext
- VK_ACCESS_HOST_WRITE_BIT, // srcAccessMask
- VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT, // dstAccessMask
- };
-
- const VkImageMemoryBarrier colorAttBarrier =
- {
- VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // sType
- &unusedExtStruct, // pNext
- 0u, // srcAccessMask
- (VK_ACCESS_COLOR_ATTACHMENT_READ_BIT|
- VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT), // dstAccessMask
- VK_IMAGE_LAYOUT_UNDEFINED, // oldLayout
- VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, // newLayout
- queueFamilyIndex, // srcQueueFamilyIndex
- queueFamilyIndex, // dstQueueFamilyIndex
- *image, // image
- {
- VK_IMAGE_ASPECT_COLOR_BIT, // aspectMask
- 0u, // baseMipLevel
- 1u, // levelCount
- 0u, // baseArrayLayer
- 1u, // layerCount
- } // subresourceRange
- };
- vk.cmdPipelineBarrier(*cmdBuf, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, (VkDependencyFlags)0, 1, &vertFlushBarrier, 0, (const VkBufferMemoryBarrier*)DE_NULL, 1, &colorAttBarrier);
-
- const VkClearValue clearValue = makeClearValueColor(clearColor);
- const VkRenderPassBeginInfo renderPassBeginInfo =
- {
- VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, // VkStructureType sType;
- &unusedExtStruct, // const void* pNext;
- *renderPass, // VkRenderPass renderPass;
- *framebuffer, // VkFramebuffer framebuffer;
- makeRect2D(0, 0, renderSize.x(), renderSize.y()), // VkRect2D renderArea;
- 1u, // deUint32 clearValueCount;
- &clearValue, // const VkClearValue* pClearValues;
- };
-
- vk.cmdBeginRenderPass(*cmdBuf, &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
-
- vk.cmdBindPipeline(*cmdBuf, VK_PIPELINE_BIND_POINT_GRAPHICS, *pipeline);
-
- const VkDeviceSize bindingOffset = 0;
- vk.cmdBindVertexBuffers(*cmdBuf, 0u, 1u, &vertexBuffer.get(), &bindingOffset);
-
- vk.cmdDraw(*cmdBuf, 3u, 1u, 0u, 0u);
- endRenderPass(vk, *cmdBuf);
-
- const VkImageMemoryBarrier imageBarrier =
- {
- VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // VkStructureType sType;
- &unusedExtStruct, // const void* pNext;
- VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, // VkAccessFlags srcAccessMask;
- VK_ACCESS_TRANSFER_READ_BIT, // VkAccessFlags dstAccessMask;
- VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, // VkImageLayout oldLayout;
- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, // VkImageLayout newLayout;
- VK_QUEUE_FAMILY_IGNORED, // deUint32 srcQueueFamilyIndex;
- VK_QUEUE_FAMILY_IGNORED, // deUint32 destQueueFamilyIndex;
- *image, // VkImage image;
- makeImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0, 1u) // VkImageSubresourceRange subresourceRange;
- };
-
- vk.cmdPipelineBarrier(*cmdBuf, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0u,
- 0u, DE_NULL, 0u, DE_NULL, 1u, &imageBarrier);
-
- const VkImageSubresourceLayers subresource =
- {
- VK_IMAGE_ASPECT_COLOR_BIT, // VkImageAspectFlags aspectMask;
- 0u, // deUint32 mipLevel;
- 0u, // deUint32 baseArrayLayer;
- 1u // deUint32 layerCount;
- };
-
- const VkBufferImageCopy region =
- {
- 0ull, // VkDeviceSize bufferOffset;
- 0u, // deUint32 bufferRowLength;
- 0u, // deUint32 bufferImageHeight;
- subresource, // VkImageSubresourceLayers imageSubresource;
- makeOffset3D(0, 0, 0), // VkOffset3D imageOffset;
- makeExtent3D(renderSize.x(), renderSize.y(), 1u) // VkExtent3D imageExtent;
- };
-
- vk.cmdCopyImageToBuffer(*cmdBuf, *image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, *readImageBuffer, 1u, ®ion);
-
- const VkBufferMemoryBarrier bufferBarrier =
- {
- VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, // VkStructureType sType;
- &unusedExtStruct, // const void* pNext;
- VK_ACCESS_TRANSFER_WRITE_BIT, // VkAccessFlags srcAccessMask;
- VK_ACCESS_HOST_READ_BIT, // VkAccessFlags dstAccessMask;
- VK_QUEUE_FAMILY_IGNORED, // deUint32 srcQueueFamilyIndex;
- VK_QUEUE_FAMILY_IGNORED, // deUint32 dstQueueFamilyIndex;
- *readImageBuffer, // VkBuffer buffer;
- 0ull, // VkDeviceSize offset;
- VK_WHOLE_SIZE // VkDeviceSize size;
- };
-
- vk.cmdPipelineBarrier(*cmdBuf, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_HOST_BIT, 0u,
- 0u, DE_NULL, 1u, &bufferBarrier, 0u, DE_NULL);
-
- endCommandBuffer(vk, *cmdBuf);
-
- // Upload vertex data
- const VkMappedMemoryRange flushRange =
- {
- VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE,
- &unusedExtStruct,
- vertexBufferMemory->getMemory(),
- vertexBufferMemory->getOffset(),
- VK_WHOLE_SIZE
- };
- deMemcpy(vertexBufferMemory->getHostPtr(), &vertices[0], sizeof(vertices));
- VK_CHECK(vk.flushMappedMemoryRanges(vkDevice, 1u, &flushRange));
-
- // Submit & wait for completion
- const VkFenceCreateInfo createInfo =
- {
- VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
- &unusedExtStruct,
- 0u
- };
-
- const Unique<VkFence> fence (createFence(vk, vkDevice, &createInfo, DE_NULL));
-
- const VkSubmitInfo submitInfo =
- {
- VK_STRUCTURE_TYPE_SUBMIT_INFO, // VkStructureType sType;
- &unusedExtStruct, // const void* pNext;
- 0u, // deUint32 waitSemaphoreCount;
- DE_NULL, // const VkSemaphore* pWaitSemaphores;
- (const VkPipelineStageFlags*)DE_NULL, // const VkPipelineStageFlags* pWaitDstStageMask;
- 1u, // deUint32 commandBufferCount;
- &*cmdBuf, // const VkCommandBuffer* pCommandBuffers;
- 0u, // deUint32 signalSemaphoreCount;
- DE_NULL, // const VkSemaphore* pSignalSemaphores;
- };
-
- VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, *fence));
- VK_CHECK(vk.waitForFences(vkDevice, 1u, &fence.get(), DE_TRUE, ~0ull));
-
- // Read results, render reference, compare
- {
- const tcu::TextureFormat tcuFormat = vk::mapVkFormat(colorFormat);
- const tcu::ConstPixelBufferAccess resultAccess (tcuFormat, renderSize.x(), renderSize.y(), 1, readImageBufferMemory->getHostPtr());
-
- invalidateAlloc(vk, vkDevice, *readImageBufferMemory);
-
- {
- tcu::TextureLevel refImage (tcuFormat, renderSize.x(), renderSize.y());
- const tcu::UVec4 threshold (0u);
- const tcu::IVec3 posDeviation (1,1,0);
-
- tcu::clear(refImage.getAccess(), clearColor);
- renderReferenceTriangle(refImage.getAccess(), vertices, context.getDeviceProperties().limits.subPixelPrecisionBits);
-
- if (tcu::intThresholdPositionDeviationCompare(context.getTestContext().getLog(),
- "ComparisonResult",
- "Image comparison result",
- refImage.getAccess(),
- resultAccess,
- threshold,
- posDeviation,
- false,
- tcu::COMPARE_LOG_RESULT))
- return tcu::TestStatus::pass("Rendering succeeded");
- else
- return tcu::TestStatus::fail("Image comparison failed");
- }
- }
-
- return tcu::TestStatus::pass("Rendering succeeded");
-}
-
tcu::TestStatus renderTriangleUnusedResolveAttachmentTest (Context& context)
{
const VkDevice vkDevice = context.getDevice();
@@ -1498,7 +901,6 @@
addFunctionCase (smokeTests.get(), "create_sampler", "", createSamplerTest);
addFunctionCaseWithPrograms (smokeTests.get(), "create_shader", "", createShaderProgs, createShaderModuleTest);
addFunctionCaseWithPrograms (smokeTests.get(), "triangle", "", createTriangleProgs, renderTriangleTest);
- addFunctionCaseWithPrograms (smokeTests.get(), "triangle_ext_structs", "", createTriangleProgs, renderTriangleUnusedExtStructTest);
addFunctionCaseWithPrograms (smokeTests.get(), "asm_triangle", "", createTriangleAsmProgs, renderTriangleTest);
addFunctionCaseWithPrograms (smokeTests.get(), "asm_triangle_no_opname", "", createProgsNoOpName, renderTriangleTest);
addFunctionCaseWithPrograms (smokeTests.get(), "unused_resolve_attachment", "", createTriangleProgs, renderTriangleUnusedResolveAttachmentTest);
diff --git a/external/vulkancts/modules/vulkan/geometry/vktGeometryLayeredRenderingTests.cpp b/external/vulkancts/modules/vulkan/geometry/vktGeometryLayeredRenderingTests.cpp
index 0fb32a0..0056d12 100644
--- a/external/vulkancts/modules/vulkan/geometry/vktGeometryLayeredRenderingTests.cpp
+++ b/external/vulkancts/modules/vulkan/geometry/vktGeometryLayeredRenderingTests.cpp
@@ -270,7 +270,7 @@
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, // VkPipelineStageFlags dstStageMask
VK_ACCESS_SHADER_WRITE_BIT, // VkAccessFlags srcAccessMask
VK_ACCESS_SHADER_READ_BIT, // VkAccessFlags dstAccessMask
- 0u, // VkDependencyFlags dependencyFlags
+ VK_DEPENDENCY_BY_REGION_BIT, // VkDependencyFlags dependencyFlags
};
const VkRenderPassCreateInfo renderPassInfo =
@@ -1782,7 +1782,7 @@
VK_ACCESS_SHADER_READ_BIT // VkAccessFlags dstAccessMask
};
- vk.cmdPipelineBarrier(*secondaryCmdBuffer, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, 0u, 1u, &barrier, 0u, DE_NULL, 0u, DE_NULL);
+ vk.cmdPipelineBarrier(*secondaryCmdBuffer, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_DEPENDENCY_BY_REGION_BIT, 1u, &barrier, 0u, DE_NULL, 0u, DE_NULL);
}
vk.cmdDraw(*secondaryCmdBuffer, 1u, 1u, 0u, 0u);
endCommandBuffer(vk, *secondaryCmdBuffer);
diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp
index 6b36abb..efb5872 100644
--- a/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp
+++ b/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp
@@ -774,7 +774,8 @@
void createBuffer (Move<VkBuffer>& buffer,
Move<VkDeviceMemory>& memory,
Context& ctx,
- BindingCaseParameters params)
+ BindingCaseParameters params,
+ VkDeviceSize* memorySize)
{
const DeviceInterface& vk = ctx.getDeviceInterface();
const VkDevice vkDevice = ctx.getDevice();
@@ -783,6 +784,7 @@
buffer = createBuffer(vk, vkDevice, &bufferParams);
vk.getBufferMemoryRequirements(vkDevice, *buffer, &memReqs);
+ *memorySize = memReqs.size;
const VkMemoryAllocateInfo memAlloc = makeMemoryAllocateInfo(ctx, memReqs, MemoryHostVisible);
VkDeviceMemory rawMemory = DE_NULL;
@@ -795,15 +797,15 @@
void pushData (VkDeviceMemory memory,
deUint32 dataSeed,
Context& ctx,
- BindingCaseParameters params)
+ VkDeviceSize size)
{
const DeviceInterface& vk = ctx.getDeviceInterface();
const VkDevice vkDevice = ctx.getDevice();
- MemoryMappingRAII hostMemory (vk, vkDevice, memory, 0u, params.bufferSize, 0u);
+ MemoryMappingRAII hostMemory (vk, vkDevice, memory, 0u, size, 0u);
deUint8* hostBuffer = static_cast<deUint8*>(hostMemory.ptr());
SimpleRandomGenerator random (dataSeed);
- for (deUint32 i = 0u; i < params.bufferSize; ++i)
+ for (deUint32 i = 0u; i < size; ++i)
{
hostBuffer[i] = static_cast<deUint8>(random.getNext() & 0xFFu);
}
@@ -813,11 +815,12 @@
deBool checkData (VkDeviceMemory memory,
deUint32 dataSeed,
Context& ctx,
- BindingCaseParameters params)
+ BindingCaseParameters params,
+ VkDeviceSize size)
{
const DeviceInterface& vk = ctx.getDeviceInterface();
const VkDevice vkDevice = ctx.getDevice();
- MemoryMappingRAII hostMemory (vk, vkDevice, memory, 0u, params.bufferSize, 0u);
+ MemoryMappingRAII hostMemory (vk, vkDevice, memory, 0u, size, 0u);
deUint8* hostBuffer = static_cast<deUint8*>(hostMemory.ptr());
SimpleRandomGenerator random (dataSeed);
@@ -844,6 +847,10 @@
virtual tcu::TestStatus iterate (void)
{
+ const InstanceInterface& vkInstance = m_context.getInstanceInterface();
+ const VkPhysicalDevice vkPhysicalDevice = m_context.getPhysicalDevice();
+ VkPhysicalDeviceProperties properties;
+ vkInstance.getPhysicalDeviceProperties(vkPhysicalDevice, &properties);
std::vector<de::SharedPtr<Move<TTarget> > >
targets;
MemoryRegionsList memory;
@@ -854,21 +861,23 @@
Move<VkBuffer> srcBuffer;
Move<VkDeviceMemory> srcMemory;
+ VkDeviceSize srcMemorySize;
- createBuffer(srcBuffer, srcMemory, m_context, m_params);
- pushData(*srcMemory, 1, m_context, m_params);
+ createBuffer(srcBuffer, srcMemory, m_context, m_params, &srcMemorySize);
+ pushData(*srcMemory, 1, m_context, srcMemorySize);
Move<VkBuffer> dstBuffer;
Move<VkDeviceMemory> dstMemory;
+ VkDeviceSize dstMemorySize;
- createBuffer(dstBuffer, dstMemory, m_context, m_params);
+ createBuffer(dstBuffer, dstMemory, m_context, m_params, &dstMemorySize);
deBool passed = DE_TRUE;
for (deUint32 i = 0; passed && i < m_params.targetsCount; ++i)
{
fillUpResource(srcBuffer, *targets[i], m_context, m_params);
readUpResource(*targets[i], dstBuffer, m_context, m_params);
- passed = checkData(*dstMemory, 1, m_context, m_params);
+ passed = checkData(*dstMemory, 1, m_context, m_params, dstMemorySize);
}
return passed ? tcu::TestStatus::pass("Pass") : tcu::TestStatus::fail("Failed");
@@ -890,6 +899,10 @@
virtual tcu::TestStatus iterate (void)
{
+ const InstanceInterface& vkInstance = m_context.getInstanceInterface();
+ const VkPhysicalDevice vkPhysicalDevice = m_context.getPhysicalDevice();
+ VkPhysicalDeviceProperties properties;
+ vkInstance.getPhysicalDeviceProperties(vkPhysicalDevice, &properties);
std::vector<de::SharedPtr<Move<TTarget> > >
targets[2];
MemoryRegionsList memory;
@@ -902,14 +915,16 @@
Move<VkBuffer> srcBuffer;
Move<VkDeviceMemory> srcMemory;
+ VkDeviceSize srcMemorySize;
- createBuffer(srcBuffer, srcMemory, m_context, m_params);
- pushData(*srcMemory, 2, m_context, m_params);
+ createBuffer(srcBuffer, srcMemory, m_context, m_params, &srcMemorySize);
+ pushData(*srcMemory, 2, m_context, srcMemorySize);
Move<VkBuffer> dstBuffer;
Move<VkDeviceMemory> dstMemory;
+ VkDeviceSize dstMemorySize;
- createBuffer(dstBuffer, dstMemory, m_context, m_params);
+ createBuffer(dstBuffer, dstMemory, m_context, m_params, &dstMemorySize);
deBool passed = DE_TRUE;
for (deUint32 i = 0; passed && i < m_params.targetsCount; ++i)
@@ -918,7 +933,7 @@
layoutTransitionResource(*(targets[1][i]), m_context);
fillUpResource(srcBuffer, *(targets[0][i]), m_context, m_params);
readUpResource(*(targets[1][i]), dstBuffer, m_context, m_params);
- passed = checkData(*dstMemory, 2, m_context, m_params);
+ passed = checkData(*dstMemory, 2, m_context, m_params, dstMemorySize);
}
return passed ? tcu::TestStatus::pass("Pass") : tcu::TestStatus::fail("Failed");
diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp
index 1937f31..2129ff4 100644
--- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp
+++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp
@@ -584,6 +584,18 @@
1.0f, // float lineWidth;
};
+ const vk::VkPipelineColorBlendStateCreateInfo colorBlendStateParams
+ {
+ vk::VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, // VkStructureType sType
+ DE_NULL, // const void* pNext
+ 0u, // VkPipelineColorBlendStateCreateFlags flags
+ VK_FALSE, // VkBool32 logicOpEnable
+ vk::VK_LOGIC_OP_CLEAR, // VkLogicOp logicOp
+ 0u, // deUint32 attachmentCount
+ DE_NULL, // const VkPipelineColorBlendAttachmentState* pAttachments
+ { 1.0f, 1.0f, 1.0f, 1.0f } // float blendConstants[4]
+ };
+
// Setup different stencil masks and refs in each quad
for (int quadNdx = 0; quadNdx < StencilTest::QUAD_COUNT; quadNdx++)
{
@@ -599,24 +611,25 @@
back.writeMask = config.backWriteMask;
back.reference = config.backRef;
- m_graphicsPipelines[quadNdx] = makeGraphicsPipeline(vk, // const DeviceInterface& vk
- vkDevice, // const VkDevice device
- *m_pipelineLayout, // const VkPipelineLayout pipelineLayout
- *m_vertexShaderModule, // const VkShaderModule vertexShaderModule
- DE_NULL, // const VkShaderModule tessellationControlModule
- DE_NULL, // const VkShaderModule tessellationEvalModule
- DE_NULL, // const VkShaderModule geometryShaderModule
- *m_fragmentShaderModule, // const VkShaderModule fragmentShaderModule
- *m_renderPass, // const VkRenderPass renderPass
- viewports, // const std::vector<VkViewport>& viewports
- scissors, // const std::vector<VkRect2D>& scissors
- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, // const VkPrimitiveTopology topology
- 0u, // const deUint32 subpass
- 0u, // const deUint32 patchControlPoints
- &vertexInputStateParams, // const VkPipelineVertexInputStateCreateInfo* vertexInputStateCreateInfo
- &rasterizationStateParams, // const VkPipelineRasterizationStateCreateInfo* rasterizationStateCreateInfo
- DE_NULL, // const VkPipelineMultisampleStateCreateInfo* multisampleStateCreateInfo
- &depthStencilStateParams); // const VkPipelineDepthStencilStateCreateInfo* depthStencilStateCreateInfo
+ m_graphicsPipelines[quadNdx] = makeGraphicsPipeline(vk, // const DeviceInterface& vk
+ vkDevice, // const VkDevice device
+ *m_pipelineLayout, // const VkPipelineLayout pipelineLayout
+ *m_vertexShaderModule, // const VkShaderModule vertexShaderModule
+ DE_NULL, // const VkShaderModule tessellationControlModule
+ DE_NULL, // const VkShaderModule tessellationEvalModule
+ DE_NULL, // const VkShaderModule geometryShaderModule
+ *m_fragmentShaderModule, // const VkShaderModule fragmentShaderModule
+ *m_renderPass, // const VkRenderPass renderPass
+ viewports, // const std::vector<VkViewport>& viewports
+ scissors, // const std::vector<VkRect2D>& scissors
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, // const VkPrimitiveTopology topology
+ 0u, // const deUint32 subpass
+ 0u, // const deUint32 patchControlPoints
+ &vertexInputStateParams, // const VkPipelineVertexInputStateCreateInfo* vertexInputStateCreateInfo
+ &rasterizationStateParams, // const VkPipelineRasterizationStateCreateInfo* rasterizationStateCreateInfo
+ DE_NULL, // const VkPipelineMultisampleStateCreateInfo* multisampleStateCreateInfo
+ &depthStencilStateParams, // const VkPipelineDepthStencilStateCreateInfo* depthStencilStateCreateInfo
+ (m_colorAttachmentEnable ? DE_NULL : &colorBlendStateParams)); // const VkPipelineColorBlendStateCreateInfo* colorBlendStateCreateInfo
}
}
diff --git a/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingWatertightnessTests.cpp b/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingWatertightnessTests.cpp
index 0ae3908..afd6224 100644
--- a/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingWatertightnessTests.cpp
+++ b/external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingWatertightnessTests.cpp
@@ -104,6 +104,24 @@
return result;
}
+ static inline double doCrossProduct(tcu::DVec2 a, tcu::DVec2 b)
+ {
+ return a.x() * b.y() - a.y() * b.x();
+ }
+
+ static bool pointInTriangle2D(tcu::Vec3 p, tcu::Vec3 a, tcu::Vec3 b, tcu::Vec3 c)
+ {
+ tcu::DVec2 pa = { a.x() - p.x(), a.y() - p.y()} ;
+ tcu::DVec2 pb = { b.x() - p.x(), b.y() - p.y()};
+ tcu::DVec2 pc = { c.x() - p.x(), c.y() - p.y()};
+ double v1 = doCrossProduct(pa, pb);
+ double v2 = doCrossProduct(pb, pc);
+ double v3 = doCrossProduct(pc, pa);
+
+ // The winding of all the triangles in the test on XY plane is the same, so a negative value can be assumed
+ return v1 < 0 && v2 < 0 && v3 < 0;
+ }
+
deUint32 getShaderGroupSize(const InstanceInterface& vki,
const VkPhysicalDevice physicalDevice)
{
@@ -445,6 +463,11 @@
const tcu::Vec3 mixed = mixVec3(mixVec3(a, b, alfa), c, beta);
const float z = -rng.getFloat(0.01f, 0.99f);
const tcu::Vec3 d = tcu::Vec3(mixed.x(), mixed.y(), z);
+
+ // A check to avoid vertices that are outside the triangle in the XY plane due to floating-point precision,
+ // resulting in inconsistent winding order
+ if(!pointInTriangle2D(d, a, b, c)) continue;
+
const deUint32& p = t.x();
const deUint32& q = t.y();
deUint32& r = t.z();
@@ -453,7 +476,7 @@
vertices.push_back(d);
triangles.push_back(tcu::UVec3(q, r, R));
- triangles.push_back(tcu::UVec3(p, r, R));
+ triangles.push_back(tcu::UVec3(p, R, r));
r = R;
}
diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp
index 4facf5f..f5a13d4 100644
--- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp
+++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp
@@ -1166,10 +1166,11 @@
VK_CHECK(synchronizationWrapperA->queueSubmit(queueA, DE_NULL));
{
- NativeHandle nativeSemaphoreHandle;
+ NativeHandle nativeSemaphoreHandle;
+ const vk::VkSemaphoreImportFlags flags = isSupportedPermanence(m_semaphoreHandleType, PERMANENCE_PERMANENT) ? (vk::VkSemaphoreImportFlagBits)0u : vk::VK_SEMAPHORE_IMPORT_TEMPORARY_BIT;
getSemaphoreNative(m_vkdA, *m_deviceA, *semaphoreA, m_semaphoreHandleType, nativeSemaphoreHandle);
- importSemaphore(m_vkdB, *m_deviceB, *semaphoreB, m_semaphoreHandleType, nativeSemaphoreHandle, 0u);
+ importSemaphore(m_vkdB, *m_deviceB, *semaphoreB, m_semaphoreHandleType, nativeSemaphoreHandle, flags);
}
}
{
diff --git a/external/vulkancts/mustpass/master/vk-default/api.txt b/external/vulkancts/mustpass/master/vk-default/api.txt
index 3980d05..cde7e20 100644
--- a/external/vulkancts/mustpass/master/vk-default/api.txt
+++ b/external/vulkancts/mustpass/master/vk-default/api.txt
@@ -8,7 +8,6 @@
dEQP-VK.api.smoke.create_sampler
dEQP-VK.api.smoke.create_shader
dEQP-VK.api.smoke.triangle
-dEQP-VK.api.smoke.triangle_ext_structs
dEQP-VK.api.smoke.asm_triangle
dEQP-VK.api.smoke.asm_triangle_no_opname
dEQP-VK.api.smoke.unused_resolve_attachment