From cf3dc150cbb3897787728586bef993d5854dbc72 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 1 Feb 2021 11:55:54 +0000 Subject: [PATCH] Test compute bindless feedback on vulkan --- .../tests/Vulkan/VK_Descriptor_Indexing.py | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/util/test/tests/Vulkan/VK_Descriptor_Indexing.py b/util/test/tests/Vulkan/VK_Descriptor_Indexing.py index 809204c76..5b1dca2d1 100644 --- a/util/test/tests/Vulkan/VK_Descriptor_Indexing.py +++ b/util/test/tests/Vulkan/VK_Descriptor_Indexing.py @@ -7,10 +7,27 @@ class VK_Descriptor_Indexing(rdtest.TestCase): def check_capture(self): - draw = self.find_draw("Draw") - + draw = self.find_draw("Dispatch") self.check(draw is not None) + self.controller.SetFrameEvent(draw.eventId, False) + pipe: rd.VKState = self.controller.GetVulkanPipelineState() + + if len(pipe.compute.descriptorSets) != 1: + raise rdtest.TestFailureException("Wrong number of compute sets is bound: {}, not 1" + .format(len(pipe.compute.descriptorSets))) + + binding = pipe.compute.descriptorSets[0].bindings[0] + + if binding.dynamicallyUsedCount != 1: + raise rdtest.TestFailureException("Compute bind 0 doesn't have the right used count {}" + .format(binding.dynamicallyUsedCount)) + + if not binding.binds[15].dynamicallyUsed: + raise rdtest.TestFailureException("Compute bind 0[15] isn't dynamically used") + + draw = self.find_draw("Draw") + self.check(draw is not None) self.controller.SetFrameEvent(draw.eventId, False) pipe: rd.VKState = self.controller.GetVulkanPipelineState() @@ -28,7 +45,8 @@ class VK_Descriptor_Indexing(rdtest.TestCase): } if len(pipe.graphics.descriptorSets) != 1: - raise rdtest.TestFailureException("Wrong number of sets is bound: {}, not 1".format(len(pipe.graphics.descriptorSets))) + raise rdtest.TestFailureException("Wrong number of sets is bound: {}, not 1" + .format(len(pipe.graphics.descriptorSets))) desc_set: rd.VKDescriptorSet = pipe.graphics.descriptorSets[0]