Alexis Hetu | 1f23d8c | 2018-10-16 14:40:19 -0400 | [diff] [blame] | 1 | // Copyright 2018 The SwiftShader Authors. All Rights Reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | #ifndef VK_SEMAPHORE_HPP_ |
| 16 | #define VK_SEMAPHORE_HPP_ |
| 17 | |
| 18 | #include "VkObject.hpp" |
| 19 | |
| 20 | namespace vk |
| 21 | { |
| 22 | |
| 23 | class Semaphore : public Object<Semaphore, VkSemaphore> |
| 24 | { |
| 25 | public: |
| 26 | Semaphore(const VkSemaphoreCreateInfo* pCreateInfo, void* mem) {} |
| 27 | |
Alexis Hetu | 1f23d8c | 2018-10-16 14:40:19 -0400 | [diff] [blame] | 28 | static size_t ComputeRequiredAllocationSize(const VkSemaphoreCreateInfo* pCreateInfo) |
| 29 | { |
| 30 | return 0; |
| 31 | } |
| 32 | |
| 33 | void wait() |
| 34 | { |
| 35 | // Semaphores are noop for now |
| 36 | } |
| 37 | |
| 38 | void wait(const VkPipelineStageFlags& flag) |
| 39 | { |
| 40 | // VkPipelineStageFlags is the pipeline stage at which the semaphore wait will occur |
| 41 | |
| 42 | // Semaphores are noop for now |
| 43 | } |
| 44 | |
| 45 | void signal() |
| 46 | { |
| 47 | // Semaphores are noop for now |
| 48 | } |
| 49 | |
| 50 | private: |
| 51 | }; |
| 52 | |
| 53 | static inline Semaphore* Cast(VkSemaphore object) |
| 54 | { |
Alexis Hetu | bd4cf81 | 2019-06-14 15:14:07 -0400 | [diff] [blame] | 55 | return Semaphore::Cast(object); |
Alexis Hetu | 1f23d8c | 2018-10-16 14:40:19 -0400 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | } // namespace vk |
| 59 | |
| 60 | #endif // VK_SEMAPHORE_HPP_ |