Skip to content

Commit

Permalink
Enable image compression control.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Jul 8, 2024
1 parent 0528650 commit bf5923a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vulkan/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,18 @@ bool Context::create_device(VkPhysicalDevice gpu_, VkSurfaceKHR surface,
ext.supports_push_descriptor = true;
}

if (has_extension(VK_EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME))
{
enabled_extensions.push_back(VK_EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME);
ADD_CHAIN(ext.image_compression_control_features, IMAGE_COMPRESSION_CONTROL_FEATURES_EXT);
}

if (has_extension(VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME))
{
enabled_extensions.push_back(VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME);
ADD_CHAIN(ext.image_compression_control_swapchain_features, IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT);
}

if (ext.device_api_core_version >= VK_API_VERSION_1_3)
{
ext.supports_store_op_none = true;
Expand Down
2 changes: 2 additions & 0 deletions vulkan/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ struct DeviceFeatures
VkPhysicalDeviceMeshShaderPropertiesEXT mesh_shader_properties = {};
VkPhysicalDeviceIndexTypeUint8FeaturesEXT index_type_uint8_features = {};
VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT rgba10x6_formats_features = {};
VkPhysicalDeviceImageCompressionControlFeaturesEXT image_compression_control_features = {};
VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT image_compression_control_swapchain_features = {};

// Vendor
VkPhysicalDeviceComputeShaderDerivativesFeaturesNV compute_shader_derivative_features = {};
Expand Down

0 comments on commit bf5923a

Please sign in to comment.