Commit Graph

8667 Commits

Author SHA1 Message Date
Henrik Rydgård
49ecc01556 Fix image leak bug when pausing and we're just displaying a framebuffer in memory 2023-05-30 18:29:50 +02:00
Henrik Rydgård
7c4b9bac90 Cache textures created by MakePixelsTexture and reuse where appropriate. 2023-05-30 14:07:44 +02:00
Henrik Rydgård
ea552bc573 Add a new GPU stat (DrawPixels), kinda heavy since creates textures. GoW does 20-ish per frame. 2023-05-30 10:15:34 +02:00
Henrik Rydgård
f54f905be5 Vulkan: Remove support for other index types than 16-bit.
We don't have any use for them anyway.
2023-05-30 10:15:34 +02:00
Henrik Rydgård
ad8827ae70 Cleanup, address feedback 2023-05-26 10:28:10 +02:00
Henrik Rydgård
5c94a20ecb SoftGPU: implement CheckConfigChanged, have it check postshaders. Fixes #17511. 2023-05-26 09:48:51 +02:00
Henrik Rydgård
6cee08c74f Post-processing: Fix using limited UV ranges when there's a single upscaling filter in the chain.
Fixes #17499
2023-05-26 09:48:51 +02:00
Henrik Rydgård
80e47b7bd3 Only dirty the uniform UVSCALEOFFSET when really needed
Broken out from #17479

With OpenGL, greatly reduces the amount of glUniform4fv calls in many games (and
similar in the other backends).
2023-05-25 15:00:57 +02:00
Henrik Rydgård
72cf531759 Bump shader cache version 2023-05-25 10:19:01 +02:00
Henrik Rydgård
7178c0cd42 Restore fragmentshader ID flags double and texalpha. Add a ubershader mode that uses dynamic state. 2023-05-25 10:19:01 +02:00
Henrik Rydgård
bb6d696a84 Merge the tex "ubershader" uniforms into one for convenience 2023-05-25 10:19:01 +02:00
Henrik Rydgård
ebd36a4369 Reorganize the fragment shader bits 2023-05-25 10:19:01 +02:00
Henrik Rydgård
dfb446f89d Allow other backends than Vulkan to have GPU memory stats. Implement for GL. 2023-05-24 14:33:01 +02:00
Henrik Rydgård
f16f879b41 Some renaming to follow the standard of appending _ to member vars 2023-05-23 18:00:50 +02:00
Henrik Rydgård
84da0327d6 GLQueueRunner: Make DrawIndexed parameters more consistent. 2023-05-23 17:49:11 +02:00
Henrik Rydgård
f56ef63ef5 Remove redundant function 2023-05-23 16:50:25 +02:00
Henrik Rydgård
d51d1413a3 DrawEngineCommon: Rename decoded to decoded_ 2023-05-23 16:46:43 +02:00
Henrik Rydgård
d7ea2ebf8a GL: Add tags to push buffers for debug purposes. Double the default vertex buffer size. 2023-05-23 15:53:41 +02:00
Henrik Rydgård
cb38c43d7e GL render manager: Merge the two stencil commands, for more compact command lists 2023-05-23 09:14:23 +02:00
Henrik Rydgård
470ebbfe73 GL: When setting a stencil value for clear, override both func and op for consistency. 2023-05-23 09:14:23 +02:00
Henrik Rydgård
a4baed4c0c Minor GLPushBuffer cleanup (now same API as the VK one) 2023-05-23 08:41:09 +02:00
Henrik Rydgård
67a35d3476
Merge pull request #17356 from unknownbrackets/minor-cleanup
Cleanup some more string formats, mostly in debugger
2023-05-23 08:29:23 +02:00
Henrik Rydgård
05b6bbdc56 Add a trivial profiling tool to the OpenGL backend - meaasure the time it takes to run a frame of commands.
Accessed from the in-game dev menu just like the Vulkan frame profiler.

With this we can easily see that actually submitting the GL commands is often the bottleneck on old
devices like a Galaxy S3.
2023-05-17 14:38:11 +02:00
Henrik Rydgård
9512bc6174 Don't cache render target copies for shader blending, only cache copies for overlap
Fixes #17451, while also keeping the Dante performance fix from #17032.

Of course, it's possible that something else could slow down now... But
hopefully not. This could also fix other problems.
2023-05-11 12:04:29 +02:00
Henrik Rydgård
b27c427547 We always bind and draw together, so let's combine them to one command. 2023-05-10 10:56:25 +02:00
Henrik Rydgård
8f2069ef71 GLQueueRunner: Combine BindVertexBuffer with BindIndexBuffer 2023-05-10 09:23:10 +02:00
Henrik Rydgård
fd43807c4d New fragment shader optimization: Only clamp color output if needed. 2023-05-09 18:44:24 +02:00
Henrik Rydgård
b42670cf59 Manually revert the rest of the lmode optimization 2023-05-09 18:44:24 +02:00
Henrik Rydgård
0babac5c5f Manually revert "Remove LM flag from vshader too" (#16718)
Reverts #16718

Though maybe we can keep this one? Let's see.
2023-05-09 18:44:18 +02:00
Henrik Rydgård
f42c682d34 Revert "Merge pull request #16628 from hrydgard/remove-fog-fshader-flag"
This reverts commit 10dee90c83, reversing
changes made to 34c11c8acf.
2023-05-08 22:01:38 +02:00
Henrik Rydgård
14887d6b04 Bump shader cache version (should have done it in the release) 2023-05-06 16:15:32 +02:00
Henrik Rydgård
ff72203a06 Remove now-redundant check, add a TODO 2023-05-05 23:46:19 +02:00
Henrik Rydgård
640c4fe9e1 GPU: Remove JumpFast/CallFast. They only avoid a very quick check and not worth the unsafety. 2023-05-05 23:44:19 +02:00
Henrik Rydgård
7ddcf62955 Change TODO to a better idea 2023-05-04 09:00:48 +02:00
Henrik Rydgård
d56e27aa2c Let's have DispatchFlush check for drawcalls before calling DoFlush, too. 2023-05-03 23:49:41 +02:00
Henrik Rydgård
c80671d9ea Debug-assert that there's a renderpass in Flush instead of asserting, and skip if not.
buildfix
2023-05-03 23:49:38 +02:00
Henrik Rydgård
c9b7c815a1 ~GPU_Vulkan: Check that we still have a draw_ pointer before trying to drain the compile queue. 2023-05-03 22:33:34 +02:00
Henrik Rydgård
0e2fb13c61 Make sure we never end up with a null vertex decoder. 2023-05-03 22:22:54 +02:00
Henrik Rydgård
214d1d296a Add a couple of TODOs for the future (not appropriate for current release process) 2023-05-03 22:15:22 +02:00
Henrik Rydgård
2cca0b265e Vulkan: Turn off the ubershader on T880, T860 and T830 on old driver versions. 2023-05-03 11:53:32 +02:00
Henrik Rydgård
cee9d2bdd2 Delete outdated lines 2023-05-03 08:35:07 +02:00
Henrik Rydgård
c476d986f7 Bump the index/vertex cpu-side buffer sizes a little. Replaces #17387 2023-05-03 00:24:43 +02:00
Henrik Rydgård
52b7bf502f
Merge pull request #17392 from hrydgard/misc-crash-fixes
Misc crash fixes from mystery thread
2023-05-02 23:41:32 +02:00
Henrik Rydgård
97488c0a79 Vulkan: Before cleaning the shader managers, drain the shader compile queue.
Mainly paranoia, but might help with the mutex crash from #17364
2023-05-02 22:05:28 +02:00
Henrik Rydgård
dc96374eb2
Merge pull request #17380 from hrydgard/replacement-find-files
Pre-scan the root of texture packs for hash-named files.
2023-05-02 21:40:05 +02:00
Henrik Rydgård
ee7e8d7c06 Add a unit test, fix listing zip directories 2023-05-02 11:35:45 +02:00
Unknown W. Brackets
bd37e98299
Merge pull request #17382 from hrydgard/avoid-double-texreplace-load
Avoid double texture cache load.
2023-05-01 22:14:20 -07:00
Henrik Rydgård
bdd0eeb7c3 Avoid double texture cache load.
Texture packs are loaded from NotifyConfigChanged which is called
anyway.

Fixes #17381
2023-05-01 23:52:39 +02:00
Henrik Rydgård
d10fae7274 Scan the root of loaded texture packs to find all the hash-named files. 2023-05-01 23:23:37 +02:00
Henrik Rydgård
2e3a676d71 Support BC1,2,3 formats also if packed in a DX10-style DDS. 2023-05-01 20:55:31 +02:00