Commit Graph

119 Commits

Author SHA1 Message Date
Flyinghead c58ae4daac vulkan: terminate context if init fails
Avoids crash on exit
2023-10-16 14:19:47 +02: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 c637ae8281 Merge remote-tracking branch 'origin/master' into dev 2023-07-30 18:05:38 +02:00
Flyinghead 3bf817aea1 vk: reset semaphore index to 0 when recreating the swap chain
When frame dupe is enabled and switching to fast forward, the current
semaphore index might end up pointing past the end of the semaphore
array, causing a crash.
Issue #1138
2023-07-10 12:41:13 +02:00
scribam a3ebe02f85 vk: modernize device properties retrieval 2023-07-09 18:51:44 +02:00
vkedwardli 7cd308fcae
Realtime Video Routing (#1126)
* Syphon video routing with OpenGL and Vulkan (MacOS)
* Spout video routing with DX11 and OpenGL (Windows)
* Fix Xcode detection
2023-06-26 11:56:56 +02:00
scribam 220fd51b27 deps: gather backends under imgui/backends directory
stay consistent with upstream
2023-05-04 09:26:01 +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
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
Flyinghead 90e9f70a1a vk: fix resizing on wayland. validation errors with framebuffer render
wayland doesn't return the current surface dimensions in
getSurfaceCapabilities so we defaulted to 640x480. Instead use the
current display dimension as set by SDL.
Issue #648
Issue #898 (partial fix)

Vulkan validation errors when doing direct framebuffer rendering if fb
slots are skipped, since the corresponding fence isn't waited on.
Instead use an independent index to use them in sequential order.
2023-02-03 11:19:41 +01:00
Flyinghead aa79196d38 vk: only destroy surface if instance and surface aren't null
Don't request Arm debug layer VK_LAYER_ARM_AGA
Fix for MINIDUMP-5G
2023-01-23 12:11:43 +01:00
Flyinghead 285655f52d vk: check if vkEnumerateInstanceVersion is null before calling it
vkEnumerateInstanceVersion is only available in vk 1.1 so it might be
null after dynamic loading of entry points.

tentative fix for MINIDUMP-1Z, MINIDUMP-20 and MINIDUMP-21
2023-01-10 09:58:56 +01:00
Flyinghead 13df32ba3f vk: check vkGetInstanceProcAddr value before use and report error
Tentative fix for MINIDUMP-1F
2023-01-08 11:06:47 +01:00
Flyinghead 659ffa4406 vk: catch vulkan dyn loader exception when driver can't be loaded
Fixes MINIDUMP-R
2023-01-03 11:08:28 +01:00
Flyinghead 802f70fedd pvr: recover from renderer init failure
issue MINIDUMP-V
fix some warnings
2022-12-29 19:18:19 +01:00
scribam 5acfa7d3d6 vulkan: return an error if no physical devices found 2022-12-29 19:12:53 +01:00
Flyinghead b5d8cecd91 android: delay sentry upload to avoid broken pipe. Log more stuff
tentative fix for the broken pipe error when uploading to sentry on
android.
init log and sleep for 5 secs before upload
log git version, gpu name and version, renderer type and game id
2022-12-21 16:49:08 +01:00
Flyinghead d417237e64 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/emulator.cpp
2022-12-06 21:47:50 +01:00
Flyinghead 5b8e932509 move steam deck hack to sdl/sdl.cpp 2022-11-14 15:59:19 +01:00
scribam 993b705d8b vulkan: use dynamic dispatch loader 2022-11-09 17:20:05 +01:00
vkedwardli 605dc59f8d
Fix Steam Deck's Game Mode also 2022-11-04 16:01:06 +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
vkedwardli 0cbf6f6601
Fixing Steam Deck's wrong dpi caused by incorrect 60mm * 60mm EDID (#796) 2022-10-27 22:00:22 +02: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 1858cf3b33 Merge remote-tracking branch 'origin/master' into dev 2022-09-24 19:28:38 +02:00
Edward Li 2b8f5a7b9d Print correct version info for Vulkan and MoltenVK 2022-09-21 14:43:28 +02:00
scribam c9c1218234 vulkan: add deps as submodules and sync with Vulkan 1.3.224.1 2022-09-18 16:56:56 +02:00
Flyinghead 8e8935b9c4 pvr: xform matrix 240p support. screen stretching changes
Use FB_R_CTRL.vclk_div to detect progressive mode.
transform_matrix: Support non-4:3 aspect ratio such as 640x240. Don't
expect 480 height. Issue #690
Add black bars at top and bottom if screen aspect ratio is too low.
Issue #584.
Framebuffer size doesn't depend on screen stretching. Stretching is done
when blitting to screen.
lr: correct subsequent stretching when drawing vmus and xhair
2022-07-18 18:21:09 +02:00
Flyinghead 1523fafce0 vk: fix crash when resizing window in boxart mode 2022-06-17 16:17:58 +02:00
Flyinghead 5eb302898f box art fetch and display
Issue #22
2022-06-15 21:22:12 +02:00
Flyinghead 5ac0772a2a vk oit: out of pool memory with moltenvk during render to texture 2022-05-26 18:06:30 +02:00
Flyinghead cf36384481 use nearest/point sampling to draw framebuffer if nearest is forced 2022-05-03 17:55:02 +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 990a4ad583 vk: ignore pipeline cache if loading fails 2022-04-27 14:30:03 +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 a635fb3f77 test automation build fix, better exit 2022-04-03 20:46:50 +02:00
Flyinghead 1015a8c098 naomi2: vulkan support
oit: use #define instead of functions in GLSL
2022-03-12 17:56:46 +01:00
Flyinghead e02afb34d1 dx11: wrong shadow scale factor. vk: object leak. Code duplication
dx11: shadow scale factor inverted in per-pixel
vulkan: clear deleted overlay images when terminating
Use color struct for FOG_COL_VERT, FOG_COL_RAM, FOG_CLAMP_MIN,
FOG_CLAMP_MAX and VO_BORDER_COL. Avoid code duplication in renderers.
2021-12-17 13:40:42 +01:00
Flyinghead 71d016722e vulkan: fix various validation errors
oit: skip to new frame even if previous frame was never presented
libretro: quad pipeline used for overlay must use subpass 2 in per-pixel
overlay: delay destruction of VMUs images
libretro: WaitIdle on queue instead of wait_sync_index
2021-12-16 21:26:55 +01:00
flyinghead 2478b72a3e lr dx11: fix exit crash. Save shader cache where vk cache is 2021-12-14 16:48:23 +01:00
Flyinghead 7583db3bef vk: option to duplicate frames to simulate swap interval > 1
Issue #293
2021-11-10 20:55:22 +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 32d31e7644 vk: implement TranslucentPolygonDepthMask
Fixes Cosmic Smash
vma: instance is needed at init
Partial vk support for iOS
2021-11-04 09:13:47 +01:00
Flyinghead da3ed74c4e vulkan: moltenvk support on macOS - WIP
sdl: save/restore window position in config
2021-11-01 13:05:22 +01:00
Flyinghead 19bd6d0bca test automation clean up
less #ifdef
force mute audio
don't force vsync
2021-10-10 16:26:36 +02:00
Flyinghead 7fe2ab720f refactor screen_width/height 2021-09-27 20:29:23 +02:00
Flyinghead 18cecc8d38 gl,vk: use VO_BORDER_COL for clear color 2021-09-27 13:39:08 +02:00