Browse Source

Vk: fix handling of unsupported formats.

Until now, Vulkan supported all formats. With the 3D ASTC ones not
anymore and that uncovered a bug.
findsdl-include-root
Vladimír Vondruš 7 years ago
parent
commit
dc4c24da03
  1. 6
      src/Magnum/Vk/Enums.cpp

6
src/Magnum/Vk/Enums.cpp

@ -52,9 +52,11 @@ constexpr VkIndexType IndexTypeMapping[]{
};
#ifndef DOXYGEN_GENERATING_OUTPUT /* It gets *really* confused */
static_assert(VK_FORMAT_UNDEFINED == 0, "VK_FORMAT_UNDEFINED is assumed to be 0");
constexpr VkFormat FormatMapping[] {
#define _c(input, format) VK_FORMAT_ ## format,
#define _s(input) VkFormat(~UnsignedInt{}),
#define _s(input) {},
#include "Magnum/Vk/Implementation/formatMapping.hpp"
#undef _s
#undef _c
@ -62,7 +64,7 @@ constexpr VkFormat FormatMapping[] {
constexpr VkFormat CompressedFormatMapping[] {
#define _c(input, format) VK_FORMAT_ ## format,
#define _s(input) VkFormat(~UnsignedInt{}),
#define _s(input) {},
#include "Magnum/Vk/Implementation/compressedFormatMapping.hpp"
#undef _s
#undef _c

Loading…
Cancel
Save