Skip to content

Commit

Permalink
Allow EXT and KHR version of load_store_op_none as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Mar 26, 2024
1 parent 6540e09 commit 93182ff
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion third_party/khronos/vulkan-headers
Submodule vulkan-headers updated 56 files
+4 −4 .reuse/dep5
+2 −0 BUILD.gn
+392 −0 include/vk_video/vulkan_video_codec_av1std.h
+109 −0 include/vk_video/vulkan_video_codec_av1std_decode.h
+1 −1 include/vk_video/vulkan_video_codec_h264std.h
+1 −1 include/vk_video/vulkan_video_codec_h264std_decode.h
+1 −1 include/vk_video/vulkan_video_codec_h264std_encode.h
+1 −1 include/vk_video/vulkan_video_codec_h265std.h
+1 −1 include/vk_video/vulkan_video_codec_h265std_decode.h
+1 −1 include/vk_video/vulkan_video_codec_h265std_encode.h
+1 −1 include/vk_video/vulkan_video_codecs_common.h
+1 −1 include/vulkan/vk_platform.h
+102 −14 include/vulkan/vulkan.cppm
+1 −1 include/vulkan/vulkan.h
+437 −67 include/vulkan/vulkan.hpp
+1 −1 include/vulkan/vulkan_android.h
+1 −1 include/vulkan/vulkan_beta.h
+320 −53 include/vulkan/vulkan_core.h
+1 −1 include/vulkan/vulkan_directfb.h
+64 −32 include/vulkan/vulkan_enums.hpp
+105 −35 include/vulkan/vulkan_extension_inspection.hpp
+1 −1 include/vulkan/vulkan_format_traits.hpp
+1 −1 include/vulkan/vulkan_fuchsia.h
+5,331 −2,504 include/vulkan/vulkan_funcs.hpp
+1 −1 include/vulkan/vulkan_ggp.h
+361 −297 include/vulkan/vulkan_handles.hpp
+278 −29 include/vulkan/vulkan_hash.hpp
+18 −1 include/vulkan/vulkan_hpp_macros.hpp
+1 −1 include/vulkan/vulkan_ios.h
+1 −1 include/vulkan/vulkan_macos.h
+1 −1 include/vulkan/vulkan_metal.h
+4,112 −2,710 include/vulkan/vulkan_raii.hpp
+1 −1 include/vulkan/vulkan_screen.h
+8 −1 include/vulkan/vulkan_shared.hpp
+174 −35 include/vulkan/vulkan_static_assertions.hpp
+2,790 −638 include/vulkan/vulkan_structs.hpp
+81 −32 include/vulkan/vulkan_to_string.hpp
+1 −1 include/vulkan/vulkan_vi.h
+1,015 −1 include/vulkan/vulkan_video.hpp
+1 −1 include/vulkan/vulkan_wayland.h
+1 −1 include/vulkan/vulkan_win32.h
+1 −1 include/vulkan/vulkan_xcb.h
+1 −1 include/vulkan/vulkan_xlib.h
+1 −1 include/vulkan/vulkan_xlib_xrandr.h
+1 −1 registry/apiconventions.py
+1 −1 registry/cgenerator.py
+1 −1 registry/generator.py
+3 −3 registry/parse_dependency.py
+153 −62 registry/profiles/VP_KHR_roadmap.json
+1 −1 registry/reg.py
+1 −1 registry/spec_tools/conventions.py
+1 −1 registry/spec_tools/util.py
+1,428 −721 registry/validusage.json
+486 −1 registry/video.xml
+578 −232 registry/vk.xml
+2 −1 registry/vkconventions.py
15 changes: 15 additions & 0 deletions vulkan/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,21 @@ bool Context::create_device(VkPhysicalDevice gpu_, VkSurfaceKHR surface,
ADD_CHAIN(ext.video_maintenance1_features, VIDEO_MAINTENANCE_1_FEATURES_KHR);
}

if (ext.device_api_core_version >= VK_API_VERSION_1_3)
{
ext.supports_store_op_none = true;
}
else if (has_extension(VK_KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME))
{
ext.supports_store_op_none = true;
enabled_extensions.push_back(VK_KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME);
}
else if (has_extension(VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME))
{
ext.supports_store_op_none = true;
enabled_extensions.push_back(VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME);
}

if ((flags & CONTEXT_CREATION_ENABLE_ADVANCED_WSI_BIT) != 0 && requires_swapchain)
{
if (has_extension(VK_KHR_PRESENT_ID_EXTENSION_NAME))
Expand Down
1 change: 1 addition & 0 deletions vulkan/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ struct DeviceFeatures
bool supports_hdr_metadata = false;
bool supports_swapchain_colorspace = false;
bool supports_surface_maintenance1 = false;
bool supports_store_op_none = false;

VkPhysicalDeviceFeatures enabled_features = {};

Expand Down
2 changes: 1 addition & 1 deletion vulkan/render_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ RenderPass::RenderPass(Hash hash, Device *device_, const RenderPassInfo &info)
}
else if (info.op_flags & RENDER_PASS_OP_PRESERVE_DEPTH_STENCIL_BIT)
{
ds_store_op = device->get_device_features().device_api_core_version >= VK_API_VERSION_1_3 ?
ds_store_op = device->get_device_features().supports_store_op_none ?
VK_ATTACHMENT_STORE_OP_NONE : VK_ATTACHMENT_STORE_OP_STORE;

if (ds_load_op != VK_ATTACHMENT_LOAD_OP_LOAD)
Expand Down

0 comments on commit 93182ff

Please sign in to comment.