Commit Graph

28 Commits

Author SHA1 Message Date
Flyinghead 03f2ef6df0 libretro: fix crash when terminating vulkan context early
Issue #1906
2025-05-03 10:57:34 +02:00
Flyinghead d0584b8652 vk: defer deleting framebuffers in ScreenDrawer and lr context
Defer deleting framebuffers and attachments in ScreenDrawer and lr
context when resizing.
Fixes crash when starting 240pSuite on the lr core.
2024-11-23 13:47:19 +01:00
Alexandre Bouvier 32d11dd89c fix missing include 2024-10-26 19:28:20 +02:00
Flyinghead 5aec6d05b0 vk: (lr) use one vk::DeviceQueueCreateInfo when possible
Using 2 with the same queue index causes a validation error and crash.
2024-10-14 16:39:33 +02:00
Wunk 4d73cc8e13
vk: Add `VK_EXT_provoking_vertex` optimization (#1681)
* vk: Add `VK_EXT_provoking_vertex` optimization

The dreamcast uses the last vertex as the provoking vertex, while vulkan uses the first vertex.
This requires an additional call to `setFirstProvokingVertex` to reorder the vertices for all incoming geometry.
With `VK_EXT_provoking_vertex`, the pipeline can designate that the provoking vertex is to be the last vertex, which removes the need to re-order incoming geometry on the CPU.

* vk: Propagate physical device API version to VMA

Allows VMA to make assumptions such as using the `*KHR` or non-`KHR` versions of certain function names.

* vk: Refactor libretro device initialization for `VK_EXT_provoking_vertex`

* vk: Top out at vulkan API version to VMA to 1.1

Despite the physical device possibly being 1.2 or 1.3, we only want up to 1.1. Otherwise we will be responsible for other API functions being resolved and loaded when passing to VMA.

* vk: Enable `VK_EXT_provoking_vertex` usage for ModVol and Final(OIT) pipeline

* vk: Enable `VK_EXT_provoking_vertex` for ModVol(OIT) pipeline

Pretty much anything handling dreamcast-geometry should use this extension when available

* vk: Additional `VK_EXT_provoking_vertex` pipeline fixes
2024-10-11 10:23:48 +02:00
Wunkolo a8bc1c12f4 vk: Optimize redundant `QuadBuffer` uploads
Hashes the contents of the `QuadBuffer` vertex-data such that data is only uploaded when the vertices actually change rather than every frame.
2024-10-09 19:40:59 +02:00
Flyinghead cc56b0fbae vk: multi render support
Fixes Quake III split screen vs. and MSR rear view mirror.
Issue #1511
2024-05-15 14:01:58 +02:00
Bobby Smith 8252a28e48 [Libretro] Check for per-pixel compatibility and hide the option if not supported 2024-03-17 17:55:23 +01:00
Flyinghead cab19ad54b libretro: crash at boot when checking for GPU vendor 2024-01-01 16:06:25 +01:00
Flyinghead 939e2bc68f vk: better deferred deletion. fix validation layer issues
Use raii-like mechanism to delete resources when not in use.
Fix several issues reported by validation layers (vtennis rtt, main
buffer size resizing, ...)
2023-12-03 19:18:16 +01:00
Flyinghead 2cd3ffb33f Revert "vk oit: add sync event between renderer and vk context on Mali
gpu"

This reverts commit abd9219347.
Issue #1234
2023-10-11 14:13:34 +02:00
Flyinghead abd9219347 vk oit: add sync event between renderer and vk context on Mali gpu
Use vk event to wait for renderer pipeline to finish before rendering
the final frame in vk context. This seems to help Mali gpus.
Issue #1234
2023-10-11 09:35:18 +02:00
Flyinghead fb4e653269 lr: crosshair not transparent with vk. Mazan can be played with gamepad
Use transparent quad pipeline to draw crosshairs and vmus
Allow mazan and touchscreen games (manic panic, tduno, ...) to be played
with a gamepad.
2023-04-15 15:45:11 +02:00
Flyinghead b94200233d vk: video shift support. refactor lr vk context
Shift the framebuffer according to VO_STARTX and VO_STARTY.
Issue #594
lr: draw overlay and manage shifting in vk context
2023-03-27 16:38:15 +02:00
Flyinghead d417237e64 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/emulator.cpp
2022-12-06 21:47:50 +01:00
scribam 993b705d8b vulkan: use dynamic dispatch loader 2022-11-09 17:20:05 +01:00
Flyinghead 94f3d80a75 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	CMakeLists.txt
#	core/hw/pvr/Renderer_if.cpp
#	core/oslib/audiobackend_alsa.cpp
#	core/rend/vulkan/desc_set.h
#	core/rend/vulkan/oit/oit_drawer.cpp
2022-11-02 20:12:34 +01:00
Flyinghead c1f0dd81d2 pvr: copy pvr regs at start_render time to avoid concurrent update
copy TA_GLOB_TILE_CLIP and SCALER_CTL to rend context when starting
render. Use rend context copy to calculate framebuffer size.
Fixes framebuffer size glitches in vf4 water stages.
lr: pass aspect ratio when resizing.

dx11: Wrong sizing of rotated games.

gl: test automation fixes.
2022-10-25 15:00:04 +02:00
Flyinghead 5722dc90f0 Full framebuffer emulation. Renderer interface changes
Helps for:
Densha de Go! 2, Issue #171
Vigilante 8, Issue #275
Xtreme Sports
Sonic Shuffle
The Ring of the Nibelungen
2022-10-23 16:32:42 +02:00
scribam 8426bcad27 vulkan: simplify function calls 2022-10-08 18:32:01 +02:00
Flyinghead b240da41e0 lr: use VK_API_VERSION_MAJOR/MINOR/PATCH 2022-09-26 11:19:15 +02:00
flyinghead 9103371362 vk: increase descSet pool size for storage buffers and input attachments
Fixes out of host memory error on macOS
Issue #619
2022-05-03 17:49:46 +02:00
Flyinghead c625cc68bf lr: increase vk descSet pool size. Insert card binding
vk: Use same descriptor set pool sizes for standalone and core
lr: bind "Insert Card" to L button (Naomi button 6)
lr: reset input descriptors when loading a new game
lr: don't reset maple devices in arcade mode: reloading eeprom cancels game settings
2022-04-17 13:23:16 +02:00
Flyinghead 6c38295d62 new naomi network protocol. vblank event. initd rumble support
new vblank event, used by cheats, lua and naomi net
new udp net protocol for naomi. rx/tx on vblank on emu thread.
input: rumble power configurable (Issue #158)
ui: rumble intensity slider, enable/disable upnp
aica: hook to consume midi out
decode midi out to simulate rumble for initd
upnp can now be disabled
2022-03-27 15:23:21 +02:00
flyinghead 2478b72a3e lr dx11: fix exit crash. Save shader cache where vk cache is 2021-12-14 16:48:23 +01: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
Flyinghead 986baccf83 lr build fix 2021-11-04 13:11:18 +01:00
Flyinghead b66e6560ca libretro: vulkan support 2021-07-08 12:47:00 +02:00