24 Commits

Author SHA1 Message Date
Luke Street 531b8f7d92 WIP: Add aurora::gx::dl::optimize 2026-06-12 12:19:41 -06:00
Luke Street caf21ab92c Fix tests 2026-06-04 23:59:03 -06:00
Luke Street 71d8462557 Introduce render worker & revamp RmlUi backend 2026-06-04 23:43:13 -06:00
Irastris d10368e2b3 Always display mips and use Linear filter mode on texture replacements (#192) 2026-05-15 16:03:27 -04:00
Luke Street 143c6ffe2c Fix tests 2026-05-14 23:00:44 -06:00
Luke Street 4cd8d2f009 Refactor viewport fit handling; use game viewport for RmlUi 2026-05-05 23:13:31 -06:00
Luke Street a6a3d3a65a Add GXDestroyCopyTex function (#141) 2026-04-26 14:01:24 -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 c4c5b3f4af Fix texture cache leak with immediate GXDestroyTexObj 2026-04-21 14:13:13 -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
qwertyquerty 5fee2ac628 better bp caching, xf cache, optimize fifo with realloc and remove double lookups (#110)
* optimize fifo with realloc and remove double lookups

* bp cache, xf cache, and last pipeline ref cache

* remove double lookup from find/try_emplace

* change name

* Move xfRegCache

* Update gx_test_stubs.cpp

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-04-12 19:40:21 -06:00
Luke Street bf46df6ba7 Simplify bind groups & improve caching 2026-04-12 18:55:35 -06:00
Luke Street b1bf531884 FIFOify texture binding (#109)
* FIFOify texture binding

* Use __cntlzw helper

* Some cleanup

* Fix texture eviction & cleanup
2026-04-09 00:14:00 -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
Pieter-Jan Briers f61c219ef2 Add functionality to lock GX framebuffer aspect ratio (#97)
* Add functionality to lock GX framebuffer aspect ratio

This leaves the imgui (so including OS) framebuffer alone.

AuroraWindowSize now has new fields for the native framebuffer, the aspect ratio controls modify the existing fields.

* Fix from merge

* fix gx_test_stubs.cpp
2026-04-06 21:05:55 -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
Luke Street 29551d433a Fix tests 2026-03-29 13:02:19 -06:00
Luke Street 587e2e3cb6 Full GPU vertex parsing 2026-03-29 12:58:35 -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
Luke Street 5fa562dc06 🚀 Execute more FIFO conversion 🚀 2026-02-17 20:44:09 -07:00