Commit graph

5075 commits

Author SHA1 Message Date
ReinUsesLisp
76bd3a8843 gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shaders
NV_shader_buffer_{load,store} is a 2010 extension that allows GL applications
to use what in Vulkan is known as physical pointers, this is basically C
pointers. On GLASM these is exposed through the LOAD/STORE/ATOM
instructions.

Up until now, assembly shaders were using NV_shader_storage_buffer_object.
These work fine, but have a (probably unintended) limitation that forces
us to have the limit of a single stage for all shader stages. In contrast,
with NV_shader_buffer_{load,store} we can pass GPU addresses to the
shader through local parameters (GLASM equivalent uniform constants, or
push constants on Vulkan). Local parameters have the advantage of being
per stage, allowing us to generate code without worrying about binding
overlaps.
2020-07-18 01:59:57 -03:00
bunnei
54f4821375 Merge pull request #4273 from ogniK5377/async-shaders-prod
video_core: Add asynchronous shader decompilation and compilation
2020-07-18 00:48:27 -04:00
David Marcec
578f84cdf4 Fix style issues 2020-07-18 14:24:32 +10:00
bunnei
8ff5d393b7 Merge pull request #4364 from lioncash/desig5
vulkan: Make use of designated initializers where applicable
2020-07-18 00:12:43 -04:00
ReinUsesLisp
1e30bdee64 vk_device: Fix build error on old MSVC versions
Designated initializers on old MSVC versions fail to build when they
take the address of a constant.
2020-07-17 20:27:53 -03:00
bunnei
b4914299eb Merge pull request #4322 from ReinUsesLisp/fix-dynstate
vk_state_tracker: Fix dirty flags for stencil_enable on VK_EXT_extended_dynamic_state
2020-07-17 09:50:45 -04:00
LC
10cf640cb6 Merge pull request #4369 from lioncash/hle-macro
macro_hle: Remove unnecessary std::make_pair calls
2020-07-17 05:20:41 -04:00
LC
e1b448b550 Merge pull request #4340 from lioncash/remove
shader_cache: Make use of std::erase_if
2020-07-17 05:19:20 -04:00
David Marcec
bab9531cc6 Remove duplicate config 2020-07-17 14:26:18 +10:00
David Marcec
73118715ca Use conditional var 2020-07-17 14:26:17 +10:00
David Marcec
95b545df7c Drop max workers from 8->2 for testing 2020-07-17 14:26:15 +10:00
David Marcec
74d8c9e0dd Rebase for per game settings 2020-07-17 14:26:14 +10:00
David Marcec
a4e811af27 async shaders 2020-07-17 14:24:57 +10:00
Lioncash
62ad951689 macro_hle: Remove unnecessary static keywords
These functions are already in an anonymous namespace which makes the
functions internally linked.
2020-07-16 23:17:17 -04:00
David
e6e7f7834a Merge pull request #4368 from lioncash/macro
macro: Resolve missing parameter in doxygen comment
2020-07-17 13:13:22 +10:00
David
cf419ad73e Merge pull request #4370 from lioncash/simplify
macro_hle: Simplify shift expression in HLE_771BB18C62444DA0()
2020-07-17 13:13:05 +10:00
Lioncash
68f92e780d macro_hle: Simplify shift expression in HLE_771BB18C62444DA0()
Given the expression involves a 32-bit value, this simplifies down to
just: 0x3ffffff. This is likely a remnant from testing that was never
cleaned up.

Resolves a -Wshift-overflow warning.
2020-07-16 22:16:11 -04:00
Lioncash
a18530237c macro_hle: Remove unnecessary std::make_pair calls
The purpose of make_pair is generally to deduce the types within the
pair without explicitly specifying the types, so these usages were
generally unnecessary, particularly when the type is enforced by the
array declaration.
2020-07-16 21:59:25 -04:00
Lioncash
38c36545d5 macro: Resolve missing parameter in doxygen comment
Resolves a -Wdocumentation warning.
2020-07-16 21:54:42 -04:00
Lioncash
daa19f1894 wrapper: Make use of designated initializers where applicable 2020-07-16 20:01:01 -04:00
Lioncash
28c7c4e06c vk_texture_cache: Make use of designated initializers where applicable 2020-07-16 19:52:38 -04:00
Lioncash
6ae380626f vk_texture_cache: Amend mismatched access masks and indices in UploadBuffer
Discovered while converting relevant parts of the codebase over to
designated initializers.
2020-07-16 19:45:46 -04:00
Lioncash
f683a6e7e0 vk_swapchain: Make use of designated initializers where applicable 2020-07-16 19:27:02 -04:00
Lioncash
98e5d57908 vk_stream_buffer: Make use of designated initializers where applicable 2020-07-16 19:22:11 -04:00
Lioncash
947749d35d vk_staging_buffer_pool: Make use of designated initializers where applicable 2020-07-16 19:22:03 -04:00
Lioncash
4694ea8a99 vk_shader_util: Make use of designated initializers where applicable 2020-07-16 19:17:41 -04:00
Lioncash
683403d1cf vk_scheduler: Make use of designated initializers where applicable 2020-07-16 19:11:43 -04:00
Lioncash
a6f0caeeb9 vk_sampler_cache: Make use of designated initializers where applicable 2020-07-16 19:06:40 -04:00
Lioncash
faba1ede49 vk_resource_manager: Make use of designated initializers where applicable 2020-07-16 19:02:35 -04:00
Lioncash
96a6d95c9c vk_renderpass_cache: Make use of designated initializers where applicable 2020-07-16 18:57:23 -04:00
Lioncash
71a085c84f vk_rasterizer: Make use of designated initializers where applicable 2020-07-16 18:49:42 -04:00
Lioncash
42dadb45ac vk_query_cache: Make use of designated initializers where applicable 2020-07-16 18:34:04 -04:00
Lioncash
fe2c963646 vk_pipeline_cache: Make use of designated initializers where applicable 2020-07-16 18:32:29 -04:00
Lioncash
8ffbe8e7c9 vk_memory_manager: Make use of designated initializers where applicable 2020-07-16 18:26:30 -04:00
Lioncash
6b6af38615 vk_image: Make use of designated initializers where applicable 2020-07-16 18:24:26 -04:00
Lioncash
f734fa9d78 vk_descriptor_pool: Make use of designated initializers where applicable 2020-07-16 18:19:45 -04:00
Lioncash
cc47d8b0ce vk_graphics_pipeline: Resolve narrowing warnings
For whatever reason, VK_TRUE and VK_FALSE aren't defined as having a
VkBool32 type, so we need to cast to it explicitly.
2020-07-16 18:13:49 -04:00
Lioncash
0b4ecb96d4 vk_compute_pipeline: Make use of designated initializers where applicable 2020-07-16 17:32:12 -04:00
Lioncash
7818dcd562 vk_compute_pass: Make use of designated initializers where applicable
Note: Some barriers can't be converted over yet, as they ICE MSVC.
2020-07-16 17:23:56 -04:00
Lioncash
5dc1c68a04 vk_buffer_cache: Make use of designated initializers where applicable
Note: An array within CopyFrom() cannot be converted over yet, as it
ICEs MSVC when converted over.
2020-07-16 16:59:39 -04:00
Rodrigo Locatti
b880ecc427 Merge pull request #4333 from lioncash/desig3
vk_graphics_pipeline: Make use of designated initializers where applicable
2020-07-16 17:41:45 -03:00
Rodrigo Locatti
475e7fb624 Merge pull request #4332 from lioncash/vkdev
vk_device: Make use of designated initializers where applicable
2020-07-16 17:41:20 -03:00
ReinUsesLisp
c5391180e6 decode/other: Implement S2R.LaneId
This maps to host's thread id.

- Fixes graphical issues on Paper Mario.
2020-07-16 16:09:39 -03:00
ReinUsesLisp
021aca9492 gl_arb_decompiler: Execute BAR even when inside control flow
Unlike GLSL, GLASM allows us to call BAR inside control flow.

- Fixes graphical artifacts in Paper Mario.
2020-07-16 16:05:52 -03:00
ReinUsesLisp
03bb8691b7 renderer_{opengl,vulkan}: Clamp shared memory to host's limit
This stops shaders from failing to build when the exceed host's shared
memory size limit. An error is logged.
2020-07-16 16:02:46 -03:00
bunnei
a002ba827d Merge pull request #4321 from lioncash/desig
vk_blit_screen: Make use of designated initializers where applicable
2020-07-16 14:55:36 -04:00
Lioncash
7d3ba83dde shader_cache: Make use of std::erase_if
Now that we use C++20, we can also make use of std::erase_if instead of
needing to do the erase-remove idiom.
2020-07-14 15:49:15 -04:00
bunnei
4d15c4ae6f Merge pull request #4242 from ReinUsesLisp/maxwell-dma
maxwell_dma: Match official doc and support pitch->voxel copies
2020-07-14 14:04:16 -04:00
Lioncash
8d7fa4e28c vk_device: Make use of designated initializers where applicable
Avoids redundant repetitions of variable names, and allows assignment
all in one statement.
2020-07-13 22:24:01 -04:00
Lioncash
869f37566e vk_graphics_pipeline: Make use of designated initializers where applicable
Avoids redundant variable name repetitions.
2020-07-13 21:07:56 -04:00