Commit Graph

1040 Commits

Author SHA1 Message Date
Flyinghead f7e227a4aa dx9: don't crash if creating a boxart texture fails. log and skip tex
Fix for MINIDUMP-5Q
2023-01-24 14:52:55 +01:00
Flyinghead f8372c51a7 Revert "wip headers"
This reverts commit e3e2c3a0d2.
2023-01-24 14:26:14 +01:00
scribam e3e2c3a0d2 wip headers 2023-01-23 18:29:04 +01:00
Flyinghead f96ce85365 dx11: attempt to recover if context reinit fails. More checks and logs 2023-01-23 12:20:10 +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 db9fbbaebf custom texture loader must be stopped before the tex cache is cleared
Fix for MINIDUMP-53
2023-01-22 17:22:04 +01:00
Flyinghead 31bd943d67 gl,vk: don't use linear mipmap filter with nearest
Fixes glitches in Railroad Tycoon II
Partially revert 15b21fff2b and
a9cabdc342
2023-01-21 11:32:28 +01:00
Flyinghead 3cf7cf0a7f network: Emulate BBA should not be changed once a game is started
Change UI to disable BBA toggle when game is started.
Refactor UI to use DisabledScope helper.
Make sure the network stack deletes the same device it initialized.

Tentative fix for MINIDUMP-4N
2023-01-20 14:52:27 +01:00
Flyinghead cecf16e65e dump textures: don't crash if malloc fails
Tentative fix for MINIDUMP-4P
2023-01-20 14:38:23 +01:00
Flyinghead 9954768636 dx11: simplify RenderFramebuffer for libretro and fix black frames
RA uses some shaders that need to be disabled (as in Render()).
Also the framebuffer texture can be returned directly.

might help Issue #865
2023-01-16 17:50:23 +01:00
Flyinghead 329e5ed467 android: allow starting games with intent while a game is running
stops and unload the current game then starts the new one
2023-01-15 20:02:03 +01:00
Flyinghead 7b49cc73ee gl,gl4: use correct framebuffer size for matrix when rtt'ing 2023-01-14 12:52:10 +01:00
Flyinghead a8c5af8425 dx: don't resize main framebuffer when rendering to texture
dx9 and dx11 renderers were wrongly resizing main framebuffer to 0,0
when rendering to a texture.

Fix for MINIDUMP-1W
2023-01-14 12:48:56 +01:00
Flyinghead 9fb69af355 dx9: more error handling. more logging
Handle case where dx context init fails when switching to/from fast
forward.
Log errors.
2023-01-13 11:15:32 +01:00
Flyinghead d082993a7a ui: race condition when network times out while pressing start
Fix for MINIDUMP-2Y
2023-01-13 10:06:36 +01:00
Flyinghead 93fbd67a85 dx9: recover after screen lock. reset render state cache on entry
Device is lost for a long time when the screen is locked. Need to
continue calling present() to recover.
Reset render state cache on in RenderFramebuffer and RenderLastFrame
entry points.
More logging in renderer resizing.
2023-01-12 16:09:01 +01:00
Flyinghead 673fb26d6e android: threading fix. stop vibrator thread. allow screen saver
If the android activity is destroyed and the game unloaded, the gui's
game state wasn't updated, leading to a crash if resuming. Same for the
android game state if pausing, destroying then resuming.
tentative fix for MINIDUMP-27, MINIDUMP-25, MINIDUMP-23
Wait until emu is stopped in single-threaded.
Stop vibrator thread when view is detached
Allow the screen saver when a game isn't running.
2023-01-11 11:44:28 +01:00
Flyinghead 5fa98da17e dx9: stricter device reset failure check. More logging
tentative fix for MINIDUMP-1P
2023-01-11 09:44:00 +01:00
Flyinghead 2b70c73f80 gl: compilation and runtime fixes for GLES 2.0
Fix libretro compile errors with GLES2
Fix black screen at runtime with gles 2.0

Issue #859
2023-01-11 09:02:24 +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 fc479dbcc0 dx9: better handling of device lost. Fix fb not rendered if 1st
Handle case where device reset fails and continue attempting a reset.
tentative fix for MINIDUMP-12 and MINIDUMP-1Q

RenderFramebuffer wasn't working when first render after init
2023-01-09 18:01:44 +01:00
Flyinghead ae47ac19b8 dx11: check supported texture formats. Fix fb render not working if 1st
Check supported texture formats including mipmap and mipmap autogen.
Fall back to 8888 format.
tentative fix for MINIDUMP-17, MINIDUMP-1R and MINIDUMP-1M

RenderFramebuffer wasn't working if first render after init.
2023-01-09 17:50:46 +01:00
Flyinghead d3b2da8e3b gui: &ll game scanner game_list updates must be guarded by mutex
arcade_game_list doesn't need to however
tentative fix for MINIDUMP-1S
2023-01-09 09:14:03 +01:00
Flyinghead b37e6dc28d Merge remote-tracking branch 'origin/master' into dev 2023-01-08 11:19:48 +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 262a39cafb android: avoid UI race condition when stopping or resuming game
Gamepad events aren't delivered to the UI thread in Android. This can
lead to race conditions between the UI thread (calling gui_display_ui())
and the event thread (calling gui_open_settings()).

Issue #852
Fix for MINIDUMP-1D, MINIDUMP-1E, MINIDUMP-1K
2023-01-08 10:59:36 +01:00
Flyinghead b6491a3842 android: REICAST_HOME -> FLYCAST_HOME 2023-01-05 20:21:15 +01:00
Flyinghead 5a409dbe2c boxart: [] operator with non-existing key on const json is UB
Use json::at() instead.
Don't return pointer to GameBoxart to UI since it can be
replaced/deleted by the scraper thread.
Tentative fix for MINIDUMP-16
2023-01-04 12:09:09 +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 12bba31270 lr: fix incorrect DC framebuffer size 2023-01-03 11:03:31 +01:00
flyinghead 5ef80f0a17 dx11: disable scissor test when rendering framebuffer
Issue #847
2023-01-02 16:04:17 +01:00
Flyinghead 2a465d2f03 ios: check if jit is enabled. attempt to enable it by debugging self
JIT detection and enabling taken from ppsspp
Re-check JIT and restart AltServer discovery every 10 secs until JIT is
enabled.
Attempt to enable JIT by forking a process to debug the parent process.
(jailbroken devices)
2022-12-30 16:22:38 +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 bfc44f2b4e scraper: skip invalid textures. invalid CUE crash. memory leak
Sanity check of PVR texture params before converting it to avoid crash
(MINIDUMP-K).
.cue gdrom needs at least 3 tracks.
Delete disc if invalid.
2022-12-25 11:27:48 +01:00
Matt Phillips 4b53edb3bd
Basic CPU graphs using ImPlot (#838) 2022-12-23 16:07:35 +01:00
scribam 1c8e558e25 deps: update glslang and vulkan 2022-12-23 10:14:31 +01:00
Flyinghead 5703bc7df2 ui: arcade games appear twice if the game list is updated 2022-12-23 10:13:26 +01:00
Flyinghead 95a00a165a sentry: upload crashes after reading emu.cfg to comply with user choice
android: get rid of Send Logs button
2022-12-23 10:06:24 +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
Matt Phillips 6d913f42c8
Host-side profiler - initial commit (#834)
* Host-side (Flycast) profiler - initial commit

* Profiler - configurable frame warning time

* Compile fix for !DC_PROFILER
2022-12-21 11:24:11 +01:00
Flyinghead f3a6fb7d8b sentry.io integration 2022-12-20 21:52:46 +01:00
Flyinghead b6f73d96ca vk,dx: provoking vtx with sorted triangles. No depth write in per-strip
Provoking vertex wasn't set with sorted triangles (dx9, dx11, vulkan)
vk,dx9: No depth write in per-strip as in opengl and dx11.
2022-12-20 21:47:19 +01:00
Flyinghead f133e3cccb verify() must not call a function with side-effect 2022-12-16 20:40:23 +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
Matt Phillips 733a1fa73d Added USE_DX9 and USE_DX11 as configurable options in CMake 2022-12-15 22:48:38 +01:00
Flyinghead e3809ba058 gl: macOS build fix 2022-12-14 23:43:36 +01:00
Flyinghead 4d3de39c64 gl: no GL_PRIMITIVE_RESTART and glPrimitiveRestartIndex in GLES 2022-12-13 23:42:11 +01:00
Flyinghead f9feaa313b pvr: sort triangles during parse. Use primitive restart
Sort triangles during ta_parse. Use the same index as other polys. Store
results in rend_context.
Use primitive restart if available to avoid too many degenerate
triangles.
Update renderers.
2022-12-13 22:57:57 +01:00
Flyinghead 9781d8971a gl: use static buffers for quad vertices 2022-12-13 20:56:19 +01:00