diff options
author | Xin Li <delphij@google.com> | 2020-10-19 10:08:14 -0700 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2020-10-19 10:08:14 -0700 |
commit | 8a52066f5508c851527f37d354ffded4b1bf70c5 (patch) | |
tree | d92b94c5cee2c00333ef4bd1aebd5c499a711858 | |
parent | 7949c69a10e39ce76e2af700a1c3ee29756ad51e (diff) | |
parent | df94d93314e366ccc47723b5f0a79c7c4a32ccb9 (diff) | |
download | deqp-8a52066f5508c851527f37d354ffded4b1bf70c5.tar.gz |
Merge redfin/bramble support.
Bug: 171218636
Merged-In: I616017abef6c87ffd5d2e0b61290b1ee45c28867
Change-Id: I40e3307057ada68807a88cb6e79315dccb04b5c0
28 files changed, 407 insertions, 64 deletions
diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp index 4b61e9592..db4523ce4 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp @@ -3853,9 +3853,9 @@ tcu::TestStatus imageFormatProperties (Context& context, const VkFormat format, if (queryResult == VK_SUCCESS) { - const deUint32 fullMipPyramidSize = de::max(de::max(deLog2Ceil32(properties.maxExtent.width), - deLog2Ceil32(properties.maxExtent.height)), - deLog2Ceil32(properties.maxExtent.depth)) + 1; + const deUint32 fullMipPyramidSize = de::max(de::max(deLog2Floor32(properties.maxExtent.width), + deLog2Floor32(properties.maxExtent.height)), + deLog2Floor32(properties.maxExtent.depth)) + 1; log << TestLog::Message << properties << "\n" << TestLog::EndMessage; diff --git a/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDispatchTests.cpp b/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDispatchTests.cpp index bacc1e256..0a594af2f 100644 --- a/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDispatchTests.cpp +++ b/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDispatchTests.cpp @@ -311,6 +311,21 @@ tcu::TestStatus ConditionalDispatchTestInstance::iterate (void) vk.cmdExecuteCommands(*cmdBuffer, 1, &secondaryCmdBuffer.get()); } + const vk::VkBufferMemoryBarrier outputBufferMemoryBarrier = + { + vk::VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, + DE_NULL, + vk::VK_ACCESS_SHADER_WRITE_BIT, + vk::VK_ACCESS_HOST_READ_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED, + outputBuffer.get(), + 0u, + VK_WHOLE_SIZE + }; + + vk.cmdPipelineBarrier(*cmdBuffer, vk::VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, vk::VK_PIPELINE_STAGE_HOST_BIT, 0u, 0u, DE_NULL, 1u, &outputBufferMemoryBarrier, 0u, DE_NULL); + endCommandBuffer(vk, *cmdBuffer); submitCommandsAndWait(vk, device, queue, *cmdBuffer); diff --git a/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDrawAndClearTests.cpp b/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDrawAndClearTests.cpp index 0ce3e11b2..40124ddcf 100644 --- a/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDrawAndClearTests.cpp +++ b/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDrawAndClearTests.cpp @@ -773,6 +773,21 @@ tcu::TestStatus ConditionalRenderingClearAttachmentsTestInstance::iterate (void) copyResultImageToBuffer(m_testParams.m_testDepth ? VK_IMAGE_ASPECT_DEPTH_BIT : VK_IMAGE_ASPECT_COLOR_BIT, m_testParams.m_testDepth ? m_depthTargetImage->object() : m_colorTargetImage->object()); + const vk::VkBufferMemoryBarrier bufferMemoryBarrier = + { + vk::VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, + DE_NULL, + vk::VK_ACCESS_TRANSFER_WRITE_BIT, + vk::VK_ACCESS_HOST_READ_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED, + m_resultBuffer->object(), + 0u, + VK_WHOLE_SIZE + }; + + m_vkd.cmdPipelineBarrier(*m_cmdBufferPrimary, vk::VK_PIPELINE_STAGE_TRANSFER_BIT, vk::VK_PIPELINE_STAGE_HOST_BIT, 0u, 0u, DE_NULL, 1u, &bufferMemoryBarrier, 0u, DE_NULL); + endCommandBuffer(m_vkd, *m_cmdBufferPrimary); submitCommandsAndWait(m_vkd, m_device, m_queue, *m_cmdBufferPrimary); @@ -942,6 +957,21 @@ tcu::TestStatus ConditionalRenderingDrawTestInstance::iterate (void) copyResultImageToBuffer(VK_IMAGE_ASPECT_COLOR_BIT, m_colorTargetImage->object()); + const vk::VkBufferMemoryBarrier bufferMemoryBarrier = + { + vk::VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, + DE_NULL, + vk::VK_ACCESS_TRANSFER_WRITE_BIT, + vk::VK_ACCESS_HOST_READ_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED, + m_resultBuffer->object(), + 0u, + VK_WHOLE_SIZE + }; + + m_vkd.cmdPipelineBarrier(*m_cmdBufferPrimary, vk::VK_PIPELINE_STAGE_TRANSFER_BIT, vk::VK_PIPELINE_STAGE_HOST_BIT, 0u, 0u, DE_NULL, 1u, &bufferMemoryBarrier, 0u, DE_NULL); + endCommandBuffer(m_vkd, *m_cmdBufferPrimary); submitCommandsAndWait(m_vkd, m_device, m_queue, *m_cmdBufferPrimary); @@ -1221,6 +1251,21 @@ tcu::TestStatus ConditionalRenderingUpdateBufferWithDrawTestInstance::iterate (v copyResultImageToBuffer(VK_IMAGE_ASPECT_COLOR_BIT, m_colorTargetImage->object()); + const vk::VkBufferMemoryBarrier bufferMemoryBarrier = + { + vk::VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, + DE_NULL, + vk::VK_ACCESS_TRANSFER_WRITE_BIT, + vk::VK_ACCESS_HOST_READ_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED, + m_conditionalRenderingBuffer->object(), + 0u, + VK_WHOLE_SIZE + }; + + m_vkd.cmdPipelineBarrier(*m_cmdBufferPrimary, vk::VK_PIPELINE_STAGE_TRANSFER_BIT, vk::VK_PIPELINE_STAGE_HOST_BIT, 0u, 0u, DE_NULL, 1u, &bufferMemoryBarrier, 0u, DE_NULL); + endCommandBuffer(m_vkd, *m_cmdBufferPrimary); submitCommandsAndWait(m_vkd, m_device, m_queue, *m_cmdBufferPrimary); @@ -1232,7 +1277,7 @@ tcu::TestStatus ConditionalRenderingUpdateBufferWithDrawTestInstance::iterate (v m_testParams ? prepareReferenceImageOneColor(reference, tcu::Vec4(0,1,0,1)) : prepareReferenceImageOneColor(reference, clearColorInitial); - flushMappedMemoryRange(m_vkd, m_device, m_conditionalRenderingBuffer->getBoundMemory().getMemory(), m_conditionalRenderingBuffer->getBoundMemory().getOffset(), VK_WHOLE_SIZE); + invalidateMappedMemoryRange(m_vkd, m_device, m_conditionalRenderingBuffer->getBoundMemory().getMemory(), m_conditionalRenderingBuffer->getBoundMemory().getOffset(), VK_WHOLE_SIZE); if (!tcu::floatThresholdCompare(m_context.getTestContext().getLog(), "Comparison", "Comparison", reference, result, tcu::Vec4(0.01f), tcu::COMPARE_LOG_ON_ERROR)) return tcu::TestStatus::fail("Fail"); diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawImageObjectUtil.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawImageObjectUtil.cpp index 66a1d5df4..4cd1a113f 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawImageObjectUtil.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawImageObjectUtil.cpp @@ -348,6 +348,24 @@ void Image::readUsingBuffer (vk::VkQueue queue, }; m_vk.cmdCopyImageToBuffer(*copyCmdBuffer, object(), layout, stagingResource->object(), 1, ®ion); + + // pipeline barrier for accessing the staging buffer from HOST + { + const vk::VkBufferMemoryBarrier memoryBarrier = + { + vk::VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, + DE_NULL, + vk::VK_ACCESS_TRANSFER_WRITE_BIT, + vk::VK_ACCESS_HOST_READ_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED, + stagingResource->object(), + 0u, + VK_WHOLE_SIZE + }; + m_vk.cmdPipelineBarrier(*copyCmdBuffer, vk::VK_PIPELINE_STAGE_TRANSFER_BIT, vk::VK_PIPELINE_STAGE_HOST_BIT, 0u, 0u, DE_NULL, 1u, &memoryBarrier, 0u, DE_NULL); + } + endCommandBuffer(m_vk, *copyCmdBuffer); submitCommandsAndWait(m_vk, m_device, queue, copyCmdBuffer.get()); @@ -437,6 +455,31 @@ de::SharedPtr<Image> Image::copyToLinearImage (vk::VkQueue queue, vk::VkImageCopy region = { { (vk::VkImageAspectFlags)aspect, mipLevel, arrayElement, 1}, offset, { (vk::VkImageAspectFlags)aspect, 0, 0, 1}, zeroOffset, {(deUint32)width, (deUint32)height, (deUint32)depth} }; m_vk.cmdCopyImage(*copyCmdBuffer, object(), layout, stagingResource->object(), vk::VK_IMAGE_LAYOUT_GENERAL, 1, ®ion); + + // pipeline barrier for accessing the staging image from HOST + { + const vk::VkImageMemoryBarrier memoryBarrier = + { + vk::VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + DE_NULL, + vk::VK_ACCESS_TRANSFER_WRITE_BIT, + vk::VK_ACCESS_HOST_READ_BIT, + vk::VK_IMAGE_LAYOUT_GENERAL, + vk::VK_IMAGE_LAYOUT_GENERAL, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED, + stagingResource->object(), + { + static_cast<vk::VkImageAspectFlags>(aspect), + 0u, + 1u, + 0u, + 1u + } + }; + m_vk.cmdPipelineBarrier(*copyCmdBuffer, vk::VK_PIPELINE_STAGE_TRANSFER_BIT, vk::VK_PIPELINE_STAGE_HOST_BIT, 0u, 0u, DE_NULL, 0u, DE_NULL, 1u, &memoryBarrier); + } + endCommandBuffer(m_vk, *copyCmdBuffer); submitCommandsAndWait(m_vk, m_device, queue, copyCmdBuffer.get()); diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp index 8c0ef62b7..83741b9d6 100644 --- a/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp +++ b/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp @@ -518,7 +518,7 @@ size_t computeDeviceMemorySystemMemFootprint (const DeviceInterface& vk, VkDevic 1u, 0u, }; - const Unique<VkDeviceMemory> memory (allocateMemory(vk, device, &allocInfo)); + const Unique<VkDeviceMemory> memory (allocateMemory(vk, device, &allocInfo, callbackRecorder.getCallbacks())); AllocationCallbackValidationResults validateRes; validateAllocationCallbacks(callbackRecorder, &validateRes); diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp index 14c49214d..221cea4dc 100644 --- a/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp +++ b/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp @@ -290,7 +290,7 @@ size_t computeDeviceMemorySystemMemFootprint (const DeviceInterface& vk, VkDevic 1u, 0u, }; - const Unique<VkDeviceMemory> memory (allocateMemory(vk, device, &allocInfo)); + const Unique<VkDeviceMemory> memory (allocateMemory(vk, device, &allocInfo, callbackRecorder.getCallbacks())); AllocationCallbackValidationResults validateRes; validateAllocationCallbacks(callbackRecorder, &validateRes); diff --git a/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderUtil.cpp b/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderUtil.cpp index 797da55d8..4fb0b55ce 100644 --- a/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderUtil.cpp +++ b/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderUtil.cpp @@ -269,7 +269,7 @@ Move<VkRenderPass> makeRenderPass (const DeviceInterface& vk, ? VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT : VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; const VkAccessFlags srcAccessMask = dsAttacmentAvailable - ? VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT + ? VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT : VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; vector <SubpassDep> subpassDependencies; for(deUint32 subpassNdx = 0u; subpassNdx < subpassCount; ++subpassNdx) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendOperationAdvancedTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendOperationAdvancedTests.cpp index 560c1e9b0..f3e0cebe6 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendOperationAdvancedTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendOperationAdvancedTests.cpp @@ -1660,7 +1660,30 @@ void BlendOperationAdvancedTest::checkSupport(Context& context) const if (!blendProperties.advancedBlendAllOperations) { - throw tcu::NotSupportedError("Unsupported all advanced blend operations"); + for (deUint32 index = 0u; index < m_param.blendOps.size(); index++) + { + switch (m_param.blendOps[index]) + { + case VK_BLEND_OP_MULTIPLY_EXT: + case VK_BLEND_OP_SCREEN_EXT: + case VK_BLEND_OP_OVERLAY_EXT: + case VK_BLEND_OP_DARKEN_EXT: + case VK_BLEND_OP_LIGHTEN_EXT: + case VK_BLEND_OP_COLORDODGE_EXT: + case VK_BLEND_OP_COLORBURN_EXT: + case VK_BLEND_OP_HARDLIGHT_EXT: + case VK_BLEND_OP_SOFTLIGHT_EXT: + case VK_BLEND_OP_DIFFERENCE_EXT: + case VK_BLEND_OP_EXCLUSION_EXT: + case VK_BLEND_OP_HSL_HUE_EXT: + case VK_BLEND_OP_HSL_SATURATION_EXT: + case VK_BLEND_OP_HSL_COLOR_EXT: + case VK_BLEND_OP_HSL_LUMINOSITY_EXT: + break; + default: + throw tcu::NotSupportedError("Unsupported all advanced blend operations and unsupported advanced blend operation"); + } + } } if (m_param.colorAttachmentsCount > blendProperties.advancedBlendMaxColorAttachments) diff --git a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemStackTests.cpp b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemStackTests.cpp index 3e9b1054b..d7120685e 100644 --- a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemStackTests.cpp +++ b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemStackTests.cpp @@ -96,7 +96,7 @@ public: private: de::MovePtr<tcu::Texture2D> createTestTexture2D (void); - tcu::TestStatus validateResult (vk::VkImage image, + bool validateResult (vk::VkImage image, vk::VkImageLayout imageLayout, const tcu::Texture2D& texture2D, const tcu::Sampler& refSampler); @@ -141,7 +141,7 @@ void StackTestCase::initPrograms (vk::SourceCollections& programCollection) cons // Function p() returns specified protected memory element from the variable allocated on stack. // Function u() returns specified protected memory element from the global variable. // Values returned by p() and u() should be same. - // Test is repeated several times (16) to avoid coincidental matches. + // Test is repeated 2 times () in shader to avoid coincidental matches. // In case of any mismatches it is signalized to inherited verifier function by setting 0 in result store image. // Each invocation validates particular element (bytes) on stack. // Number of invocations matches stack size specified in test parameters. @@ -175,7 +175,7 @@ void StackTestCase::initPrograms (vk::SourceCollections& programCollection) cons " int checked_ndx = gy * w + gx;\n" " vec4 outColor;\n" "\n" - " for (int j = 0; j < 16; j++)\n" + " for (int j = 0; j < 2; j++)\n" " {\n" " for (int i = 0; i < n; i++)\n" " {\n" @@ -324,7 +324,14 @@ tcu::TestStatus StackTestInstance::iterate (void) updateBuilder.update(vk, device); } + // Calculate reference image + calculateRef(*texture2D); + + bool result = true; + // Create compute commands & submit + // Command buffer load is repeated 8 times () to avoid coincidental matches. + for (int i = 0; (i < 8) && (result == true); i++) { const vk::Unique<vk::VkFence> fence (vk::createFence(vk, device)); vk::Unique<vk::VkPipeline> pipeline (makeComputePipeline(vk, device, *pipelineLayout, *computeShader, DE_NULL)); @@ -337,14 +344,18 @@ tcu::TestStatus StackTestInstance::iterate (void) vk.cmdDispatch(*cmdBuffer, 1u, 1u, 1u); endCommandBuffer(vk, *cmdBuffer); + VK_CHECK(queueSubmit(ctx, PROTECTION_ENABLED, queue, *cmdBuffer, *fence, ~0ull)); - } - // Calculate reference image - calculateRef(*texture2D); + VK_CHECK(vk.waitForFences(device, 1u, &*fence, VK_TRUE, ~0ull)); - // Validate result - return validateResult(**imageDst, vk::VK_IMAGE_LAYOUT_GENERAL, *texture2D, refSampler); + result = validateResult(**imageDst, vk::VK_IMAGE_LAYOUT_GENERAL, *texture2D, refSampler); + } + + if (result == true) + return tcu::TestStatus::pass("Pass"); + else + return tcu::TestStatus::fail("Result validation failed"); } void StackTestInstance::calculateRef (tcu::Texture2D& texture2D) @@ -357,7 +368,7 @@ void StackTestInstance::calculateRef (tcu::Texture2D& texture2D) reference.setPixel(zero, x, y); } -tcu::TestStatus StackTestInstance::validateResult (vk::VkImage image, vk::VkImageLayout imageLayout, const tcu::Texture2D& texture2D, const tcu::Sampler& refSampler) +bool StackTestInstance::validateResult (vk::VkImage image, vk::VkImageLayout imageLayout, const tcu::Texture2D& texture2D, const tcu::Sampler& refSampler) { de::Random rnd (getSeedValue(m_params)); ValidationData refData; @@ -373,9 +384,9 @@ tcu::TestStatus StackTestInstance::validateResult (vk::VkImage image, vk::VkImag } if (!m_validator.validateImage(m_protectedContext, refData, image, vk::VK_FORMAT_R8G8B8A8_UNORM, imageLayout)) - return tcu::TestStatus::fail("Result validation failed"); + return false; else - return tcu::TestStatus::pass("Pass"); + return true; } } // anonymous diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedAttachmentSparseFillingTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedAttachmentSparseFillingTests.cpp index 51cd1f1b3..24a42270f 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedAttachmentSparseFillingTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedAttachmentSparseFillingTests.cpp @@ -248,8 +248,8 @@ void InputAttachmentSparseFillingTest::checkSupport(Context& context) const const vk::VkPhysicalDeviceLimits limits = getPhysicalDeviceProperties(context.getInstanceInterface(), context.getPhysicalDevice()).limits; - if( m_testParams.activeInputAttachmentCount > limits.maxPerStageDescriptorInputAttachments ) - TCU_THROW(NotSupportedError, "Input attachment count exceeds maxPerStageDescriptorInputAttachments"); + if( 2u * m_testParams.activeInputAttachmentCount > limits.maxPerStageDescriptorInputAttachments ) + TCU_THROW(NotSupportedError, "Input attachment count including unused elements exceeds maxPerStageDescriptorInputAttachments"); if ( 2u * m_testParams.activeInputAttachmentCount > limits.maxPerStageResources) TCU_THROW(NotSupportedError, "Input attachment count including unused elements exceeds maxPerStageResources"); diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp index 698aabd1c..6f2c5c00d 100644 --- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp +++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp @@ -4223,6 +4223,7 @@ TestStatus runAndVerifyDefaultPipeline (Context& context, InstanceContext instan // Record commands beginCommandBuffer(vk, *cmdBuf); + if (firstPass) { const VkMemoryBarrier vertFlushBarrier = { @@ -4308,43 +4309,43 @@ TestStatus runAndVerifyDefaultPipeline (Context& context, InstanceContext instan vk.cmdDraw(*cmdBuf, deUint32(vertexCount), 1u /*run pipeline once*/, 0u /*first vertex*/, 0u /*first instanceIndex*/); endRenderPass(vk, *cmdBuf); + if (x == numRenderSegments - 1 && y == numRenderSegments - 1) { - vector<VkImageMemoryBarrier> renderFinishBarrier; - VkImageMemoryBarrier imgBarrier = { - VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // VkStructureType sType; - DE_NULL, // const void* pNext; - VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, // VkMemoryOutputFlags outputMask; - VK_ACCESS_TRANSFER_READ_BIT, // VkMemoryInputFlags inputMask; - VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, // VkImageLayout oldLayout; - VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, // VkImageLayout newLayout; - queueFamilyIndex, // deUint32 srcQueueFamilyIndex; - queueFamilyIndex, // deUint32 destQueueFamilyIndex; - *image, // VkImage image; + vector<VkImageMemoryBarrier> renderFinishBarrier; + VkImageMemoryBarrier imgBarrier = { - VK_IMAGE_ASPECT_COLOR_BIT, // VkImageAspectFlags aspectMask; - 0u, // deUint32 baseMipLevel; - 1u, // deUint32 mipLevels; - 0u, // deUint32 baseArraySlice; - 1u, // deUint32 arraySize; - } // VkImageSubresourceRange subresourceRange; - }; - renderFinishBarrier.push_back(imgBarrier); - - if (needInterface) - { - imgBarrier.image = *fragOutputImage; + VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // VkStructureType sType; + DE_NULL, // const void* pNext; + VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, // VkMemoryOutputFlags outputMask; + VK_ACCESS_TRANSFER_READ_BIT, // VkMemoryInputFlags inputMask; + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, // VkImageLayout oldLayout; + VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, // VkImageLayout newLayout; + queueFamilyIndex, // deUint32 srcQueueFamilyIndex; + queueFamilyIndex, // deUint32 destQueueFamilyIndex; + *image, // VkImage image; + { + VK_IMAGE_ASPECT_COLOR_BIT, // VkImageAspectFlags aspectMask; + 0u, // deUint32 baseMipLevel; + 1u, // deUint32 mipLevels; + 0u, // deUint32 baseArraySlice; + 1u, // deUint32 arraySize; + } // VkImageSubresourceRange subresourceRange; + }; renderFinishBarrier.push_back(imgBarrier); - vk.cmdPipelineBarrier(*cmdBuf, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, (VkDependencyFlags)0, 0, (const VkMemoryBarrier*)DE_NULL, 0, (const VkBufferMemoryBarrier*)DE_NULL, 2, renderFinishBarrier.data()); - } - else - { - vk.cmdPipelineBarrier(*cmdBuf, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, (VkDependencyFlags)0, 0, (const VkMemoryBarrier*)DE_NULL, 0, (const VkBufferMemoryBarrier*)DE_NULL, 1, renderFinishBarrier.data()); + + if (needInterface) + { + imgBarrier.image = *fragOutputImage; + renderFinishBarrier.push_back(imgBarrier); + vk.cmdPipelineBarrier(*cmdBuf, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, (VkDependencyFlags)0, 0, (const VkMemoryBarrier*)DE_NULL, 0, (const VkBufferMemoryBarrier*)DE_NULL, 2, renderFinishBarrier.data()); + } + else + { + vk.cmdPipelineBarrier(*cmdBuf, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, (VkDependencyFlags)0, 0, (const VkMemoryBarrier*)DE_NULL, 0, (const VkBufferMemoryBarrier*)DE_NULL, 1, renderFinishBarrier.data()); + } } - } - if ( x == numRenderSegments -1 && y == numRenderSegments - 1) - { { const VkBufferImageCopy copyParams = { @@ -4364,7 +4365,7 @@ TestStatus runAndVerifyDefaultPipeline (Context& context, InstanceContext instan if (needInterface) { - vk.cmdCopyImageToBuffer(*cmdBuf, *fragOutputImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, *fragOutputBuffer, 1u, ©Params); + vk.cmdCopyImageToBuffer(*cmdBuf, *fragOutputImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, *fragOutputBuffer, 1u, ©Params); } } diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp index 207474dbe..97cb3355c 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp @@ -602,7 +602,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) std::string extHeader = getExtHeader(caseDef); - subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, extHeader, testSrc, ""); + subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, *caseDef.geometryPointSizeSupported, extHeader, testSrc, ""); } void supportedCheck (Context& context, CaseDefinition caseDef) diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp index 96c92c2a1..07ae70df8 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp @@ -239,7 +239,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) std::string testSrc = getTestSrc(caseDef); std::string helperStr = getHelperFunctionARB(caseDef); - subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, extHeader, testSrc, helperStr); + subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, *caseDef.geometryPointSizeSupported, extHeader, testSrc, helperStr); } void supportedCheck (Context& context, CaseDefinition caseDef) diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp index 9894e7672..cf0ef4012 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp @@ -215,6 +215,7 @@ void initFrameBufferPrograms(SourceCollections& programCollection, CaseDefinitio << bdyStr << " out_color[gl_InvocationID ] = float(tempResult);\n" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -234,6 +235,7 @@ void initFrameBufferPrograms(SourceCollections& programCollection, CaseDefinitio << bdyStr << " out_color = float(tempResult);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -318,6 +320,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; const string tese = @@ -336,6 +339,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempResult;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; const string geometry = @@ -354,6 +358,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + bdyStr + " result[gl_PrimitiveIDIn] = tempResult;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp index 9aaf27d7c..930b1ce83 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp @@ -308,6 +308,7 @@ void initFrameBufferPrograms(SourceCollections& programCollection, CaseDefinitio << bdyStr << " out_color[gl_InvocationID ] = float(tempResult);\n" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -326,6 +327,7 @@ void initFrameBufferPrograms(SourceCollections& programCollection, CaseDefinitio << bdyStr << " out_color = float(tempResult);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -407,6 +409,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; const string tese = @@ -424,6 +427,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempResult;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; const string geometry = @@ -441,6 +445,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + bdyStr + " result[gl_PrimitiveIDIn] = tempResult;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp index 9f6c0e1ff..7b1100796 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp @@ -818,6 +818,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "" ) + "}\n"; const string tese = @@ -839,6 +840,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempResult;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "" ) + "}\n"; const string geometry = @@ -860,6 +862,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + testSrc + " result[gl_PrimitiveIDIn] = tempResult;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "" ) + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp index 8fe6bf6d3..209904bd1 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp @@ -1277,6 +1277,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tesc") << glu::TessellationControlSource(tesc) << vk::ShaderBuildOptions(programCollection.usedVulkanVersion, vk::SPIRV_VERSION_1_3, 0u); @@ -1298,6 +1299,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempResult;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tese") @@ -1320,6 +1322,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + bdy + " result[gl_PrimitiveIDIn] = tempResult;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp index c8e6921ef..db34b6e88 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp @@ -1125,8 +1125,14 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + #if GEOMETRY_POINT_SIZE_SUPPORTED + " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" + #endif "}\n"; */ + + const string pointSizeCapability = (*caseDef.geometryPointSizeSupported ? "OpCapability TessellationPointSize\n" : ""); + const string tesc = "; SPIR-V\n" "; Version: 1.3\n" @@ -1135,6 +1141,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "; Schema: 0\n" "OpCapability Tessellation\n" "OpCapability GroupNonUniform\n" + + pointSizeCapability + "%1 = OpExtInstImport \"GLSL.std.450\"\n" "OpMemoryModel Logical GLSL450\n" "OpEntryPoint TessellationControl %4 \"main\" %15 %18 %20 %26 %36 %48 %54\n" @@ -1205,6 +1212,10 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%54 = OpVariable %53 Input\n" "%56 = OpTypePointer Input %42\n" "%59 = OpTypePointer Output %42\n" + + (*caseDef.geometryPointSizeSupported ? + "%61 = OpTypePointer Input %32\n" + "%62 = OpTypePointer Output %32\n" + "%63 = OpConstant %12 1\n" : "") + "%4 = OpFunction %2 None %3\n" "%5 = OpLabel\n" "%16 = OpLoad %12 %15\n" @@ -1230,6 +1241,11 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%58 = OpLoad %42 %57\n" "%60 = OpAccessChain %59 %48 %49 %13\n" "OpStore %60 %58\n" + + (*caseDef.geometryPointSizeSupported ? + "%64 = OpAccessChain %61 %54 %49 %63\n" + "%65 = OpLoad %32 %64\n" + "%66 = OpAccessChain %62 %48 %49 %63\n" + "OpStore %66 %65\n" : "") + "OpReturn\n" "OpFunctionEnd\n"; programCollection.spirvAsmSources.add("tesc") << tesc << SpirVAsmBuildOptions(programCollection.usedVulkanVersion, SPIRV_VERSION_1_3); @@ -1250,8 +1266,14 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = uvec4(gl_SubgroupSize, gl_SubgroupInvocationID, 0, 0);\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + #if GEOMETRY_POINT_SIZE_SUPPORTED + " gl_PointSize = gl_in[0].gl_PointSize;\n" + #endif "}\n"; */ + + const string pointSizeCapability = (*caseDef.geometryPointSizeSupported ? "OpCapability TessellationPointSize\n" : ""); + const string tese = "; SPIR - V\n" "; Version: 1.3\n" @@ -1260,6 +1282,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "; Schema: 0\n" "OpCapability Tessellation\n" "OpCapability GroupNonUniform\n" + + pointSizeCapability + "%1 = OpExtInstImport \"GLSL.std.450\"\n" "OpMemoryModel Logical GLSL450\n" "OpEntryPoint TessellationEvaluation %4 \"main\" %15 %23 %33 %35 %48 %53\n" @@ -1329,6 +1352,10 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%54 = OpTypePointer Input %43\n" "%61 = OpConstant %20 2\n" "%65 = OpTypePointer Output %43\n" + + (*caseDef.geometryPointSizeSupported ? + "%67 = OpTypePointer Input %20\n" + "%68 = OpTypePointer Output %20\n" + "%69 = OpConstant %12 1\n" : "") + "%4 = OpFunction %2 None %3\n" "%5 = OpLabel\n" "%41 = OpVariable %40 Function\n" @@ -1357,6 +1384,11 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%64 = OpFAdd %43 %56 %63\n" "%66 = OpAccessChain %65 %48 %13\n" "OpStore %66 %64\n" + + (*caseDef.geometryPointSizeSupported ? + "%70 = OpAccessChain %67 %53 %13 %69\n" + "%71 = OpLoad %20 %70\n" + "%72 = OpAccessChain %68 %48 %69\n" + "OpStore %72 %71\n" : "") + "OpReturn\n" "OpFunctionEnd\n"; programCollection.spirvAsmSources.add("tese") << tese << SpirVAsmBuildOptions(programCollection.usedVulkanVersion, SPIRV_VERSION_1_3); @@ -1378,10 +1410,16 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "{\n" " result[gl_PrimitiveIDIn] = uvec4(gl_SubgroupSize, gl_SubgroupInvocationID, 0, 0);\n" " gl_Position = gl_in[0].gl_Position;\n" + #if GEOMETRY_POINT_SIZE_SUPPORTED + " gl_PointSize = gl_in[0].gl_PointSize;\n" + #endif " EmitVertex();\n" " EndPrimitive();\n" "}\n"; */ + + const string pointSizeCapability = (*caseDef.geometryPointSizeSupported ? "OpCapability GeometryPointSize\n" : ""); + const string geometry = "; SPIR-V\n" "; Version: 1.3\n" @@ -1390,6 +1428,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "; Schema: 0\n" "OpCapability Geometry\n" "OpCapability GroupNonUniform\n" + + pointSizeCapability + "%1 = OpExtInstImport \"GLSL.std.450\"\n" "OpMemoryModel Logical GLSL450\n" "OpEntryPoint Geometry %4 \"main\" %15 %18 %20 %32 %36\n" @@ -1449,6 +1488,10 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%36 = OpVariable %35 Input\n" "%37 = OpTypePointer Input %27\n" "%40 = OpTypePointer Output %27\n" + + (*caseDef.geometryPointSizeSupported ? + "%42 = OpTypePointer Input %26\n" + "%43 = OpTypePointer Output %26\n" + "%44 = OpConstant %12 1\n" : "") + "%4 = OpFunction %2 None %3\n" "%5 = OpLabel\n" "%16 = OpLoad %12 %15\n" @@ -1461,10 +1504,16 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%39 = OpLoad %27 %38\n" "%41 = OpAccessChain %40 %32 %13\n" "OpStore %41 %39\n" + + (*caseDef.geometryPointSizeSupported ? + "%45 = OpAccessChain %42 %36 %13 %44\n" + "%46 = OpLoad %26 %45\n" + "%47 = OpAccessChain %43 %32 %44\n" + "OpStore %47 %46\n" : "") + "OpEmitVertex\n" "OpEndPrimitive\n" "OpReturn\n" "OpFunctionEnd\n"; + addGeometryShadersFromTemplate(geometry, SpirVAsmBuildOptions(programCollection.usedVulkanVersion, SPIRV_VERSION_1_3), programCollection.spirvAsmSources); } diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp index efd30d116..005fe97b8 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp @@ -436,7 +436,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) std::string extHeader = getExtHeader(caseDef); std::string testSrc = getBodySource(caseDef); - subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, extHeader, testSrc, ""); + subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, *caseDef.geometryPointSizeSupported, extHeader, testSrc, ""); } void supportedCheck (Context& context, CaseDefinition caseDef) diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsPartitionedTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsPartitionedTests.cpp index b76c0913d..26ae1a377 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsPartitionedTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsPartitionedTests.cpp @@ -644,6 +644,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << bdy.str() << " out_color[gl_InvocationID] = float(tempResult);" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; @@ -673,6 +674,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << bdy.str() << " out_color = float(tempResult);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp index 080a7836d..e9e1db08a 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp @@ -198,7 +198,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) std::string extHeader = getExtHeader(caseDef.format); std::string testSrc = getTestSrc(caseDef); - subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, extHeader, testSrc, ""); + subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, *caseDef.geometryPointSizeSupported, extHeader, testSrc, ""); } void supportedCheck (Context& context, CaseDefinition caseDef) diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp index 537aa8c4b..66e456910 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp @@ -203,6 +203,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << bdy.str() << " out_color[gl_InvocationID] = float(tempResult);\n" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -222,6 +223,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << bdy.str() << " out_color = float(tempResult);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -366,6 +368,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tesc") @@ -388,6 +391,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = 1;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tese") @@ -410,6 +414,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + bdy.str() + " result[gl_PrimitiveIDIn] = tempResult;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp index 052744dc0..eef837f1d 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp @@ -236,6 +236,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << testSource << " out_color[gl_InvocationID] = temp_res;\n" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -266,6 +267,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << testSource << " out_color = temp_res;\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -363,6 +365,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tesc") @@ -385,6 +388,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = temp_res;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tese") @@ -407,6 +411,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + testSource + " result[gl_PrimitiveIDIn] = temp_res;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp index 536610831..7d57e5a47 100644 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp @@ -1052,6 +1052,7 @@ void vkt::subgroups::initStdFrameBufferPrograms( SourceCollections& programCo << testSrc << " out_color[gl_InvocationID] = float(tempRes);\n" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (gsPointSize ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -1077,6 +1078,7 @@ void vkt::subgroups::initStdFrameBufferPrograms( SourceCollections& programCo << testSrc << " out_color = float(tempRes);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (gsPointSize ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -1092,6 +1094,7 @@ void vkt::subgroups::initStdPrograms( vk::SourceCollections& programCollection const vk::ShaderBuildOptions& buildOptions, vk::VkShaderStageFlags shaderStage, vk::VkFormat format, + bool gsPointSize, std::string extHeader, std::string testSrc, std::string helperStr) @@ -1178,6 +1181,7 @@ void vkt::subgroups::initStdPrograms( vk::SourceCollections& programCollection " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (gsPointSize ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; const string tese = @@ -1201,6 +1205,7 @@ void vkt::subgroups::initStdPrograms( vk::SourceCollections& programCollection " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempRes;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (gsPointSize ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; const string geometry = @@ -1224,6 +1229,7 @@ void vkt::subgroups::initStdPrograms( vk::SourceCollections& programCollection + testSrc + " result[gl_PrimitiveIDIn] = tempRes;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (gsPointSize ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; @@ -1331,6 +1337,47 @@ bool vkt::subgroups::isTessellationAndGeometryPointSizeSupported (Context& conte return features.shaderTessellationAndGeometryPointSize ? true : false; } +bool vkt::subgroups::is16BitUBOStorageSupported(Context& context) { + VkPhysicalDevice16BitStorageFeatures storage16bit; + deMemset(&storage16bit, 0, sizeof(storage16bit)); + storage16bit.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR; + storage16bit.pNext = DE_NULL; + + VkPhysicalDeviceFeatures2 features2; + deMemset(&features2, 0, sizeof(features2)); + features2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; + features2.pNext = &storage16bit; + + const PlatformInterface& platformInterface = context.getPlatformInterface(); + const VkInstance instance = context.getInstance(); + const InstanceDriver instanceDriver(platformInterface, instance); + + instanceDriver.getPhysicalDeviceFeatures2(context.getPhysicalDevice(), &features2); + return bool(storage16bit.uniformAndStorageBuffer16BitAccess); +} + + +bool vkt::subgroups::is8BitUBOStorageSupported(Context& context) { + + VkPhysicalDevice8BitStorageFeatures storage8bit; + deMemset(&storage8bit, 0, sizeof(storage8bit)); + storage8bit.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR; + storage8bit.pNext = DE_NULL; + + VkPhysicalDeviceFeatures2 features2; + deMemset(&features2, 0, sizeof(features2)); + features2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; + features2.pNext = &storage8bit; + + + const PlatformInterface& platformInterface = context.getPlatformInterface(); + const VkInstance instance = context.getInstance(); + const InstanceDriver instanceDriver(platformInterface, instance); + + instanceDriver.getPhysicalDeviceFeatures2(context.getPhysicalDevice(), &features2); + return bool(storage8bit.uniformAndStorageBuffer8BitAccess); +} + bool vkt::subgroups::isFormatSupportedForDevice(Context& context, vk::VkFormat format) { VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures subgroupExtendedTypesFeatures; @@ -1716,6 +1763,46 @@ bool vkt::subgroups::isFormatFloat (VkFormat format) } } +bool vkt::subgroups::isFormat8bitTy(VkFormat format) +{ + switch (format) + { + default: + return false; + case VK_FORMAT_R8_SINT: + case VK_FORMAT_R8G8_SINT: + case VK_FORMAT_R8G8B8_SINT: + case VK_FORMAT_R8G8B8A8_SINT: + case VK_FORMAT_R8_UINT: + case VK_FORMAT_R8G8_UINT: + case VK_FORMAT_R8G8B8_UINT: + case VK_FORMAT_R8G8B8A8_UINT: + return true; + } +} + +bool vkt::subgroups::isFormat16BitTy(VkFormat format) +{ + switch (format) + { + default: + return false; + case VK_FORMAT_R16_SFLOAT: + case VK_FORMAT_R16G16_SFLOAT: + case VK_FORMAT_R16G16B16_SFLOAT: + case VK_FORMAT_R16G16B16A16_SFLOAT: + case VK_FORMAT_R16_SINT: + case VK_FORMAT_R16G16_SINT: + case VK_FORMAT_R16G16B16_SINT: + case VK_FORMAT_R16G16B16A16_SINT: + case VK_FORMAT_R16_UINT: + case VK_FORMAT_R16G16_UINT: + case VK_FORMAT_R16G16B16_UINT: + case VK_FORMAT_R16G16B16A16_UINT: + return true; + } +} + void vkt::subgroups::setVertexShaderFrameBuffer (SourceCollections& programCollection) { /* @@ -3480,11 +3567,13 @@ tcu::TestStatus vkt::subgroups::makeComputeTest( VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT, (VkPipeline) DE_NULL, localSizesToTest[0][0], localSizesToTest[0][1], localSizesToTest[0][2]); context.getTestContext().touchWatchdog(); + for (deUint32 index = 1; index < (localSizesToTestCount - 1); index++) { const deUint32 nextX = localSizesToTest[index][0]; const deUint32 nextY = localSizesToTest[index][1]; const deUint32 nextZ = localSizesToTest[index][2]; + context.getTestContext().touchWatchdog(); pipelines[index] = makeComputePipeline(context, *pipelineLayout, *shaderModule, diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.hpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.hpp index 80e48e14e..2637c1805 100644 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.hpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.hpp @@ -117,6 +117,7 @@ void initStdPrograms( vk::SourceCollections& programCollection, const vk::ShaderBuildOptions& buildOptions, vk::VkShaderStageFlags shaderStage, vk::VkFormat format, + bool gsPointSize, std::string extHeader, std::string testSrc, std::string helperStr); @@ -140,6 +141,10 @@ bool isInt64SupportedForDevice(Context& context); bool isTessellationAndGeometryPointSizeSupported(Context& context); +bool is16BitUBOStorageSupported(Context& context); + +bool is8BitUBOStorageSupported(Context& context); + bool isSubgroupBroadcastDynamicIdSupported(Context& context); std::string getFormatNameForGLSL (vk::VkFormat format); @@ -151,6 +156,8 @@ const std::vector<vk::VkFormat> getAllFormats (); bool isFormatSigned (vk::VkFormat format); bool isFormatUnsigned (vk::VkFormat format); bool isFormatFloat (vk::VkFormat format); +bool isFormat8bitTy(vk::VkFormat format); +bool isFormat16BitTy(vk::VkFormat format); void addGeometryShadersFromTemplate (const std::string& glslTemplate, const vk::ShaderBuildOptions& options, vk::GlslSourceCollection& collection); void addGeometryShadersFromTemplate (const std::string& spirvTemplate, const vk::SpirVAsmBuildOptions& options, vk::SpirVAsmCollection& collection); diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp index d4308b371..17134dfdc 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp @@ -116,6 +116,8 @@ struct CaseDefinition VkShaderStageFlags shaderStage; VkFormat format; de::SharedPtr<bool> geometryPointSizeSupported; + deBool requires8BitUniformBuffer; + deBool requires16BitUniformBuffer; }; bool fmtIsBoolean(VkFormat format) @@ -268,6 +270,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << source << " out_color[gl_InvocationID] = float(result);" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -295,6 +298,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << source << " out_color = float(result);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -488,6 +492,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tesc") @@ -517,6 +522,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " res[offset] = result;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tese") @@ -546,6 +552,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + source + " res[offset] = result;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; @@ -612,6 +619,22 @@ void supportedCheck (Context& context, CaseDefinition caseDef) if (!subgroups::isFormatSupportedForDevice(context, caseDef.format)) TCU_THROW(NotSupportedError, "Device does not support the specified format in subgroup operations"); + if (caseDef.requires16BitUniformBuffer) + { + if (!subgroups::is16BitUBOStorageSupported(context)) + { + TCU_THROW(NotSupportedError, "Device does not support the specified format in subgroup operations"); + } + } + + if (caseDef.requires8BitUniformBuffer) + { + if (!subgroups::is8BitUBOStorageSupported(context)) + { + TCU_THROW(NotSupportedError, "Device does not support the specified format in subgroup operations"); + } + } + if (caseDef.opType > OPTYPE_LAST_NON_ARB) { context.requireDeviceFunctionality("VK_EXT_shader_subgroup_vote"); @@ -790,7 +813,7 @@ tcu::TestCaseGroup* createSubgroupsVoteTests(tcu::TestContext& testCtx) const std::string op = de::toLower(getOpTypeName(opTypeIndex)); { - const CaseDefinition caseDef = {opTypeIndex, VK_SHADER_STAGE_COMPUTE_BIT, format, de::SharedPtr<bool>(new bool)}; + const CaseDefinition caseDef = { opTypeIndex, VK_SHADER_STAGE_COMPUTE_BIT, format, de::SharedPtr<bool>(new bool),deBool(false),deBool(false) }; if (opTypeIndex < OPTYPE_LAST_NON_ARB) { addFunctionCaseWithPrograms(computeGroup.get(), @@ -806,7 +829,7 @@ tcu::TestCaseGroup* createSubgroupsVoteTests(tcu::TestContext& testCtx) } { - const CaseDefinition caseDef = {opTypeIndex, VK_SHADER_STAGE_ALL_GRAPHICS, format, de::SharedPtr<bool>(new bool)}; + const CaseDefinition caseDef = {opTypeIndex, VK_SHADER_STAGE_ALL_GRAPHICS, format, de::SharedPtr<bool>(new bool),deBool(false),deBool(false) }; if (opTypeIndex < OPTYPE_LAST_NON_ARB) { addFunctionCaseWithPrograms(graphicGroup.get(), @@ -823,7 +846,7 @@ tcu::TestCaseGroup* createSubgroupsVoteTests(tcu::TestContext& testCtx) for (int stageIndex = 0; stageIndex < DE_LENGTH_OF_ARRAY(stages); ++stageIndex) { - const CaseDefinition caseDef = {opTypeIndex, stages[stageIndex], format, de::SharedPtr<bool>(new bool)}; + const CaseDefinition caseDef = {opTypeIndex, stages[stageIndex], format, de::SharedPtr<bool>(new bool),deBool(false),deBool(false) }; if (opTypeIndex < OPTYPE_LAST_NON_ARB) { addFunctionCaseWithPrograms(framebufferGroup.get(), @@ -841,8 +864,9 @@ tcu::TestCaseGroup* createSubgroupsVoteTests(tcu::TestContext& testCtx) supportedCheck, initFrameBufferPrograms, noSSBOtest, caseDef); } } - - const CaseDefinition caseDef = {opTypeIndex, VK_SHADER_STAGE_FRAGMENT_BIT, format, de::SharedPtr<bool>(new bool)}; + bool needs8BitUBOStorage = isFormat8bitTy(format); + bool needs16BitUBOStorage = isFormat16BitTy(format); + const CaseDefinition caseDef = {opTypeIndex, VK_SHADER_STAGE_FRAGMENT_BIT, format, de::SharedPtr<bool>(new bool),deBool(needs8BitUBOStorage),deBool(needs16BitUBOStorage) }; if (opTypeIndex < OPTYPE_LAST_NON_ARB) { addFunctionCaseWithPrograms(fragHelperGroup.get(), diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp index ab682b73e..00966d840 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp @@ -1651,8 +1651,12 @@ public: for (deUint32 instanceIdx = 0; instanceIdx < queueFamilyProperties[familyIdx].queueCount && !added; instanceIdx++) { VkQueueFlags readOpQueueFlags = readOp->getQueueFlags(m_opContext); - if ((readOpQueueFlags & queueFamilyProperties[familyIdx].queueFlags) != readOpQueueFlags) - continue; + // If the readOpQueueFlags contain the transfer bit set then check if the queue supports graphics or compute operations before skipping this iteration. + // Because reporting transfer functionality is optional if a queue supports graphics or compute operations. + if (((readOpQueueFlags & queueFamilyProperties[familyIdx].queueFlags) != readOpQueueFlags) && + (((readOpQueueFlags & VK_QUEUE_TRANSFER_BIT) == 0) || + ((queueFamilyProperties[familyIdx].queueFlags & (VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT)) == 0))) + continue; // Add the read operation on the universal queue, it should be // submitted in order with regard to the write operation. diff --git a/modules/egl/teglWideColorTests.cpp b/modules/egl/teglWideColorTests.cpp index 5a9b3150d..83bc57f95 100644 --- a/modules/egl/teglWideColorTests.cpp +++ b/modules/egl/teglWideColorTests.cpp @@ -1130,6 +1130,10 @@ void WideColorSurfaceTest::testFramebufferColorEncoding() { correct = framebufferColorEncoding == GL_LINEAR; } + else if (m_redSize == 10) + { + correct = true; + } } else { |