Disabled enum formats of Surface
This commit is contained in:
parent
b468fa411d
commit
bde0c77911
@ -75,36 +75,36 @@ void GPUDeviceAttribute::Refresh()
|
||||
surface_format.format = VK_FORMAT_B8G8R8A8_SRGB;
|
||||
surface_format.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
|
||||
if (vkGetPhysicalDeviceSurfaceFormatsKHR(pdevice, surface, &format_count, nullptr) == VK_SUCCESS)
|
||||
{
|
||||
surface_formats_list.SetCount(format_count);
|
||||
//if (vkGetPhysicalDeviceSurfaceFormatsKHR(pdevice, surface, &format_count, nullptr) == VK_SUCCESS)
|
||||
//{
|
||||
// surface_formats_list.SetCount(format_count);
|
||||
|
||||
if (vkGetPhysicalDeviceSurfaceFormatsKHR(pdevice, surface, &format_count, surface_formats_list.GetData()) != VK_SUCCESS)
|
||||
{
|
||||
surface_formats_list.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
VkSurfaceFormatKHR *sf = surface_formats_list.GetData();
|
||||
// if (vkGetPhysicalDeviceSurfaceFormatsKHR(pdevice, surface, &format_count, surface_formats_list.GetData()) != VK_SUCCESS)
|
||||
// {
|
||||
// surface_formats_list.Clear();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// VkSurfaceFormatKHR *sf = surface_formats_list.GetData();
|
||||
|
||||
if (format_count == 1 && sf->format == VK_FORMAT_UNDEFINED)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
surface_format.format=VK_FORMAT_UNDEFINED;
|
||||
// if (format_count == 1 && sf->format == VK_FORMAT_UNDEFINED)
|
||||
// {
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// surface_format.format=VK_FORMAT_UNDEFINED;
|
||||
|
||||
for(uint32_t i=0;i<format_count;i++)
|
||||
{
|
||||
if(sf->format>surface_format.format
|
||||
&&sf->colorSpace==VK_COLOR_SPACE_SRGB_NONLINEAR_KHR)
|
||||
surface_format=*sf;
|
||||
// for(uint32_t i=0;i<format_count;i++)
|
||||
// {
|
||||
// if(sf->format>surface_format.format
|
||||
// &&sf->colorSpace==VK_COLOR_SPACE_SRGB_NONLINEAR_KHR)
|
||||
// surface_format=*sf;
|
||||
|
||||
++sf;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ++sf;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user