Commit Graph
3315 Commits
Author SHA1 Message Date
Henrik Rydgård 063cd18254 Simplify CPU upscaling code
Use the existing expandTo32bit mode in the texture decoder instead of
the backend-specific switches and stuff.

Just gets rid of a bunch of redundant code and makes further changes
easier.
2022-07-30 15:06:25 +02:00
Henrik Rydgård 9f1fdc6c02 Use PrepareBuildTexture from the Vulkan backend too 2022-07-30 10:45:03 +02:00
Henrik Rydgård d0d53091a8 Change from maxLevel to levelsToLoad, for better readability. Cleanup. 2022-07-30 10:45:02 +02:00
Henrik Rydgård 1e9d85cda1 Define texture loading plan semantics better, pre-port some from Vulkan 2022-07-30 10:44:28 +02:00
Henrik Rydgård 6220068fb1 Update PrepareBuildTexture 2022-07-30 10:44:28 +02:00
Henrik Rydgård 043989ca8a Use PrepareBuildTexture from D3D11 backend 2022-07-30 10:44:27 +02:00
Henrik Rydgård 167b837ed3 Break out the preparation part of BuildTexture from GLES 2022-07-30 10:44:27 +02:00
Henrik Rydgård 4165e146e6 Remove unused parameters to some conversion functions 2022-07-30 08:52:24 +02:00
Henrik Rydgård 6f484d0aee Remove unused useBGRA parameter 2022-07-30 08:52:24 +02:00
Unknown W. Brackets acc248164f Replacement: Clear cache on disable.
When lazy loading, let's clear cached replacement data on disable.
This is purges memory immediately, and also allows force-reloading
textures by toggling the setting.
2022-07-27 20:27:56 -07:00
Lubos d29b9011db OpenXR - VR settings added, better UI detection 2022-07-27 19:47:11 +02:00
Henrik Rydgård a44bee6f85 Fix bug in blue-to-alpha - alpha blending could be on when it shouldn't be.
Fixes #15732. (Split/Second environment mapping problem in the menu).
2022-07-27 10:59:39 +02:00
Lubos 9b8a9d3b32 Merge branch 'feature_openxr_quest' into feature_openxr_6dof 2022-07-26 18:00:40 +02:00
Lubos 0c208d192b OpenXR - Basic look around implementation 2022-07-25 18:47:54 +02:00
Henrik Rydgård c9a37ec6b9 Remove bool that was always true in state mapping. 2022-07-24 21:04:54 +02:00
Henrik RydgårdandGitHub 3c88183d0d Merge pull request #15717 from hrydgard/render-target-y-offset
Allows "merging" render targets that overlap on the Y axis. Fixes Juiced 2
2022-07-24 18:48:21 +02:00
Henrik Rydgård 80f0f90af7 Revert the x-offset bpp fix temporarily. 2022-07-24 17:41:27 +02:00
Henrik Rydgård 89845eae7a Add GPU stat for number of depth copies per frame
Will be useful for evaluating #15700
2022-07-24 17:12:43 +02:00
Unknown W. BracketsandGitHub b02fa4ec00 Merge pull request #15718 from hrydgard/getpointer-const-cleanup
Split GetPointer into GetPointer and GetPointerWrite
2022-07-24 07:51:39 -07:00
Henrik Rydgård f523341351 Remove unnecessary parameters from MakePixelsTexture 2022-07-24 13:54:09 +02:00
Henrik Rydgård 881cc23965 Delete some unused code. 2022-07-24 13:54:04 +02:00
Henrik Rydgård e6403d7157 Split GetPointer into two versions, to help with const correctness 2022-07-24 13:26:19 +02:00
Henrik Rydgård 04a85b1da0 Allows "merging" render targets that overlap on the Y access. Fixes #7295 (Juiced 2)
To be safe, gating this behind the related AllowLargeFBTextureOffsets,
which is also required for the effect to work.

Additionally, fixes the offset check for X offsets, which I guess is a
very small risk.
2022-07-24 11:58:07 +02:00
Henrik Rydgård 1fd80646cb Mali driver bug workaround for driver 32+.
See #15661

Hope this small bias won't break things.
2022-07-17 22:53:10 +02:00
Henrik Rydgård 15f5ed81a7 Add a simple compat flag to workaround the Clone Wars issue, #12949
Could probably also be fixed by changing the heuristic a bit, but since
we're in heuristic land anyway and close to a release, I feel this is
the safest option.

Also sneaks in a logspam reduction
2022-07-15 11:44:51 +02:00
Henrik Rydgård 0ff8c721e4 Improve comment, variable name 2022-07-12 00:17:26 +02:00
Henrik Rydgård e52e9094ca Vulkan fragment shaders: Don't opportunistically emit "layout (early_fragment_tests)"
The purpose of this is not really for optimization, it's to get a
specific behavior that we really don't care about. Drivers are pretty
good at getting this potential performance improvement automatically
if it's possible without changing the output.

git blame says I added it, heh.

Don't think it'll make much difference one way or another, though, but
trying to reduce complexity.
2022-07-12 00:14:22 +02:00
Henrik Rydgård c5a10a5501 Tweak the Mali stencil-test workaround to work for Surf's Up. See #15016 2022-07-11 16:57:52 +02:00
Henrik Rydgård 8922be2015 Out of performance paranoia, limit the Mali workaround to known affected games 2022-06-19 01:48:37 +02:00
Henrik Rydgård d0ea3b3284 Work around the Mali stencil discard bug the same way as the Adreno one. 2022-06-18 14:23:09 +02:00
Henrik Rydgård 63fdb99ca2 Shaun White Snowboarding: Use compat flag to eliminate a readback per frame
Should be a good performance improvement.

Just another case of a game copying a framebuffer to RAM, then texturing
directly from it.
2022-06-11 12:00:06 +02:00
Henrik Rydgård 751afde7c9 Echochrome lines: Remove UV offsets, avoid reading the destination (much better codegen) 2022-06-11 11:22:29 +02:00
Henrik Rydgård c82d8a04e0 Add centered line drawing for Echochrome. 2022-06-11 00:20:35 +02:00
Henrik Rydgård 493c17647a Take the absolute value when measuring pixel size for line expansion.
Fixes issues in Echochrome. Though still doesn't look fantastic.
2022-06-11 00:03:40 +02:00
Unknown W. Brackets 868568a744 Postshader: Avoid treating directories as files. 2022-05-25 20:04:47 -07:00
Henrik Rydgård 62808b89ef Fix discrepancy in how the LMODE flag is calculated between VS and FS 2022-05-03 00:06:42 +02:00
Henrik Rydgård 66ddbe9513 Remove the rather problematic limit on framebuffer copies 2022-05-01 12:49:19 +02:00
Henrik Rydgård 5868cf0f1c Convert the blueToAlpha bool to a usageFlag. KEEP instead of CLEAR for depth during reinterpret. 2022-04-30 18:17:29 +02:00
Henrik Rydgård 6b2dec91b5 Finish BlueToAlpha functionality 2022-04-30 18:17:17 +02:00
Henrik Rydgård 0c66087cc7 BlueToAlpha hack to avoid clearing the envmap in split/second :( 2022-04-30 18:17:17 +02:00
Henrik Rydgård 462972f7ea Add option to redirect blue to alpha if 565 mode is rendered and mask is 0x0FFFFF.
This is used by several games to render to the alpha channel of RGBA4444
images, which cannot normally be done directly on the PSP.

Can be used as a far more efficient replacement for
ReinterpretFramebuffers/ShaderColorBitmask
2022-04-30 18:17:16 +02:00
Henrik Rydgård 7be86264d0 Move framebufFormat to gstate_c, so we can override it 2022-04-30 18:16:09 +02:00
Henrik Rydgård 5a1ab67cf8 Dirty more state after reinterpret 2022-04-30 18:15:14 +02:00
Henrik Rydgård 6bc7a699fe Minor cleanups in framebuffer manager 2022-04-30 18:14:53 +02:00
Unknown W. Brackets 8779421a3e GLES: Reverse alphamask when comparing to CLUT.
The CLUT is already reversed.
2022-04-25 08:54:02 -07:00
Unknown W. BracketsandGitHub ec05bce068 Merge pull request #15502 from hrydgard/gran-turismo-regression-fix
Simplify alphasum checking for DXT textures, and fix a regression
2022-04-24 17:23:59 -07:00
Henrik Rydgård 35e7affa3e Simplify alphasum checking for DXT textures, and fix a regression
Got some weird blackness in the sky in Gran Turismo. This fixes that.
2022-04-25 00:54:47 +02:00
Henrik Rydgård 32df78a2cc Make the existing ReinterpretFramebuffers/ShaderColorBitmask path work for Split/Second
It took writing and debugging #15500 for me to understand what the issue with the old path was..

Much simpler alternative to #15500, or we could merge both but disable Split/Second
for this one. Needs some benchmarks I guess...
2022-04-25 00:11:09 +02:00
Henrik Rydgård 3d4c4aa5b5 Fix regression with CLUT16 textures. See #12188 2022-04-24 00:43:15 +02:00
Henrik Rydgård c52a5e9e25 Fix checks for the "fake mipmap" situation.
Fixes #15492
2022-04-22 22:59:20 +02:00