mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Add additional proteciton & testing of unbound images in vulkan
This commit is contained in:
@@ -115,6 +115,10 @@ void main()
|
||||
const VkPhysicalDeviceMemoryProperties *props = NULL;
|
||||
vmaGetMemoryProperties(allocator, &props);
|
||||
|
||||
VkImage unboundImg = VK_NULL_HANDLE;
|
||||
vkCreateImage(device, preinitInfo, NULL, &unboundImg);
|
||||
setName(unboundImg, "Unbound image");
|
||||
|
||||
while(Running())
|
||||
{
|
||||
VkImage preinitImg = VK_NULL_HANDLE;
|
||||
|
||||
@@ -178,6 +178,15 @@ class TestCase:
|
||||
|
||||
return rd.ReplayOptions()
|
||||
|
||||
def get_capture_options(self):
|
||||
"""
|
||||
Method to overload if you want to override the capture options used.
|
||||
|
||||
:return: The renderdoc.CaptureOptions to use.
|
||||
"""
|
||||
|
||||
return rd.CaptureOptions()
|
||||
|
||||
def get_capture(self):
|
||||
"""
|
||||
Method to overload if not implementing a run(), using the default run which
|
||||
@@ -188,7 +197,7 @@ class TestCase:
|
||||
"""
|
||||
|
||||
if self.demos_test_name != '':
|
||||
return capture.run_and_capture(util.get_demos_binary(), self.demos_test_name, self.demos_frame_cap)
|
||||
return capture.run_and_capture(util.get_demos_binary(), self.demos_test_name, self.demos_frame_cap, opts=self.get_capture_options())
|
||||
|
||||
raise NotImplementedError("If run() is not implemented in a test, then"
|
||||
"get_capture() and check_capture() must be.")
|
||||
|
||||
@@ -5,6 +5,14 @@ import renderdoc as rd
|
||||
class VK_Image_Layouts(rdtest.TestCase):
|
||||
demos_test_name = 'VK_Image_Layouts'
|
||||
|
||||
def get_capture_options(self):
|
||||
opts = rd.CaptureOptions()
|
||||
|
||||
# Ref all resources to pull in the image with unbound data
|
||||
opts.refAllResources = True
|
||||
|
||||
return opts
|
||||
|
||||
def check_capture(self):
|
||||
self.controller.SetFrameEvent(0, False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user