160 Commits

Author SHA1 Message Date
Luke Street 507fda8591 Implement GX_LINES and GX_LINESTRIP
Includes support for GXTexOffsets
2026-03-29 22:33:28 -06:00
Luke Street beb6fdbbbc Set window minimum size to 640x480 2026-03-29 15:18:24 -06:00
Luke Street 5ff8232fd7 Delete CMPR->DXT1 conversion; always use RGBA8
CMPR and DXT1 differ in alpha-blending behavior;
we should always decode to RGBA8 instead of using the
TextureCompressionBC feature path.
2026-03-29 15:07:24 -06:00
Luke Street f45a8a13f1 Fix GX_TG_MTX3x4 w/ GX_TG_TEX* src 2026-03-29 14:01:02 -06:00
Luke Street 8dc57b7826 Reduce FIFO write overhead & improve codegen 2026-03-29 13:51:04 -06:00
Luke Street d0490990f0 Avoid NaN normals (from Lars) 2026-03-29 12:58:35 -06:00
Luke Street d356e694bd Move _PC formats into GXTexFmt 2026-03-29 12:58:35 -06:00
Luke Street 587e2e3cb6 Full GPU vertex parsing 2026-03-29 12:58:35 -06:00
Pieter-Jan Briers d5c068653c Expose SDL_Gamepad* handle via PAD API (#68) 2026-03-29 11:05:05 -06:00
Pieter-Jan Briers fcc825636f Fix warning about log size narrowing to u32 (#71) 2026-03-29 10:51:30 -06:00
TakaRikka 236a7a5e9a fix incorrect t_TexCoord usage (#66) 2026-03-27 12:53:09 -06:00
PJB3005 21286ed94f Remove SDL gamepad map editing logic
No longer necessary with remapping UI, and actually breaks it.

Also use a SDL_GetGamepadType(ctrl) == SDL_GAMEPAD_TYPE_GAMECUBE where appropriate.
2026-03-27 18:44:47 +01:00
TakaRikka d76b70fc72 i8 palette support (#65) 2026-03-21 08:40:39 -06:00
TakaRikka 2919018795 symbol clash fix 2026-03-18 01:06:10 -07:00
TakaRikka 198b478e8b GXDraw from dolsdk2004 2026-03-18 00:54:21 -07:00
Pieter-Jan Briers da0e2886f3 asan: fix std::unique_ptr<wgpu::ChainedStruct> base cast (#63)
This is UB because of some C++ insanity. Moving to shared_ptr fixes it.
2026-03-16 10:09:25 -06:00
Pieter-Jan Briers 8cbbba0179 Add function to get ARAM real address (#59)
For audio implementation in TP.
2026-03-15 23:29:57 -06:00
Luke Street 8bba29f882 Fix sampler bindings after palette textures 2026-03-15 23:29:18 -06:00
Luke Street d8c719c6b2 Fix alpha matSrc differing from color matSrc 2026-03-15 23:29:04 -06:00
Luke Street 03b8643a15 Fix TEV overflow handling 2026-03-15 23:28:29 -06:00
Jeffrey Crowell 419643fd66 support Apple libc++ for OSGetTime
Apple libc++ currently ships <chrono> with the C++20 timezone database API
disabled so zoned_time/current_zone are unavailable there.
2026-03-14 20:08:12 -07:00
Max Roncace da18035dfb Fix OSGetTime implementation 2026-03-14 21:32:06 -04:00
Jeffrey Crowell 818b750d71 avoid redundant storage uploads and extra alignment padding (#55)
was hitting this crash:

  (lldb) bt
  * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    * frame #0: 0x00000001927915b0 libsystem_kernel.dylib`__pthread_kill + 8
      frame #1: 0x00000001927cb888 libsystem_pthread.dylib`pthread_kill + 296
      frame #2: 0x00000001926d0850 libsystem_c.dylib`abort + 124
      frame #3: 0x00000001060400f8 libgame.dylib`aurora::ByteBuffer::resize(this=0x0000000106b97358, size=8488606, zeroed=false) at common.hpp:141:9
      frame #4: 0x0000000106047cb8 libgame.dylib`aurora::ByteBuffer::append(this=0x0000000106b97358, data=0x00000004323e0ae0, size=145566) at common.hpp:96:5
      frame #5: 0x0000000106038230 libgame.dylib`aurora::gfx::push(target=0x0000000106b97358, data="b0\xf2", length=145566, alignment=256) at common.cpp:725:12
      frame #6: 0x0000000106038340 libgame.dylib`aurora::gfx::push_storage(data="b0\xf2", length=145566) at common.cpp:750:10
      frame #7: 0x000000010606c144 libgame.dylib`aurora::gx::fifo::handle_draw(cmd=152 '\x98', data="\x98", pos=0x000000016d931eac, size=1184, bigEndian=true)
  at command_processor.cpp:1668:26
      frame #8: 0x0000000106066434 libgame.dylib`aurora::gx::fifo::process(data="\x98", size=1184, bigEndian=true) at command_processor.cpp:628:7
      frame #9: 0x00000001060a00dc libgame.dylib`GXCallDisplayList(data=0x000000043247f980, nbytes=1184) at GXDispList.cpp:67:3
      frame #10: 0x0000000105f7d440 libgame.dylib`J3DShapeDraw::draw(this=0x0000000432839a28) const at J3DShapeDraw.cpp:79:5
      frame #11: 0x0000000105f7e97c libgame.dylib`J3DShape::drawFast(this=0x0000000432839960) const at J3DShape.cpp:337:32
      frame #12: 0x0000000105f793a0 libgame.dylib`J3DShapePacket::drawFast(this=0x00000004329be9e8) at J3DPacket.cpp:401:18
      frame #13: 0x0000000105f79280 libgame.dylib`J3DMatPacket::draw(this=0x00000004329bf448) at J3DPacket.cpp:236:17
      frame #14: 0x0000000105f98b3c libgame.dylib`J3DDrawBuffer::drawHead(this=0x000000042f513808) const at J3DDrawBuffer.cpp:232:21
      frame #15: 0x0000000105f98ce8 libgame.dylib`J3DDrawBuffer::draw(this=0x000000042f513808) const at J3DDrawBuffer.cpp:223:5
      frame #16: 0x000000010530cd50 libgame.dylib`dDlst_list_c::drawXluDrawList(this=0x0000000106bb99d0, pDrawBuf=0x000000042f513808) at d_drawlist.cpp:1835:15
      frame #17: 0x000000010528bc10 libgame.dylib`dDlst_list_c::drawXluListDarkBG(this=0x0000000106bb99d0) at d_drawlist.h:479:32
      frame #18: 0x0000000105289150 libgame.dylib`dComIfGd_drawXluListDarkBG() at d_com_inf_game.h:4729:33
      frame #19: 0x0000000105287dc0 libgame.dylib`mDoGph_Painter() at m_Do_graphic.cpp:1783:13
      frame #20: 0x00000001056325f0 libgame.dylib`cAPIGph_Painter() at c_API_graphic.cpp:10:5
      frame #21: 0x00000001052b6560 libgame.dylib`fpcM_Management(i_preExecuteFn=0x0000000000000000, i_postExecuteFn=(libgame.dylib`fapGm_After() at
  f_ap_game.cpp:718)) at f_pc_manager.cpp:64:13
      frame #22: 0x00000001052a5fa8 libgame.dylib`fapGm_Execute() at f_ap_game.cpp:735:5
      frame #23: 0x0000000105236db0 libgame.dylib`main01() at m_Do_main.cpp:177:9
      frame #24: 0x0000000105237e2c libgame.dylib`game_main(argc=1, argv=0x000000016d9335a0) at m_Do_main.cpp:298:5
      frame #25: 0x00000001024cd518 dusk`main(argc=1, argv=0x000000016d9335a0) at main.cpp:12:12
      frame #26: 0x0000000192401d54 dyld`start + 7184

  (lldb) f 4
  frame #4: 0x0000000106047cb8 libgame.dylib`aurora::ByteBuffer::append(this=0x0000000106b97358, data=0x00000004323e0ae0, size=145566) at common.hpp:96:5
     93  	  [[nodiscard]] bool empty() const noexcept { return m_length == 0; }
     94
     95  	  void append(const void* data, size_t size) {
  -> 96  	    resize(m_length + size, false);
      	    ^
     97  	    memcpy(m_data + m_length, data, size);
     98  	    m_length += size;
     99  	  }

› (lldb) p/x m_capacity
  (size_t) 0x0000000000800000
  (lldb) p m_capacity
  (size_t) 8388608
  (lldb) p/x size
  (size_t) 0x000000000081869e these were the size/capacity

essentially alignment padding was making the capacity overwhelmed.
2026-03-13 19:46:11 -07:00
Jasper St. Pierre 7721ccb27c gx: last stage fix 2026-03-13 01:13:12 -07:00
Jasper St. Pierre cf42406855 flush fifo before end_frame 2026-03-12 23:35:17 -07:00