Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_state_private.hh
| Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | public: | ||||
| virtual void image_bind(Texture *tex, int unit) = 0; | virtual void image_bind(Texture *tex, int unit) = 0; | ||||
| virtual void image_unbind(Texture *tex) = 0; | virtual void image_unbind(Texture *tex) = 0; | ||||
| virtual void image_unbind_all() = 0; | virtual void image_unbind_all() = 0; | ||||
| virtual void texture_unpack_row_length_set(uint len) = 0; | virtual void texture_unpack_row_length_set(uint len) = 0; | ||||
| }; | }; | ||||
| /** | |||||
| * GPUFence. | |||||
| */ | |||||
| class Fence { | |||||
| protected: | |||||
| bool signalled_ = false; | |||||
| public: | |||||
| Fence(){}; | |||||
| virtual ~Fence(){}; | |||||
| virtual void signal() = 0; | |||||
| virtual void wait() = 0; | |||||
| }; | |||||
| /* Syntactic sugar. */ | |||||
| static inline GPUFence *wrap(Fence *pixbuf) | |||||
| { | |||||
| return reinterpret_cast<GPUFence *>(pixbuf); | |||||
| } | |||||
| static inline Fence *unwrap(GPUFence *pixbuf) | |||||
| { | |||||
| return reinterpret_cast<Fence *>(pixbuf); | |||||
| } | |||||
| static inline const Fence *unwrap(const GPUFence *pixbuf) | |||||
| { | |||||
| return reinterpret_cast<const Fence *>(pixbuf); | |||||
| } | |||||
| } // namespace gpu | } // namespace gpu | ||||
| } // namespace blender | } // namespace blender | ||||