aboutsummaryrefslogtreecommitdiff
path: root/common/end2end/GfxstreamEnd2EndVkTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/end2end/GfxstreamEnd2EndVkTests.cpp')
-rw-r--r--common/end2end/GfxstreamEnd2EndVkTests.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/common/end2end/GfxstreamEnd2EndVkTests.cpp b/common/end2end/GfxstreamEnd2EndVkTests.cpp
index 87529ea3..d77acbf0 100644
--- a/common/end2end/GfxstreamEnd2EndVkTests.cpp
+++ b/common/end2end/GfxstreamEnd2EndVkTests.cpp
@@ -719,6 +719,33 @@ TEST_P(GfxstreamEnd2EndVkTest, DISABLED_AcquireImageAndroidWithFenceAndSemaphore
DoAcquireImageAndroidWithSync(/*withFence=*/true, /*withSemaphore=*/true);
}
+VKAPI_ATTR void VKAPI_CALL MemoryReportCallback(const VkDeviceMemoryReportCallbackDataEXT*, void*) {
+ // Unused
+}
+
+TEST_P(GfxstreamEnd2EndVkTest, DeviceMemoryReport) {
+ int userdata = 1;
+ vkhpp::DeviceDeviceMemoryReportCreateInfoEXT deviceDeviceMemoryReportInfo = {
+ .pfnUserCallback = &MemoryReportCallback,
+ .pUserData = &userdata,
+ };
+
+ auto [instance, physicalDevice, device, queue, queueFamilyIndex] =
+ VK_ASSERT(SetUpTypicalVkTestEnvironment({
+ .deviceExtensions = {{
+ VK_EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME,
+ }},
+ .deviceCreateInfoPNext = &deviceDeviceMemoryReportInfo,
+ }));
+
+ const vkhpp::MemoryAllocateInfo memoryAllocateInfo = {
+ .allocationSize = 1024,
+ .memoryTypeIndex = 0,
+ };
+ auto memory = device->allocateMemoryUnique(memoryAllocateInfo).value;
+ ASSERT_THAT(memory, IsValidHandle());
+}
+
std::vector<TestParams> GenerateTestCases() {
std::vector<TestParams> cases = {TestParams{
.with_gl = false,