vulkan: fix colors

This commit is contained in:
niki
2022-07-30 00:48:46 +02:00
parent 94c58e1599
commit 506cf8c210
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -1014,7 +1014,8 @@ namespace love {
VkSurfaceFormatKHR Graphics::chooseSwapSurfaceFormat(const std::vector<VkSurfaceFormatKHR>& availableFormats) {
for (const auto& availableFormat : availableFormats) {
if (availableFormat.format == VK_FORMAT_B8G8R8A8_SRGB && availableFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) {
// fixme: what if this format and colorspace is not available?
if (availableFormat.format == VK_FORMAT_B8G8R8A8_UNORM && availableFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) {
return availableFormat;
}
}
+1 -1
View File
@@ -202,7 +202,7 @@ namespace love {
textureFormat.internalFormatRepresentation = FORMATREPRESENTATION_UINT;
break;
case PIXELFORMAT_RGBA8_UNORM:
textureFormat.internalFormat = VK_FORMAT_R8G8B8A8_SRGB; // fixme?
textureFormat.internalFormat = VK_FORMAT_R8G8B8A8_UNORM;
textureFormat.internalFormatRepresentation = FORMATREPRESENTATION_FLOAT;
break;
case PIXELFORMAT_RGBA8_UNORM_sRGB: