mirror of
https://github.com/encounter/aurora.git
synced 2025-08-03 19:05:35 +00:00
Build fixes for linux and possibly macOS
This commit is contained in:
parent
d9de6603c7
commit
3b56e337c0
@ -212,7 +212,7 @@ void GXInitTlutObj(GXTlutObj* obj_, const void* data, GXTlutFmt format, u16 entr
|
||||
auto* obj = reinterpret_cast<GXTlutObj_*>(obj_);
|
||||
obj->ref = aurora::gfx::new_static_texture_2d(
|
||||
entries, 1, 1, texFmt, aurora::ArrayRef{static_cast<const u8*>(data), static_cast<size_t>(entries) * 2},
|
||||
"GXInitTlutObj");
|
||||
true, "GXInitTlutObj");
|
||||
}
|
||||
|
||||
void GXLoadTlut(const GXTlutObj* obj_, GXTlut idx) {
|
||||
|
@ -90,7 +90,7 @@ concept TextureDecoder = requires(T) {
|
||||
template <TextureDecoder T>
|
||||
static ByteBuffer DecodeTiled(uint32_t width, uint32_t height, uint32_t mips, ArrayRef<uint8_t> data) {
|
||||
const size_t texelCount = ComputeMippedTexelCount(width, height, mips);
|
||||
ByteBuffer buf{texelCount * sizeof(T::Target)};
|
||||
ByteBuffer buf{texelCount * sizeof(typename T::Target)};
|
||||
|
||||
uint32_t w = width;
|
||||
uint32_t h = height;
|
||||
@ -127,7 +127,7 @@ static ByteBuffer DecodeTiled(uint32_t width, uint32_t height, uint32_t mips, Ar
|
||||
|
||||
template <TextureDecoder T>
|
||||
static ByteBuffer DecodeLinear(uint32_t width, ArrayRef<uint8_t> data) {
|
||||
ByteBuffer buf{width * sizeof(T::Target)};
|
||||
ByteBuffer buf{width * sizeof(typename T::Target)};
|
||||
auto* target = reinterpret_cast<typename T::Target*>(buf.data());
|
||||
const auto* in = reinterpret_cast<const typename T::Source*>(data.data());
|
||||
for (uint32_t x = 0; x < width; ++x) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user