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
970c266b41
Restore parallel GLSL builds
2022-11-08 00:30:21 +01:00
Henrik Rydgård
4d637342f7
Log source code for failed pipeline creations
2022-11-08 00:21:08 +01:00
Henrik Rydgård
24d5cd087c
Experiment (Vulkan): Temporarily disable GLSL parallel compilation on Android. For #16341 investigation.
2022-11-07 14:30:24 +01:00
Henrik Rydgård
ad14d628b6
Turn off boundSecondaryIsInputAttachment_ when we don't have one.
2022-11-07 09:30:47 +01:00
Henrik Rydgård
668904a515
Vulkan: Use the very same view as input attachment and color attachment, not just the same image
...
Fixes most of the new validation errors seen #16351 , though one remains.
I believe that to be a bug in the validation layers, will investigate
later.
2022-11-07 09:14:55 +01: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
ad6725b684
VK/D3D11: Move the rarely used "u_rotation" uniform to the frame uniform buffer.
...
This uniform is used in two cases:
* Non-buffered rendering in Vulkan, software transform
* Non-buffered rendering in D3D11 level 9 on Windows Phone, software transform
- which I don't think anyone builds for anymore
Nice to not have it in the main uniform buffer, but mainly a
demonstrator/test of moving stuff to the new frame-global buffer, and
setting up the infrastructure.
2022-11-05 22:14:05 +01:00
Henrik Rydgård
c6fe91224a
Vulkan: Fixes validation errors with "null" textures
...
These arise in non-buffered rendering when we don't have a framebuffer
to texture from.
2022-10-28 18:40:55 +02:00
Henrik Rydgård
8e0b82f92e
Address feedback
2022-10-28 17:42:21 +02:00
Henrik Rydgård
d9cfcf215e
Need to request the proper type of uniform buffer descriptors.
...
Otherwise, assert on Mali.
2022-10-28 10:20:47 +02:00
Henrik Rydgård
ab1cebec51
Actually bind a global uniform buffer, too. Not yet used.
2022-10-28 10:15:36 +02:00
Henrik Rydgård
96a5c52037
Vulkan: Reserve descriptor set 0 for frame-global data, move everything else to set 1
2022-10-28 09:39:56 +02:00
Henrik Rydgård
e0bbebc65e
Clean up GPU_Vulkan::BuildReportingInfo a bit
2022-10-27 11:05:59 +02:00
Henrik Rydgård
763afd4a8e
Improve compatibility checks for stereo rendering.
2022-10-27 11:05:59 +02:00
Henrik Rydgård
31fd928a5c
Name more image views. Very useful with a little patch to the Vulkan debug layers.
2022-10-27 11:05:59 +02:00
Henrik Rydgård
8413473fa4
Fix more cases, GTA works now.
2022-10-27 11:05:59 +02:00
Henrik Rydgård
524e92374f
Use arrays more consistently.
2022-10-27 11:05:59 +02:00
Henrik Rydgård
6af4644ab2
Stereo on mobile fixes
2022-10-27 11:05:58 +02: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
1d8ab38ce5
Vulkan: Use v2 feature checks, and add check for multiview features.
...
Extracted from the multiview PR, and renamed some stuff.
2022-10-24 00:21:28 +02:00
Henrik Rydgård
8cd602a9c6
Merge pull request #16257 from unknownbrackets/error-cleanup
...
Kernel: Fix reported StopThread error
2022-10-19 08:06:30 +02:00
Unknown W. Brackets
a42064eb48
Vulkan: Correct some enum switch warnings.
...
Nice to log debug annotations anyway.
2022-10-18 21:52:38 -07:00
Henrik Rydgård
7c5fc3ccb5
Reorder the GPU USE flags a bit
2022-10-17 19:55:11 +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
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
Henrik Rydgård
ee46f8992e
Don't use fragmentShaderInt32Support as a replacement for checking for bitwiseOps
2022-10-10 18:02:19 +02:00
Unknown W. Brackets
bc84d6345b
Vulkan: Disable geometry shaders for Mali <= 18.
...
These drivers apparently have some weird behavior.
2022-10-09 00:57:10 -07: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
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
Unknown W. Brackets
2832edcc37
Vulkan: Allow configuring geometry shaders on/off.
2022-10-02 07:42:22 -07:00
Unknown W. Brackets
8df956b036
Vulkan: Block geometry shaders on older Mali.
...
They're too slow to be usable.
2022-10-02 07:42:22 -07:00
Unknown W. Brackets
2ce0cda333
Vulkan: Enable geo shader for culling.
...
The compat setting was really for some previously buggy cases that
couldn't work without cull.
2022-10-02 07:42:22 -07:00
Henrik Rydgård
ac248338be
Vulkan: Cull in geoshader, hack to on for now.
2022-10-02 07:42:17 -07:00
Henrik Rydgård
cdee10fe86
Vulkan: Basic geoshader code generation.
2022-10-02 07:42:17 -07:00
Unknown W. Brackets
fbdb278168
Vulkan: Update shader cache format for geo shaders.
2022-10-02 07:42:16 -07:00
Unknown W. Brackets
d16caa71af
Vulkan: Add geometry shader ID tracking.
...
We're still not generating them, yet. But this tracks the objects and
IDs through the pipeline.
2022-10-02 07:42:16 -07:00
Unknown W. Brackets
38e16324f0
Vulkan: Clean up shader module tag.
2022-10-02 07:42:16 -07:00
Unknown W. Brackets
878a049f60
GPU: Add dirtying for geo shader state.
...
Not yet used, but dirtied at the right times.
2022-10-02 07:42:16 -07:00
Unknown W. Brackets
87171cef98
GPU: Add geometry path for shader writer.
...
Not yet used.
2022-10-01 12:45:43 -07:00
Henrik Rydgård
07ca9e4656
Fold the "materialUpdate" flag into the light ubershader part.
...
This reduces the number of vertex shaders and thus pipelines by quite a
bit more in a few games, like Tekken and GoW, continuing the fight
against shader compile stutter.
The perf impact should be minimal if not positive due to less pipeline
changes.
GLES fixes
Make the vertex input declarations match (always declare fog input). Fixes D3D11 validation
Tess fix
2022-09-26 12:06:16 +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
08d2cb4486
Bump the shader cache version
2022-09-24 22:40:42 +02:00
Henrik Rydgård
9f3dfe7ebe
Vulkan: Don't compile pipeline variants that don't make sense given their flags.
...
Ran into this with cache files from previous version of my change.
Also bumping the shader cache ID again to avoid this in other ways, but
good to be robust here.
2022-09-24 22:39:22 +02:00
Unknown W. Brackets
c76d31dfa8
GPU: Cleanup unused CheckAlpha() funcs.
2022-09-24 02:00:03 -07:00
Henrik Rydgård
1259283c2e
More tweaks, fix crash on exit (double-join thread)
2022-09-23 22:10:29 +02:00
Henrik Rydgård
7884e4ccb3
Another uninitialized variable (VAI minihash/hash)
2022-09-23 12:33:16 +02:00
Henrik Rydgård
ac7ca963db
Make valgrind happy
2022-09-23 12:24:43 +02:00
Henrik Rydgård
8e30a7ccfc
Vulkan: Don't have renderpasses store/load depth buffers when we don't use them
2022-09-22 10:06:05 +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
Henrik Rydgård
262a306b9a
Flag shader blending as broken on Adreno for now.
2022-09-16 19:19:42 +02:00
Henrik Rydgård
5f5277a409
Need to have input attachments in the descriptor pool.
2022-09-16 19:19:42 +02:00
Henrik Rydgård
ce82fce8de
Use subpass dependencies to implement shader framebuffer read in Vulkan.
2022-09-16 19:19:42 +02:00
Henrik Rydgård
d6d7a15d25
Get depal-from-dynamic-CLUT working
2022-09-14 22:18:35 +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
Henrik Rydgård
b86648b352
Address feedback
2022-09-12 16:30:08 +02:00
Henrik Rydgård
4ad345d78d
Better shader compile logging
2022-09-12 15:39:29 +02:00
Henrik Rydgård
a2eaad5445
Debug-name shader modules with their shader desc strings
2022-09-12 15:39:29 +02:00
Henrik Rydgård
75efcd9dfd
Merge pull request #16000 from unknownbrackets/gedebugger
...
Cleanup some crashes in GE debugger or with large textures
2022-09-11 19:41:11 +02:00
Henrik Rydgård
694dbe1271
Add ShaderDepalMode enum, use in shader ID. Replaces smoothed bit.
2022-09-11 14:40:01 +02:00
Unknown W. Brackets
6c6d817ce7
Vulkan: Avoid crash if large texture attempted.
...
Doesn't do the clamp/wrap thing, but at least this won't crash.
2022-09-10 20:14:37 -07: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
Henrik Rydgård
974cd38b1f
Some more debug names to vulkan objects
2022-09-08 09:16:40 +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
14b5a1a7cd
Fix pipeline lifetime issue, misc.
2022-09-08 00:38:32 +02:00
Henrik Rydgård
77819c6f80
Lifetime fixes, cleanups
2022-09-08 00:38:32 +02:00
Henrik Rydgård
befcfb470c
Fix shader caching.
2022-09-08 00:38:32 +02:00
Henrik Rydgård
e828df9f25
Split each renderpass/framebuffer into multiple "compatibility classes" (RenderPassType).
2022-09-08 00:32:03 +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
Henrik Rydgård
2474eb6a72
Shader bit setup and code generation for logic-ops-in-shader
2022-09-04 11:14:47 +02:00
Henrik Rydgård
ec173559f8
Additional cleanup
2022-09-04 00:10:55 +02:00
Henrik Rydgård
ceda7aef49
Add log functions to state structs
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
5f1ffeae70
Correct LogicOp API support detection
2022-09-04 00:08:40 +02:00
Henrik Rydgård
6b1e4806cf
Don't parallelize shader compiles in debug mode, sync in debug allocator kills performance.
2022-09-03 23:07:39 +02:00
Henrik Rydgård
b92ea74fb3
Merge pull request #15589 from hrydgard/glsl-compilation-parallelization
...
Vulkan: Parallelize GLSL compilation
2022-09-03 17:00:01 +02:00
Henrik Rydgård
fb3f417e77
Fix lying comment, log level reduction
2022-09-03 16:15:46 +02:00
Henrik Rydgård
c06cf8efaa
Switch Vulkan pipelines to use promises for synchronization
...
Slightly more expensive I guess but shouldn't be much of a bottleneck.
2022-09-03 15:21:08 +02:00
Henrik Rydgård
6e605fa2bc
Fix silly logic, fixes the shader leak.
2022-09-03 15:21:07 +02:00
Henrik Rydgård
8775837c11
Work towards finding the leak
2022-09-03 15:21:07 +02:00
Henrik Rydgård
93422f6dea
Don't block on shader creation until it's time to create the pipeline.
2022-09-03 15:21:07 +02:00
Henrik Rydgård
e2c740827a
Use shader module promises as keys in pipeline cache instead of the actual shader modules.
...
Prevents early block.
2022-09-03 15:21:07 +02:00
Henrik Rydgård
fc418ee16f
Create shader modules (and compile GLSL) on worker threads
2022-09-03 15:21:07 +02:00
Henrik Rydgård
ec0586ba50
Use promises to hold shader modules, for later asyncification
2022-09-03 15:21:07 +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
fd6ab4c495
Avoid recomputing the shaderblend setup in ComputeFragmentShaderID.
2022-09-02 23:06:41 +02:00
Henrik Rydgård
f81a28f661
Some reordering
2022-09-02 22:40:15 +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
Unknown W. Brackets
c5fbb400de
Replacement: Detect OOM even with replacements.
...
Also allow saving video textures if so configured.
2022-09-01 19:05:20 -07:00
Unknown W. Brackets
1033fa6cd7
Vulkan: Prevent saving tex during replace load.
2022-09-01 18:52:52 -07:00
Henrik Rydgård
2bf0c86ac7
Fix image format when dumping textures.
...
Fixes #15831
2022-09-01 15:04:59 +02:00
Henrik Rydgård
11d4f9acb6
Fix texture saving for Vulkan
2022-09-01 15:04:59 +02:00
Henrik Rydgård
9097fdaae6
Shrink VkRenderData from 88 to 64 bytes.
2022-09-01 14:21:34 +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
Henrik Rydgård
b447092742
Some Vulkan renderpass load/store optimizations.
2022-08-28 23:16:48 +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
Henrik Rydgård
df92f72ac3
Unify the spongebob depth inverse check
2022-08-28 07:11:00 +02:00
Henrik Rydgård
880ea48e2d
Implement the stencil/alpha reverse trick for all backends
2022-08-27 10:25:18 +02:00
Henrik Rydgård
6781dd5fe8
Fix Katamari
2022-08-26 23:47:22 +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
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
a901fa4315
GE Debugger: Add separate step based on vsync.
...
I think there were some games where this would step in the middle of a
frame, but not seeing it commonly now. So make it the default, but allow
both methods in the menu.
Fixes #15893 .
2022-08-23 19:48:34 -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
f5e6754ac0
Special case depal lookups for Test Drive's strange usage.
...
This implements the hack I suggested in #13355 , where instead of first
reducing the color to RGB565 as the real game does, we just take each
channel at full precision and do the lookup according to the mask,
linearly filtering the palette.
This makes the game look a lot nicer and is also a small optimization,
but the hack is very specific so kinda ugly in a way.
2022-08-22 15:19:38 +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
Henrik Rydgård
3c307c9857
Merge pull request #15884 from unknownbrackets/texreplace-io-async
...
Replacement: Read files only within time budget
2022-08-22 11:10:16 +02:00
Unknown W. Brackets
e473eb9f5e
Replacement: Read files only within time budget.
...
When delayed texture load is enabled. Intended to reduce IO delays on
Android.
2022-08-21 22:07:05 -07:00
Unknown W. Brackets
73c06bb776
Replacement: Be more consistent about base level.
2022-08-21 22:03:16 -07: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
Henrik Rydgård
295f5f391e
More consistent handling of lack of depth texture support. Small log improvement.
2022-08-20 08:05:53 +02:00
Unknown W. Brackets
f7e4efdbc2
Merge pull request #15852 from hrydgard/more-code-cleanup
...
Remove DX9 namespace, other code cleanup
2022-08-16 20:16:53 -07:00
Henrik Rydgård
1f276fcc20
Vulkan: Restore a minor old forgotten optimization
2022-08-16 21:42:40 +02:00
Henrik Rydgård
cdb4124bc1
More removing redundant stuff
2022-08-16 21:38:09 +02:00
Unknown W. Brackets
cf030c3bce
Global: Cleanup some unreferenced warnings.
2022-08-13 12:43:14 -07:00
Henrik Rydgård
131098c4d4
Some enum renaming, move RasterChannel to GPU.h.
2022-08-09 19:58:48 +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
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
Henrik Rydgård
ded8ba8806
More cleanup, fixes.
2022-08-06 18:27:04 +02:00
Henrik Rydgård
9a5893ce6e
More cleanup
2022-08-06 18:27:04 +02:00
Henrik Rydgård
de10c1fddd
Buildfixes
2022-08-06 18:27:04 +02:00
Henrik Rydgård
4e3c258140
Delete all the duplicate implementations of ApplyTextureFramebuffer
2022-08-06 18:27:03 +02:00
Henrik Rydgård
b5597d1013
Remove Vulkan2D
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
87b128ecaf
Compiles on Vulkan, but doesn't yet work.
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
2fa9b0d0c7
Simplify
2022-08-06 18:27:03 +02:00
Henrik Rydgård
08e2d951b4
State handling reordering in D3D11 and D3D9 backends.
2022-08-05 23:07:01 +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
126ace770e
Remove the D3D9 and Vulkan BlitFramebuffer functions
2022-08-03 22:22:52 +02:00
Henrik Rydgård
d5a0249678
Fix upscaling in Vulkan. Fixes #15779
2022-08-03 22:22:24 +02:00
Henrik Rydgård
6ca47076e7
Delete the Vulkan implementation of DrawActiveTexture, fixups to shader gen
2022-08-03 14:12:55 +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
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
Henrik Rydgård
710c6b6ad1
Fix crash in shader upscaling. This variable shadowed the one that now lives in Common.
...
Fixes #15778
2022-08-02 08:33:50 +02:00
Henrik Rydgård
90a44579bf
Implement color-to-depth for Vulkan, start implementing for D3D11
2022-08-01 11:30:36 +02:00
Henrik Rydgård
9437d5e3b0
Fix small breakage in Vulkan texture decoder
2022-08-01 11:29:25 +02:00
Henrik Rydgård
99b4e7c54c
Vulkan: Don't try to auto-mipmap 3D textures in max quality filter mode
2022-08-01 00:16:57 +02:00
Henrik Rydgård
0262fbc70a
Implement 3D textures for D3D11
2022-07-31 10:43:48 +02:00
Henrik Rydgård
e455d6bcfe
Some safety checks to avoid bad combinations, probably not really needed in practice.
2022-07-31 10:43:48 +02:00
Henrik Rydgård
176b460d76
Quick attempt at fixing the Macross glitch
2022-07-31 10:43:48 +02:00
Henrik Rydgård
f061eadc04
Initial implementation of 3D texturing through equal-size mips (see #6357 )
...
Vulkan-only currently, though all the other backends except ES 2.0
without GL_OES_texture_3d can support it with some work.
2022-07-31 10:43:47 +02:00
Unknown W. Brackets
795b1c04a9
GPU: Small scaling variable cleanup.
2022-07-30 18:18:51 -07: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
b9b3310c21
Remove some indentation
2022-07-30 10:45:03 +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
eb6d364a2d
Vulkan: One step closer to using PrepareBuildTexture
2022-07-30 10:44:28 +02:00
Henrik Rydgård
c031f3085b
Additional cleanup
2022-07-30 10:44:26 +02:00
Henrik Rydgård
679a861204
Make the BuildTexture of DX9 and D3D11 backends more similar
2022-07-30 10:44:01 +02:00
Henrik Rydgård
da9f03e356
Remove indentation, useless code
2022-07-30 10:42:16 +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
Henrik Rydgård
c9a37ec6b9
Remove bool that was always true in state mapping.
2022-07-24 21:04:54 +02:00
Henrik Rydgård
f523341351
Remove unnecessary parameters from MakePixelsTexture
2022-07-24 13:54:09 +02:00
Henrik Rydgård
c955246499
Fix shader blending regression (Vulkan)
2022-05-03 00:38:58 +02:00
Unknown W. Brackets
42d7226413
Vulkan: Correct size for tex mip level readback.
...
Used by the GE debugger to display the texture levels.
2022-05-01 15:23:57 -07:00
Henrik Rydgård
1dead5f095
Merge pull request #15515 from hrydgard/remove-framebuffer-read-limit
...
Remove the rather problematic limit on framebuffer copies
2022-05-01 13:41:35 +02:00
Henrik Rydgård
7c6c59976c
Merge pull request #15514 from hrydgard/vulkan-barrier-optimizations
...
Vulkan barrier optimizations
2022-05-01 13:39:01 +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
d30024cc88
Vulkan: Follow sampler best practices with auto max quality.
2022-05-01 10:20:11 +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
ed7dfdc8ad
Fix mip level bug in Vulkan texture cache.
2022-04-23 22:51:11 +02:00
Henrik Rydgård
c52a5e9e25
Fix checks for the "fake mipmap" situation.
...
Fixes #15492
2022-04-22 22:59:20 +02:00
Unknown W. Brackets
34d0acac4e
Vulkan: Save textures using a memory copy.
2022-04-17 20:55:39 -07:00
Unknown W. Brackets
39d6dc1740
Vulkan: Allow saving const tex levels.
...
This might be used for fonts, for example. They could be replaced, so no
reason not to export.
2022-04-17 20:06:03 -07:00
Henrik Rydgård
dffc1a9196
Add the slow comment to one more place
2022-04-18 00:40:49 +02:00
Henrik Rydgård
3a09c85fb1
Fix hang when choosing "Skip" in first-time init. Warning fix, comment add.
...
Fixes #15011
2022-04-17 23:02:37 +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
a5ee1884c1
Address feedback
2022-04-15 01:08:14 +02:00
Henrik Rydgård
3bf9ea8de6
Debug log (remove before merge)
2022-04-15 00:56:25 +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
Henrik Rydgård
7cab540fca
Short circuit the texture replacement code
2022-03-08 19:56:06 +01:00
Unknown W. Brackets
8418287a87
Vulkan: Avoid crash on double DeviceLost.
...
This caused Android to crash when switching to OpenGL, because the
destructor would try to deinit again. There weren't any objects, but
draw_ was no longer valid.
2022-02-06 23:34:44 -08: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
Unknown W. Brackets
48b597a1b9
Display: Move core counters/stats to HW file.
...
This separates things better, so not everything is pulling in HLE.
2022-01-30 11:53:48 -08:00
Unknown W. Brackets
a9a07b0935
Vulkan: Avoid crash on bad shader.
2022-01-09 21:34:05 -08:00
Henrik Rydgård
df2f0df155
Make the Vulkan GPU log profiler a runtime developer setting.
...
I keep forgetting to disable the define on commit, this is a better
solution.
2021-12-19 22:50:14 +01:00
Henrik Rydgård
748b8287a6
Add format string support to Vulkan log-profiler
2021-12-19 22:21:34 +01:00
Henrik Rydgård
80ae4b039c
Vulkan: Be more restrictive about texture upscaling on "slow" devices.
...
Applies the same rules as for software upscaling in this case.
Should fix the stutters seen in #15109
2021-12-16 21:00:49 +01:00
Henrik Rydgård
ff887b0f11
Vulkan: Don't generate mipmaps for huge textures (probably menu backgrounds). Other minor fixes.
2021-12-13 09:13:48 +01:00
Henrik Rydgård
b99a5b6613
Minor fixes
2021-12-12 23:21:28 +01:00
Henrik Rydgård
5adf23280c
Turn video upscaling off.
2021-12-12 23:21:28 +01:00
Henrik Rydgård
dc9816ceac
Add hardcoded bool toggle for upscaling video, fix log, remove a comment, minor opt
2021-12-12 23:20:57 +01:00
Henrik Rydgård
3833d935f4
Fixes when profiler is disabled.
...
Typo, validation fix
More fixes
Fix mipgen logging
Disable the logging profiler by default again
Important to use the macro
2021-12-12 12:42:40 +01:00
Henrik Rydgård
9945620504
Switch to macros to easily disable the new profiling. Add missing scope
2021-12-12 12:11:59 +01:00
Henrik Rydgård
55fe21db1e
Add a simple GPU profiler to profile individual events, rather than full passes.
2021-12-12 12:11:54 +01:00
Henrik Rydgård
b85a7e9a46
Name uniform buffers, add more asserts. Used this to track down the bug fixed in the previous commit.
2021-12-10 21:01:01 +01:00
Henrik Rydgård
7b07a1385a
Merge pull request #15220 from unknownbrackets/vulkan-exit
...
Vulkan: Fix use-after-free on shutdown
2021-12-10 10:37:43 +01:00
Henrik Rydgård
97f3b477ab
Merge pull request #15219 from unknownbrackets/vulkan-2d
...
Vulkan: Avoid desc set error in tests
2021-12-10 10:37:19 +01:00
Unknown W. Brackets
fe7b573a38
Vulkan: Fix use-after-free on shutdown.
2021-12-09 23:52:10 -08:00
Unknown W. Brackets
8d06431ea7
Vulkan: Use new desc sets in Draw and VulkanUtil.
...
It seems like a bug that destory device objects wasn't clearing descSets.
2021-12-09 19:03:17 -08:00
Unknown W. Brackets
1010d7ac0e
Vulkan: Refactor common desc pool handling.
2021-12-09 18:39:55 -08:00
Unknown W. Brackets
75d2188a92
Vulkan: Avoid desc set error in tests.
...
This requires quite a few DrawActiveTextures, but some pspautotests were
triggering it.
2021-12-09 17:43:00 -08:00
Henrik Rydgård
45308a16c0
Vulkan is strict about scissor rect, so let's clamp centrally.
...
Better than spreading the logic all over.
Fixes #15207
2021-12-08 22:38:01 +01:00
Henrik Rydgård
05429fc34f
Vulkan: Correct the max level to generate mipmap calculation
2021-12-07 21:28:58 +01:00
Henrik Rydgård
f991f6a789
Remove the old allocator visualizer. Keep the setting but hide it. Other feedback
2021-11-23 08:55:12 +01:00
Henrik Rydgård
0cbb7ab027
Change the PushBuffer API a bit to not take explicit memory types.
2021-11-22 18:54:09 +01:00
Henrik Rydgård
c2f594cc73
Remove the VulkanDeviceAllocator
2021-11-22 18:54:09 +01:00
Henrik Rydgård
1b1e585a35
More integration, use VMA in VulkanTexture
2021-11-22 18:54:09 +01:00
Henrik Rydgård
81fba1f4a4
Minor refactor
2021-11-21 22:08:53 +01: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
Henrik Rydgård
dda425b068
Vulkan: Add a single background thread for pipeline creation
...
Add proper waits for compile-done
Don't rely on non-standard struct initialization of classes
Attempt to drain the pipeline compile queue before destroying the PipelineManager.
Vulkan: Bump the cache version for testing
2021-11-21 18:36:00 +01:00
Henrik Rydgård
62f4875e24
VulkanRenderManager: Add deferred pipeline creation (to get it off the CPU thread)
2021-11-21 18:36:00 +01:00
Unknown W. Brackets
f7a029c61f
Vulkan: Fix crash on shutdown after device lost.
...
This happens in SDL every time, apparently.
2021-11-21 05:35:07 -08:00
Unknown W. Brackets
8a5f07b860
Vulkan: Don't cache vulkan_ with draw context.
...
Since we can get the VulkanContext cheaply from the draw context, it's
easier to make sure things stay up to date.
2021-11-14 15:25:28 -08: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
f58e75e462
Remove unused variable
2021-11-07 16:31:28 +01:00
Henrik Rydgård
43dc54bc4a
Comment fix, remove assert
2021-11-07 16:30:47 +01:00
Henrik Rydgård
c60feef55e
Remove support for 16-bit textures from the upscaling shader, to shorten it for benefit of mobile GPUs
2021-11-07 16:08:57 +01:00
Henrik Rydgård
281ddc2437
Speed up the 4xBRZ upscaler with 16x and the MMPX one with 4x by not doing redundant work
2021-11-07 15:47:05 +01:00
Henrik Rydgård
6349704924
Switch texture scaling shaders to a fixed scale model, preparing for the next change.
2021-11-07 13:12:28 +01:00
Henrik Rydgård
c111d6cc2d
Remove the copy-compute-shader path
2021-11-07 12:55:39 +01:00
Unknown W. Brackets
60bd25582c
Vulkan: Remove wide line handling.
...
No longer used, since we convert lines to triangles now.
2021-10-31 14:47:21 -07:00