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.
* 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>
* 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>
* 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
- 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
* 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