* Implement PNG & arb texture replacements
Fixes#119
For arb textures it's just making sure the file parsing can handle them. Idk if we need to do something special for it.
* Allow non-mipmapped textures to be replaced by mipmapped textures
Some of Henriko's textures (like the cuttable grass) rely on this.
The mipmap bool is no longer part of the runtime key.
* Make texture name the texture replacement key
Might as well? Helped me debug some stuff
* Oops that broke it bad
* libpng instead of spng
* I did it again
* Update libpng fetch
* Add zlib fetch
* Forgot to set the hash
* Add zlib redirect
* Add INCLUDE_DIR(S) to redirect
* Prefer shared for libpng
* Set CMAKE_FIND_PACKAGE_TARGETS_GLOBAL
---------
Co-authored-by: Luke Street <luke@street.dev>
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.
* 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>
* Sprinkle Tracy all over the project
* Move Tracy FetchContent to extern file, disable Tracy by default
* Use older CMake syntax for setting cache variables
* Fix test compile
* Rename ALIGN macro to AURORA_ALIGN
Needed because it conflicts with a macro in Apple's SDK headers on my macbook, and Tracy is now pulling in that header.