diff options
author | dan sinclair <dj2@everburning.com> | 2019-01-24 15:42:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-24 15:42:21 -0500 |
commit | d03f04bb4ff2412ed0490fb3594d8530a8e1ad61 (patch) | |
tree | e60354ba98fc1c1905372eade5d4f653584ac389 /src/vulkan/descriptor.h | |
parent | c8091bac42db3a14b61cee2264e3931267724aa1 (diff) | |
download | amber-d03f04bb4ff2412ed0490fb3594d8530a8e1ad61.tar.gz |
[vulkan] Load vulkan methods through method. (#246)
This CL changes the vulkan backend to load all vulkan methods through
the vkGetInstanceProcAddr method instead of accessing directly.
Diffstat (limited to 'src/vulkan/descriptor.h')
-rw-r--r-- | src/vulkan/descriptor.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vulkan/descriptor.h b/src/vulkan/descriptor.h index 98ed544..66310a3 100644 --- a/src/vulkan/descriptor.h +++ b/src/vulkan/descriptor.h @@ -41,12 +41,14 @@ enum class DescriptorType : uint8_t { kInputAttachment, }; +class Device; + VkDescriptorType ToVkDescriptorType(DescriptorType type); class Descriptor { public: Descriptor(DescriptorType type, - VkDevice device, + Device* device, uint32_t desc_set, uint32_t binding); @@ -148,8 +150,6 @@ class Descriptor { VkDescriptorType descriptor_type, const VkBufferView& texel_view); - VkDevice GetDevice() const { return device_; } - std::vector<BufferInput>& GetBufferInputQueue() { return buffer_input_queue_; } @@ -167,6 +167,7 @@ class Descriptor { uint32_t descriptor_set_ = 0; uint32_t binding_ = 0; + Device* device_ = nullptr; private: VkWriteDescriptorSet GetWriteDescriptorSet( @@ -175,7 +176,6 @@ class Descriptor { void UpdateVkDescriptorSet(const VkWriteDescriptorSet& write); DescriptorType type_ = DescriptorType::kSampledImage; - VkDevice device_ = VK_NULL_HANDLE; // Each element of this queue contains information of what parts // of buffer must be updates with what values. This queue will be |