Commit Graph

21 Commits

Author SHA1 Message Date
Flyinghead d789b57412 rend: get rid of globals for fog/palette updates & tex cache flush
Add state vars to Renderer
Use events to detect loading a state and terminating the game.
Don't present last rendered frame after game terminated.
2024-12-14 17:00:51 +01:00
Flyinghead 78fa3ee09e vulkan: delay updating imgui texture when driver has just been reset
Fixes crash when selecting a custom gamepad layout .png (android)
2024-12-03 20:42:54 +01:00
Wunkolo 5b343562b9 vk: Add `CommandBufferDebugScope` utility-type
Adds a new RAII-based utility type for adding diagnostic information to command buffers.
Enabled only when `VK_DEBUG` is set to `1`.
2024-10-09 19:47:14 +02:00
Wunk b20db6a8bb
vk: Disable LOD clamping in samplers (#1674)
This addresses the `BestPractices-Arm-vkCreateSampler-lod-clamping` message from ARM:
65b79bac61/layers/best_practices/bp_descriptor.cpp (L103-L110)

Rather than clamping the LOD in the samplers, instead rely on the Image-View's `vk::ImageSubresourceRange` to limit the number of sampled LODs.

Currently, only game-textures actually have MipMaps, so this does not introduce any additional mip-map sampling or filtering anywhere. If any code want's to actually limit the number of LODs sampled, then they would allocate an additional ImageView for the range of MipMaps to be sampled.

Co-authored-by: flyinghead <flyinghead@users.noreply.github.com>
2024-10-09 19:46:36 +02:00
Wunkolo b94acb70a6 vk: Use matching u/v/w sampler address-mode when possible
This addresses the `BestPractices-Arm-vkCreateSampler-different-wrapping-modes` message from ARM:
65b79bac61/layers/best_practices/bp_descriptor.cpp (L95-L100)

The `W`-axis for these samplers is always unused, it's never the case that these samplers are going to be used for 3D textures.
ARM suggests trying to keep all of the wrapping-modes the same if possible for performance.

`wRepeat` will be set to the same value as `vRepeat` to try and encourage all three wrapping-modes to be the same.
2024-10-09 19:40:20 +02:00
Flyinghead 6f0581032b save screenshot. add screenshot to savestates
Retrieve last frame rgb data (gl, vk, dx9, dx11).
Specific save screenshot code for android, iOS and UWP.
Add Save Screenshot emu key (F12 by default)
vk: defer deletion of in-flight textures when texture cache is cleared.
vk: fix issue when updating imgui textures after a render pass has begun
(achievements)
vk: palette texture not updated after a state has been loaded.
gl: Move opengl-specific stuff into opengl imgui driver.
savestate: Add non compressed header, following by screenshot png data,
before actual savestate.

Issue #842
2024-05-13 15:47:34 +02:00
Flyinghead 13302b87c8 move ui to its own folder 2024-05-07 22:23:51 +02:00
Flyinghead ceec01ac2e ui: use imgui for vmu on pause menu. toast notifications
Allow nearest sampling with imgui textures (vmu, crosshair)
Use raii for styles and colors
2024-05-06 21:31:04 +02:00
Flyinghead 43ba8953a2 vk: don't delete the ImGui driver when recreating the swap chain
It might be drawing at this point so just reset it.
2024-05-04 19:24:02 +02:00
scribam f3a774ab4e imgui: use fonts upload code from v1.90 2023-12-01 15:02:43 +01:00
scribam 105ab95efa deps: update imgui and implot 2023-11-25 17:08:01 +01:00
scribam 220fd51b27 deps: gather backends under imgui/backends directory
stay consistent with upstream
2023-05-04 09:26:01 +02:00
scribam d8137a967c
C++17 (#926)
* cmake: use c++17

* Use std::size

* Use std::make_unique

* Use std::clamp

* Use structured binding

* Use [[fallthrough]]

* Use enable_if_t/is_enum_v/is_integral_v/is_same_v

* Use if constexpr

* Use try_emplace

* Use auto for iterators

* Use inline variables
2023-02-18 13:24:34 +01:00
Matt Phillips b0a520fe18
Various GDB fixes and improvements (#832)
* Enabled GDB server, compile fix for MSVC, added GDB option to config

* GDB - 'vMustReplyEmpty' should not be explicitly handled, it is a test for how the target responds to unknown vpackets (which was incorrect)

* GDB wait for debugger option to allow debugging from bootstrap, and Event::Resume moved after renderer init so agent.interrupt() can pause the renderer

* Draw "Waiting for debugger", and fixed UI not rendering last frame before a state change

* Fixed GDB regs/mem endianness
2022-12-16 20:34:30 +01:00
Flyinghead 71e9420929 macOS: std::exception handler not catching FlycastException
Catch std::runtime_error instead
vk: Clear boxart texture cache before shutting down imgui driver
2022-08-14 18:39:09 +02:00
Flyinghead 7bcd8c819a arcade rom names update. non square boxart
Correct handling of non square images
Improve search for arcade game names
Retrieve other images if no boxart (titlescreen, screenshot)
Changed some arcade rom names to more friendly ones
2022-06-20 18:07:06 +02:00
Flyinghead 1523fafce0 vk: fix crash when resizing window in boxart mode 2022-06-17 16:17:58 +02:00
Flyinghead 54d92a11e8 build fixes 2022-06-15 22:38:05 +02:00
Flyinghead 5eb302898f box art fetch and display
Issue #22
2022-06-15 21:22:12 +02:00
Flyinghead a710674cd4 gui: init once. reset ui driver when needed. android 120+ Hz support
ImGui is now initialized once at startup and shutdown before
terminating. graphics initialization is independent.
Move more imgui stuff into imgui drivers.
switch: set scaling on external screen to 1.4, same as xbox
UI scaling refactoring.
2022-04-13 18:06:19 +02:00
Flyinghead ac5abd96bb ui: imgui driver, GraphicsContext interface, dx9 swap interval
Refactor imgui backend code into imgui drivers for gl, vk, dx9
Generic GraphicsContext interface for gl/vk/dx9 contexts
Simplify graphics api switching code
dx9, gl(sdl): set swap interval based on monitor refresh rate.
2021-11-10 20:35:30 +01:00