Added shader state; WIP kernel objects
This commit is contained in:
parent
45788b9c82
commit
f79c9668a3
33 changed files with 576 additions and 68 deletions
28
src/common/serialization/atomic.h
Normal file
28
src/common/serialization/atomic.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
|
||||
namespace boost::serialization
|
||||
{
|
||||
template <class Archive, class T>
|
||||
void serialize(Archive& ar, std::atomic<T>& value, const unsigned int file_version)
|
||||
{
|
||||
boost::serialization::split_free(ar, value, file_version);
|
||||
}
|
||||
|
||||
template <class Archive, class T>
|
||||
void save(Archive& ar, const std::atomic<T>& value, const unsigned int file_version)
|
||||
{
|
||||
ar << value.load();
|
||||
}
|
||||
|
||||
template <class Archive, class T>
|
||||
void load(Archive& ar, std::atomic<T>& value, const unsigned int file_version)
|
||||
{
|
||||
T tmp;
|
||||
ar >> tmp;
|
||||
value.store(tmp);
|
||||
}
|
||||
|
||||
} // namespace boost::serialization
|
Loading…
Add table
Add a link
Reference in a new issue