Commit Graph

164 Commits

Author SHA1 Message Date
Henrik Rydgård 28166cb35d Add "allocation slack" to our pushbuffers. Fixes a memory overwrite bug
Reported by Joseph on Discord.

Sometimes, things could align perfectly so allocations happend exactly
at the end of a pushbuffer. At the same time, we allow our vertex decoder to write an extra few
bytes if it needs to for speed. Unfortunately I missed this interaction,
resulting in some uncommon crashes that were especially common with
heavy-geometry things like modified GTA LCS with PS2 assets, for
example.

The problem was reported with Vulkan, but our OpenGL backend had the
same issue too.
2026-05-13 15:55:34 +02:00
Henrik Rydgård 48c6faa762 ImDebugger: Fix texture viewer in OpenGL mode and partially in D3D11 mode (swapped colors) 2026-02-17 18:19:23 +01:00
Henrik Rydgård 02d621c0f6 OpenGL ES: Correct check for 3D texture support. 2026-01-02 14:20:20 +01:00
Henrik Rydgård 1ac218960f OpenGL / FramebufferManager: Improve asserts for raster blits 2026-01-01 14:15:37 +01:00
Henrik Rydgård c999367471 Fix crash in DrawPixels in "skip framebuffer effects" mode 2025-12-15 17:18:17 +01:00
Henrik Rydgård 1efcaafd5a Add query for max texture size 2025-11-15 15:26:02 +01:00
Henrik Rydgård d265336912 Warning fix 2025-10-21 11:16:19 +02:00
Henrik Rydgård c5b1f2ffb0 OpenGL: Call SwapInterval properly 2025-10-20 22:45:42 +02:00
Henrik Rydgård 042cf87248 Rework the present mode settings, refactor. 2025-10-20 21:28:38 +02:00
Henrik Rydgård 176c55da25 Remove unused "interval" concept from presentation mode 2025-10-19 18:18:06 +02:00
Henrik Rydgård 6cfea96e58 Remove D3D9 support, to make future changes easier 2025-06-10 15:07:16 +02:00
Henrik Rydgård 4dd3621fa0 Remove some unnecessary <algorithm> includes. 2024-12-18 17:04:27 +01:00
Henrik Rydgård 111d0c872d Global rename of FBChannel to Aspect, also make it a class enum 2024-12-15 22:24:05 +01:00
Henrik Rydgård 6763c13f88 ImGui: Finish implementing pipeline switching for all backends 2024-11-27 01:19:05 +01:00
Henrik Rydgård 09779e0f44 ImGui drawing: Allow varying the pipeline when binding textures 2024-11-26 19:59:09 +01:00
Henrik Rydgård eaff38f161 Implement ImGui clipped batch texturing support in the other backends too 2024-11-26 09:38:30 +01:00
Henrik Rydgård c6c9e32d15 Fix the ImDebugger on OpenGL 2024-11-21 15:48:18 +01:00
Henrik Rydgård 472103d460 Back out the 32-bit index buffer support. Not actually needed for ImGui. 2024-11-04 23:14:39 +01:00
Henrik Rydgård 184a3ecf2a Code fixes. Correct the UWP fix 2024-11-04 23:14:39 +01:00
Henrik Rydgård 17a7c80cb1 Get it rendering on Vulkan and D3D11 (OpenGL is bugged though) 2024-11-04 23:14:39 +01:00
Henrik Rydgård d37c04079d Change the 2D matrix generation to query the coordinate convention from the draw context 2024-11-04 23:14:23 +01:00
Henrik Rydgård 8f8598c347 thin3d: Add partial support for 32-bit index buffers. Add DrawIndexedUP. 2024-11-04 23:14:22 +01:00
Henrik Rydgård a6a189c24d An old version of android had strict JNI validation of UTF-8 strings enabled. Let's pass it. 2024-10-22 11:02:26 +02:00
Henrik Rydgård e1527233d9 Add the EmuScreen pass assert on OpenGL as well 2024-10-14 14:35:35 +02:00
Henrik Rydgård 4d6905672e Bunch more linting 2024-10-10 11:57:10 +02:00
Henrik Rydgård e0c12c9547 More lint warning fixes 2024-10-10 10:52:45 +02:00
Henrik Rydgård b2d9ac54dd Make InfoField an "enum class", extract function FormatAPIVersion 2024-09-25 16:34:33 +02:00
Henrik Rydgård 2ba4eaf3dd First part of the const changes etc 2024-09-17 15:13:13 +02:00
Henrik Rydgård ed8f0c560a Merge branch 'master' into fix-core-gpu-always-true 2024-09-17 13:03:26 +02:00
Henrik Rydgård 665f03ff62 Add provoking vertex to caps, flip the flag around 2024-07-17 14:40:52 +02:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Herman Semenov c901e8c9bb [Core/GPU] Fixed condition blocks where result always true 2024-04-11 16:05:11 +03:00
Henrik Rydgård 126d88ecfc Back out clearly inconsequential/useless .reserve() calls 2023-12-29 08:27:56 +01:00
Herman Semenov b8748ae9e5 [Common/File/GPU/Render/Input] Using reserve if possible 2023-12-15 14:00:51 +03:00
Henrik Rydgård d891aaf9cd Remove code that pretended that we supported multiple vertex streams
Don't really see that we'll have much use for this feature, so simplify
it away. Only single vertex stream data is now supported by the thin3d
API.
2023-11-13 01:15:28 +01:00
Henrik Rydgård db245e1b34 Fix old texture leak in GLES hardware tessellation 2023-09-26 00:38:11 +02:00
Henrik Rydgård 13cfd9c3d6 Add Mesa as a known GPU driver "vendor". 2023-08-17 22:06:03 +02:00
Henrik Rydgård 691c8b8d8d Write to the frame time history from the other backends too. Needed for the upcoming timing code. 2023-08-16 12:22:49 +02:00
Henrik Rydgård ff6e118fff Get rid of a lot of ifdefs around presentation mode. Instead, set things dynamically. 2023-08-14 11:02:29 +02:00
Henrik Rydgård bec9c5611e Rename PresentationMode to PresentMode 2023-08-14 11:02:29 +02:00
Henrik Rydgård e651d6e59f Finish the separation of EndFrame and Present. 2023-08-13 18:40:35 +02:00
Henrik Rydgård 0ccd29f2ba Revert "OpenGL: Separate submit/present for this backend as well"
This reverts commit 0143d67f9b.
2023-08-12 13:35:21 +02:00
Henrik Rydgård ed9b033f7d D3D9/11: Move away from using context->SwapBuffers(), instead move present to draw_->Present(). 2023-08-11 01:57:02 +02:00
Henrik Rydgård 0143d67f9b OpenGL: Separate submit/present for this backend as well 2023-08-10 17:46:10 +02:00
Henrik Rydgård 0deefb82a9 thin3d: Merge BeginFrame and SetDebugFlags (set them every frame anyway) 2023-08-10 17:15:54 +02:00
Henrik Rydgård 1b6d4df3a4 Move the EndFrame/Present split one level out, to NativeApp.cpp 2023-08-10 09:59:29 +02:00
Henrik Rydgård 39d25ce91f D3D11: Allow setting the max frame latency 2023-08-04 11:53:51 +02:00
Henrik Rydgård be63ce3a4a Minor refactor allowing getting the GPU profile string outside games 2023-08-03 16:31:20 +02:00
Henrik Rydgård adc24b5001 OpenGL: Fix a wrong assert 2023-07-03 01:10:42 +02:00
Henrik Rydgård 2bee5b64e4 Add new icon cache, for caching small images.
It doesn't try to insert or fetch missing things itself, re-fetching is up to the caller.

This will be required for handling the many achievement icons.

Saving/loading the cache to a single file on disk is implemented but not
hooked up yet. It works without it, though of course will have to
re-fetch things on the next startup.
2023-06-18 14:11:12 +02:00