Commit Graph

1299 Commits

Author SHA1 Message Date
Henrik Rydgård
ad1cd40ff7 Bump shader cache versions before release, just to be safe. 2022-12-13 08:45:20 +01:00
Unknown W. Brackets
f44852bb18 Global: Cleanup virtual/override specifiers.
Also missing virtual destructors, hidden non-overrides, etc.
2022-12-10 21:13:36 -08:00
Henrik Rydgård
cdb830f390 Minor optimization/cleanup 2022-12-10 12:05:40 +01:00
Unknown W. Brackets
78ed8d45a7 Vulkan: Defer deletion of shader module promises. 2022-12-03 14:53:10 -08:00
Unknown W. Brackets
53eedf06e3 Vulkan: Track pipeline desc using a refcount.
Not very safe to not allow deletes, and don't want to force Draw objects
on the deleter (this is referenced by them.)
2022-12-03 14:52:06 -08:00
Henrik Rydgård
238c9439e3
Merge pull request #16491 from unknownbrackets/cleanup
Quick cleanup
2022-12-03 16:38:32 +01:00
Unknown W. Brackets
e50eae1bfb GPU: Cleanup some bounds checks, assignments. 2022-12-03 07:17:12 -08:00
Henrik Rydgård
0f12d44e59 Remove some unused/unnecessary code 2022-12-03 12:05:10 +01:00
Henrik Rydgård
92df6b832c Safer and simpler alternative to cbfa4bf.
See #16483
2022-12-03 12:05:08 +01:00
Henrik Rydgård
02b8bf33fb
Merge pull request #16458 from hrydgard/desktop-friendly-msaa
Implement MSAA support for desktop GPUs in Vulkan
2022-12-03 11:22:41 +01:00
Lubos
b41a782fcd Revert "Centralize ClearCacheNextFrame"
This reverts commit cbfa4bfc8e.
2022-12-02 14:32:27 +01:00
Henrik Rydgård
8a3e92aa38 Not pretty, but with this, you can switch MSAA level at runtime. 2022-12-01 23:41:31 +01:00
Henrik Rydgård
8208768c15 Add a pipeline flag for USES_DISCARD. Will be used for the MSAA quality setting. 2022-12-01 22:49:00 +01:00
Henrik Rydgård
4dfce4f6bc Basically working MSAA on desktop GPUs! Some glitches remain. 2022-12-01 22:49:00 +01:00
Henrik Rydgård
06af304c8d Multisampling groundwork 2022-12-01 22:49:00 +01:00
Unknown W. Brackets
4866518b84
Merge pull request #16477 from hrydgard/invalidation-refactor
Add a flags parameter to InvalidateCachedState and rename it Invalidate.
2022-12-01 11:05:04 -08:00
Henrik Rydgård
331d024a8c Add a flags parameter to InvalidateCachedState and rename it Invalidate.
Also rename the old InvalidationFlags enum to InvalidateCallbackFlags.
2022-12-01 19:15:38 +01:00
Henrik Rydgård
40ae99073b Remove std::string from VulkanTexture 2022-12-01 12:17:03 +01:00
Henrik Rydgård
d72ad3b3f4 Fragment shader generator: Move the framebuffer fetch bit to the shader ID.
Will resolve a future issue in the multisampling PR, where the
GPU_USE_FRAMEBUFFER_FETCH flag changes at runtime if you switch between no AA and MSAA.

Just figured I'd get it in separately for safety.
2022-11-30 00:26:15 +01:00
Unknown W. Brackets
1d00824528 Vulkan: Only use geometry shaders with accurate z.
Just to be safe, since that's what it's most well tested with.
2022-11-26 23:28:57 -08:00
Henrik Rydgård
3dd45c6561 Can't forget the texture in the callback, breaks texture-from-framebuffer-copy.
Was probably redundant anyway.
2022-11-24 11:02:21 +01:00
Henrik Rydgård
70d1d8fa07 Replace the "GetCurrentStepId"-based state invalidation with callbacks 2022-11-24 10:52:42 +01:00
Henrik Rydgård
ddd2c6e343
Merge pull request #16409 from hrydgard/preserve-framebuffers
Preserve framebuffer on pause screen even if render resolution is changed
2022-11-22 10:03:47 +01:00
Henrik Rydgård
8f103f3f47 Extract the Vulkan descriptor binding cleanup from #16345 2022-11-21 20:30:20 +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
37ec31dedd Fix resizing issue. Took some refactoring. 2022-11-20 12:57:32 +01:00
Unknown W. Brackets
4a367148e6 GPU: Centralize more GPU_USE flags, like depth. 2022-11-13 08:04:47 -08:00
Unknown W. Brackets
66668d4b3f Vulkan: Correct alpha in Adreno workaround. 2022-11-12 17:41:48 -08:00
Unknown W. Brackets
70c3205564 GPU: Correct equal depth checks. 2022-11-09 20:34:29 -08: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
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