Compare commits

..

No commits in common. "d7a6bc4ae46cc5deeadaa1213bd0bf91a70376ce" and "d9b676d1b29205e23ad3778feec5e76909eed000" have entirely different histories.

2 changed files with 2 additions and 7 deletions

View File

@ -248,17 +248,12 @@ constexpr Error MetalClawReaderTemplate<Reader>::field(const char*, HashMap<Stri
auto reader = child(""); auto reader = child("");
auto &handler = *reader.interface(); auto &handler = *reader.interface();
oxReturnError(handler.setTypeInfo("List", 0, {}, static_cast<std::size_t>(len))); oxReturnError(handler.setTypeInfo("List", 0, {}, static_cast<std::size_t>(len)));
// this loop body needs to be in a lambda because of the potential alloca call for (std::size_t i = 0; i < len; ++i) {
constexpr auto loopBody = [](auto& handler) {
oxRequire(keyLen, handler.stringLength(nullptr)); oxRequire(keyLen, handler.stringLength(nullptr));
auto wkey = ox_malloca(keyLen + 1, char, 0); auto wkey = ox_malloca(keyLen + 1, char, 0);
auto wkeyPtr = wkey.get(); auto wkeyPtr = wkey.get();
oxReturnError(handler.fieldCString("", &wkeyPtr, keyLen + 1)); oxReturnError(handler.fieldCString("", &wkeyPtr, keyLen + 1));
oxReturnError(handler.field("", &val->operator[](wkey.get()))); oxReturnError(handler.field("", &val->operator[](wkey.get())));
return OxError(0);
};
for (std::size_t i = 0; i < len; ++i) {
oxReturnError(loopBody(handler));
} }
} }
} }

View File

@ -357,9 +357,9 @@ ox::Error initGfx(
for (auto &bg : gctx.cbbs) { for (auto &bg : gctx.cbbs) {
initBackgroundBufferset(gctx.bgShader, bg); initBackgroundBufferset(gctx.bgShader, bg);
} }
initSpritesBufferset(gctx.spriteShader, gctx.spriteBlocks);
if (initParams.glInstallDrawer) { if (initParams.glInstallDrawer) {
turbine::gl::addDrawer(gctx.turbineCtx, &gctx.drawer); turbine::gl::addDrawer(gctx.turbineCtx, &gctx.drawer);
initSpritesBufferset(gctx.spriteShader, gctx.spriteBlocks);
} }
return {}; return {};
} }