Resolve some TODOs
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "../../Auxiliary/bits.hpp"
|
||||
#include "../../Auxiliary/type_traits.hpp"
|
||||
#include "../../System/IOPorts/gpu_io.hpp"
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace GPU {
|
||||
@@ -38,14 +39,14 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
enable_if<!is_pointer<T>::value, T&>::type concat(T& obj) {
|
||||
enable_if<!is_pointer<T>::value, Link&>::type concat(T& obj) {
|
||||
Link::set_adr(&obj);
|
||||
return obj;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
enable_if<!is_pointer<T>::value, const T&>::type concat(const T& obj) {
|
||||
return concat(const_cast<T&>(obj));
|
||||
enable_if<!is_pointer<T>::value, const Link&>::type concat(const T& obj) {
|
||||
return concat(const_cast<Link&>(obj));
|
||||
}
|
||||
|
||||
constexpr void terminate() {
|
||||
@@ -77,8 +78,7 @@ namespace JabyEngine {
|
||||
return &this->element;
|
||||
}
|
||||
|
||||
// TODO: Replace this magic number?
|
||||
static_assert((sizeof(T) >> 2) <= 16);
|
||||
static_assert((sizeof(T) >> 2) <= GPU_IO::FIFOWordSize);
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
|
@@ -216,6 +216,8 @@ namespace JabyEngine {
|
||||
static constexpr auto TexturePageY256 = Bit(4);
|
||||
};
|
||||
|
||||
static constexpr size_t FIFOWordSize = 16;
|
||||
|
||||
__declare_io_port(, GP0, 0x1F801810);
|
||||
__declare_io_port(, GP1, 0x1F801814);
|
||||
|
||||
|
Reference in New Issue
Block a user