Skip to content

Commit 93182ff

Browse files
committed
Allow EXT and KHR version of load_store_op_none as well.
1 parent 6540e09 commit 93182ff

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

third_party/khronos/vulkan-headers

Submodule vulkan-headers updated 56 files

vulkan/context.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,21 @@ bool Context::create_device(VkPhysicalDevice gpu_, VkSurfaceKHR surface,
13681368
ADD_CHAIN(ext.video_maintenance1_features, VIDEO_MAINTENANCE_1_FEATURES_KHR);
13691369
}
13701370

1371+
if (ext.device_api_core_version >= VK_API_VERSION_1_3)
1372+
{
1373+
ext.supports_store_op_none = true;
1374+
}
1375+
else if (has_extension(VK_KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME))
1376+
{
1377+
ext.supports_store_op_none = true;
1378+
enabled_extensions.push_back(VK_KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME);
1379+
}
1380+
else if (has_extension(VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME))
1381+
{
1382+
ext.supports_store_op_none = true;
1383+
enabled_extensions.push_back(VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME);
1384+
}
1385+
13711386
if ((flags & CONTEXT_CREATION_ENABLE_ADVANCED_WSI_BIT) != 0 && requires_swapchain)
13721387
{
13731388
if (has_extension(VK_KHR_PRESENT_ID_EXTENSION_NAME))

vulkan/context.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ struct DeviceFeatures
7171
bool supports_hdr_metadata = false;
7272
bool supports_swapchain_colorspace = false;
7373
bool supports_surface_maintenance1 = false;
74+
bool supports_store_op_none = false;
7475

7576
VkPhysicalDeviceFeatures enabled_features = {};
7677

vulkan/render_pass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ RenderPass::RenderPass(Hash hash, Device *device_, const RenderPassInfo &info)
182182
}
183183
else if (info.op_flags & RENDER_PASS_OP_PRESERVE_DEPTH_STENCIL_BIT)
184184
{
185-
ds_store_op = device->get_device_features().device_api_core_version >= VK_API_VERSION_1_3 ?
185+
ds_store_op = device->get_device_features().supports_store_op_none ?
186186
VK_ATTACHMENT_STORE_OP_NONE : VK_ATTACHMENT_STORE_OP_STORE;
187187

188188
if (ds_load_op != VK_ATTACHMENT_LOAD_OP_LOAD)

0 commit comments

Comments
 (0)