blob: d3ecae4f3baa6bdb907debdb3ecfceb55d22aef5 [file] [log] [blame]
Alexis Hetu1f23d8c2018-10-16 14:40:19 -04001// 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
20namespace vk
21{
22
23class Semaphore : public Object<Semaphore, VkSemaphore>
24{
25public:
26 Semaphore(const VkSemaphoreCreateInfo* pCreateInfo, void* mem) {}
27
Alexis Hetu1f23d8c2018-10-16 14:40:19 -040028 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
50private:
51};
52
53static inline Semaphore* Cast(VkSemaphore object)
54{
Alexis Hetubd4cf812019-06-14 15:14:07 -040055 return Semaphore::Cast(object);
Alexis Hetu1f23d8c2018-10-16 14:40:19 -040056}
57
58} // namespace vk
59
60#endif // VK_SEMAPHORE_HPP_