Commit Graph

8632 Commits

Author SHA1 Message Date
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
Henrik Rydgård
7c420381d5 OpenGL: Some paranoia checks around failed shader generation 2023-05-01 12:11:34 +02:00
Henrik Rydgård
d4249c1d73 OpenGL: Add an assert to catch a class of crash bugs early. Also assorted paranoia. 2023-05-01 11:56:26 +02:00
Henrik Rydgård
02880d7d7d Less broken behavior with integer scale factor + auto render resolution
Unfortunately these don't make the same decision (integer scale factor
tries to make sure the whole image can fit in the window, while auto
render resolution is glad to step up a level), but at least the user is
not faces with a black screen.

Not sure what's actually the best thing here, possibly this case should
be disallowed somehow.
2023-04-30 10:18:47 +02:00
Henrik Rydgård
6945deec01 Replace a LOT of sprintf with snprintf, and a few strcpy with truncate_cpy 2023-04-28 21:04:05 +02:00
Henrik Rydgård
68be93467e Fix some checks around translation. 2023-04-27 12:05:11 +02:00
Henrik Rydgård
6274eb7cae Follow the intent of the game's lookups rather than the practice, to reduce banding. 2023-04-25 23:17:40 +02:00
Henrik Rydgård
484f2c5954 Fix texcoord issue with SOCOM post effect 2023-04-25 23:02:12 +02:00
Henrik Rydgård
16b243b007 Centralize allocation of vertex decode buffers 2023-04-24 12:11:58 +02:00
Henrik Rydgård
321a112eff Rename SimpleBuf -> AlignedVector, use regular aligned memory instead of pages. 2023-04-24 12:04:34 +02:00
Henrik Rydgård
ef5abac1d3 Fix an oversight when saving replacement textures on scoped storage
We ended up not properly mangling the filename when changing extensions
if the file URI is an Android content URI.

Fixes #17320
2023-04-22 00:05:07 +02:00
Henrik Rydgård
c70b71f945 Fix night vision in D3D9/ES2 as well. 2023-04-21 00:05:27 +02:00
Henrik Rydgård
913c460fe0 Fix night vision in SOCOM games (in fact, fix the CLUT8 effect properly)
I failed to notice that when doing the shift to apply the "texel offset"
translating CLUT8 to a CLUT16 lookup, we also need to shift the mask
used to choose color components to read.
2023-04-20 23:46:45 +02:00
Henrik Rydgård
db13fa6e66 Apply the SOCOM fix to D3D9/ES2 depal shaders too 2023-04-20 10:10:26 +02:00
Unknown W. Brackets
b4d55713cb GPU: Always update size when shrinking.
Previously, we only updated size when we didn't need to recreate.
This would sometimes cause it to recreate over and over, hurting perf.
2023-04-19 23:42:02 -07:00
Henrik Rydgård
a20c620e16
Merge pull request #17297 from hrydgard/socom-clut-trickery
Workaround for some SOCOM games' misuse of CLUT8 to texture from framebuffer
2023-04-18 10:11:20 +02:00
Henrik Rydgård
b1f8830bd8 Don't try to present from little temp framebuffers used by Godfather to draw text.
The framebuffer does contain the top of the video frame at the present
time though, so things have partially gone well. However the rest of the
frame lies after it in VRAM. What we probably technically should do when
we see this is to assemble an image from both the framebuffer we find
and VRAM contents exceeding the range of that image, but seems kinda
impractical.

This works, but there seems to be some other issue with how the text is
rendered or copied. Could be a color precision issue confusing the game
I suppose.
2023-04-17 12:24:31 +02:00
Henrik Rydgård
9a3ff69091 Workaround for some SOCOM game's misuse of CLUT8 textures.
Emulating this correctly would be possible too but would only work at 1x
rendering resolution.
2023-04-17 09:34:26 +02:00
Unknown W. Brackets
0490ad0039 softgpu: Add NEON variants as well. 2023-04-16 13:09:56 -07:00
Unknown W. Brackets
860fc176d8 softgpu: Use more SSE in lighting. 2023-04-16 11:59:57 -07:00
Unknown W. Brackets
2868495cf8 softgpu: Use SSE for lighting ceil if available.
Tiny optimization, helps only a little.
2023-04-16 11:13:43 -07:00
Unknown W. Brackets
b5206df04f softgpu: Calc worldnormal a bit less often.
This is clearer anyway.
2023-04-16 10:16:32 -07:00
Unknown W. Brackets
59fb374c38 softgpu: Small optimization to clut updates. 2023-04-16 10:16:06 -07:00
Henrik Rydgård
b90833a462 OpenGL texture filtering: enforce key.mipEnable when we're forcing mips.
Fixes #17268, but I feel we could possibly get rid of the bool entirely
since we have maxlevel. Only GL and D3D even looks at this flag.

Oh well, that's for later.
2023-04-14 14:36:07 +02:00
Henrik Rydgård
178fe27263
Merge pull request #17269 from unknownbrackets/debugger-minor
Debugger: Avoid unaligned reads in expressions
2023-04-12 10:38:08 +02:00
Unknown W. Brackets
9cebfc31b3 Debugger: Avoid unaligned reads in expressions.
Potentially, a watch or break condition could crash if it was unaligned
between mirrors.  This might happen if it's not the condition you wanted,
especially.  Play it safe.
2023-04-12 01:14:30 -07:00
Henrik Rydgård
88899984e3 Correctly pass un-rotated width/height to presentation pipeline. 2023-04-11 22:27:26 +02:00
Henrik Rydgård
652612cf15 Fix issue in present where we applied the UV range at the wrong place when post-processing.
Fixes #17249
2023-04-11 22:27:26 +02:00
Henrik Rydgård
4f6e5e73a6 PresentationCommon: Simplify Y flip handling.
Don't manipulate the UVs, manipulate the vertex coordinates instead.

This will simplify the next change that will fix the pixel accuracy
problems in post-processing.
2023-04-10 21:58:34 +02:00
Henrik Rydgård
d26700820c Minor buildfix/cleanup 2023-04-09 22:47:34 +02:00
Henrik Rydgård
d630d3c751 Presentation: Switch from indexed trilist to plain tristrip
Insignificant performance difference, but nice to get rid of the index
buffer.
2023-04-08 13:02:18 +02:00
Henrik Rydgård
ccab375ddb
Merge pull request #17246 from hrydgard/i18n-indexing
I18N: Switch to getting categories by index instead of by string lookup
2023-04-08 09:20:51 +02:00
Henrik Rydgård
3616e0fb3c Revert "Turn off light ubershader generation on Broadcom GPUs."
See #16824

This reverts commit 1374fb040c.
2023-04-07 16:43:50 +02:00
Henrik Rydgård
ee6234ecb6 I18N: Switch to getting categories by index instead of by string lookup
Also gets rid of the shared_ptr usage, and generally makes things nicer.

Needed for later config refactorings, good to get in early.
2023-04-07 10:35:01 +02:00
Lubos
cc1dd22e0f OpenXR - Option to disable HUD detection added 2023-04-05 22:49:46 +02:00