]> git.tdb.fi Git - libs/gl.git/blob - source/backends/vulkan/query_backend.cpp
Refresh target framebuffer before blitting
[libs/gl.git] / source / backends / vulkan / query_backend.cpp
1 #include <stdexcept>
2 #include "query.h"
3 #include "query_backend.h"
4 #include "vulkan.h"
5
6 using namespace std;
7
8 namespace Msp {
9 namespace GL {
10
11 VulkanQueryPool::VulkanQueryPool(unsigned t):
12         vulkan_type(get_vulkan_query_type(t))
13 {
14         throw logic_error("VulkanQueryPool is unimplemented");
15 }
16
17 VulkanQueryPool::VulkanQueryPool(VulkanQueryPool &&other):
18         vulkan_type(other.vulkan_type)
19 { }
20
21 VulkanQueryPool::~VulkanQueryPool()
22 { }
23
24 void VulkanQueryPool::resize()
25 { }
26
27 unsigned VulkanQueryPool::get_result(unsigned) const
28 {
29         return 0;
30 }
31
32
33 unsigned get_vulkan_query_type(unsigned t)
34 {
35         switch(t)
36         {
37         case OCCLUSION_QUERY: return VK_QUERY_TYPE_OCCLUSION;
38         default: throw invalid_argument("get_vulkan_query_type");
39         }
40 }
41
42 } // namespace GL
43 } // namespace Msp