Build fixes for linux and possibly macOS

This commit is contained in:
Phillip Stephens 2025-04-10 13:35:47 -07:00
parent d9de6603c7
commit 3b56e337c0
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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) {