31 Commits

Author SHA1 Message Date
Luke Street 71d8462557 Introduce render worker & revamp RmlUi backend 2026-06-04 23:43:13 -06:00
Luke Street c50f5cda92 Fix draw call count & dirty on currentPnMtx change 2026-05-14 17:06:57 -06:00
Luke Street 06722fb169 More gracefully handle buffer mapping errors 2026-05-09 09:18:05 -06:00
Luke Street 4cd8d2f009 Refactor viewport fit handling; use game viewport for RmlUi 2026-05-05 23:13:31 -06:00
Luke Street 8d9618dc4b Implement GXPeekZ (#138)
* Implement GXPeekZ

* Limit depth readback to 30hz
2026-04-24 21:55:17 -06:00
Luke Street 63cc5da669 Reduce bind group cache retention & clear on resize 2026-04-21 01:06:16 -06:00
Luke Street 5d420c9f73 Arbitrary mipmap detection & texture cleanup (#131) 2026-04-20 20:33:14 -06:00
Luke Street c05e7aace1 Viewport scaling rework & IR configuration (#127)
This is a breaking change: `GXSetViewport`, `GXSetScissor`, `GXSetTexCopySrc`, `GXSetTexCopyDst` now accept logical coords relative to the `VIConfigure` EFB size.

`GXSetViewportRender` and `GXSetScissorRender` are used to override the scaled viewport/scissor from the logical coords.
2026-04-18 14:10:32 -06:00
Luke Street eb17aab5e1 Delete some commented code 2026-04-12 18:56:26 -06:00
Luke Street bf46df6ba7 Simplify bind groups & improve caching 2026-04-12 18:55:35 -06:00
Luke Street aae772abfe Disable texture upload buffer 2026-04-10 18:18:29 -06:00
Luke Street 1533a48c7d Reworked pipeline cache with sqlite (#108)
* Reworked pipeline cache with sqlite

* Include <ranges> in common.cpp (sigh)

* Restore tracy thread names
2026-04-08 20:03:25 -06:00
Pieter-Jan Briers 50fda393a1 GX optimizations (#107)
* handle_draw optimization

1. cache vtxSize
2. remove heap allocation from draw call merging index buffer
3. move things that aren't on the "draw call merging hot path" out to other functions, to reduce stack frame size of handle_draw (it was previously using __chkstk)

* Make ByteBuffer expand exponentially

Fix half a second of startup time being just that.

* Babysit the compiler's inlining decisions

* Merged draw call idxBuf now a global static

* GXFlush() doesn't write NOPs to FIFO

I'm sure this made sense on actual hardware

* Don't bind unused textures/samplers

* Remove C++ RAII types from build_bind_groups

Most of this function's code was fucking with WebGPU AddRef and ReleaseRef. Seriously.

* More refs in common.hpp

* Index buffer in handle_draw_unmerged now not dynamically allocated for small draws

* Fix gx_test_stubs.cpp

* Some cleanup & renaming

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-04-08 19:51:06 -06:00
Luke Street f5c5917832 Reverse TextureUploadSize change 2026-04-06 23:06:35 -06:00
Irastris 500d81b22b Implement texture dumping & replacement (#91) 2026-04-06 21:04:01 -06:00
Luke Street 33ec54347d Add offscreen rendering support & GXSetTexCopyDst (#89)
* Add offscreen rendering support & GXSetTexCopyDst

* Try to fix alignment for MSVC
2026-04-02 23:01:14 -06:00
Luke Street 6b9f614d32 Texture refactor (#78)
- Removes special sampling logic from the GX shader in favor of performing conversions using separate draw calls and swizzling
- Simplifies texture bindings
- Much more accurate EFB copy handling (still incomplete but better)
  - Handle copy clears appropriately (color, alpha, depth) + GXSetDstAlpha copies
- Re-enables code for buffered texture uploads
- Adds `lastTextureUploadSize` to AuroraStats
- Use RG8 + swizzle for IA4/IA8
2026-04-01 00:49:28 -06:00
Pieter-Jan Briers eb960f8148 Add debug group/marker GX/GD API (#48)
* Add debug group/marker GX/GD API

* This keeps happening

* Don't crash if debug group stack underflows

* Missed a debug check

* Stubs

* Last stub?

* We hate C++

* Oh right release exists
2026-03-10 18:38:35 -06:00
Luke Street 856e40efb4 Reimplement draw call merging & refactor aurora::gx (#37) 2026-03-05 20:31:51 -07:00
Luke Street 6e96710482 Add pull_request event to CI; rename SetViewportCommand->Viewport 2026-03-05 10:17:03 -07:00
Dávid Balatoni 604232c4ff Implement GXGetViewportv (#33) 2026-03-05 10:09:26 -07:00
Luke Street a600b0b84c Rewrite attribute buffer, matrix & stream handling
Now array attributes (GXSetArray) will be properly
fetched based on the vertex format. Buffers are
still assumed to be byte-swapped to little-endian.

Stream handling completely redone and many issues
resolved.

Eliminates matrix transposes. AURORA_NATIVE_MATRIX
is no longer necessary and removed.
2025-04-14 17:17:59 -06:00
Luke Street 7760ef8409 Restructure logging and add fallback logging 2025-04-06 16:32:50 -06:00
Luke Street f058c5b7a5 Remove submodules, migrate to FetchContent 2025-04-04 22:01:52 -06:00
Luke Street 1016fbb36d Fix bind group caching 2025-04-04 01:59:30 -06:00