Update GPU IOs (What a pain)

This commit is contained in:
2024-09-28 17:49:04 +02:00
parent 54b12b13e9
commit 3fab693049
9 changed files with 319 additions and 239 deletions

View File

@@ -8,23 +8,23 @@ namespace JabyEngine {
struct TexPage : public internal::LinkedElementCreator<TexPage> {
static constexpr bool is_render_primitive = true;
struct GPU_IO::GP0 value;
GPU_IO_Values::GP0 value;
static constexpr TexPage create(const PositionU16& tex_pos, TextureColorMode tex_color, SemiTransparency transparency = SemiTransparency::B_Half_add_F_Half, bool dither = false) {
return TexPage{.value = GPU_IO::Command::TexPage(tex_pos, transparency, tex_color, dither, false)};
return TexPage{.value = GPU_IO_Values::GP0::TexPage(tex_pos, transparency, tex_color, dither, false)};
}
};
struct CPU2VRAM {
struct GPU_IO::GP0 cmd;
struct GPU_IO::GP0 pos;
struct GPU_IO::GP0 size;
GPU_IO_Values::GP0 cmd;
GPU_IO_Values::GP0 pos;
GPU_IO_Values::GP0 size;
static constexpr CPU2VRAM create(const AreaU16& dst) {
return CPU2VRAM{
.cmd = GPU_IO::Command::CPU2VRAM_Blitting(),
.pos = GPU_IO::Command::TopLeftPosition(dst.position),
.size = GPU_IO::Command::WidthHeight(dst.size)
.cmd = GPU_IO_Values::GP0::CPU2VRAMBlitting(),
.pos = GPU_IO_Values::GP0::PostionTopLeft(dst.position),
.size = GPU_IO_Values::GP0::WidthHeight(dst.size)
};
}
};