Henrik Rydgård
70d1d8fa07
Replace the "GetCurrentStepId"-based state invalidation with callbacks
2022-11-24 10:52:42 +01:00
Henrik Rydgård
9bc0d662c9
Add more affected games to compat setting. Reorder checks, and check vendor flag.
2022-11-24 10:09:47 +01:00
Henrik Rydgård
39f2ddd128
Add compat flag / bug check for games on old Adreno/GL affected by #16015
...
See #16015
Partly derived from https://github.com/hrydgard/ppsspp/compare/master...unknownbrackets:ppsspp:adreno-deadlock
But this one surgically activates it only for the known affected games, to avoid any additional
performance regressions in the release.
Entirely untested.
2022-11-24 10:05:35 +01:00
Henrik Rydgård
f6fcc9e9a7
Add a way to view the "GPU_USE_" flags at runtime. Useful for sanity checking on-device.
2022-11-23 16:17:41 +01:00
Henrik Rydgård
cbfa4bfc8e
Centralize ClearCacheNextFrame
2022-11-21 18:13:13 +01:00
Henrik Rydgård
ce5a1b8b7e
Some minor "centralization"
2022-11-21 17:55:30 +01:00
Henrik Rydgård
eff4118769
One more refactoring step
2022-11-21 14:54:48 +01:00
Henrik Rydgård
37ec31dedd
Fix resizing issue. Took some refactoring.
2022-11-20 12:57:32 +01:00
Unknown W. Brackets
01d7d73438
GPU: Remove unused GPU_USE flag.
2022-11-13 08:09:57 -08:00
Unknown W. Brackets
4a367148e6
GPU: Centralize more GPU_USE flags, like depth.
2022-11-13 08:04:47 -08:00
Unknown W. Brackets
70c3205564
GPU: Correct equal depth checks.
2022-11-09 20:34:29 -08:00
Henrik Rydgård
2886c33c06
Merge pull request #16370 from lvonasek/compat_openxr_sonic
...
OpenXR - Sonic Rivals fixed
2022-11-09 21:28:34 +01:00
Lubos
b980f55645
OpenXR - Don't get mirroring from identity matrix
2022-11-09 19:07:45 +01:00
Unknown W. Brackets
1c0a37f252
GPU: Correct vertex decoder in software transform.
...
It was meant to flip to skin in decode.
2022-11-09 07:07:39 -08:00
Unknown W. Brackets
745d9ad320
GPU: Avoid enabling depth test pointlessly.
...
See #16015 . Attempting to avoid a driver bug.
2022-11-08 20:06:08 -08:00
Unknown W. Brackets
855d16ffb3
GPU: Prefer scaling depth to 16-bit if using 24.
...
In most cases, this will be a lot faster than pixel depth rounding, and
may avoid more issues in vertex rounding.
2022-11-08 20:06:08 -08:00
Unknown W. Brackets
3333f2a5aa
GPU: Avoid clears for non-simple depth values.
...
Some drivers don't round depth the same way for a clear vs for drawing,
which can cause mismatches. We only do this if we see equals-style depth
comparison funcs used in drawing.
2022-11-08 20:06:08 -08:00
Henrik Rydgård
41c812651d
Merge pull request #16347 from unknownbrackets/softgpu-skin
...
Always skin in decode for software transform and rendering
2022-11-06 20:21:02 +01:00
Unknown W. Brackets
3de2557ecb
GPU: Always skin in decode for software transform.
2022-11-06 08:55:07 -08:00
Unknown W. Brackets
6c36f03a0d
GPU: Purify vertTypeIsSkinningEnabled().
2022-11-06 08:40:54 -08:00
Henrik Rydgård
b4507cd5cc
Make a lot more code VR build for all platforms
2022-11-06 14:36:51 +01:00
Lubos
c6b83dd9d8
OpenXR - Enable camera movement and stereo in flatscreen mode
2022-11-03 20:00:30 +01:00
Henrik Rydgård
0de12f5ca9
Some refactoring of framebuffer views, layer issues, more work.
2022-10-27 11:05:58 +02:00
Henrik Rydgård
fb250c4b29
More multiview work
2022-10-27 11:05:58 +02:00
Henrik Rydgård
d3804ec2e5
Misc multiview hackery
2022-10-27 11:05:58 +02:00
Henrik Rydgård
90d395a10d
Remove "attachment" parameter from BindFramebufferAsTexture everywhere.
...
Not actually useful since our framebuffer objects don't support multiple
color images, and probably won't ever need to.
2022-10-20 10:15:19 +02:00
Lubos
eed75889e4
OpenXR - Ensure scene analyze is called the same way as before
2022-10-18 12:23:23 +02:00
Henrik Rydgård
aa51bfd1ef
Use GPU "use" flags to replace IsVRBuild in the renderer. It remains elsewhere.
2022-10-17 19:57:11 +02:00
Henrik Rydgård
7c5fc3ccb5
Reorder the GPU USE flags a bit
2022-10-17 19:55:11 +02:00
Lubos
1a6180583e
OpenXR - Reduce uniform calls
2022-10-17 19:00:38 +02:00
Henrik Rydgård
30aa07b156
Two more renames to make things read better
2022-10-17 08:47:05 +02:00
Henrik Rydgård
9b8a5d1db3
Rename GPU_SUPPORTS_ to GPU_USE_
2022-10-17 08:47:03 +02:00
Henrik Rydgård
daca0b2109
Rename gstate_c.Supports to gstate_c.Use
2022-10-17 08:46:37 +02:00
Henrik Rydgård
e0e29a1556
Merge pull request #16197 from hrydgard/more-uniform-optimization
...
More uniform optimization, fixes
2022-10-12 01:00:27 +02:00
Henrik Rydgård
d30d8bf35c
Removes the option, autodetect instead - only enable if the GPU doesn't support bitwise ops.
2022-10-11 16:09:57 +02:00
Henrik Rydgård
901f698a10
Merge pull request #16201 from unknownbrackets/gedebugger
...
GE Debugger: Normalize framebuffer texture preview
2022-10-11 11:33:19 +02:00
Unknown W. Brackets
416265431b
GE Debugger: Display if tex is framebuf.
...
Rather than guessing based on size, let's show explicitly.
2022-10-10 22:35:42 -07:00
Unknown W. Brackets
fc9f200224
GE Debugger: Centralize current fb tex fetch code.
2022-10-10 21:50:53 -07:00
Unknown W. Brackets
fc68cd9457
GLES: Add debug readback of stencil data.
...
This allows the existing gpu.buffer.renderStencil to snapshot the state.
2022-10-10 17:09:14 -07:00
Unknown W. Brackets
c03d327ddd
GLES: Refactor depth pipeline create.
...
So we can reuse for stencil as well.
2022-10-10 16:55:30 -07:00
Henrik Rydgård
ee46f8992e
Don't use fragmentShaderInt32Support as a replacement for checking for bitwiseOps
2022-10-10 18:02:19 +02:00
Henrik Rydgård
aec22491fe
Don't expand alphaColorRef to 128 bytes on backends where we don't need to.
2022-10-10 18:02:01 +02:00
Unknown W. Brackets
1dc35b3ac4
GLES: Simplify, enable debug depth readback.
2022-10-10 01:04:57 -07:00
Unknown W. Brackets
f8908c691b
GLES: Use Draw for depth readback shader.
...
Was not working before, since the program was not being used by Draw2D.
2022-10-10 00:54:29 -07:00
Unknown W. Brackets
93346d6e2c
GLES: Refactor depth shader download.
...
This makes it similar to the Draw interface.
2022-10-10 00:54:29 -07:00
Unknown W. Brackets
c2da29392c
GLES: Depth download cleanup.
2022-10-10 00:54:29 -07:00
Unknown W. Brackets
55d5dc3834
GPU: Rename readback and buffer write operations.
...
Avoid download/upload and pack, which don't have clear directions.
2022-10-09 13:49:41 -07:00
Unknown W. Brackets
ad3220f857
GLES: Hook up depth download.
...
Currently, only used by one hook.
2022-10-09 01:08:04 -07:00
Henrik Rydgård
87d00f79da
Merge pull request #16165 from unknownbrackets/geo-shader
...
Vulkan: Clip clamped depth in geometry shader
2022-10-06 09:18:08 +02:00
Unknown W. Brackets
aee2ad46a2
GPU: Verify generated shader buffer length.
...
Hardware tessellation + uberlighting + clamp was exceeding the buffer,
causing memory corruption. Let's try to catch it, but also increase
buffers to be safe.
2022-10-05 21:41:09 -07:00
Unknown W. Brackets
bc3d3cf9fb
GPU: Optimize clip distances needed.
...
We only need to write one clip distance to clip clamped depth, since we
don't clamp when it needs clipping on both sides.
2022-10-05 21:17:17 -07:00
Henrik Rydgård
ed3cd1dc26
Merge pull request #16150 from unknownbrackets/vram-mirrors
...
GPU: Mask away unused bits in framebuf/zbuf ptr, cleanup
2022-10-03 11:56:24 +02:00
Unknown W. Brackets
b9b59f7806
GPU: Mask away unused bits in framebuf/zbuf ptr.
...
Lower 4 bits are ignored during rendering, and mirrors (even even the 8
bit at the top) are ignored.
2022-10-02 20:44:35 -07:00
lainon
3cdf72b68b
Better readability and optimization insertion into container by replacing 'insert' -> 'emplace', 'push_back' -> 'emplace_back'
2022-09-30 12:35:28 +03:00
lainon
b304551747
Code readability, vec reserve() and remove excess c_str()
2022-09-30 12:31:32 +03:00
Henrik Rydgård
f4b71e2dc7
Fragment shader uniforms: Pack color mask in 32 bits instead of expand to 128 bits.
...
Allows us to save 16 bytes from the main uniform buffer, since there's
free 32-bit spaces here and there to use.
2022-09-26 13:04:56 +02:00
Henrik Rydgård
9d1355e137
Always do the vertex shader part of the fog computation.
...
In #16104 , we drastically reduced the number of shader variants for
games that use flexible lighting setups. I looked at a few games and it
seems that a lot of games have the same shaders with fog on/off, while
fog is super cheap to compute. So let's just always do it, reducing
vertex shader variants further (though the amount of pipelines will probably
remain the same, since we still specialize the fragment shader).
Might also be worth adding a dynamic bool for the fragment shader, but
if so, doing it separately.
2022-09-26 09:30:54 +02:00
Henrik Rydgård
96f054f098
Fix light ubershader for D3D11 and OpenGL, GLES unsigned/signed stuff
2022-09-25 23:35:08 +02:00
Lubos
adffbb2ea7
Merge branch 'master' into compat_openxr_gta
2022-09-23 14:16:58 +02:00
Unknown W. Brackets
a8eced4773
GLES: Avoid resizing tessellation data textures.
...
Just recreate when it needs to be larger. Fixes Test Drive Unlimited
issues noted in #16069 .
2022-09-21 23:30:00 -07:00
Lubos
c4dbd6d045
Merge branch 'master' into compat_openxr_gta
2022-09-20 21:46:33 +02:00
Henrik Rydgård
aa19712fc3
Unify depth texture and framebuffer fetch checks
2022-09-20 10:47:49 +02:00
Henrik Rydgård
09bcf3ec13
Unify range culling detection
2022-09-20 10:15:04 +02:00
Henrik Rydgård
1ae7c0132c
Start unifying setting of the GPU feature flags, now that thin3d has feature detection.
2022-09-20 10:07:01 +02:00
Unknown W. Brackets
a2a7e8258b
GPU: Clip depth properly when also clamping.
...
Helps situations like #11216 , where only one side should be clamped.
Keeps depth clamp (i.e. #7932 ) working. See #11399 .
2022-09-18 13:18:02 -07:00
Unknown W. Brackets
c08c873462
GLES: Support more clip distances.
...
Will be used later, for now just the enable/disable logic.
2022-09-18 13:16:59 -07:00
Henrik Rydgård
ce82fce8de
Use subpass dependencies to implement shader framebuffer read in Vulkan.
2022-09-16 19:19:42 +02:00
Luboš Vonásek
861af63be9
Merge branch 'hrydgard:master' into compat_openxr_gta
2022-09-16 10:20:11 +02:00
Henrik Rydgård
a208afb7b8
OpenGL and D3D11 fixes
2022-09-14 23:35:15 +02:00
Henrik Rydgård
abd58199ce
Add way to bind cached textures to a DrawContext
2022-09-14 22:18:35 +02:00
Henrik Rydgård
0ed1f3d461
Switch multiple bools as parameters to DecodeTextureLevel to a flags enum.
2022-09-14 18:40:08 +02:00
Lubos
e406dc4730
Merge branch 'master' into compat_openxr_gta
2022-09-13 21:01:55 +02:00
Lubos
b695c1ffb3
Merge branch 'master' into compat_openxr_gta
2022-09-12 23:04:31 +02:00
Lubos
e49ee5c93b
Merge branch 'master' into feature_openxr_stereo
2022-09-12 18:49:22 +02:00
Lubos
bdde5f0f7f
OpenXR - Use per game stereo separation file
2022-09-12 18:47:13 +02:00
Henrik Rydgård
694dbe1271
Add ShaderDepalMode enum, use in shader ID. Replaces smoothed bit.
2022-09-11 14:40:01 +02:00
Henrik Rydgård
9bd8b11bf8
Implement shader depal for D3D11.
2022-09-11 13:41:17 +02:00
Luboš Vonásek
5be9455bf5
Merge branch 'hrydgard:master' into compat_openxr_gta
2022-09-08 18:39:11 +02:00
Lubos
c9f08a85c6
OpenXR - Do not mashup Common/GPU
2022-09-08 18:25:10 +02:00
Henrik Rydgård
f3c097680e
Merge pull request #15982 from hrydgard/renderpass-refactor
...
Vulkan: Refactor renderpass handling
2022-09-08 09:35:55 +02:00
Unknown W. Brackets
e6b4495e22
GPU: Make NotifyConfigChanged() calls consistent.
...
They're generally centralized in Common.
2022-09-07 23:41:00 -07:00
Henrik Rydgård
e828df9f25
Split each renderpass/framebuffer into multiple "compatibility classes" (RenderPassType).
2022-09-08 00:32:03 +02:00
Lubos
08226d8396
OpenXR - Stereo matrices fixed
2022-09-05 20:49:25 +02:00
Lubos
3a0e6c7232
Merge branch 'master' into feature_openxr_stereo
2022-09-05 19:11:52 +02:00
Henrik Rydgård
b15c65540e
Fix the new logic-op-in-shader on OpenGL and D3D11
...
Also disable BlueToAlpha for now for Outrun and DiRT 2, it breaks the
water effect somehow. Will come back to it later.
2022-09-04 22:53:05 +02:00
Lubos
4ce0579f70
OpenXR - Split projection matrix for color and depth buffer
2022-09-04 21:12:18 +02:00
Lubos
5be6665df8
Merge branch 'master' into feature_openxr_stereo
2022-09-04 12:37:41 +02:00
Lubos
1df1d79b9e
OpenXR - Stereo without multiview added
2022-09-04 12:36:52 +02:00
Henrik Rydgård
ec173559f8
Additional cleanup
2022-09-04 00:10:55 +02:00
Henrik Rydgård
87b14fe1c2
Some more renaming and refactoring, extracted from a future PR
2022-09-04 00:10:55 +02:00
Henrik Rydgård
8e39018b95
Channel mask refactor
2022-09-04 00:10:54 +02:00
Henrik Rydgård
c846c2dfa8
Remove confusing resetFramebufferRead flag from secondary framebuffer binding
2022-09-03 14:48:07 +02:00
Henrik Rydgård
8c56abd3dc
Remove setting "Disable slower framebuffer effects"
2022-09-03 11:06:43 +02:00
Henrik Rydgård
b84cda2876
Plumb the computed pipeline state into ComputeFragmentShaderID.
2022-09-02 22:16:57 +02:00
Henrik Rydgård
c784c0e94b
Some renaming. Store the BlendState/MaskState.
2022-09-02 21:07:29 +02:00
Lubos
00aaf9e1a6
Merge branch 'master' into feature_openxr_stereo
2022-09-01 18:09:21 +02:00
Henrik Rydgård
2bf0c86ac7
Fix image format when dumping textures.
...
Fixes #15831
2022-09-01 15:04:59 +02:00
Henrik Rydgård
67d6549afd
Rename Slow Framebuf effects to Shader Blending (might remove). Reassign readbacks to BlockTransferGPU.
2022-08-31 14:23:33 +02:00
Henrik Rydgård
08eaf7665c
Fix race condition in replacement texture loading
...
The texture could become valid during the load, causing an inconsistent
state within the texture loading. So can only check for valid-ness once.
2022-08-30 12:52:31 +02:00
Henrik Rydgård
6f2966f502
Clean up mip size calculations
...
Calculating the same thing in multiple places is a recipe for bugs, so
let's not.
2022-08-30 12:05:57 +02:00
Lubos
2adc7269a3
Merge branch 'master' into feature_openxr_stereo
2022-08-28 21:55:15 +02:00
Unknown W. Brackets
a8190f3eb4
GPU: Recheck depth/stencil after Spongebob hack.
...
Since we swap the compare, we should at least recheck it later.
2022-08-28 08:39:05 -07:00
Unknown W. Brackets
18e1efece1
GPU: Add a way to defer dirty rechecks.
...
These are situations where we have temporary state which will require
recalc again later.
2022-08-28 08:34:48 -07:00
Lubos
4bd5a28604
OpenXR - Flag to easily disable multiview shaders added
2022-08-28 14:49:27 +02:00
Lubos
ca92f80bd8
Merge branch 'master' into feature_openxr_stereo
2022-08-28 14:22:18 +02:00
Henrik Rydgård
df92f72ac3
Unify the spongebob depth inverse check
2022-08-28 07:11:00 +02:00
Henrik Rydgård
c80245af91
OpenGL graphics fixes
2022-08-27 19:37:28 +02:00
Lubos
c2c0561be2
OpenXR - OPENXR ifdef removal
2022-08-27 17:33:37 +02:00
Henrik Rydgård
8d1157e107
GL bugfix, log cleanup
2022-08-27 14:40:42 +02:00
Henrik Rydgård
880ea48e2d
Implement the stencil/alpha reverse trick for all backends
2022-08-27 10:25:18 +02:00
Luboš Vonásek
11a6318509
Merge branch 'hrydgard:master' into feature_openxr_stereo
2022-08-24 19:50:45 +02:00
Henrik Rydgård
416d8b403b
Merge pull request #15768 from lvonasek/feature_openxr_6dof
...
OpenXR - 6DoF support
2022-08-24 18:49:41 +02:00
Henrik Rydgård
b529d26f3a
Fix smoothed depal on GLES. Don't enable filtering if not using.
2022-08-24 13:43:41 +02:00
Henrik Rydgård
586da08820
Merge pull request #15895 from unknownbrackets/gpu-minor
...
GPU: Correct Draw2D::DeviceRestore()
2022-08-24 11:50:42 +02:00
Henrik Rydgård
d459eac891
Fix checks for depth texture support, GLES syntax errors
2022-08-24 11:26:07 +02:00
Henrik Rydgård
ff92d7d4b0
Remove duplicate uniform queries
2022-08-24 10:51:45 +02:00
Henrik Rydgård
eb2f12e64a
Drive-by texture slot management cleanup
2022-08-24 10:22:58 +02:00
Luboš Vonásek
c5cb45b1f7
Merge branch 'hrydgard:master' into feature_openxr_6dof
2022-08-24 06:55:31 +02:00
Henrik Rydgård
5d50d02227
Merge pull request #15894 from unknownbrackets/debugger
...
GE Debugger: Record only one flip if display framebuf not changed, step on vsync
2022-08-24 06:27:31 +02:00
Unknown W. Brackets
7ec62a32b4
GPU: More consistently clear ptrs on DeviceLost().
...
Rather get a null pointer crash than confusing buggy use-after-free
excitement.
2022-08-23 20:15:30 -07:00
Unknown W. Brackets
c581a83896
GPU: Centralize SetDisplayFramebuffer().
2022-08-23 19:29:06 -07:00
Henrik Rydgård
5084743bbb
Use Draw2D for depal shaders (except the actual blit, for now)
2022-08-23 11:21:40 +02:00
Henrik Rydgård
6558bde0f6
Remove SmoothedDepal compat setting, instead detect the ramp directly.
2022-08-22 15:24:41 +02:00
Henrik Rydgård
b39b74e602
More renaming. Fix shader view for Vulkan
2022-08-22 12:30:51 +02:00
Henrik Rydgård
82a6c42e17
DepalettizeCommon -> TextureShaderCommon. Simplifications.
2022-08-22 12:21:20 +02:00
Unknown W. Brackets
89a499b4d2
GLES: Correct preview of mip levels > 0.
...
Don't need to force level 0 anymore. Software can show levels hardware
refuses to load. This is consistent with other backends.
2022-08-21 16:47:46 -07:00
Unknown W. Brackets
b5a4843c1f
GPU: Purify ConvertViewportAndScissor().
...
This makes it harder to misuse. See #15856 .
2022-08-20 14:21:11 -07:00
Unknown W. Brackets
d61619db47
GPU: Dirty params when converting viewport state.
...
This flag will be false when we convert next time, so parameters won't get
updated as expected.
2022-08-20 14:03:24 -07:00
Henrik Rydgård
12db0e52d4
Fix deferred-depth for bezier/spline. Move updating of last_frame_depth_render to GPUCommon.
2022-08-20 08:29:33 +02:00
Henrik Rydgård
886679c7ec
Remove the color-to-depth mode
2022-08-20 08:29:33 +02:00
Lubos
4026d49104
OpenXR - Multiview uniforms working
2022-08-17 19:14:36 +02:00
Lubos
d570a194dd
Merge branch 'feature_openxr_6dof' into feature_openxr_stereo
2022-08-17 17:08:12 +02:00
Lubos
1e479fa192
Merge branch 'master' into feature_openxr_6dof
2022-08-17 16:48:05 +02:00
Henrik Rydgård
5785cf40ad
Clean up and comment framebuffer struct better, add bind sequence numbers
2022-08-17 10:09:11 +02:00
Henrik Rydgård
cdb4124bc1
More removing redundant stuff
2022-08-16 21:38:09 +02:00
Lubos
22e7f87e33
OpenXR - Disable multiview for now
2022-08-16 21:32:11 +02:00
Henrik Rydgård
9f2447c0b4
Assorted minor cleanup
2022-08-16 10:55:44 +02:00
Lubos
f8e68a45b6
Merge branch 'feature_openxr_6dof' into feature_openxr_stereo
2022-08-15 17:41:27 +02:00
Lubos
d34d1e4af9
OpenXR - Ensure PSP aspect ratio for 2D content
2022-08-15 17:41:04 +02:00
Lubos
ab6c91c203
OpenXR - Integrate multiview into system
2022-08-14 18:51:45 +02:00
Lubos
47349b2c0d
Merge branch 'master' into feature_openxr_stereo
2022-08-14 16:51:09 +02:00
Unknown W. Brackets
cf030c3bce
Global: Cleanup some unreferenced warnings.
2022-08-13 12:43:14 -07:00
Lubos
3542fbbc38
Merge branch 'master' into feature_openxr_6dof
2022-08-12 10:31:00 +02:00
Lubos
76bea33ef0
OpenXR - Better detecting of 2D menus
2022-08-12 08:41:22 +02:00
Henrik Rydgård
131098c4d4
Some enum renaming, move RasterChannel to GPU.h.
2022-08-09 19:58:48 +02:00
Lubos
89a0a28c70
Merge branch 'master' into feature_openxr_6dof
2022-08-09 19:35:13 +02:00
Henrik Rydgård
1913930541
Careful with mipmaps on old OpenGL ES. Lost this check in the refactor, made it clearer than before at least.
...
Fixes Burnout rendering issue mentioned in #15818
2022-08-09 17:26:39 +02:00
Lubos
5c3ff4f357
OpenXR - Detect 3D content better
2022-08-08 18:43:16 +02:00
Lubos
c00fea1b22
Merge branch 'master' into feature_openxr_6dof
2022-08-07 20:33:14 +02:00
Lubos
c7e321b866
OpenXR - Detecting UI mode improved
2022-08-07 20:32:34 +02:00
Henrik Rydgård
6f1f482432
Make GLQueueRunner/RenderManager aware of device caps, use it to check for NPOT and some other stuff
2022-08-07 11:15:23 +02:00
Unknown W. Brackets
e6ea07bc9d
GPU: Cleanup remnants of GLES-only stencil upload.
2022-08-06 20:33:34 -07:00
Henrik Rydgård
9a5893ce6e
More cleanup
2022-08-06 18:27:04 +02:00
Henrik Rydgård
81c36578ca
Feature detection fixes
2022-08-06 18:27:03 +02:00
Henrik Rydgård
4e3c258140
Delete all the duplicate implementations of ApplyTextureFramebuffer
2022-08-06 18:27:03 +02:00
Henrik Rydgård
45def772ee
Move the depal cache instance ownership to TextureCacheCommon
2022-08-06 18:27:03 +02:00
Henrik Rydgård
7085861aad
Switch over D3D9 as well. Buggy, will debug after unification
2022-08-06 18:27:03 +02:00
Henrik Rydgård
e345a6ba3c
Works with D3D11, except the depth texturing case
2022-08-06 18:27:03 +02:00
Henrik Rydgård
da65af832a
D3D11 prep
2022-08-06 18:27:03 +02:00
Henrik Rydgård
7800bfdf72
Move the TextureShaderApplier out to DepalettizeCommon
2022-08-06 18:27:03 +02:00
Henrik Rydgård
ab560d9224
Move more stuff to Common
2022-08-06 18:27:03 +02:00
Henrik Rydgård
4e89174b85
OpenGL: Fix shader depal too.
2022-08-06 18:27:03 +02:00
Henrik Rydgård
37555fd442
Move to Common
2022-08-06 18:27:02 +02:00
Henrik Rydgård
d3070005a2
Mostly works for OpenGL.
2022-08-06 18:27:02 +02:00
Henrik Rydgård
8aebf0dca4
Port the OpenGL depal path to thin3d
2022-08-06 18:27:02 +02:00
Henrik Rydgård
08e2d951b4
State handling reordering in D3D11 and D3D9 backends.
2022-08-05 23:07:01 +02:00
Lubos
cc3981a328
OpenXR - 72Hz support added
2022-08-05 15:14:21 +02:00
Lubos
5f377f82eb
Merge branch 'master' into feature_openxr_6dof
2022-08-05 13:49:42 +02:00
Lubos
92d3ed6ee3
OpenXR - HUD is enabled based on gstate
2022-08-05 11:31:33 +02:00
Henrik Rydgård
e28b45481b
Delete more unused code
2022-08-03 22:47:31 +02:00
Henrik Rydgård
f8e0c09463
Delete unused stuff in all backends
2022-08-03 22:22:52 +02:00
Henrik Rydgård
1ab9293cb3
Convert FramebufferBlit from the GL backend to use thin3d
2022-08-03 22:22:51 +02:00
Lubos
3578656b8b
OpenXR - Introduce VR tweaks
2022-08-03 18:52:55 +02:00
Henrik Rydgård
192e331b11
Delete the OpenGL implementation of DrawActiveTexture.
2022-08-03 14:12:55 +02:00
Henrik Rydgård
41e327a66b
Cleanup and testfixes
2022-08-03 13:34:59 +02:00
Henrik Rydgård
9bead443c3
Unify stencil buffer upload using Draw. Only OpenGL tested yet (shaders need adaptation).
2022-08-03 13:31:13 +02:00
Lubos
cb6448ff2d
Merge branch 'master' into feature_openxr_6dof
2022-08-02 21:01:05 +02:00
Lubos
4814bed7df
OpenXR - HUD support added
2022-08-02 20:58:16 +02:00
Henrik Rydgård
770cb49f94
GLES: FramebufferBlit: Don't blit if the target is the current framebuffer.
2022-08-02 14:57:20 +02:00
Henrik Rydgård
19931c003f
Clean up blit/copy feature detection. Don't need fast GPU flags for these.
2022-08-02 09:53:46 +02:00
Lubos
2103874c0f
OpenXR - Estimate world unit scale
2022-08-01 19:28:50 +02:00
Lubos
4a3f809588
OpenXR - Head orientation in some games fixed
2022-08-01 17:47:24 +02:00
Henrik Rydgård
73fc9fb520
OpenGL fix
2022-08-01 11:57:22 +02:00
Lubos
e6b14cb473
OpenXR - 6DoF head movement support added
2022-07-31 20:05:08 +02:00
Lubos
8117f05395
OpenXR - Renderer support for axis mirror added
2022-07-31 19:08:47 +02:00
Lubos
d129870d44
Merge branch 'master' into feature_openxr_6dof
2022-07-31 16:37:54 +02:00
Henrik Rydgård
c158414858
Give the mip bias its own uniform flag.
2022-07-31 10:43:48 +02:00
Henrik Rydgård
fecf9127a0
Implement 3D texturing in the OpenGL backend too. Assorted fixes.
2022-07-31 10:43:48 +02:00
Henrik Rydgård
6a5a232777
Unify the GLES LoadTextureLevel with the D3D ones.
2022-07-30 19:07:21 +02:00
Henrik Rydgård
9ed96921e1
Cleanup
2022-07-30 16:51:29 +02:00
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
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
167b837ed3
Break out the preparation part of BuildTexture from GLES
2022-07-30 10:44:27 +02:00
Henrik Rydgård
c031f3085b
Additional cleanup
2022-07-30 10:44:26 +02:00
Henrik Rydgård
ae6763766e
Get the GLES BuildTexture slightly closer
2022-07-30 10:44:02 +02:00
Henrik Rydgård
f728faffdc
Remove fake-mipmap logic from LoadTextureLevel
2022-07-30 10:38:17 +02:00
Henrik Rydgård
8b398bbbb7
Minor code simplification
2022-07-30 10:32:50 +02:00
Henrik Rydgård
6f484d0aee
Remove unused useBGRA parameter
2022-07-30 08:52:24 +02:00
Henrik Rydgård
c41b780c8c
Remove the ReplacedTextureFormat enum
2022-07-30 08:52:24 +02:00
Henrik Rydgård
ef4a6cf873
Remove support for 16-bit replacement texture formats
2022-07-30 08:52:24 +02:00
Lubos
60d8a102f9
OpenXR - Switching between 2D/VR fixed
2022-07-29 10:19:11 +02:00
Lubos
d29b9011db
OpenXR - VR settings added, better UI detection
2022-07-27 19:47:11 +02:00
Lubos
9b8a9d3b32
Merge branch 'feature_openxr_quest' into feature_openxr_6dof
2022-07-26 18:00:40 +02:00
Lubos
5c95fd244f
OpenXR - Automatically switch between fullscreen/VR
2022-07-26 17:20:46 +02:00
Lubos
0c208d192b
OpenXR - Basic look around implementation
2022-07-25 18:47:54 +02:00
Henrik Rydgård
f523341351
Remove unnecessary parameters from MakePixelsTexture
2022-07-24 13:54:09 +02:00
Henrik Rydgård
9ffb248e59
Merge pull request #15646 from unknownbrackets/report-vertex
...
Reporting: Log when vertex count truncated
2022-07-04 23:23:36 +02:00
Unknown W. Brackets
efacbddaef
Reporting: Log when vertex count truncated.
2022-07-04 13:22:17 -07:00
Unknown W. Brackets
feddff8299
GLES: Fix sw transform flip in skip buffer mode.
...
Was causing some things to be drawn in the wrong places and upside down.
2022-06-05 11:31:07 -07:00
Henrik Rydgård
66ddbe9513
Remove the rather problematic limit on framebuffer copies
2022-05-01 12:49:19 +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
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
c52a5e9e25
Fix checks for the "fake mipmap" situation.
...
Fixes #15492
2022-04-22 22:59:20 +02:00
Henrik Rydgård
c4dfbf4f1a
Delete a lot of specialized alpha checking code.
...
This was now only used to check alpha in CLUTs, and the generic functions will not actually be any slower.
2022-04-15 12:34:50 +02:00
Henrik Rydgård
42cd937de2
Simplification and some cleanup
2022-04-15 00:56:25 +02:00
Henrik Rydgård
9f7e0978a9
AND together colors while decoding, and then check against fullAlphaMask.
2022-04-15 00:56:25 +02:00
Henrik Rydgård
a68ddd0a8d
Merge separate NEON functions into the normal functions.
...
We no longer support non-NEON ARM.
It's nice also to have the NEON and SSE implementations "close" to each
other, easier to port optimizations back and forth etc.
2022-04-12 23:43:21 +02:00
Unknown W. Brackets
2479d52202
Global: Reduce includes of common headers.
...
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Henrik Rydgård
f1cd1d535b
Add a hidden setting to turn off the shader cache, for shader compile performance work
2021-11-21 21:25:56 +01:00
Unknown W. Brackets
0dc7688838
GPU: Cleanup some extra pointers in fb managers.
...
These weren't being used / weren't final anyway.
2021-11-14 14:13:48 -08:00
Henrik Rydgård
b88d676f78
Remove the vertex cache from the OpenGL backend.
...
It was disabled for a very long time, and now that we've re-enabled it, it
mostly causes problems.
Not feeling like debugging it on weird hardware, I think it's better
to focus energy on other optimizations.
2021-11-06 00:45:43 +01:00
Unknown W. Brackets
2718e81c0e
GPU: Expand lines to triangles.
2021-10-31 14:46:46 -07:00
Unknown W. Brackets
b3a8e013f6
GPU: Expand points into triangles for higher res.
2021-10-31 13:06:06 -07:00
Unknown W. Brackets
9fc94a3494
GPU: Skip cull for lines and points.
...
These already always go through software transform, so make sure we handle
them consistently. We'll eventually convert to triangles.
2021-10-31 10:54:50 -07:00
Henrik Rydgård
8a718a8202
Merge pull request #15072 from unknownbrackets/guardband
...
Implement depth culling in software transform
2021-10-31 17:29:41 +01:00
Henrik Rydgård
3bf6b140c7
Don't forget to check for bufferedRendering before enabling screen rotation in the shader.
2021-10-31 13:35:13 +01:00
Unknown W. Brackets
5128480d74
GPU: Implement cull behavior in sw transform.
2021-10-30 21:04:16 -07:00
Unknown W. Brackets
e688bb2cdf
GPU: Correct software transform projection.
...
Now reading the new fog value.
2021-10-30 18:23:58 -07:00
Unknown W. Brackets
4ec75de0e7
GPU: Add fog separately for swtransform verts.
...
At this point, still being processed wrong, this just changes the
attribute structure.
2021-10-30 18:22:54 -07:00
Unknown W. Brackets
b87451de92
GPU: Restore rotation handling in sw transform.
2021-10-30 18:22:53 -07:00
Unknown W. Brackets
159eab5141
GPU: Set projection matrix per backend.
...
There's a bit of variance, so this keeps the central code clean.
2021-10-30 18:20:36 -07:00
Unknown W. Brackets
f35c7d04bd
GPU: Update viewport params before sw transform.
2021-10-30 18:19:16 -07:00
Unknown W. Brackets
3730460bc5
GPU: Move swtransform flippedY to params.
2021-10-30 18:17:22 -07:00
Henrik Rydgård
edc4e69c3d
Merge pull request #15025 from unknownbrackets/texreplace-pop
...
Allow delayed loading of texture replacements
2021-10-25 23:31:30 +02:00
Unknown W. Brackets
5557950a4b
GPU: Allow range cull on Mali/etc.
...
Previously had been disabled when cullDistance/clipDistance were
unsupported, but it's still helpful without those. See #15049 .
2021-10-23 08:43:14 -07:00
Unknown W. Brackets
83b7b33cfd
Replacement: Centralize lookup logic.
...
And make sure we don't change our minds about using a replacement during a
draw.
2021-10-21 17:05:38 -07:00
Unknown W. Brackets
2356280a9c
Replacement: Add structure for delayed loading.
2021-10-21 17:05:38 -07:00
Unknown W. Brackets
d804d35dcb
GPU: Enable new guardband culling again.
2021-10-21 15:29:51 -07:00
Unknown W. Brackets
c72d045170
Compat: Ignore DisableRangeCulling with clip/cull.
...
As long as we support these things and the NAN issue isn't there, we
should be able to safely enable regardless.
2021-10-21 13:23:13 -07:00
Henrik Rydgård
16bf5197e4
Merge pull request #14833 from unknownbrackets/guardband
...
Handle guardband clip/cull better for hardware backends
2021-10-19 12:00:01 +02:00
Unknown W. Brackets
3e9d1e0b00
GLES: Re-enable vertex cache.
...
Was accidentally left disabled during GL threading effort.
2021-10-12 20:41:18 -07:00
Unknown W. Brackets
33598f2e75
GPU: Support clip and cull distances separately.
...
Older GL devices, and it seems Apple devices, may not support cull.
2021-10-12 20:34:44 -07:00
Unknown W. Brackets
5e6f54033e
GPU: Split clip and cull caps.
...
GL_ARB_cull_distance is needed, sometimes available on older GL.
2021-10-12 20:34:43 -07:00
Unknown W. Brackets
7d00b6ca90
GLES: Enable/disable clip distance 0.
2021-10-12 20:34:42 -07:00
Unknown W. Brackets
046a5c548b
GLES: Check clip/cull distance support.
...
Pretty limited on GLES3+. Also D3D11.
Seems like doing it on D3D9 might be a bit tricky.
2021-10-12 20:34:42 -07:00
Unknown W. Brackets
24011c3754
GPU: Correct depth handling for guardband.
...
This culls based on pre-viewport Z and avoids culling based on the clip
range at negative Z.
2021-10-12 20:34:41 -07:00
Henrik Rydgård
9ca97dfa8e
Handle vertex shader generation failures better.
...
Suspect that this is happening with the HW tesselation crash in KOF '96.
Should help #14774
2021-08-29 21:50:43 +02:00
Henrik Rydgård
4c9b5ada0f
Address feedback
2021-07-09 21:09:44 +02:00
Henrik Rydgård
4e8ffae024
Implement basic depth texturing for OpenGL, requires depth clamp for now.
...
Need to figure out what to do about other Z mappings.
Helps #6411 for OpenGL on desktop primarily, and certain other games affected by #13256
are likely working too like the fog in Harry Potter.
2021-07-09 21:09:44 +02:00