mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[Vulkan] Enable VK_KHR_sampler_ycbcr_conversion
This commit is contained in:
parent
758db4ccb3
commit
fdcbf67623
|
|
@ -701,6 +701,7 @@ bool VulkanProvider::Initialize() {
|
||||||
std::memset(&device_extensions_, 0, sizeof(device_extensions_));
|
std::memset(&device_extensions_, 0, sizeof(device_extensions_));
|
||||||
if (device_properties_.apiVersion >= VK_MAKE_API_VERSION(0, 1, 1, 0)) {
|
if (device_properties_.apiVersion >= VK_MAKE_API_VERSION(0, 1, 1, 0)) {
|
||||||
device_extensions_.khr_dedicated_allocation = true;
|
device_extensions_.khr_dedicated_allocation = true;
|
||||||
|
device_extensions_.khr_sampler_ycbcr_conversion = true;
|
||||||
if (device_properties_.apiVersion >= VK_MAKE_API_VERSION(0, 1, 2, 0)) {
|
if (device_properties_.apiVersion >= VK_MAKE_API_VERSION(0, 1, 2, 0)) {
|
||||||
device_extensions_.khr_image_format_list = true;
|
device_extensions_.khr_image_format_list = true;
|
||||||
device_extensions_.khr_shader_float_controls = true;
|
device_extensions_.khr_shader_float_controls = true;
|
||||||
|
|
@ -723,6 +724,13 @@ bool VulkanProvider::Initialize() {
|
||||||
offsetof(DeviceExtensions, khr_image_format_list)},
|
offsetof(DeviceExtensions, khr_image_format_list)},
|
||||||
{"VK_KHR_portability_subset",
|
{"VK_KHR_portability_subset",
|
||||||
offsetof(DeviceExtensions, khr_portability_subset)},
|
offsetof(DeviceExtensions, khr_portability_subset)},
|
||||||
|
// While vkGetPhysicalDeviceFormatProperties should be used to check the
|
||||||
|
// format support (device support for Y'CbCr formats is not required by
|
||||||
|
// this extension or by Vulkan 1.1), still adding
|
||||||
|
// VK_KHR_sampler_ycbcr_conversion to this list to enable this extension
|
||||||
|
// on the device on Vulkan 1.0.
|
||||||
|
{"VK_KHR_sampler_ycbcr_conversion",
|
||||||
|
offsetof(DeviceExtensions, khr_sampler_ycbcr_conversion)},
|
||||||
{"VK_KHR_shader_float_controls",
|
{"VK_KHR_shader_float_controls",
|
||||||
offsetof(DeviceExtensions, khr_shader_float_controls)},
|
offsetof(DeviceExtensions, khr_shader_float_controls)},
|
||||||
{"VK_KHR_spirv_1_4", offsetof(DeviceExtensions, khr_spirv_1_4)},
|
{"VK_KHR_spirv_1_4", offsetof(DeviceExtensions, khr_spirv_1_4)},
|
||||||
|
|
@ -982,6 +990,8 @@ bool VulkanProvider::Initialize() {
|
||||||
XELOGVK(" * Triangle fans: {}",
|
XELOGVK(" * Triangle fans: {}",
|
||||||
device_portability_subset_features_.triangleFans ? "yes" : "no");
|
device_portability_subset_features_.triangleFans ? "yes" : "no");
|
||||||
}
|
}
|
||||||
|
XELOGVK("* VK_KHR_sampler_ycbcr_conversion: {}",
|
||||||
|
device_extensions_.khr_sampler_ycbcr_conversion ? "yes" : "no");
|
||||||
XELOGVK("* VK_KHR_shader_float_controls: {}",
|
XELOGVK("* VK_KHR_shader_float_controls: {}",
|
||||||
device_extensions_.khr_shader_float_controls ? "yes" : "no");
|
device_extensions_.khr_shader_float_controls ? "yes" : "no");
|
||||||
if (device_extensions_.khr_shader_float_controls) {
|
if (device_extensions_.khr_shader_float_controls) {
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,8 @@ class VulkanProvider : public GraphicsProvider {
|
||||||
bool khr_image_format_list;
|
bool khr_image_format_list;
|
||||||
// Requires the VK_KHR_get_physical_device_properties2 instance extension.
|
// Requires the VK_KHR_get_physical_device_properties2 instance extension.
|
||||||
bool khr_portability_subset;
|
bool khr_portability_subset;
|
||||||
|
// Core since 1.1.0.
|
||||||
|
bool khr_sampler_ycbcr_conversion;
|
||||||
// Core since 1.2.0.
|
// Core since 1.2.0.
|
||||||
bool khr_shader_float_controls;
|
bool khr_shader_float_controls;
|
||||||
// Core since 1.2.0.
|
// Core since 1.2.0.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue