Browse Source

vulkan: Un-flip integer rgba8 formats

These are not flipped in OpenGL either, to my surprise, so I guess let's stay bug-for-bug compatible with the OpenGL back-end here.

See also #1169
rdb 1 year ago
parent
commit
16ad3090c7
1 changed files with 4 additions and 2 deletions
  1. 4 2
      panda/src/vulkandisplay/vulkanGraphicsStateGuardian.cxx

+ 4 - 2
panda/src/vulkandisplay/vulkanGraphicsStateGuardian.cxx

@@ -4676,9 +4676,11 @@ get_image_format(const Texture *texture) const {
   case Texture::F_rg8i:
   case Texture::F_rg8i:
     return (VkFormat)(VK_FORMAT_R8G8_UINT + is_signed);
     return (VkFormat)(VK_FORMAT_R8G8_UINT + is_signed);
   case Texture::F_rgb8i:
   case Texture::F_rgb8i:
-    return (VkFormat)(VK_FORMAT_B8G8R8_UINT + is_signed);
+    //XXX not flipped in OpenGL, so not flipped here
+    return (VkFormat)(VK_FORMAT_R8G8B8_UINT + is_signed);
   case Texture::F_rgba8i:
   case Texture::F_rgba8i:
-    return (VkFormat)(VK_FORMAT_B8G8R8A8_UINT + is_signed);
+    //XXX not flipped in OpenGL, so not flipped here
+    return (VkFormat)(VK_FORMAT_R8G8B8A8_UINT + is_signed);
   case Texture::F_r11_g11_b10:
   case Texture::F_r11_g11_b10:
     return VK_FORMAT_B10G11R11_UFLOAT_PACK32;
     return VK_FORMAT_B10G11R11_UFLOAT_PACK32;
   case Texture::F_rgb9_e5:
   case Texture::F_rgb9_e5: