]> git.tdb.fi Git - libs/gl.git/blob - source/backends/vulkan/frameformat_backend.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / backends / vulkan / frameformat_backend.cpp
1 #include <stdexcept>
2 #include "frameformat.h"
3 #include "frameformat_backend.h"
4 #include "vulkan.h"
5
6 using namespace std;
7
8 namespace Msp {
9 namespace GL {
10
11 unsigned get_vulkan_samples(unsigned samples)
12 {
13         switch(samples)
14         {
15         case 1: return VK_SAMPLE_COUNT_1_BIT;
16         case 2: return VK_SAMPLE_COUNT_2_BIT;
17         case 4: return VK_SAMPLE_COUNT_4_BIT;
18         case 8: return VK_SAMPLE_COUNT_8_BIT;
19         case 16: return VK_SAMPLE_COUNT_16_BIT;
20         case 32: return VK_SAMPLE_COUNT_32_BIT;
21         case 64: return VK_SAMPLE_COUNT_64_BIT;
22         default: throw invalid_argument("get_vulkan_samples");
23         }
24 }
25
26 } // namespace GL
27 } // namespace Msp