Commit Graph

329 Commits

Author SHA1 Message Date
Luke Street 2a9a7943f1 Make IMGUI_ENABLE_FREETYPE PUBLIC in target_compile_definitions 2026-04-09 23:03:41 -06:00
Pieter-Jan Briers 3bedc9950d Allow games to define the default PAD mapping (#111)
* Allow games to define the default PAD mapping

* Use a separate function call instead of adding it to AuroraConfig

* Rename NATIVE_BUTTON_INVALID
2026-04-09 19:03:53 -06:00
Dávid Balatoni f241595f24 Fix color shader error "cannot assign to value of type swizzle" (#112)
Suggested by encounter, it fixes this error:
[FATAL | aurora::gpu] WebGPU error 2: Error while parsing WGSL: :446:5 error: cannot assign to value of type 'swizzle<function, vec3<f32>, read_write, 4, 3>'
    prev.rgb = tevreg0.rgb;
2026-04-09 19:02:14 -06:00
Luke Street cc8de2aa22 Use linear sampling when resizing copy textures 2026-04-09 18:33:21 -06:00
Luke Street d15064a757 Use GXTexObj size as logical size for indtex 2026-04-09 18:32:52 -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
Luke Street c4825c70b9 Fix WGPUBindGroup leak 2026-04-08 20:31:18 -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
Pieter-Jan Briers 212d01769d Tracy integration (#106)
* 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.
2026-04-08 19:19:58 -06:00
Pieter-Jan Briers bec90f1b68 Set up dawn cache (#98)
* Set up dawn cache

Massively speeds up pipeline compilation on the second go around, especially for D3D12.

Currently, uses SQLite for the cache. SQLite is committed in as the "amalgam" blob, but I'm open for better ways to fetch it.

* Compress cache contents with zstd

More significantly for Vulkan, less so for D3D12.

* Store cache keys as XXH128 instead

This reduces the size of the D3D12 cache by a ridiculous amount

* Stop using exceptions for error handling

* FetchContent for sqlite; cleanup & make zstd optional

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-04-08 13:46:51 -06:00
Luke Street 6cdf594a94 Fix depth texture format in get_offscreen_textures 2026-04-07 22:48:29 -06:00
Luke Street b537e10211 Cache offscreen color textures as well 2026-04-07 19:01:41 -06:00
Luke Street 833122b894 Fix indMtx scaleExp (5-bits instead of 6) 2026-04-07 18:08:33 -06:00
Dávid Balatoni f173c876de Remove C++ syntax from card.h and pad.h (#105) 2026-04-07 12:36:06 -07:00
Phillip Stephens 81e43dab4f Use PAD_BUTTON_COUNT and PAD_AXIS_COUNT instead of hard coded magic values (#104) 2026-04-07 11:19:07 -07:00
Phillip Stephens f8fbfea24c Cleanup CARD and silence clang-tidy warnings, closes #102 (#103) 2026-04-07 10:22:17 -07:00
Luke Street f5c5917832 Reverse TextureUploadSize change 2026-04-06 23:06:35 -06:00
Luke Street 79507b88b9 Add vsync configuration 2026-04-06 23:04:43 -06:00
qwertyquerty c2ea378f3d Get dol pointer helper (#99)
* dol pointer helper

* dvd change

* change signature to use types

* c compatability and remove asserts
2026-04-06 22:18:36 -06:00
Roman Sandu 854ce1c178 Fixes for forest (#101) 2026-04-06 21:12:29 -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
CraftyBoss 5a23bcbd5e Set path of card image before CARDInit (#87)
* add ability to set path of card image before CARDInit

* add missing func to osx/linux variant of ResolveDolphinCardPath

* remove format specifiers in formatting funcs

* missed some oops

* refactor card loading to allow loading slot A and B if present

if neither slots have card images, a slot A image will be created at the save directory
this commit also changes card image names to "MemoryCardA/B.USA.raw" to fit with dolphins naming conventions (region code will always be USA unless changed in the macro, which could eventually be changed to be something in aurora config)

* only remove file name from CARDSetBasePath if not a directory
2026-04-05 23:14:15 -07:00
Roman Sandu 50163edfe7 OSAlloc impl + some header fixes (#96)
* Small refactors of headers for forest

* OSAlloc implementation
2026-04-05 11:40:38 -06:00