diff options
author | Xin Li <delphij@google.com> | 2020-11-23 13:14:10 -0800 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2020-11-23 13:14:10 -0800 |
commit | 473b8c15dec0c1ec613c86b94cfcf41bb9f7580b (patch) | |
tree | ec40234f114418b1fd4a79d58e17925b7fc58acf | |
parent | d3dd61046459494b7dfd0411631cd1d3c57c02d6 (diff) | |
parent | 45dcc04e5e34907251e1318cd7b1cfb636599abf (diff) | |
download | deqp-473b8c15dec0c1ec613c86b94cfcf41bb9f7580b.tar.gz |
Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I710d62102e6f5d696ef58617749401ac503783e1
Change-Id: I0af6accff796e324759022ed779cca3890f2dd8e
12 files changed, 82 insertions, 24 deletions
diff --git a/external/vulkancts/framework/vulkan/vkRenderDocUtil.cpp b/external/vulkancts/framework/vulkan/vkRenderDocUtil.cpp index a4423b4ad..f6ba0a59b 100644 --- a/external/vulkancts/framework/vulkan/vkRenderDocUtil.cpp +++ b/external/vulkancts/framework/vulkan/vkRenderDocUtil.cpp @@ -35,6 +35,8 @@ #if (DE_OS == DE_OS_WIN32) # define RENDERDOC_LIBRARY_NAME "renderdoc.dll" +#elif (DE_OS == DE_OS_ANDROID) +# define RENDERDOC_LIBRARY_NAME "libVkLayer_GLES_RenderDoc.so" #else # define RENDERDOC_LIBRARY_NAME "librenderdoc.so" #endif diff --git a/external/vulkancts/modules/vulkan/binding_model/vktBindingBufferDeviceAddressTests.cpp b/external/vulkancts/modules/vulkan/binding_model/vktBindingBufferDeviceAddressTests.cpp index 80a96c27d..79a75b25e 100644 --- a/external/vulkancts/modules/vulkan/binding_model/vktBindingBufferDeviceAddressTests.cpp +++ b/external/vulkancts/modules/vulkan/binding_model/vktBindingBufferDeviceAddressTests.cpp @@ -963,6 +963,8 @@ tcu::TestStatus BufferAddressTestInstance::iterate (void) Move<VkFramebuffer> framebuffer; de::MovePtr<BufferWithMemory> sbtBuffer; + m_context.getTestContext().touchWatchdogAndDisableIntervalTimeLimit(); + if (m_data.stage == STAGE_COMPUTE) { const Unique<VkShaderModule> shader(createShaderModule(vk, device, m_context.getBinaryCollection().get("test"), 0)); @@ -1216,6 +1218,8 @@ tcu::TestStatus BufferAddressTestInstance::iterate (void) pipeline = createGraphicsPipeline(vk, device, DE_NULL, &graphicsPipelineCreateInfo); } + m_context.getTestContext().touchWatchdogAndEnableIntervalTimeLimit(); + const VkImageMemoryBarrier imageBarrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // VkStructureType sType diff --git a/external/vulkancts/modules/vulkan/descriptor_indexing/vktDescriptorSetsIndexingTestsUtils.cpp b/external/vulkancts/modules/vulkan/descriptor_indexing/vktDescriptorSetsIndexingTestsUtils.cpp index c81b84508..22ef4eee6 100644 --- a/external/vulkancts/modules/vulkan/descriptor_indexing/vktDescriptorSetsIndexingTestsUtils.cpp +++ b/external/vulkancts/modules/vulkan/descriptor_indexing/vktDescriptorSetsIndexingTestsUtils.cpp @@ -730,7 +730,7 @@ deUint32 DeviceProperties::computeMaxPerStageDescriptorCount (VkDescriptorType d storageBuffersDynamic = deMinu32( deviceProps.limits.maxPerStageDescriptorStorageBuffers, deviceProps.limits.maxDescriptorSetStorageBuffersDynamic); // 8 sampledImages = deMinu32( deviceProps.limits.maxPerStageDescriptorSampledImages - reservedCount, deviceProps.limits.maxDescriptorSetSampledImages - reservedCount); // 1048576. storageImages = deMinu32( deviceProps.limits.maxPerStageDescriptorStorageImages, deviceProps.limits.maxDescriptorSetStorageImages); // 1048576 - inputAttachments = deMinu32( deviceProps.limits.maxPerStageDescriptorInputAttachments, deviceProps.limits.maxDescriptorSetInputAttachments); // 1048576 + inputAttachments = deMinu32( deviceProps.limits.maxPerStageDescriptorInputAttachments - 1, deviceProps.limits.maxDescriptorSetInputAttachments - 1); // 1048576. -1 because tests use a prime number + 1 to reference subpass input attachment in shader } // adding arbitrary upper bound limits to restrain the size of the test ( we are testing big arrays, not the maximum size arrays ) diff --git a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemBufferValidator.hpp b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemBufferValidator.hpp index e3eaf4a1c..fb3523004 100644 --- a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemBufferValidator.hpp +++ b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemBufferValidator.hpp @@ -82,17 +82,19 @@ template<typename T> class BufferValidator { public: - BufferValidator (const ValidationData<T> data) + BufferValidator (const ValidationData<T> data, vk::VkFormat format) : m_refData (data) , m_refDataStorage (*reinterpret_cast<ValidationDataStorage<T>*>( &std::vector<char>(sizeof(ValidationDataStorage<T>), '\0').front())) , m_bufferType (SAMPLER_BUFFER) + , m_format (format) { } - BufferValidator (const ValidationDataStorage<T> data) + BufferValidator (const ValidationDataStorage<T> data, vk::VkFormat format) : m_refData (*reinterpret_cast<ValidationData<T>*>( &std::vector<char>(sizeof(ValidationData<T>), '\0').front())) , m_refDataStorage (data) , m_bufferType (STORAGE_BUFFER) + , m_format (format) { } @@ -110,6 +112,7 @@ private: const ValidationDataStorage<T> m_refDataStorage; BufferType m_bufferType; + vk::VkFormat m_format; }; template<> @@ -239,7 +242,7 @@ bool BufferValidator<T>::validateBuffer (ProtectedContext& ctx, DE_NULL, // const void* pNext 0u, // VkBufferViewCreateFlags flags buffer, // VkBuffer buffer - vk::VK_FORMAT_R32G32B32A32_UINT, // VkFormat format + m_format, // VkFormat format 0u, // VkDeviceSize offset VK_WHOLE_SIZE // VkDeviceSize range }; diff --git a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemCopyImageToBufferTests.cpp b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemCopyImageToBufferTests.cpp index 1dedf15f2..b6f1a0103 100644 --- a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemCopyImageToBufferTests.cpp +++ b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemCopyImageToBufferTests.cpp @@ -82,10 +82,11 @@ public: const std::string& name, vk::VkClearColorValue fillValue, ValidationData<T> data, - CmdBufferType cmdBufferType) + CmdBufferType cmdBufferType, + vk::VkFormat format) : TestCase (testCtx, name, "Copy image to buffer.") , m_fillValue (fillValue) - , m_validator (data) + , m_validator (data, format) , m_cmdBufferType (cmdBufferType) { } @@ -366,7 +367,7 @@ tcu::TestCaseGroup* createCopyImageToFloatBufferTests(tcu::TestContext& testCtx, DE_ASSERT(testData[ndx].data.positions[3].x() < MAX_POSITION); const std::string name = "copy_" + de::toString(ndx + 1); - copyStaticTests->addChild(new CopyImageToBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), testData[ndx].fillValue, testData[ndx].data, cmdBufferType)); + copyStaticTests->addChild(new CopyImageToBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), testData[ndx].fillValue, testData[ndx].data, cmdBufferType, vk::VK_FORMAT_R32G32B32A32_SFLOAT)); } /* Add a few randomized tests */ @@ -394,7 +395,7 @@ tcu::TestCaseGroup* createCopyImageToFloatBufferTests(tcu::TestContext& testCtx, DE_ASSERT(data.positions[2].x() < MAX_POSITION); DE_ASSERT(data.positions[3].x() < MAX_POSITION); - copyRandomTests->addChild(new CopyImageToBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), clearValue.color, data, cmdBufferType)); + copyRandomTests->addChild(new CopyImageToBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), clearValue.color, data, cmdBufferType, vk::VK_FORMAT_R32G32B32A32_SFLOAT)); } std::string groupName = getCmdBufferTypeStr(cmdBufferType); diff --git a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemFillUpdateCopyBufferTests.cpp b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemFillUpdateCopyBufferTests.cpp index d9211b53f..9c6f9a413 100644 --- a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemFillUpdateCopyBufferTests.cpp +++ b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemFillUpdateCopyBufferTests.cpp @@ -99,10 +99,11 @@ public: deUint32 fillValue, ValidationData<T> data, CmdType cmdType, - CmdBufferType cmdBufferType) + CmdBufferType cmdBufferType, + vk::VkFormat format) : TestCase (testCtx, name, getTestTypeName(cmdType)) , m_fillValue (fillValue) - , m_validator (data) + , m_validator (data, format) , m_cmdType (cmdType) , m_cmdBufferType (cmdBufferType) { @@ -358,7 +359,7 @@ tcu::TestCaseGroup* createFillUpdateCopyBufferFloatTests (tcu::TestContext& test const std::string name = "test_" + de::toString(ndx + 1); staticTests->addChild(new FillUpdateCopyBufferTestCase<tcu::Vec4>( - testCtx, name.c_str(), testData[ndx].fillValue.uint, testData[ndx].data, cmdType, cmdBufferType)); + testCtx, name.c_str(), testData[ndx].fillValue.uint, testData[ndx].data, cmdType, cmdBufferType, vk::VK_FORMAT_R32G32B32A32_SFLOAT)); } /* Add a few randomized tests */ @@ -390,7 +391,7 @@ tcu::TestCaseGroup* createFillUpdateCopyBufferFloatTests (tcu::TestContext& test DE_ASSERT(data.positions[2].x() < MAX_POSITION); DE_ASSERT(data.positions[3].x() < MAX_POSITION); - randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), fillValue.uint, data, cmdType, cmdBufferType)); + randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::Vec4>(testCtx, name.c_str(), fillValue.uint, data, cmdType, cmdBufferType, vk::VK_FORMAT_R32G32B32A32_SFLOAT)); } const std::string groupName = getCmdBufferTypeStr(cmdBufferType); @@ -469,7 +470,7 @@ tcu::TestCaseGroup* createFillUpdateCopyBufferIntegerTests (tcu::TestContext& te const std::string name = "test_" + de::toString(ndx + 1); staticTests->addChild(new FillUpdateCopyBufferTestCase<tcu::IVec4>( - testCtx, name.c_str(), testData[ndx].fillValue.uint, testData[ndx].data, cmdType, cmdBufferType)); + testCtx, name.c_str(), testData[ndx].fillValue.uint, testData[ndx].data, cmdType, cmdBufferType, vk::VK_FORMAT_R32G32B32A32_SINT)); } /* Add a few randomized tests */ @@ -501,7 +502,7 @@ tcu::TestCaseGroup* createFillUpdateCopyBufferIntegerTests (tcu::TestContext& te DE_ASSERT(data.positions[2].x() < MAX_POSITION); DE_ASSERT(data.positions[3].x() < MAX_POSITION); - randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::IVec4>(testCtx, name.c_str(), fillValue.uint, data, cmdType, cmdBufferType)); + randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::IVec4>(testCtx, name.c_str(), fillValue.uint, data, cmdType, cmdBufferType, vk::VK_FORMAT_R32G32B32A32_SINT)); } const std::string groupName = getCmdBufferTypeStr(cmdBufferType); @@ -577,7 +578,7 @@ tcu::TestCaseGroup* createFillUpdateCopyBufferUnsignedTests (tcu::TestContext& t const std::string name = "test_" + de::toString(ndx + 1); staticTests->addChild(new FillUpdateCopyBufferTestCase<tcu::UVec4>( - testCtx, name.c_str(), testData[ndx].fillValue, testData[ndx].data, cmdType, cmdBufferType)); + testCtx, name.c_str(), testData[ndx].fillValue, testData[ndx].data, cmdType, cmdBufferType, vk::VK_FORMAT_R32G32B32A32_UINT)); } /* Add a few randomized tests */ @@ -605,7 +606,7 @@ tcu::TestCaseGroup* createFillUpdateCopyBufferUnsignedTests (tcu::TestContext& t DE_ASSERT(data.positions[2].x() < MAX_POSITION); DE_ASSERT(data.positions[3].x() < MAX_POSITION); - randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::UVec4>(testCtx, name.c_str(), fillValue, data, cmdType, cmdBufferType)); + randomTests->addChild(new FillUpdateCopyBufferTestCase<tcu::UVec4>(testCtx, name.c_str(), fillValue, data, cmdType, cmdBufferType, vk::VK_FORMAT_R32G32B32A32_UINT)); } const std::string groupName = getCmdBufferTypeStr(cmdBufferType); diff --git a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemStorageBufferTests.cpp b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemStorageBufferTests.cpp index 6d1980e78..0804ae310 100644 --- a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemStorageBufferTests.cpp +++ b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemStorageBufferTests.cpp @@ -202,12 +202,13 @@ public: const char* name, const tcu::UVec4 testInput, ValidationDataStorage<T> validationData, + vk::VkFormat format, const std::string& extraShader = "") : TestCase (testctx, name, getSSBOTestDescription(testType)) , m_testType (testType) , m_shaderType (shaderType) , m_testInput (testInput) - , m_validator (validationData) + , m_validator (validationData, format) , m_extraShader (extraShader) { } @@ -676,7 +677,7 @@ tcu::TestCaseGroup* createSpecifiedStorageBufferTests (tcu::TestContext& te for (size_t ndx = 0; ndx < testCount; ++ndx) { const std::string name = testTypeStr + "_" + de::toString(ndx + 1); - testGroup->addChild(new StorageBufferTestCase<tcu::UVec4>(testCtx, testType, shaderType, name.c_str(), testData[ndx].values, testData[ndx])); + testGroup->addChild(new StorageBufferTestCase<tcu::UVec4>(testCtx, testType, shaderType, name.c_str(), testData[ndx].values, testData[ndx], vk::VK_FORMAT_R32G32B32A32_UINT)); } return testGroup.release(); @@ -871,7 +872,7 @@ tcu::TestCaseGroup* createAtomicStorageBufferTests (tcu::TestContext& testctx) calculateAtomicOpData(atomicType, inputValue, atomicArg, atomicCall, refValue, testData[ndx].swapNdx); ValidationDataStorage<tcu::UVec4> validationData = { refValue }; - staticTests->addChild(new StorageBufferTestCase<tcu::UVec4>(testctx, SSBO_ATOMIC, shaderType, name.c_str(), inputValue, validationData, atomicCall)); + staticTests->addChild(new StorageBufferTestCase<tcu::UVec4>(testctx, SSBO_ATOMIC, shaderType, name.c_str(), inputValue, validationData, vk::VK_FORMAT_R32G32B32A32_UINT, atomicCall)); } de::MovePtr<tcu::TestCaseGroup> randomTests (new tcu::TestCaseGroup(testctx, "random", (atomicDesc + " with random input").c_str())); @@ -889,7 +890,7 @@ tcu::TestCaseGroup* createAtomicStorageBufferTests (tcu::TestContext& testctx) calculateAtomicOpData(atomicType, inputValue, atomicArg, atomicCall, refValue, ndx); ValidationDataStorage<tcu::UVec4> validationData = { refValue }; - randomTests->addChild(new StorageBufferTestCase<tcu::UVec4>(testctx, SSBO_ATOMIC, shaderType, name.c_str(), inputValue, validationData, atomicCall)); + randomTests->addChild(new StorageBufferTestCase<tcu::UVec4>(testctx, SSBO_ATOMIC, shaderType, name.c_str(), inputValue, validationData, vk::VK_FORMAT_R32G32B32A32_UINT, atomicCall)); } diff --git a/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp b/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp index 6146063a7..3d444edb0 100644 --- a/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp +++ b/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp @@ -2408,6 +2408,8 @@ tcu::TestStatus SSBOLayoutCaseInstance::iterate (void) }; vk::Move<vk::VkPipelineLayout> pipelineLayout(createPipelineLayout(vk, device, &pipelineLayoutParams)); + m_context.getTestContext().touchWatchdogAndDisableIntervalTimeLimit(); + vk::Move<vk::VkShaderModule> shaderModule (createShaderModule(vk, device, m_context.getBinaryCollection().get("compute"), 0)); const vk::VkPipelineShaderStageCreateInfo pipelineShaderStageParams = { @@ -2431,6 +2433,8 @@ tcu::TestStatus SSBOLayoutCaseInstance::iterate (void) }; vk::Move<vk::VkPipeline> pipeline(createComputePipeline(vk, device, DE_NULL, &pipelineCreateInfo)); + m_context.getTestContext().touchWatchdogAndEnableIntervalTimeLimit(); + vk::Move<vk::VkCommandPool> cmdPool (createCommandPool(vk, device, vk::VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, queueFamilyIndex)); vk::Move<vk::VkCommandBuffer> cmdBuffer (allocateCommandBuffer(vk, device, *cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY)); diff --git a/framework/common/tcuTestContext.cpp b/framework/common/tcuTestContext.cpp index 965d91815..3ae6f1fff 100644 --- a/framework/common/tcuTestContext.cpp +++ b/framework/common/tcuTestContext.cpp @@ -52,6 +52,18 @@ void TestContext::touchWatchdog (void) qpWatchDog_touch(m_watchDog); } +void TestContext::touchWatchdogAndDisableIntervalTimeLimit (void) +{ + if (m_watchDog) + qpWatchDog_touchAndDisableIntervalTimeLimit(m_watchDog); +} + +void TestContext::touchWatchdogAndEnableIntervalTimeLimit (void) +{ + if (m_watchDog) + qpWatchDog_touchAndEnableIntervalTimeLimit(m_watchDog); +} + void TestContext::setTestResult (qpTestResult testResult, const char* description) { m_testResult = testResult; diff --git a/framework/common/tcuTestContext.hpp b/framework/common/tcuTestContext.hpp index 0a8bddce7..8cc40dab6 100644 --- a/framework/common/tcuTestContext.hpp +++ b/framework/common/tcuTestContext.hpp @@ -57,6 +57,8 @@ public: Platform& getPlatform (void) { return m_platform; } void setTestResult (qpTestResult result, const char* description); void touchWatchdog (void); + void touchWatchdogAndDisableIntervalTimeLimit (void); + void touchWatchdogAndEnableIntervalTimeLimit (void); const CommandLine& getCommandLine (void) const { return m_cmdLine; } // API for test framework diff --git a/framework/qphelper/qpWatchDog.c b/framework/qphelper/qpWatchDog.c index c691aa217..7604fd9a8 100644 --- a/framework/qphelper/qpWatchDog.c +++ b/framework/qphelper/qpWatchDog.c @@ -49,6 +49,12 @@ struct qpWatchDog_s void* timeOutUserPtr; int totalTimeLimit; /* Total test case time limit in seconds */ int intervalTimeLimit; /* Iteration length limit in seconds */ + /* + Iteration time limit in seconds specified to the constructor. This is stored so that + intervalTimeLimit can be restored after qpWatchDog_touchAndDisableIntervalTimeLimit + is called. + */ + int defaultIntervalTimeLimit; volatile deUint64 resetTime; volatile deUint64 lastTouchTime; @@ -98,10 +104,11 @@ qpWatchDog* qpWatchDog_create (qpWatchDogFunc timeOutFunc, void* userPtr, int to DBGPRINT(("qpWatchDog::create(%ds, %ds)\n", totalTimeLimitSecs, intervalTimeLimitSecs)); - dog->timeOutFunc = timeOutFunc; - dog->timeOutUserPtr = userPtr; - dog->totalTimeLimit = totalTimeLimitSecs; - dog->intervalTimeLimit = intervalTimeLimitSecs; + dog->timeOutFunc = timeOutFunc; + dog->timeOutUserPtr = userPtr; + dog->totalTimeLimit = totalTimeLimitSecs; + dog->intervalTimeLimit = intervalTimeLimitSecs; + dog->defaultIntervalTimeLimit = intervalTimeLimitSecs; /* Reset (sets time values). */ qpWatchDog_reset(dog); @@ -149,3 +156,22 @@ void qpWatchDog_touch (qpWatchDog* dog) DBGPRINT(("qpWatchDog::touch()\n")); dog->lastTouchTime = deGetMicroseconds(); } + +/* + These function exists to allow the interval timer to be disabled for special cases + like very long shader compilations. Heavy code can be put between calls + to qpWatchDog_touchAndDisableIntervalTimeLimit and qpWatchDog_touchAndEnableIntervalTimeLimit + and during that period the interval time limit will become the same as the total + time limit. Afterwards, the interval timer is set back to its default. +*/ +void qpWatchDog_touchAndDisableIntervalTimeLimit(qpWatchDog *dog) +{ + dog->intervalTimeLimit = dog->totalTimeLimit; + qpWatchDog_touch(dog); +} + +void qpWatchDog_touchAndEnableIntervalTimeLimit(qpWatchDog *dog) +{ + dog->intervalTimeLimit = dog->defaultIntervalTimeLimit; + qpWatchDog_touch(dog); +} diff --git a/framework/qphelper/qpWatchDog.h b/framework/qphelper/qpWatchDog.h index 6247e6620..908eea1ab 100644 --- a/framework/qphelper/qpWatchDog.h +++ b/framework/qphelper/qpWatchDog.h @@ -43,6 +43,8 @@ qpWatchDog* qpWatchDog_create (qpWatchDogFunc watchDogFunc, void* userPtr, int void qpWatchDog_destroy (qpWatchDog* dog); void qpWatchDog_reset (qpWatchDog* dog); void qpWatchDog_touch (qpWatchDog* dog); +void qpWatchDog_touchAndDisableIntervalTimeLimit(qpWatchDog *dog); +void qpWatchDog_touchAndEnableIntervalTimeLimit(qpWatchDog *dog); DE_END_EXTERN_C |