Port GPU IOs
This commit is contained in:
@@ -57,6 +57,9 @@ namespace JabyEngine {
|
||||
|
||||
#define __declare_new_io_port(name, adr) \
|
||||
__declare_new_named_io_port(name, name, adr)
|
||||
|
||||
#define __declare_new_const_io_port(name, adr) \
|
||||
__declare_new_named_io_port(const name, name, adr)
|
||||
|
||||
#define __declare_new_io_port_array(name, adr, size) \
|
||||
static inline auto& name = reinterpret_cast<name##_v(&)[size]>(*reinterpret_cast<name##_v*>(adr))
|
||||
@@ -88,8 +91,9 @@ namespace JabyEngine {
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
constexpr name##_io_base& set(const IOValueSet::IOValueSetPair<type>& value) { \
|
||||
this->set(value.first, value.second); \
|
||||
template<typename S> \
|
||||
constexpr name##_io_base& set(const IOValueSet::IOValueSetPair<S>& value) { \
|
||||
this->set(value.first, static_cast<type>(value.second)); \
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
|
||||
Reference in New Issue
Block a user