diff --git a/cores/libretro-test-vulkan/libretro-test.c b/cores/libretro-test-vulkan/libretro-test.c index 554c0a7d56..7c5a27df5b 100644 --- a/cores/libretro-test-vulkan/libretro-test.c +++ b/cores/libretro-test-vulkan/libretro-test.c @@ -1002,10 +1002,24 @@ static void context_destroy(void) memset(&vk, 0, sizeof(vk)); } +static const VkApplicationInfo *get_application_info(void) +{ + static const VkApplicationInfo info = { + VK_STRUCTURE_TYPE_APPLICATION_INFO, + NULL, + "libretro-test-vulkan", + 0, + "libretro-test-vulkan", + 0, + VK_MAKE_VERSION(1, 0, 18), + }; + return &info; +} + static bool retro_init_hw_context(void) { hw_render.context_type = RETRO_HW_CONTEXT_VULKAN; - hw_render.version_major = VK_MAKE_VERSION(1, 0, 6); + hw_render.version_major = VK_MAKE_VERSION(1, 0, 18); hw_render.version_minor = 0; hw_render.context_reset = context_reset; hw_render.context_destroy = context_destroy; @@ -1013,6 +1027,16 @@ static bool retro_init_hw_context(void) if (!environ_cb(RETRO_ENVIRONMENT_SET_HW_RENDER, &hw_render)) return false; + static const struct retro_hw_render_context_negotiation_interface_vulkan iface = { + RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN, + RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN_VERSION, + + get_application_info, + NULL, + }; + + environ_cb(RETRO_ENVIRONMENT_SET_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE, (void*)&iface); + return true; }