Commit graph

18253 commits

Author SHA1 Message Date
ReinUsesLisp cdb3837085 shader: Manually convert from array<u32> to bitset instead of using bit_cast 2021-07-22 21:51:40 -04:00
ameerj e45e458b17 renderers: Disable async shader compilation
The current implementation is prone to causing graphical issues. Disable until a better solution is implemented.
2021-07-22 21:51:40 -04:00
ReinUsesLisp b654537f0f maxwell_to_vk: Add R16_SNORM 2021-07-22 21:51:40 -04:00
lat9nq df62bcd9cb configure_graphics: Mark SPIR-V as Experimental, Mesa only 2021-07-22 21:51:40 -04:00
ameerj f2f16e3a1d glsl: Fix tracking of info.uses_shadow_lod 2021-07-22 21:51:40 -04:00
ameerj 508e41777b shader: Ignore global memory ops on devices lacking int64 support 2021-07-22 21:51:40 -04:00
lat9nq 52f2fe7b52 vulkan_device: Add missing include algorithm 2021-07-22 21:51:40 -04:00
ameerj d965b7200a vulkan_device: Blacklist ampere devices from float16 math 2021-07-22 21:51:40 -04:00
ameerj d54c4880d1 dual_vertex_pass: Clang format 2021-07-22 21:51:40 -04:00
ameerj 472f9fcb18 gl_shader_cache: Fixes for async shaders 2021-07-22 21:51:40 -04:00
ReinUsesLisp e8d458a81d vulkan_device: Enable VK_EXT_extended_dynamic_state on RADV 21.2 onward 2021-07-22 21:51:40 -04:00
ReinUsesLisp ff35ef8ec1 emit_spirv: Workaround VK_KHR_shader_float_controls on fp16 Nvidia
Fix regression on Fire Emblem: Three Houses when using native fp16.
2021-07-22 21:51:40 -04:00
lat9nq 84bc5be7a1 configure_graphics: Re-order vulkan device populating 2021-07-22 21:51:40 -04:00
lat9nq c969f6e678 shader: GCC fmt 8.0.0 fixes 2021-07-22 21:51:40 -04:00
ameerj 79e317ad7d shader: Account for 33-bit IADD3 scenario 2021-07-22 21:51:40 -04:00
ReinUsesLisp 611797a7c6 shader: Only apply shift on register mode for IADD3 2021-07-22 21:51:39 -04:00
ReinUsesLisp 934b23ab85 vk_rasterizer: Workaround bug in VK_EXT_vertex_input_dynamic_state
Workaround potential bug on Nvidia's driver where only updating high
attributes leaves low attributes out dated.
2021-07-22 21:51:39 -04:00
ReinUsesLisp b48b4b0600 shader: Fix disabled and unwritten attributes and varyings 2021-07-22 21:51:39 -04:00
ameerj d77dc5919c glsl: Fix shared and local memory declarations
account for the fact that program.*memory_size is in units of bytes.
2021-07-22 21:51:39 -04:00
ameerj 33d21ac2db opengl: Implement LOP.CC
Used by MH:Rise
2021-07-22 21:51:39 -04:00
ReinUsesLisp 1c7c65087d vk_graphics_pipeline: Implement smooth lines 2021-07-22 21:51:39 -04:00
ReinUsesLisp bd0796d52f vk_graphics_pipeline: Implement line width 2021-07-22 21:51:39 -04:00
ReinUsesLisp 7dc8577529 spirv: Fix code emission when descriptor aliasing is unsupported
Fixes OpenGL.
2021-07-22 21:51:39 -04:00
lat9nq 5443d4bd9c video_core: Enable GL SPIR-V shaders 2021-07-22 21:51:39 -04:00
lat9nq ddd4720fe4 general: Add setting shader_backend
GLASM is getting good enough that we can move it out of advanced
graphics settings. This removes the setting `use_assembly_shaders`,
opting for a enum class `shader_backend`. This comes with the benefits
that it is extensible for additional shader backends besides GLSL and
GLASM, and this will work better with a QComboBox.

Qt removes the related assembly shader setting from the Advanced
Graphics section and places it as a new QComboBox in the API Settings
group. This will replace the Vulkan device selector when OpenGL is
selected.

Additionally, mark all of the custom anisotropic filtering settings as
"WILL BREAK THINGS", as that is the case with a select few games.
2021-07-22 21:51:39 -04:00
ameerj c446ada33e glsl: Declare local memory in main 2021-07-22 21:51:39 -04:00
ameerj 0810714e46 glsl: Add passthrough geometry shader support 2021-07-22 21:51:39 -04:00
ReinUsesLisp 41b2a991c4 shader: Use std::bit_cast instead of Common::BitCast for passthrough 2021-07-22 21:51:39 -04:00
ReinUsesLisp 362888dcb0 glasm: Add passthrough geometry shader support 2021-07-22 21:51:39 -04:00
ReinUsesLisp b1df436cef shader: Rework varyings and implement passthrough geometry shaders
Put all varyings into a single std::bitset with helpers to access it.

Implement passthrough geometry shaders using host's.
2021-07-22 21:51:39 -04:00
ReinUsesLisp 649c9cca0f vk_graphics_pipeline: Implement conservative rendering 2021-07-22 21:51:39 -04:00
ReinUsesLisp 6db3ba6542 shader: Only verify shader when graphics debugging is enabled 2021-07-22 21:51:39 -04:00
ReinUsesLisp c0705f79b8 shader: Unify shader stage types 2021-07-22 21:51:39 -04:00
lat9nq 0f092f17af lower_int64_to_int32: Add missing include 2021-07-22 21:51:39 -04:00
ReinUsesLisp 0a75c400e3 shader: Emulate 64-bit integers when not supported
Useful for mobile and Intel Xe devices.
2021-07-22 21:51:39 -04:00
ReinUsesLisp e3df2285ca shader: Add int64 to int32 lowering pass 2021-07-22 21:51:39 -04:00
ReinUsesLisp ba211323ab shader: Teach global memory base tracker to follow vectors 2021-07-22 21:51:39 -04:00
ReinUsesLisp f54fa4a1f5 shader: Add constant propagation to integer vectors 2021-07-22 21:51:39 -04:00
ameerj 99e8164b43 glsl: Better IAdd Overflow CC fix
This ensures the original operand values are not overwritten when being used in the overflow detection.
2021-07-22 21:51:39 -04:00
ReinUsesLisp f158fe9359 shader: Remove IAbs64 2021-07-22 21:51:39 -04:00
ameerj 516c17d4d3 glsl: Fix IADD CC 2021-07-22 21:51:39 -04:00
ameerj 58a052072c shader_recompiler: Fix IADD3 input partitioning 2021-07-22 21:51:39 -04:00
ReinUsesLisp 04c1dca457 shader: Move loop safety tests to code emission 2021-07-22 21:51:39 -04:00
ReinUsesLisp e57f54e582 gl_graphics_pipeline: Fix assembly shaders check for transform feedbacks 2021-07-22 21:51:39 -04:00
ameerj abade15f5e glsl: Remove frag color initialization 2021-07-22 21:51:39 -04:00
ameerj 1d99187d4c glasm: Implement SetAttribute ViewportMask 2021-07-22 21:51:39 -04:00
ReinUsesLisp 2cff04fab9 gl_graphics_pipeline: Inline hash and operator== key functions 2021-07-22 21:51:39 -04:00
ReinUsesLisp 97cfedab70 gl_shader_cache: Check previous pipeline before checking hash map
Port optimization from Vulkan.
2021-07-22 21:51:39 -04:00
ReinUsesLisp 40402f3947 gl_graphics_pipeline: Port optimizations from Vulkan pipelines 2021-07-22 21:51:39 -04:00
ameerj b79424c3bf emit_glsl_special: Skip initialization of frag_color0
Fixes rendering in Devil May Cry without regressing Ori and the Blind Forest.
2021-07-22 21:51:38 -04:00
ReinUsesLisp d633ec4ecc shader: Calibrate loop safety threshold 2021-07-22 21:51:38 -04:00
ReinUsesLisp 2cd96376b5 buffer_cache: Fix debugging leftover 2021-07-22 21:51:38 -04:00
Morph 6e8400f165 glsl: Add missing ; in EmitSetSampleMask
Fixes shader compilation in Okami HD
2021-07-22 21:51:38 -04:00
ReinUsesLisp b7cf8e0de4 buffer_cache: Fix size reductions not having in mind bind sizes
A buffer binding can change between shaders without changing the
shaders. This lead to outdated bindings on OpenGL.
2021-07-22 21:51:38 -04:00
ameerj 7d20cd7656 glsl: Fix output varying initialization when transform feedback is used 2021-07-22 21:51:38 -04:00
ameerj c7921c7812 shaders: Allow shader notify when async shaders is disabled 2021-07-22 21:51:38 -04:00
ameerj 633c54a202 texture_pass: Fix is_read image qualification
Atomic operations are considered to have both read and write access. This was not  being accounted for.
2021-07-22 21:51:38 -04:00
ReinUsesLisp 9c387a270b shader: Align constant buffer sizes to 16 bytes
WAR for AMD reading zeroes on uniform buffers of size 2.
2021-07-22 21:51:38 -04:00
ReinUsesLisp 10f91c42e2 spirv: Properly handle devices without int8 and int16 2021-07-22 21:51:38 -04:00
ReinUsesLisp fe5fc478e7 spirv: Handle small storage buffer loads on devices with no support 2021-07-22 21:51:38 -04:00
ReinUsesLisp b3bf0d4ebb vk_graphics_pipeline: Use VK_KHR_push_descriptor when available
~51% faster on Nvidia compared to previous method.
2021-07-22 21:51:38 -04:00
ameerj 45c91da369 glsl: Fix cbuf component indexing bug falback 2021-07-22 21:51:38 -04:00
ReinUsesLisp 16d28031e7 shader: Simplify MergeDualVertexPrograms 2021-07-22 21:51:38 -04:00
ReinUsesLisp c4a71824d5 shader: Properly manage attributes not written from previous stages 2021-07-22 21:51:38 -04:00
ReinUsesLisp ebd1146ea7 glsl: Only declare fragment outputs on fragment shaders 2021-07-22 21:51:38 -04:00
ReinUsesLisp 9389e71b12 shader: Split profile and runtime info headers 2021-07-22 21:51:38 -04:00
ReinUsesLisp 52be21495e shader: Add support for native 16-bit floats 2021-07-22 21:51:38 -04:00
ReinUsesLisp 41c634a7a9 shader: Rename maxwell/program.h to translate_program.h 2021-07-22 21:51:38 -04:00
ReinUsesLisp a9a5f5b535 vulkan_device: Blacklist VK_EXT_vertex_input_dynamic_state on Intel 2021-07-22 21:51:38 -04:00
ameerj 7a9b23ea70 glsl: Obey need_declared_frag_colors to declare and initialize all frag_color
Fixes Ori and the blind forest title screen
2021-07-22 21:51:38 -04:00
ameerj 1d2c13fd7b glsl: Address rest of feedback 2021-07-22 21:51:38 -04:00
ameerj 52bd1d7788 glsl: Move gl_Position/generic attribute initialization to EmitProlgue 2021-07-22 21:51:38 -04:00
ameerj bc50a9ef20 glsl: Conditionally use fine/coarse derivatives based on device support 2021-07-22 21:51:38 -04:00
ameerj 4e73fdbd0f glsl: Cleanup/Address feedback 2021-07-22 21:51:38 -04:00
ameerj 7e661303d5 gl_shader_cache: Implement async shaders 2021-07-22 21:51:38 -04:00
ameerj d344489b5b glsl: Add Shader_GLSL logging 2021-07-22 21:51:38 -04:00
ameerj c44b3f664d glsl: Add LoopSafety instructions 2021-07-22 21:51:38 -04:00
ameerj 50e1ced397 glsl: Conditionally add EXT_texture_shadow_lod 2021-07-22 21:51:38 -04:00
ameerj b33af69513 glsl: Add stubs for sparse queries and variable aoffi when not supported 2021-07-22 21:51:38 -04:00
ameerj 3e6f89f964 glsl: Implement legacy varyings 2021-07-22 21:51:38 -04:00
ameerj 18aae22ad2 gl_shader_cache: Remove const from pipeline source arguments 2021-07-22 21:51:38 -04:00
ameerj 07a59e1404 gl_shader_cache: Move OGL shader compilation to the respective Pipeline constructor 2021-07-22 21:51:38 -04:00
ameerj 67cc50be47 glsl: Minor cleanup 2021-07-22 21:51:38 -04:00
ameerj 5e9b073176 glsl: Fix Cbuf getters for F32 type 2021-07-22 21:51:38 -04:00
ameerj 152f718017 glsl: Add immediate index oob checking for Cbuf getters 2021-07-22 21:51:38 -04:00
ameerj 163ce47cb1 glsl: Refactor GetCbuf functions to reduce code duplication 2021-07-22 21:51:38 -04:00
ameerj 7bf5c1164e glsl: Address more feedback. Implement indexed texture reads 2021-07-22 21:51:38 -04:00
ameerj 73278ba985 glsl: Remove Signed Integer variables 2021-07-22 21:51:38 -04:00
ameerj 5d2cd1551f glsl: Address Rodrigo's feedback 2021-07-22 21:51:38 -04:00
ameerj 8ab7780015 glsl: Reorganize backend code, remove unneeded [[maybe_unused]] 2021-07-22 21:51:37 -04:00
ameerj b247baab26 glsl: Implement SampleId and SetSampleMask
plus some minor refactoring of implementations
2021-07-22 21:51:37 -04:00
ameerj a2f864493b glsl: Add gl_PerVertex in for GS 2021-07-22 21:51:37 -04:00
ameerj 5eb36b0913 glsl: Use existing tracking for enabling EXT_shader_image_load_formatted 2021-07-22 21:51:37 -04:00
ameerj 42ac60591e glsl: Enable early fragment tests 2021-07-22 21:51:37 -04:00
ameerj 3ad05ecd4e gl_rasterizer: Add texture fetch barrier for fragments
Fixes flicker seen in XC2
2021-07-22 21:51:37 -04:00
ameerj 95aedb5258 glsl: Implement more attribute getters and setters 2021-07-22 21:51:37 -04:00
ameerj 656de6639c glsl: Implement fswzadd
and wip nv thread shuffle impl
2021-07-22 21:51:37 -04:00
ameerj ccd4becb79 glsl: Implement indexed attribute loads 2021-07-22 21:51:37 -04:00
ameerj 819ae85298 glsl: Conditionally add GL_ARB_sparse_texture2 2021-07-22 21:51:37 -04:00
ameerj c800b9bf92 glsl: Rebase fixes 2021-07-22 21:51:37 -04:00
ameerj 5292962d7e glsl: Conditionally use GL_EXT_shader_image_load_formatted
Fix for SULD.D
2021-07-22 21:51:37 -04:00
ameerj 6e4ed00e8d glsl: Remove output generic indexing for geometry stage 2021-07-22 21:51:37 -04:00
ameerj 3319879b23 glsl: Allow dynamic tracking of variable allocation 2021-07-22 21:51:37 -04:00
ameerj 1017c12427 glsl: Implement barriers 2021-07-22 21:51:37 -04:00
ameerj b3a46a3746 glsl: Implement image atomics and set layer
along with some more cleanup/oversight fixes
2021-07-22 21:51:37 -04:00
ameerj d01344c008 glsl: Fix image gather logic 2021-07-22 21:51:37 -04:00
ameerj fd55ca9828 glsl: Add cbuf access workaround for devices with component indexing bug 2021-07-22 21:51:37 -04:00
ameerj 8c9d420fa5 glsl: Use textureGrad fallback when EXT_texture_shadow_lod is unsupported 2021-07-22 21:51:37 -04:00
ameerj f56a276e79 emit_glsl_image: Use immediate offsets when possible 2021-07-22 21:51:37 -04:00
ameerj 8894af7c06 glsl: Fix <32-bit SSBO writes
and more cleanup
2021-07-22 21:51:37 -04:00
ameerj 4534294b7b glsl: Cleanup and address feedback 2021-07-22 21:51:37 -04:00
ameerj bef3820fb0 glsl: Refactor Global memory functions 2021-07-22 21:51:37 -04:00
ameerj dfa7abe1e7 glsl: Increase NUM_VARS that can be allocated
needed for HW:AoC.
2021-07-22 21:51:37 -04:00
ameerj 2e8da9d3be glsl: Implement Load/WriteGlobal
along with some other misc changes and fixes
2021-07-22 21:51:37 -04:00
ameerj d19a49485a glsl: Implement Images 2021-07-22 21:51:37 -04:00
ameerj 0c162d8b17 glsl: skip gl_ViewportIndex write if device does not support it 2021-07-22 21:51:37 -04:00
ameerj f54240823c glsl: Implement transform feedback 2021-07-22 21:51:37 -04:00
ameerj 922ea01123 glsl: Yet another gl_ViewportIndex fix attempt 2021-07-22 21:51:37 -04:00
ameerj 1736a7e162 glsl: Add gl_ViewportIndex out attribute 2021-07-22 21:51:37 -04:00
lat9nq 503159f29b emit_glsl_context_get_set: Remove unused function 2021-07-22 21:51:37 -04:00
ameerj 363e228778 glsl: Fix precise variable declaration
and add some more separation in the shader for better debugability when dumped
2021-07-22 21:51:37 -04:00
ameerj e866cece98 glsl: Implement tessellation shaders 2021-07-22 21:51:37 -04:00
ameerj 5c73bf453c glsl: Implement ImageGradient and other texture function variants 2021-07-22 21:51:37 -04:00
ameerj 8d8c104d4f glsl: Fix atomic SSBO offsets
and implement misc getters
2021-07-22 21:51:37 -04:00
ameerj 7374a8bf1d glsl: Implement geometry shaders 2021-07-22 21:51:37 -04:00
ameerj 43426d170c glsl: Use NotImplemented macro with function name output 2021-07-22 21:51:37 -04:00
ameerj aa06d8fa05 glsl: Implement gl_ViewportIndex
SSBU now working
2021-07-22 21:51:37 -04:00
ameerj badacf0a7e glsl: SHFL fix and prefer shift operations over divide in glsl shader 2021-07-22 21:51:37 -04:00
ameerj 00105f0615 glsl: Implement precise fp variable allocation 2021-07-22 21:51:37 -04:00
ameerj 1cc3be2135 HACK glsl: Write defaults to unused generic attributes 2021-07-22 21:51:37 -04:00
ameerj 12b9b923e1 glsl: Fix ssbo indexing and name shadowing between shader stages 2021-07-22 21:51:37 -04:00
ameerj c6615e9d05 glsl: implement set clip distance
and missed a diff in emit_glsl relating to var alloc ref counting
2021-07-22 21:51:37 -04:00
ameerj 33f63cdc22 glsl: Rework var alloc to not assign unused results 2021-07-22 21:51:37 -04:00
ameerj 8185a5ab34 glsl: Rework variable allocator to allow for variable reuse 2021-07-22 21:51:37 -04:00
ameerj 748e56e8a2 glsl: Fix ATOM and implement ATOMS 2021-07-22 21:51:37 -04:00
ameerj f91616b31a glsl: Use gl_SubGroupInvocationARB 2021-07-22 21:51:36 -04:00
ameerj ee44e94932 glsl: Implement VOTE for subgroup size potentially larger 2021-07-22 21:51:36 -04:00
ameerj 5a3864d8c4 glsl: Implement VOTE 2021-07-22 21:51:36 -04:00
ameerj 1e59e72a48 glsl: Implement ST{LS} 2021-07-22 21:51:36 -04:00
ameerj d7213c862e glsl: Implement more instructions used by SMO 2021-07-22 21:51:36 -04:00
ameerj 3795c56db6 glsl: Implement more instructions used by SMO 2021-07-22 21:51:36 -04:00
ameerj 26649eb889 glsl: Fix GetAttribute return values
fixes font rendering issues as these were used to index into the ssbos
2021-07-22 21:51:36 -04:00
ameerj 8a7d7d16c8 glsl: minor cleanup 2021-07-22 21:51:36 -04:00
ameerj 0ac1a68a36 glsl: Fix and implement rest of cbuf access 2021-07-22 21:51:36 -04:00
ameerj 0b8e65125a glsl: Implement TXQ and other misc changes 2021-07-22 21:51:36 -04:00
ameerj 5a4af6cf14 glsl: TLD4 implementation 2021-07-22 21:51:36 -04:00
ameerj 81c2595a33 glsl: Implement TLD instruction 2021-07-22 21:51:36 -04:00
ameerj db039e6271 glsl: Implement TEXS 2021-07-22 21:51:36 -04:00
ameerj b3253f6f44 glsl: Cleanup texture functions 2021-07-22 21:51:36 -04:00
lat9nq fc7edccbc1 shader_recompiler: GCC fixes 2021-07-22 21:51:36 -04:00
ameerj 08935e289f glsl: Implement TEX depth functions 2021-07-22 21:51:36 -04:00
ameerj b055e4a91e glsl: Implement TEX ImageSample functions 2021-07-22 21:51:36 -04:00
ameerj 8c9c79a8c6 glsl: Rework Shuffle emit instructions to align with SPIR-V 2021-07-22 21:51:36 -04:00
ameerj a68609b4f8 glsl: Better Storage access and wip warps 2021-07-22 21:51:36 -04:00
ameerj a28096cb70 glsl: Fix integer conversions, implement clamp CC 2021-07-22 21:51:36 -04:00
ameerj fa06331601 glsl: Implement IADD CC 2021-07-22 21:51:36 -04:00
ameerj 54778aa10a glsl: SSBO access fixes and wip SampleExplicitLod implementation. 2021-07-22 21:51:36 -04:00
ameerj 72974388fb glsl: WIP var forward declaration
to fix Loop control flow.
2021-07-22 21:51:36 -04:00
ameerj c797a0c5a5 glsl: Fix bindings, add some CC ops 2021-07-22 21:51:36 -04:00
ameerj e6a0f0f384 glsl: remove unused headers 2021-07-22 21:51:36 -04:00
ameerj b96d76fa7e glsl: Implement derivatives and YDirection
plus some other misc additions/changed
2021-07-22 21:51:36 -04:00
ameerj ac6135774f glsl: Fix non-immediate buffer access
and many other misc implementations
2021-07-22 21:51:36 -04:00
ameerj 2328b0b2a8 glsl: textures wip 2021-07-22 21:51:36 -04:00
ameerj 32328acc39 glsl: Implement some attribute getters and setters 2021-07-22 21:51:36 -04:00
ameerj c8b2a5a4f3 glsl: Track S32 atomics 2021-07-22 21:51:36 -04:00
ameerj ee45d46f9e glsl: Update phi node management 2021-07-22 21:51:36 -04:00
ameerj 4eb02b106f glsl: Fix floating point compare ops
Logic for ordered/unordered ops was wrong.
2021-07-22 21:51:36 -04:00
ameerj ce2ddb7d69 glsl: Query GL Device for FP16 extension support 2021-07-22 21:51:36 -04:00
ameerj 1d88049eaf glsl: Simply FP storage atomics 2021-07-22 21:51:36 -04:00
ameerj 0adc9d2fc1 glsl: F16x2 storage atomics 2021-07-22 21:51:36 -04:00
ameerj 5fa21197b9 glsl: Revert ssbo aliasing. Storage Atomics impl 2021-07-22 21:51:36 -04:00
ameerj 3d950a8d18 glsl: implement phi nodes 2021-07-22 21:51:36 -04:00
ameerj 659eecb295 glsl: Wip storage atomic ops 2021-07-22 21:51:36 -04:00
ameerj b3fce08191 glsl: Implement FCMP 2021-07-22 21:51:36 -04:00
ameerj 7febd59ce1 glsl: Add a more robust fp formatter 2021-07-22 21:51:36 -04:00
ameerj bf40d10805 glsl: More FP fixes 2021-07-22 21:51:36 -04:00
ameerj d7656077bf glsl: FP function fixes 2021-07-22 21:51:36 -04:00
ameerj 30f47ec831 glsl: More FP instructions/fixes 2021-07-22 21:51:36 -04:00
ameerj 1dae770c9d glsl: Add many FP32/64 instructions 2021-07-22 21:51:36 -04:00
ReinUsesLisp fc7cb28bc7 glsl: Fixup build issues 2021-07-22 21:51:36 -04:00
ameerj 1df4541247 glsl: Implement more Integer ops 2021-07-22 21:51:36 -04:00
ameerj fc36d45a97 glsl: Implement BF* 2021-07-22 21:51:36 -04:00
ameerj eea0726cd5 glsl: Implement a few Integer instructions 2021-07-22 21:51:36 -04:00
ameerj 0c315dae67 glsl: Use std::string_view for Emit function args. 2021-07-22 21:51:35 -04:00
ameerj b2cd8e4588 glsl: Pass IR::Inst& to Emit functions 2021-07-22 21:51:35 -04:00
ameerj c01220d25a glsl: INeg and IAdd negate tests 2021-07-22 21:51:35 -04:00
ameerj 6ee142d3e4 glsl: Reusable typed variables. IADD32 2021-07-22 21:51:35 -04:00
ameerj 690e6a79c7 glsl: Fix program linking and cbuf 2021-07-22 21:51:35 -04:00
ameerj 3355c467e0 glsl: Fix "reg" allocing
based on glasm with some tweaks
2021-07-22 21:51:35 -04:00
ameerj fda83fe3c5 glsl: Initial backend 2021-07-22 21:51:35 -04:00
ReinUsesLisp 04fed81921 spirv: Reduce log severity of mismatching denorm rules 2021-07-22 21:51:35 -04:00
ReinUsesLisp 574a99b9b3 shader: Fix loop safety to SSA pass 2021-07-22 21:51:35 -04:00
ReinUsesLisp eb7925b421 vk_rasterizer: Exit render passes on fragment barriers 2021-07-22 21:51:35 -04:00
Rodrigo Locatti 0ce45868ca vk_graphics_pipeline: Fix path with no VK_EXT_extended_dynamic_state 2021-07-22 21:51:35 -04:00
ReinUsesLisp ee69b7aa59 buffer_cache: Invalidate fast buffers on compute 2021-07-22 21:51:35 -04:00
ReinUsesLisp f40daa777e shader: Add logging 2021-07-22 21:51:35 -04:00
lat9nq 3a70b6c79b shader: Add shader loop safety check settings
Also add a setting for enable Nsight Aftermath.
2021-07-22 21:51:35 -04:00
ReinUsesLisp a56f9f4322 shader: Comment why the array component is not read in TMML 2021-07-22 21:51:35 -04:00
ReinUsesLisp 59a989f149 vulkan_device: Enable VK_EXT_vertex_input_dynamic_state 2021-07-22 21:51:35 -04:00
ReinUsesLisp cefa403eba vk_pipeline_cache: Skip cached pipelines with different dynamic state 2021-07-22 21:51:35 -04:00
ameerj 87a78640d7 main: Fix Open Transferable Shader Cache context item
Opens the new shader cache directory location for the specified title, if it exists.
2021-07-22 21:51:35 -04:00
ameerj 4c1067ef1c tmml: Remove index component from coords vec
The lod query functions exposed by the rendering API's do not make use of the texturearray layer indexing.
2021-07-22 21:51:35 -04:00
ReinUsesLisp 1805ba1763 vulkan: Add VK_EXT_vertex_input_dynamic_state support
Reduces the number of total pipelines generated on Vulkan.
Tested on Super Smash Bros. Ultimate.
2021-07-22 21:51:35 -04:00
ReinUsesLisp 8fae35f767 shader: Reorder shader cache directories 2021-07-22 21:51:35 -04:00
ReinUsesLisp 2e99f9ce1b vk_rasterizer: Implement first index 2021-07-22 21:51:35 -04:00
ReinUsesLisp 969f76707c vulkan: Use VK_EXT_provoking_vertex when available 2021-07-22 21:51:35 -04:00
ameerj 60b33bdc9f spirv/convert: Catch more signed operations oversights
The sign bit on integers of size < 32 was not properly preserved in casts
2021-07-22 21:51:35 -04:00
ReinUsesLisp 4fedf2c20a spirv/convert: Catch more broken signed operations on Nvidia OpenGL
BitCast U32 to S32 before converting to float on drivers with broken
signed operations.
2021-07-22 21:51:35 -04:00
ameerj 6e65f16895 gl_buffer_cache: Use unorm internal formats for snorm texture buffer views
Fixes black textures in UE4 games
2021-07-22 21:51:35 -04:00
ReinUsesLisp 09c4a71dd4 shader_environment: Fix local memory size calculations 2021-07-22 21:51:35 -04:00
ReinUsesLisp 5292190c8d buffer_cache: Fix copy based uniform bindings tracking 2021-07-22 21:51:35 -04:00
ameerj 1bbecac1d2 shader_environment: Add shader_local_memory_crs_size to local memory size
Fixes DOOM 2016 missing local memory
2021-07-22 21:51:35 -04:00
ReinUsesLisp 8393ea343f gl_texture_cache: Create image storage views
Fixes SULD.D tests.
2021-07-22 21:51:35 -04:00
ReinUsesLisp 0b6f8eea5a gl_shader_util: Move shader utility code to a separate file 2021-07-22 21:51:35 -04:00
ReinUsesLisp ca6dbc7c49 gl_shader_cache: Store workers in shader cache object 2021-07-22 21:51:35 -04:00
ReinUsesLisp b420b97025 vk_pipeline_cache,shader_notify: Add shader notifications 2021-07-22 21:51:35 -04:00
ReinUsesLisp 1dccf005e1 vk_pipeline_cache: Add asynchronous shaders 2021-07-22 21:51:35 -04:00
ReinUsesLisp 420ec60284 vk_rasterizer: Flush work on clear and dispatches 2021-07-22 21:51:34 -04:00
FernandoS27 72c3d368cf DMA: Restrict optimised path for BlockToLinear further. 2021-07-22 21:51:34 -04:00
ReinUsesLisp 41737ccae4 vk_swapchain: Handle outdated swapchains
Fixes pixelated presentation on Intel devices.
2021-07-22 21:51:34 -04:00
FernandoS27 be4d1c9b95 shader: Fix VertexA Shaders. 2021-07-22 21:51:34 -04:00
ReinUsesLisp 64dfb4220f shader: Add 2D and 3D variants to SUATOM and SURED
Used by Claybook.
2021-07-22 21:51:34 -04:00
ReinUsesLisp 73fb56fe7e vk_buffer_cache: Handle null texture buffers
Fixes a crash on Age of Calamity cutscenes.
2021-07-22 21:51:34 -04:00
ReinUsesLisp 11fab60557 nsight_aftermath_tracker: Fix SPIR-V module writes 2021-07-22 21:51:34 -04:00
ReinUsesLisp 99e3490f64 vk_pipeline_cache: Set support_derivative_control to true 2021-07-22 21:51:34 -04:00
ReinUsesLisp 1dd4302fac shader: Avoid CPU side undefined behavior on I2F 2021-07-22 21:51:34 -04:00
ReinUsesLisp 5fa6d7a3b9 glasm: Use ARB_derivative_control conditionally 2021-07-22 21:51:34 -04:00
ReinUsesLisp 535fb4e6b5 buffer_cache: Reduce uniform buffer size from shader usage
Increases performance significantly on certain titles.
2021-07-22 21:51:34 -04:00
ReinUsesLisp 914bc0deb9 transform_feedback: Read buffer stride from index instead of layout 2021-07-22 21:51:34 -04:00
ReinUsesLisp bbc537fec0 fixed_pipeline_state: Use regular for loop instead of ranges for perf
MSVC generates better code for it.
2021-07-22 21:51:34 -04:00
ReinUsesLisp 5593b029d4 vk_swapchain: Avoid recreating the swapchain on each frame
Recreate only when requested (or sRGB is changed) instead of tracking
the frontend's size. That size is still used as a hint.
2021-07-22 21:51:34 -04:00
lat9nq 6e9eab2c32 emit_glasm_context_get_set: Remove unused variable 2021-07-22 21:51:34 -04:00
ReinUsesLisp 34d1a2ffe5 shader,glasm: Implement legacy texcoord loads 2021-07-22 21:51:34 -04:00
ReinUsesLisp b9a0a742fa glasm: Implement legacy varyings 2021-07-22 21:51:34 -04:00
ReinUsesLisp bebebf3fa8 shader: Track legacy varyings 2021-07-22 21:51:34 -04:00
ReinUsesLisp 4744a21bd4 shader: Add support for "negative" and unaligned offsets
"Negative" offsets don't exist. They are shown as such due to a bug in
nvdisasm.

Unaligned offsets have been proved to read the aligned offset. For
example, when reading an U32, if the offset is 6, the offset read will
be 4.
2021-07-22 21:51:34 -04:00
ReinUsesLisp e3aedea124 shader: Implement ISCADD32I 2021-07-22 21:51:34 -04:00
ReinUsesLisp d27dbec3e6 spirv: Fix output generics with components 2021-07-22 21:51:34 -04:00
ReinUsesLisp ccea376e34 vulkan: Conditionally use shaderInt16
Add support for Polaris AMD devices.
2021-07-22 21:51:34 -04:00
ReinUsesLisp 7207ef07f4 vulkan: Enable depth bounds and use it conditionally
Intel devices pre-Xe don't support this.
2021-07-22 21:51:34 -04:00
ReinUsesLisp e7bf692f9e vk_buffer_cache: Add transform feedback usage to buffers 2021-07-22 21:51:34 -04:00
ReinUsesLisp 9750e0410b opengl: Declare fragment outputs even if they are not used
Fixes Ori and the Blind Forest's menu on GLASM. For some reason
(probably high level optimizations) it is not sanitized on SPIR-V for
OpenGL. Vulkan is unaffected by this change.
2021-07-22 21:51:34 -04:00
ReinUsesLisp ebfbb5e09f buffer_cache: Mark uniform buffers as dirty if any enable bit changes 2021-07-22 21:51:34 -04:00
ReinUsesLisp 142d4f3f6e shader: Always initialize up reference in structure control flow
Fixes ubsan issue.
2021-07-22 21:51:34 -04:00
ReinUsesLisp ae786ee784 vulkan_device: Enable float64 and int64 conditionally
Add Intel Xe support.
2021-07-22 21:51:34 -04:00
ReinUsesLisp 6e475617d5 shader: Fix ImageWrite indexing 2021-07-22 21:51:34 -04:00
ReinUsesLisp f7508aa014 spirv: Fix image and image buffer descriptor index usage 2021-07-22 21:51:34 -04:00
ReinUsesLisp bd96e0a436 glasm: Fix immediate texture coordinate 2021-07-22 21:51:34 -04:00
ReinUsesLisp 74df00415a shader: Clang-format secondary textures 2021-07-22 21:51:34 -04:00
ReinUsesLisp f19403bafa shader: Fix secondary textures 2021-07-22 21:51:34 -04:00
ameerj 6bb1f54fbb shader: Adhere to disk shader cache setting 2021-07-22 21:51:34 -04:00
ReinUsesLisp 8ea552e64e shader: Fix TMML queries 2021-07-22 21:51:34 -04:00
ReinUsesLisp ca3e927e35 shader: Fix FSwizzleAdd folding when going through phi nodes 2021-07-22 21:51:34 -04:00
ReinUsesLisp 7ad72d78dd shader/exception: Fix compilation errors on gcc 2021-07-22 21:51:34 -04:00
ReinUsesLisp 1a02dee23a glasm: Reduce reg allocation leaks from an exception to a log 2021-07-22 21:51:34 -04:00
ReinUsesLisp 60e44af24d texture_cache: Reduce invalid image/sampler error severity 2021-07-22 21:51:34 -04:00
ReinUsesLisp 672930b6c8 shader: Handle host exceptions 2021-07-22 21:51:34 -04:00
ReinUsesLisp 50e491f101 glasm: Use integer lod for TXQ 2021-07-22 21:51:33 -04:00
ReinUsesLisp e3d10ba821 glasm: Prepare XFB from state instead of global registers 2021-07-22 21:51:33 -04:00
ReinUsesLisp 5339775f96 glasm: Fix global memory fallbacks 2021-07-22 21:51:33 -04:00
ReinUsesLisp 0ca75be20a Revert "glasm: Skip phi moves on undefined instructions"
Causes regressions on Bowser's Fury.
2021-07-22 21:51:33 -04:00
ReinUsesLisp e607d856c2 glasm: Remove unintentional '\n' on Undef32 2021-07-22 21:51:33 -04:00
ReinUsesLisp df14567fcc glasm: Use storage buffers instead of global memory when possible 2021-07-22 21:51:33 -04:00
ReinUsesLisp ec19b0d7eb glasm: Implement Y direction 2021-07-22 21:51:33 -04:00
ReinUsesLisp 459e3b17e6 glasm: Skip phi moves on undefined instructions 2021-07-22 21:51:33 -04:00
ReinUsesLisp 91a375b557 glasm: Implement undef instructions 2021-07-22 21:51:33 -04:00
ReinUsesLisp 93b8943fae glasm: Fix global memory callbacks 2021-07-22 21:51:33 -04:00
ReinUsesLisp 58b5083052 gl_shader_cache: Add disk shader cache 2021-07-22 21:51:33 -04:00
ReinUsesLisp 205bf15e71 video_core,shader: Clang-format fixes 2021-07-22 21:51:33 -04:00
ReinUsesLisp ddb24146b6 gl_shader_cache: Rename Program abstractions into Pipeline 2021-07-22 21:51:33 -04:00
ReinUsesLisp 3e5b0c116d glasm: Release phi node registers after they are no longer needed 2021-07-22 21:51:33 -04:00
ReinUsesLisp d284ce48e2 glasm: Remove unintentionally committed fmt::prints 2021-07-22 21:51:33 -04:00
ReinUsesLisp 8d77a943cc glasm: Fix INeg32 on negative immediates 2021-07-22 21:51:33 -04:00
ReinUsesLisp 42a91d4366 glasm: Remove unnecessary value types 2021-07-22 21:51:33 -04:00
ReinUsesLisp 6bf6015548 glasm: Throw when there are register leaks 2021-07-22 21:51:33 -04:00
ReinUsesLisp 143db4b112 glasm: Catch more register leaks
Add support for null registers. These are used when an instruction has
no usages.

This comes handy when an instruction is only used for its CC value, with
the caveat of having to invalidate all pseudo-instructions before
defining the instruction itself in the register allocator. This commits
changes this.

Workaround a bug on Nvidia's condition codes conditional execution using
branches.
2021-07-22 21:51:33 -04:00
ReinUsesLisp a5ce5f4a65 glasm: Fix usage counting on phi nodes 2021-07-22 21:51:33 -04:00
ReinUsesLisp 921b6b48be gl_shader_cache: Do not flip tessellation on OpenGL 2021-07-22 21:51:33 -04:00
ReinUsesLisp 548871e127 gl_graphics_program: Fix texture buffer bindings 2021-07-22 21:51:33 -04:00
ReinUsesLisp 09ad2b5994 glasm: Implement global memory fallbacks 2021-07-22 21:51:33 -04:00
ReinUsesLisp 46edc93371 glasm: Implement int64 add and subtract 2021-07-22 21:51:33 -04:00
lat9nq 90e2710052 emit_glasm_context_get_set: Remove unused variable 2021-07-22 21:51:33 -04:00
ReinUsesLisp e9a5390a92 glasm: Implement indirect attribute loads 2021-07-22 21:51:33 -04:00
ReinUsesLisp 2e2d1986b1 glasm: Implement image atomics 2021-07-22 21:51:33 -04:00
ReinUsesLisp 9a2176f883 glasm: Reorder unreachable image atomic insts
Reorder them to the bottom of the file for readability.
2021-07-22 21:51:33 -04:00
ReinUsesLisp 26ba81b9bf glasm: Implement gl_Layer stores 2021-07-22 21:51:33 -04:00
ReinUsesLisp dd41025472 glasm: Implement SampleId 2021-07-22 21:51:33 -04:00
ReinUsesLisp 5f9dd18113 glasm: Implement IsHelperInvocation 2021-07-22 21:51:33 -04:00
ReinUsesLisp b0b43d2a66 glasm: Fix EmitVertex's optimization 2021-07-22 21:51:33 -04:00
ReinUsesLisp 712afb51d4 gl_shader_cache: Conditionally use viewport mask 2021-07-22 21:51:33 -04:00
ReinUsesLisp 94d3b4d7e3 gl_shader_cache,glasm: Conditionally use typeless image reads extension 2021-07-22 21:51:33 -04:00
ReinUsesLisp 8aa7240b7f gl_shader_cache: Improve GLASM error print logic 2021-07-22 21:51:33 -04:00
ReinUsesLisp 16c95ab56d glasm: Implement forced early Z 2021-07-22 21:51:33 -04:00
ReinUsesLisp 220e679fdf glasm: Set transform feedback state 2021-07-22 21:51:33 -04:00
ReinUsesLisp 06ae1bff4b video_core: Abstract transform feedback translation utility 2021-07-22 21:51:33 -04:00
ReinUsesLisp 9960abf482 glasm: Simplify patch reads 2021-07-22 21:51:33 -04:00
ReinUsesLisp 8499797b68 glasm: Fix output patch reads
With this, Luigi's Mansion's sand renders properly.
2021-07-22 21:51:33 -04:00
ReinUsesLisp c45503bcb7 gl_shader_cache: Pass shader runtime information 2021-07-22 21:51:33 -04:00
ReinUsesLisp 9452fe2dc6 shader: Split profile and runtime information in separate structs 2021-07-22 21:51:33 -04:00
ameerj 22f261e954 emit_glasm_context_get_and_set.cpp: Add missing semicolons 2021-07-22 21:51:33 -04:00
ReinUsesLisp 83ff44531b glasm: Fix patch attribute declarations 2021-07-22 21:51:33 -04:00
ameerj 68fb25a223 glasm: Implement FSWZADD 2021-07-22 21:51:33 -04:00
ReinUsesLisp 8fa82725d1 glasm: Implement PrimitiveId attribute read 2021-07-22 21:51:33 -04:00
ReinUsesLisp 62f0368ce4 glasm: Implement clip distance stores 2021-07-22 21:51:32 -04:00
ReinUsesLisp 7d0baaa1c9 glasm: Fix tessellation input attributes 2021-07-22 21:51:32 -04:00
ReinUsesLisp 35db68e859 glasm: Add missing semicolon on tesscoord reading 2021-07-22 21:51:32 -04:00
ReinUsesLisp 53705226c6 glasm: Fix tessellation headers 2021-07-22 21:51:32 -04:00
ReinUsesLisp e8289a4e5f glasm: Add tessellation shader declarations 2021-07-22 21:51:32 -04:00
ReinUsesLisp 539a4ef59c glasm: Implement TessellationEvaluationPoint 2021-07-22 21:51:32 -04:00
ReinUsesLisp d4bc962012 gl_shader_manager: Zero initialize current assembly programs 2021-07-22 21:51:32 -04:00
ReinUsesLisp bde1749606 gl_shader_manager: Remove unintentionally committed #pragma 2021-07-22 21:51:32 -04:00
ReinUsesLisp 2e5002f0bf glasm: Implement patch memory 2021-07-22 21:51:32 -04:00
ReinUsesLisp deb47706e9 glasm: Fix InvocationId declaration 2021-07-22 21:51:32 -04:00
ReinUsesLisp 24e3128420 glasm: Implement InvocationId 2021-07-22 21:51:32 -04:00
ReinUsesLisp 8db0554dc6 glasm: Optimize EmitVertex into EMIT 2021-07-22 21:51:32 -04:00
ReinUsesLisp 2268a150ce glasm: Implement geometry shader attribute reads 2021-07-22 21:51:32 -04:00
ReinUsesLisp 2c0780b9fa glasm: Properly declare attributes on geometry programs 2021-07-22 21:51:32 -04:00
ReinUsesLisp 1efc77e510 glasm: Declare geometry program headers 2021-07-22 21:51:32 -04:00
ReinUsesLisp 1ec230efae renderer_opengl: State track compute assembly programs 2021-07-22 21:51:32 -04:00
ReinUsesLisp e21983ce24 renderer_opengl: State track assembly programs 2021-07-22 21:51:32 -04:00
ReinUsesLisp bbc4c8e6b6 glasm: Fix potential aliasing bug on cube array samples 2021-07-22 21:51:32 -04:00
ReinUsesLisp ea029df649 glasm: Implement ImageWrite 2021-07-22 21:51:32 -04:00
ReinUsesLisp 96d2dd78b0 glasm: Implement ImageRead 2021-07-22 21:51:32 -04:00
ReinUsesLisp 1426ed05b0 glasm: Implement EmitVertex and EndPrimitive 2021-07-22 21:51:32 -04:00
ReinUsesLisp 9c318fe58b glasm: Implement ImageGradient 2021-07-22 21:51:32 -04:00
ReinUsesLisp d95e33ac44 glasm: Implement 64-bit shifts 2021-07-22 21:51:32 -04:00
ReinUsesLisp 65e81c75e9 glasm: Implement barriers 2021-07-22 21:51:32 -04:00
ReinUsesLisp e63efa1b56 glasm: Fix compute stage name 2021-07-22 21:51:32 -04:00
ReinUsesLisp e59778c5e5 glasm: Fix phi instruction types 2021-07-22 21:51:32 -04:00
ReinUsesLisp 6493d900ce glasm: Implement PREC on relevant instructions 2021-07-22 21:51:32 -04:00
ReinUsesLisp 601f7bfd00 glasm: Implement stores to gl_ViewportIndex 2021-07-22 21:51:32 -04:00
ReinUsesLisp 0f180aaaa8 glasm: Implement gl_PointSize stores 2021-07-22 21:51:32 -04:00
ReinUsesLisp 05bd52b119 glasm: Implement gl_PointCoord 2021-07-22 21:51:32 -04:00
ReinUsesLisp 9dfad89884 glasm: Implement ImageQueryLod 2021-07-22 21:51:32 -04:00
ReinUsesLisp 1e64cbd23a glasm: Implement ImageFetch 2021-07-22 21:51:32 -04:00
ameerj a9a9dddd34 glasm: Implement IADD.CC 2021-07-22 21:51:32 -04:00
ReinUsesLisp abcdcde851 glasm: Implement BFE.CC 2021-07-22 21:51:32 -04:00
ReinUsesLisp cfa232a5a5 glasm: Implement SelectU1 2021-07-22 21:51:32 -04:00
ReinUsesLisp 5d24aadff0 HACK: Bind stages before and after bindings
Works around a bug where program parameters are only applied to the
current stage, and this one wasn't bound at the moment.

Affects all SSBO usages on GLASM.
2021-07-22 21:51:32 -04:00
ReinUsesLisp 089e3a82b3 glasm: Implement gl_WorkGroupID 2021-07-22 21:51:32 -04:00
ReinUsesLisp 50dda4164a glasm: Implement TXQ and improve texture info reads 2021-07-22 21:51:32 -04:00
ReinUsesLisp bf1ad74e8a glasm: Implement gl_FrongFacing attribute 2021-07-22 21:51:32 -04:00
ReinUsesLisp 0c82ee3444 glasm: Support textures used in more than one stage 2021-07-22 21:51:32 -04:00
ReinUsesLisp e4835094aa glasm: Implement textureGather instructions 2021-07-22 21:51:32 -04:00
ReinUsesLisp 98b4463dbb glasm: Implement gl_FragDepth and gl_SampleMask stores 2021-07-22 21:51:32 -04:00
ReinUsesLisp c455c92d76 glasm: Do not alias ConditionRef for now
Immediate condition refs where not handled correctly. Just move the
value for now.
2021-07-22 21:51:32 -04:00
ReinUsesLisp 5c6dc51c69 shader: Read branch conditions from an instruction
Fixes the identity removal pass.
2021-07-22 21:51:32 -04:00
ReinUsesLisp 43bca14217 glasm: Implement InstanceId and VertexId 2021-07-22 21:51:31 -04:00
ReinUsesLisp 7c24546332 glasm: Add missing return value on move assignment 2021-07-22 21:51:31 -04:00
ReinUsesLisp 64039f6f4b glasm: Fix aliased bitcasts ref counting 2021-07-22 21:51:31 -04:00
ReinUsesLisp 03fc0f42c6 glasm: Remove unintentional comma on vector insert 2021-07-22 21:51:31 -04:00
ReinUsesLisp 0b3a3f35e8 glasm: Implement TEX and TEXS instructions
Remove lod clamp from texture instructions with lod, as this is not
needed (nor supported).
2021-07-22 21:51:31 -04:00
ReinUsesLisp 3d82b30141 glasm: Add support for non-2D texture samples 2021-07-22 21:51:31 -04:00
ReinUsesLisp 9ddbdd90e1 glasm: Reorder unreachable image instructions to the bottom 2021-07-22 21:51:31 -04:00
ReinUsesLisp 771490ebac glasm: Add support for texture offsets 2021-07-22 21:51:31 -04:00
ReinUsesLisp 009721f477 glasm: Improve texture sampling instructions 2021-07-22 21:51:31 -04:00
ReinUsesLisp 22fb9cc538 emit_glasm: Enable ARB_draw_buffers when needed 2021-07-22 21:51:31 -04:00
ReinUsesLisp 059e91d5da emit_glasm: Add support for reading position attributes 2021-07-22 21:51:31 -04:00
lat9nq 69210028b4 shader_recompiler: GCC fixes
Fixes members of unnamed union not being accessible, and one function
without a declaration.
2021-07-22 21:51:31 -04:00
ameerj be403ea956 glasm: Implement rest of shared mem 2021-07-22 21:51:31 -04:00
ReinUsesLisp e45e4d02d3 opengl: Initial (broken) support to GLASM shaders 2021-07-22 21:51:31 -04:00
ReinUsesLisp f2ab3993eb shader: Use a non-trivial dummy to construct ASL node union 2021-07-22 21:51:31 -04:00
ReinUsesLisp 6be1db8873 emit_spirv: Jump to loop body with local variable
Silence unused variable warning
2021-07-22 21:51:31 -04:00
ReinUsesLisp 87c847ddc3 glasm: Implement derivative instructions on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 6a524ebac6 glasm: Initial (broken) implementation of TEX on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp b31edad7a9 glasm: Implement some graphics instructions on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 58cf7baaea glasm: Add Void type to GLASM values 2021-07-22 21:51:31 -04:00
ReinUsesLisp 6758e3d946 glasm: Add graphics specific shader declarations to GLASM 2021-07-22 21:51:31 -04:00
ameerj d0c4cca02d glasm: Implement local memory for glasm 2021-07-22 21:51:31 -04:00
ReinUsesLisp cb344497a7 emit_spirv: Add missing block in case 2021-07-22 21:51:31 -04:00
ReinUsesLisp f2ae32fa76 glasm: Initial implementation of phi nodes on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 55a293a9c8 glasm: Write result to scalar on integer comparison instructions 2021-07-22 21:51:31 -04:00
ReinUsesLisp ffdaa42529 glasm: Declare NV_shader_thread_group when needed 2021-07-22 21:51:31 -04:00
ReinUsesLisp f132d214a1 vk_update_descriptor: Properly initialize payload on the update descriptor queue 2021-07-22 21:51:31 -04:00
ReinUsesLisp 03f6d424ce glasm: Rework control flow introducing a syntax list
This commit regresses VertexA shaders, their transformation pass has to
be adapted to the new control flow.
2021-07-22 21:51:31 -04:00
ameerj 8a556b49cf glasm: Implement Storage atomics
StorageAtomicExchangeU64 is failing test seemingly due to failure storing 64-bit
result into the register
2021-07-22 21:51:31 -04:00
ReinUsesLisp 8331e533f4 glasm: Ensure reg alloc order across compilers on GLASM
Use a struct constructor to serialize register allocation arguments to
ensure registers are allocated in the same order regardless of the
compiler used.

The A and B functions can be called in any order when passed as
arguments to "foo":

  foo(A(), B())

But the order is guaranteed for curly-braced constructor calls in
classes:

  Foo{A(), B()}

Use this to get consistent behavior.
2021-07-22 21:51:31 -04:00
ReinUsesLisp d9a11b2388 glasm: Enable unintentionally disabled register aliasing on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 3e7dbc81f5 glasm: Review all GLASM insts to be aware of register aliasing 2021-07-22 21:51:31 -04:00
ReinUsesLisp 7273fcab95 glasm: Implement shuffle and vote instructions on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 3e0e8c952d glasm: Add MUFU instructions to GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 8a77a1426b glasm: Implement IAbs64 and INeg64 on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp cef625a9b2 shader: Add floating-point rounding to I2F 2021-07-22 21:51:31 -04:00
ReinUsesLisp 00a7d4add9 glasm: Properly clamp Fp64 on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp cfff5bad59 glasm: Fix register allocation when moving immediate on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp c5055cade9 glasm: Implement SelectU64 on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 56b7f92b56 glasm: Fix clamps so the min value has priority on NAN on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp b5b5006016 glasm: Fix moving U64 immediates to registers in GLASM 2021-07-22 21:51:31 -04:00
ameerj 55801889e1 glasm: Implement storage atomic ops 2021-07-22 21:51:31 -04:00
ReinUsesLisp cbac486530 glasm: Add conversion instructions to GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp db3a10b384 glasm: Add fp min/max insts and fix store for fp64 on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 763b4a8b16 glasm: Add logical instructions on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 1f320a9d79 glasm: Remove duplicated Fp64 pack instructions on GLASM 2021-07-22 21:51:30 -04:00
ReinUsesLisp 06bd9acf07 glasm: Remove unnecesary new white space on Clamp GLASM 2021-07-22 21:51:30 -04:00
ReinUsesLisp 45be6d11cc glasm: Add floating-point comparisons on GLASM 2021-07-22 21:51:30 -04:00
ameerj fd6393cb14 emit_glasm: Implement more integer alu ops 2021-07-22 21:51:30 -04:00
ameerj c13b6d8f86 glasm: Reimplement bitwise ops and BFI/BFE 2021-07-22 21:51:30 -04:00
ReinUsesLisp fc009ca296 glasm: Initial GLASM fp64 support 2021-07-22 21:51:30 -04:00
ReinUsesLisp 8de3f88656 glasm: Implement GLASM fp16 packing and move bitwise insns 2021-07-22 21:51:30 -04:00
ReinUsesLisp de15d41257 glasm: Remove unused functions left from rebase 2021-07-22 21:51:30 -04:00
ReinUsesLisp 7101c374c7 glasm: Specify namespace when using FormatTo 2021-07-22 21:51:30 -04:00
ReinUsesLisp 8d20355a93 glasm: Implement more GLASM composite instructions 2021-07-22 21:51:30 -04:00
ReinUsesLisp d5c0c34383 vk_pipeline_cache: Enable int8 and int16 types on Vulkan 2021-07-22 21:51:30 -04:00
ReinUsesLisp 04ed27a997 glasm: Make GLASM aware of types 2021-07-22 21:51:30 -04:00
ameerj 94ee083286 glasm: Use CMP.S for Select32
also fixes ADD and SUB to use U modifier
2021-07-22 21:51:30 -04:00
ameerj b27f30fa2e glasm: Implement more logical ops 2021-07-22 21:51:30 -04:00
ameerj 779ff6918b glasm: Implement BFI, BFE
Along with implementations of common instructions along the way
2021-07-22 21:51:30 -04:00
ReinUsesLisp 9d7312e780 glasm: Use BitField instead of C bitfields 2021-07-22 21:51:30 -04:00
ReinUsesLisp fdd87ffdb7 glasm: Remove unused argument in identity instructions on GLASM 2021-07-22 21:51:30 -04:00
ReinUsesLisp 33a769ea26 gl_rasterizer: Flush L2 caches before glFlush on GLASM 2021-07-22 21:51:30 -04:00
ReinUsesLisp 826796b51f glasm: Initial GLASM compute implementation for testing 2021-07-22 21:51:30 -04:00
ReinUsesLisp 6c0a696179 glasm: Implement basic GLASM instructions 2021-07-22 21:51:30 -04:00
ReinUsesLisp 03f17ebc43 glasm: Changes to GLASM register allocator and emit context 2021-07-22 21:51:30 -04:00
ReinUsesLisp 99ae172ef2 vk_scheduler: Use locks instead of SPSC a queue
This tries to fix a data race where we'd wait forever for the GPU.
2021-07-22 21:51:30 -04:00
ReinUsesLisp 3fca53bce8 vk_query_cache: Wait before reading queries 2021-07-22 21:51:30 -04:00
ReinUsesLisp dbe29b8bb6 vk_master_semaphore: Use fetch_add to increase master semaphore tick 2021-07-22 21:51:30 -04:00
ReinUsesLisp d9b9c10f32 glasm: Add GLASM backend infrastructure 2021-07-22 21:51:30 -04:00
ameerj a739b6933e shader: ISET.X implementation 2021-07-22 21:51:30 -04:00
ReinUsesLisp 947a36e79e gl_shader_cache: Remove code unintentionally committed 2021-07-22 21:51:30 -04:00
ReinUsesLisp 75adb54e79 shader: Fixup SPIR-V emit header namespaces 2021-07-22 21:51:30 -04:00
ReinUsesLisp 055db41f19 Move SPIR-V emission functions to their own header 2021-07-22 21:51:30 -04:00
FernandoS27 007a11014c shader: Optimize NVN Fallthrough 2021-07-22 21:51:30 -04:00
FernandoS27 fb20effc51 shader: Stub SR_AFFINITY 2021-07-22 21:51:30 -04:00
ameerj 455872a4af shader: Implement Int32 SUATOM/SURED 2021-07-22 21:51:30 -04:00
ReinUsesLisp 5ca5988c63 shader: Initial OpenGL implementation 2021-07-22 21:51:30 -04:00
ReinUsesLisp 5ad12292a6 spirv: Be aware of NAN unaware drivers 2021-07-22 21:51:30 -04:00
ReinUsesLisp 21a5bd332c spirv: Add SSBO read fallbacks when no aliasing is available 2021-07-22 21:51:29 -04:00
ReinUsesLisp 1922cbb84c spirv: Add OpKill fallback to demote 2021-07-22 21:51:29 -04:00
ReinUsesLisp d2e6291c0e spirv: Do not enable ShaderLayer
This is enabled by an extension instead of the capability.
2021-07-22 21:51:29 -04:00
ReinUsesLisp b2fe282ad3 spirv: Enable DemoteToHelperInvocationEXT only when supported 2021-07-22 21:51:29 -04:00
ReinUsesLisp 2ee532c9bc spirv: Use OriginLowerLeft when requested 2021-07-22 21:51:29 -04:00
ReinUsesLisp f6c09c27b1 spirv: Only add image operands mask when needed 2021-07-22 21:51:29 -04:00
ReinUsesLisp 59668831b7 spirv: Workaround image unsigned offset bug
Workaround bug on Nvidia's OpenGL SPIR-V compiler when using unsigned
texture offsets.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 4a76786740 spirv: Add int8 and int16 capabilities only when supported 2021-07-22 21:51:29 -04:00
ReinUsesLisp 8accb076ee spirv: Add integer clamping workarounds
Workaround more bugs on Nvidia's OpenGL SPIR-V compiler.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 55ff0ab463 spirv: Implement int8 and int16 conversion fallbacks 2021-07-22 21:51:29 -04:00
ReinUsesLisp 884a937022 spirv: Support OpenGL uniform buffers and change bindings 2021-07-22 21:51:29 -04:00
ReinUsesLisp 2bdce72c92 spirv: Desambiguate descriptor names
Worksaround a bug on Nvidia's OpenGL SPIR-V compiler where names are
used for name matching.
2021-07-22 21:51:29 -04:00
ReinUsesLisp bfb08e709c shader: Add OpenGL shader profile options 2021-07-22 21:51:29 -04:00
ReinUsesLisp 4c5f8d123d shader: Remove shader util 2021-07-22 21:51:29 -04:00
FernandoS27 6aff9b4476 shader: Address feedback 2021-07-22 21:51:29 -04:00
FernandoS27 a2fac91c47 shader: Implement VertexA stage 2021-07-22 21:51:29 -04:00
FernandoS27 cb0587f841 shader: Implement delegation of Exit to dispatcher on CFG 2021-07-22 21:51:29 -04:00
ReinUsesLisp 806c5a3739 vk_graphics_pipeline: Fix texture buffer descriptors 2021-07-22 21:51:29 -04:00
ameerj 031e91e7e5 shader: Fix IADD3.CC 2021-07-22 21:51:29 -04:00
ReinUsesLisp b62b8f2e84 vk_scheduler: Allow command submission on worker thread
This changes how Scheduler::Flush works. It queues the current command
buffer to be sent to the GPU but does not do it immediately. The Vulkan
worker thread takes care of that. Users will have to use
Scheduler::Flush + Scheduler::WaitWorker to get the previous behavior.

Scheduler::Finish is unchanged.

To avoid waiting on work never queued, Scheduler::Wait sends the current
command buffer if that's what the caller wants to wait.
2021-07-22 21:51:29 -04:00
ReinUsesLisp eb7ef12b95 vk_compute_pass: Fix -Wshadow warning 2021-07-22 21:51:29 -04:00
ReinUsesLisp ed6c131c92 shader: Move pipeline cache logic to separate files
Move code to separate files to be able to reuse it from OpenGL. This
greatly simplifies the pipeline cache logic on Vulkan.

Transform feedback state is not yet abstracted and it's still
intrusively stored inside vk_pipeline_cache. It will be moved when
needed on OpenGL.
2021-07-22 21:51:29 -04:00
ReinUsesLisp fd502a4d43 vulkan: Defer descriptor set work to the Vulkan thread
Move descriptor lookup and update code to a separate thread. Delaying
this removes work from the main GPU thread and allows creating
descriptor layouts on another thread. This reduces a bit the workload
of the main thread when new pipelines are encountered.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 896a4fe9b5 vulkan: Rework descriptor allocation algorithm
Create multiple descriptor pools on demand. There are some degrees of
freedom what is considered a compatible pool to avoid wasting large
pools on small descriptors.
2021-07-22 21:51:29 -04:00
ReinUsesLisp a3b025c6a4 vk_graphics_pipeline: Generate specialized pipeline config functions and improve code 2021-07-22 21:51:29 -04:00
ReinUsesLisp 565d922014 shader: Accelerate pipeline transitions and use dirty flags for shaders 2021-07-22 21:51:29 -04:00
ameerj 90ff800962 shader: Fix BFE s32 undefined check
Our unit tests were hitting this exception.
2021-07-22 21:51:29 -04:00
ReinUsesLisp ecd481a0ca vk_compute_pipeline: Fix index comparison oversight on compute texture buffers 2021-07-22 21:51:29 -04:00
ReinUsesLisp 1f54f1ff26 shader: Fix error checking in bitfieldExtract and implement bitfieldInsert folding 2021-07-22 21:51:29 -04:00
ReinUsesLisp d835906b9f vulkan_device: Require shaderClipDistance and shaderCullDistance features 2021-07-22 21:51:29 -04:00
ReinUsesLisp 1f47476089 vk_graphics_pipeline: Guard against non-tessellation pipelines using patches 2021-07-22 21:51:29 -04:00
ReinUsesLisp e37ec2790d shader: Fix storage type when reading patches on tess control 2021-07-22 21:51:29 -04:00
ReinUsesLisp c8b0377a67 shader: Fix VMNMX selector B 2021-07-22 21:51:29 -04:00
Rodrigo Locatti 72b10edd15 shader: Fix bugs and build issues on GCC 2021-07-22 21:51:29 -04:00
ReinUsesLisp fa439cb6df shader: Fix render targets with null attachments 2021-07-22 21:51:29 -04:00
ReinUsesLisp 763adf56a6 shader: Increase the maximum number of storage buffers
Compute shaders spill uniform buffers on storage buffers, increasing the
expected number.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 1d861a6e90 shader: Remove identity removal pass for better build times 2021-07-22 21:51:29 -04:00
ReinUsesLisp 4eec191801 shader: Add more strict validation the pass 2021-07-22 21:51:29 -04:00
ReinUsesLisp 21d50bd9bd shader: Fix forward referencing identity instructions when inserting phi 2021-07-22 21:51:29 -04:00
ReinUsesLisp 3c80ebf1e2 shader: Remove invalidated blocks in dead code elimination pass 2021-07-22 21:51:29 -04:00
ReinUsesLisp 12d7acf707 shader: Add missing UndoUse case for GetSparseFromOp 2021-07-22 21:51:29 -04:00
ReinUsesLisp 9b691a28d8 shader: Require dual source blending 2021-07-22 21:51:29 -04:00
ReinUsesLisp 04e042d3b3 shader: Simplify code in opcodes.h to fix Intellisense
Avoid using std::array to fix Intellisense not properly compiling this
code and disabling itself on all files that include it.

While we are at it, change the code to use u8 instead of size_t for the
number of instructions in an opcode.
2021-07-22 21:51:29 -04:00
ReinUsesLisp 052317e748 shader: Implement indexed textures 2021-07-22 21:51:28 -04:00
ameerj 3089fb1e2a shader: Refactor atomic_operations_global_memory 2021-07-22 21:51:28 -04:00
ameerj 8202ace3e9 shader: add missing include guard in half_floating_point_helper.h 2021-07-22 21:51:28 -04:00
ReinUsesLisp 172942911a shader: Fix gcc warnings 2021-07-22 21:51:28 -04:00
ReinUsesLisp 16a869571e shader: Inline common Value getters 2021-07-22 21:51:28 -04:00
ReinUsesLisp 9f5c43dd53 shader: Intrusively store in a block if it's sealed or not 2021-07-22 21:51:28 -04:00
ReinUsesLisp fecb87ebc8 cmake: Link to common in shader_recompiler 2021-07-22 21:51:28 -04:00
ReinUsesLisp 3c1229a7c5 shader: Improve goto removal algorithm complexity
Find sibling node containing a nephew searching from the nephew itself
instead of the uncle.
2021-07-22 21:51:28 -04:00
ReinUsesLisp 1a44a5cafa shader: Use memset to reset instruction arguments 2021-07-22 21:51:28 -04:00
ReinUsesLisp 9edc2bd70f shader: Inline common Value functions into the header 2021-07-22 21:51:28 -04:00
ReinUsesLisp 6236b611cf shader: Move microinstruction header to the value header 2021-07-22 21:51:28 -04:00
ReinUsesLisp 7769517fc0 shader: Move siblings check to a separate function and comment them out 2021-07-22 21:51:28 -04:00
ReinUsesLisp 7bf134b294 shader: Intrusively store register values in block for SSA pass 2021-07-22 21:51:28 -04:00
ReinUsesLisp 3a39124359 shader: Inline common Opcode and Inst functions 2021-07-22 21:51:28 -04:00
ReinUsesLisp b6bd6a5bce shader: Inline common IR::Block methods 2021-07-22 21:51:28 -04:00
ReinUsesLisp 8d1327bf78 shader: Use a small_vector for phi blocks 2021-07-22 21:51:28 -04:00
ReinUsesLisp c44139cda0 shader: Calculate number of arguments in an opcode at compile time 2021-07-22 21:51:28 -04:00
ReinUsesLisp 7066f9ef7b shader: Implement D3D samplers 2021-07-22 21:51:28 -04:00
ReinUsesLisp 5c187201ec shader: Add constant propagation for arithmetic right shifts 2021-07-22 21:51:28 -04:00
ReinUsesLisp 56aae7efcf shader: Simplify code for local memory 2021-07-22 21:51:28 -04:00
ReinUsesLisp e54171c1a9 shader: Add NVN storage buffer fallbacks
When we can't track the SSBO origin of a global memory instruction,
leave it as a global memory operation and assume these pointers are in
the NVN storage buffer slots, then apply a linear search in the shader's
runtime.
2021-07-22 21:51:28 -04:00
ReinUsesLisp eb7a932952 spirv: Fix ViewportMask 2021-07-22 21:51:28 -04:00
ameerj 688c89590c spirv: Replace Constant/ConstantComposite with Const helper 2021-07-22 21:51:28 -04:00
FernandoS27 4a97dd4483 shader: Address feedback 2021-07-22 21:51:28 -04:00
FernandoS27 b85c9d8e84 shader: Implement F2F (Imm) 2021-07-22 21:51:28 -04:00
FernandoS27 fbb642f433 shader: Implement IADD3.CC/.X 2021-07-22 21:51:28 -04:00
FernandoS27 f1a3f449d6 shader: Address feedback 2021-07-22 21:51:28 -04:00
FernandoS27 2f01c7fb62 shader: Add coarse derivatives 2021-07-22 21:51:28 -04:00
FernandoS27 b1e325f317 shader: Implement fine derivates constant propagation 2021-07-22 21:51:28 -04:00
FernandoS27 6c60109967 shader: Implement SR_Y_DIRECTION 2021-07-22 21:51:28 -04:00
ReinUsesLisp 99e6cd3916 shader: Fix Phi node types 2021-07-22 21:51:28 -04:00
ReinUsesLisp 6d540c6f2e shader: Fix memory barriers 2021-07-22 21:51:28 -04:00
ReinUsesLisp 0623915e2e spirv: Fix implicit lod type 2021-07-22 21:51:28 -04:00
ReinUsesLisp b597da7f2a spirv: Use explicit lods outside of fragment shaders 2021-07-22 21:51:28 -04:00
ReinUsesLisp f771d1fc52 spirv: Use ConstOffset instead of Offset when possible 2021-07-22 21:51:28 -04:00
ameerj bfdb38404c shader: Implement BFE and BFI CC
Fix two bugs in BFI.
2021-07-22 21:51:28 -04:00
ReinUsesLisp ad1507b4a5 shader: Implement SampleMask 2021-07-22 21:51:28 -04:00
ReinUsesLisp cc96469019 shader: Implement PIXLD.MY_INDEX 2021-07-22 21:51:28 -04:00
ReinUsesLisp ca85ce444f spirv: Bitcast non-F32 output attributes to their type before store 2021-07-22 21:51:28 -04:00
ReinUsesLisp b6b541e36a spirv: Implement ViewportMask with NV_viewport_array2 2021-07-22 21:51:28 -04:00
ReinUsesLisp f65aa540d8 spirv: Bitcast non-F32 attributes to F32 2021-07-22 21:51:27 -04:00
ReinUsesLisp 10c96c7484 shader: Implement PrimitiveId 2021-07-22 21:51:27 -04:00
ReinUsesLisp 38908d0f7e shader: Implement tessellation shaders, polygon mode and invocation id 2021-07-22 21:51:27 -04:00
ReinUsesLisp 0f99fdc0eb shader: Mark atomic instructions as writes 2021-07-22 21:51:27 -04:00
lat9nq 212f5c8050 vk_pipeline_cache: Silence GCC warnings
Silences `-Werror=missing-field-initializers` due to missing
initializers.
2021-07-22 21:51:27 -04:00
ReinUsesLisp 03c16b085a spirv: Implement image buffers 2021-07-22 21:51:27 -04:00
ReinUsesLisp bba876f192 spirv: Implement Layer stores 2021-07-22 21:51:27 -04:00
FernandoS27 f930bda4fb spirv: Fix alpha test 2021-07-22 21:51:27 -04:00
ameerj 9502835689 spirv: Fix non-atomic 64-bit store 2021-07-22 21:51:27 -04:00
ameerj 542dc35aac spirv: Implement alpha test 2021-07-22 21:51:27 -04:00
ReinUsesLisp e59971ea1b shader: Implement transform feedbacks and define file format 2021-07-22 21:51:27 -04:00
ReinUsesLisp 4a6c299e3f shader: Implement early Z tests 2021-07-22 21:51:27 -04:00
ReinUsesLisp 9f5ab82de2 shader: Document and relax cache control on surface instructions 2021-07-22 21:51:27 -04:00
ReinUsesLisp c84c2ab88c spirv: Rework storage buffers and shader memory 2021-07-22 21:51:27 -04:00
ReinUsesLisp a4f27e897c shader: Fix fixed pipeline point size on geometry shaders 2021-07-22 21:51:27 -04:00
ReinUsesLisp deba5c7666 shader: Add constant propagation for *&^| binary operations 2021-07-22 21:51:27 -04:00
ReinUsesLisp 4b32692423 shader: Implement geometry shaders 2021-07-22 21:51:27 -04:00
ReinUsesLisp 40948b18ac shader: Implement OUT 2021-07-22 21:51:27 -04:00
lat9nq f70707d435 internal_stage_buffer_entry_read: Remove pragma optimize off 2021-07-22 21:51:27 -04:00
ReinUsesLisp 8ebc7b90a0 shader: Stub SR_INVOCATION_INFO 2021-07-22 21:51:27 -04:00
ReinUsesLisp c6b81943a9 shader: Stub ISBERD 2021-07-22 21:51:27 -04:00
ReinUsesLisp 211fc6331d shader: Fix CC in I2I 2021-07-22 21:51:27 -04:00
ReinUsesLisp 1cae8e9a10 spirv: Define StorageImageWriteWithoutFormat capability when used 2021-07-22 21:51:27 -04:00
ReinUsesLisp 7c867c2d7c pipeline_helper: Simplify descriptor objects initialization 2021-07-22 21:51:27 -04:00
ReinUsesLisp c7efa5ead4 shader: Simplify FLO and throw on CC 2021-07-22 21:51:27 -04:00
ReinUsesLisp 31835567f2 shader: Mark blocks with no end branch as unreachable 2021-07-22 21:51:27 -04:00
ReinUsesLisp 4678dc7246 shader: Implement LOP CC 2021-07-22 21:51:27 -04:00
ReinUsesLisp 879fb08101 shader: Implement SR_THREAD_KILL 2021-07-22 21:51:27 -04:00
ReinUsesLisp bf784e1497 shader: Apply sign bit in FCMP (imm) 2021-07-22 21:51:27 -04:00
ameerj 62c3bef607 shader: Implement ATOM/S and RED 2021-07-22 21:51:27 -04:00
ReinUsesLisp 619f68db8e nsight_aftermath_tracker: Report used shaders to Nsight Aftermath 2021-07-22 21:51:27 -04:00
ReinUsesLisp ece2e64825 spirv: Move phi node patching to a separate function 2021-07-22 21:51:27 -04:00
ReinUsesLisp 480ce24b7e spirv: Guard against typeless image reads on unsupported devices 2021-07-22 21:51:27 -04:00
ReinUsesLisp 8ec58e16b2 shader: Move LaneId to the warp emission file and fix AMD 2021-07-22 21:51:27 -04:00
ReinUsesLisp 7f8b92cc2d vk_rasterizer: Request outside render pass execution context for compute 2021-07-22 21:51:27 -04:00
ReinUsesLisp 9a49eed4d6 pipeline_helper: Add missing [[maybe_unused]] 2021-07-22 21:51:27 -04:00
ReinUsesLisp 1e5255de49 spirv: Fix forward declarations on phi nodes 2021-07-22 21:51:27 -04:00
ReinUsesLisp a26f760eba shader: Mark ImageWrite with side effects 2021-07-22 21:51:27 -04:00
FernandoS27 ee8beff168 shader: Implement CC for ISET, FSET, PSET, CSET, and DSET
Throw when other instructions are missing CC.
2021-07-22 21:51:27 -04:00
ReinUsesLisp 99cfd73ba7 shader: Remove outdated comment in F2I 2021-07-22 21:51:27 -04:00
ReinUsesLisp 5ab1ac4f29 shader: Implement SULD and SUST 2021-07-22 21:51:26 -04:00
ReinUsesLisp 577efc5f9f shader: Fix Windows build issues 2021-07-22 21:51:26 -04:00
lat9nq 5b95114cd4 shader: Address feedback + clang format 2021-07-22 21:51:26 -04:00
lat9nq a4e7a41e7f shader_recompiler,video_core: Cleanup some GCC and Clang errors
Mostly fixing unused *, implicit conversion, braced scalar init,
fpermissive, and some others.

Some Clang errors likely remain in video_core, and std::ranges is still
a pertinent issue in shader_recompiler

shader_recompiler: cmake: Force bracket depth to 1024 on Clang
Increases the maximum fold expression depth

thread_worker: Include condition_variable

Don't use list initializers in control flow

Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
2021-07-22 21:51:26 -04:00
ReinUsesLisp 157952f809 shader: Fix FCMP immediate variant 2021-07-22 21:51:26 -04:00
ReinUsesLisp 7f75818298 shader: Fix dangling labels 2021-07-22 21:51:26 -04:00
ReinUsesLisp 3e6cb6362d shader: Interact texture buffers with buffer cache 2021-07-22 21:51:26 -04:00
ReinUsesLisp d349f8ff61 shader: Fix F2I 2021-07-22 21:51:26 -04:00
ReinUsesLisp d07e15fcf6 shader: Fix TextureGrad 2021-07-22 21:51:26 -04:00
ReinUsesLisp 96da029a74 shader: Implement texture buffers 2021-07-22 21:51:26 -04:00
FernandoS27 0ef887fa6f shader: Address feedback 2021-07-22 21:51:26 -04:00
FernandoS27 e9cffe874f shader: Implement indexed Position and ClipDistances 2021-07-22 21:51:26 -04:00
FernandoS27 1fe6a22cff shader: Implement indexed attributes 2021-07-22 21:51:26 -04:00
FernandoS27 a7f5231caf shader: Implement AL2P 2021-07-22 21:51:26 -04:00
FernandoS27 c63d79cf65 shader: Fix BRX tracking 2021-07-22 21:51:26 -04:00
ReinUsesLisp 459057f8d4 vk_pipeline_cache: Fix num of pipeline workers on weird platforms 2021-07-22 21:51:26 -04:00
ReinUsesLisp a9ba4fea0c shader: Move recursive SSA rewrite to the heap 2021-07-22 21:51:26 -04:00
FernandoS27 3fc7d20fce shader: Fix ShadowCube declaration type, set number of pipeline threads based on hardware 2021-07-22 21:51:26 -04:00
ReinUsesLisp 64372edffb shader: Fix splits on blocks using indirect branches 2021-07-22 21:51:26 -04:00
ReinUsesLisp e2d1e21532 shader: Eliminate orphan blocks more efficiently 2021-07-22 21:51:26 -04:00
ReinUsesLisp ba2130d5a5 shader: Add subgroup masks 2021-07-22 21:51:26 -04:00
ReinUsesLisp b580c1e208 shader: Implement BAR and fix memory barriers 2021-07-22 21:51:26 -04:00
ReinUsesLisp e9d7f63788 shader: Abstract breadth searches and use the abstraction 2021-07-22 21:51:26 -04:00
ReinUsesLisp 9db035faec shader: Reimplement GetCbufU64 as GetCbufU32x2
It may generate better code on some compilers and it's easier to handle.
2021-07-22 21:51:26 -04:00
ReinUsesLisp 4c15b3b91a vk_compute_pass: Fix compute passes 2021-07-22 21:51:26 -04:00
ReinUsesLisp ee52ec7e04 shader: Remove atomic flags and use mutex + cond variable for pipelines 2021-07-22 21:51:26 -04:00
ReinUsesLisp a2536f0b42 shader: Remove unused header in VOTE 2021-07-22 21:51:26 -04:00
ReinUsesLisp 9008061b99 vk_pipeline_cache: Remove unnecesary scope in pipeline cache locking 2021-07-22 21:51:26 -04:00
ReinUsesLisp 24084a77ca shader: Rework global memory tracking to use breadth-first search 2021-07-22 21:51:26 -04:00
ReinUsesLisp b1335585bf shader: Fix fp16 merge when using native fp16 2021-07-22 21:51:26 -04:00
ReinUsesLisp d1b84c7828 shader: Fix FADD32I 2021-07-22 21:51:26 -04:00
FernandoS27 fe14898573 shader: Fix undetected bug from review 2021-07-22 21:51:26 -04:00
FernandoS27 ffb90d59c6 shader: Address feedback 2021-07-22 21:51:26 -04:00
FernandoS27 df48b3b32a shader: "Implement" NOP 2021-07-22 21:51:26 -04:00
FernandoS27 98c08894d9 vk_pipeline_cache: Small fixes to the pipeline cache 2021-07-22 21:51:26 -04:00
FernandoS27 741b21715a shader: Address Feedback 2021-07-22 21:51:26 -04:00
FernandoS27 5a6eb31578 shader: Implement SR_LaneId 2021-07-22 21:51:26 -04:00
FernandoS27 e98900a16b shader: Fix shared memory on cool drivers 2021-07-22 21:51:26 -04:00
FernandoS27 a9f79b6553 shader: Implement MEMBAR 2021-07-22 21:51:26 -04:00
FernandoS27 5c94fba511 shader: Improve VOTE.VTG stub 2021-07-22 21:51:25 -04:00
FernandoS27 06469da581 shader: Mark SSBOs as written when they are 2021-07-22 21:51:25 -04:00
FernandoS27 68bad0e922 shader: Implement ViewportIndex 2021-07-22 21:51:25 -04:00
FernandoS27 c7ed439bbc shader: Stub TLD4's PTP when it isn't constant 2021-07-22 21:51:25 -04:00
FernandoS27 1534a99e35 shader: Stub VOTE.VTG 2021-07-22 21:51:25 -04:00
FernandoS27 82698ecb41 shader: Fold composite extract 2021-07-22 21:51:25 -04:00
FernandoS27 5b74fe36ec shader: Fold comparisons and Pack/Unpack16 2021-07-22 21:51:25 -04:00
ReinUsesLisp b64bf653a4 shader: Fix branches to visited virtual blocks 2021-07-22 21:51:25 -04:00
ReinUsesLisp 2b6f357e36 vulkan: Serialize pipelines on a separate thread 2021-07-22 21:51:25 -04:00
ReinUsesLisp 8678cb10d4 vulkan: Create pipeline layouts in separate threads 2021-07-22 21:51:25 -04:00
ReinUsesLisp 9e46643465 vulkan: Build pipelines in parallel at runtime
Wait from the worker thread for a pipeline to build before binding it to
the command buffer. This allows queueing pipelines to multiple threads.
2021-07-22 21:51:25 -04:00
ReinUsesLisp 2116d7e0b3 shader: Fix dependency on identity removal pass 2021-07-22 21:51:25 -04:00
ReinUsesLisp 6df3c1a64e shader: Fix constant propagation to use reverse post order 2021-07-22 21:51:25 -04:00
ReinUsesLisp ce39989ea9 shader: Implement LDG .U.128 as .128 2021-07-22 21:51:25 -04:00
ReinUsesLisp 5a589fabdb shader: Unroll "using enum" for opcode declarations 2021-07-22 21:51:25 -04:00
ReinUsesLisp 9730422e34 vk_pipeline_cache: Name SPIR-V modules 2021-07-22 21:51:25 -04:00
ReinUsesLisp 4d60dd7eb5 spirv: Remove unnecesary variable for clip distances 2021-07-22 21:51:25 -04:00
FernandoS27 40ace25859 shader: Implement ClipDistance 2021-07-22 21:51:25 -04:00
FernandoS27 8f2238dc3d shader: Fix TXD 2021-07-22 21:51:25 -04:00
FernandoS27 7d40446b99 shader: Address feedback 2021-07-22 21:51:25 -04:00
ReinUsesLisp 696f326cd1 shader: Always pass a lod for TexelFetch 2021-07-22 21:51:25 -04:00
FernandoS27 5a7d8d73ad shader: Implement TXD 2021-07-22 21:51:25 -04:00
FernandoS27 be5936dea2 shader: Implement ImageGradient 2021-07-22 21:51:25 -04:00
FernandoS27 d523cd563c shader: Implement TMML partially 2021-07-22 21:51:25 -04:00
FernandoS27 56c8c42cf8 shader,spirv: Implement ImageQueryLod. 2021-07-22 21:51:25 -04:00
FernandoS27 287d4a38de shader: Implement TLDS 2021-07-22 21:51:25 -04:00
FernandoS27 8232c10ed1 shader: Implement TLD 2021-07-22 21:51:25 -04:00
ReinUsesLisp 0bb8a473e2 spirv: Add fixed pipeline point size 2021-07-22 21:51:25 -04:00
FernandoS27 a8c2a85610 shader: Add PointCoord attribute 2021-07-22 21:51:25 -04:00
ameerj 357a47d944 shader: Add PointSize attribute 2021-07-22 21:51:25 -04:00
ReinUsesLisp 2c78d07197 shader: Store type of phi nodes in flags
This is needed because pseudo-instructions where invalidated.
2021-07-22 21:51:25 -04:00
ReinUsesLisp 876dd94b57 shader: Fix indirect branches to scheduler instructions 2021-07-22 21:51:25 -04:00
ReinUsesLisp 19cba41834 spirv: Fix default output attribute initialization 2021-07-22 21:51:25 -04:00
ReinUsesLisp d0d339b398 shader: Add missing new lines 2021-07-22 21:51:25 -04:00
ameerj d5d6d4ce74 shader: Implement FSWZADD 2021-07-22 21:51:25 -04:00
FernandoS27 bf9d512e17 shader: Implement BRX 2021-07-22 21:51:25 -04:00
ReinUsesLisp 99b954550f shader: Fix alignment checks on RZ 2021-07-22 21:51:25 -04:00
ameerj a0a4d75c6c shader: Implement I2I CC 2021-07-22 21:51:25 -04:00
ameerj f3ec28dc23 shader: Implement I2I SAT 2021-07-22 21:51:25 -04:00
ReinUsesLisp d9227e102d vk_pipeline_cache: Fix size hashing of shaders 2021-07-22 21:51:25 -04:00
ameerj a446881ab4 shader: Fix ISCADD logic for PO/CC 2021-07-22 21:51:25 -04:00
ReinUsesLisp 6044946495 shader: Implement LDS, STS, LDL, and STS and use SPIR-V 1.4 when available 2021-07-22 21:51:25 -04:00
ameerj 2e3184a1c8 shader: Implement ISCADD CC 2021-07-22 21:51:24 -04:00
ameerj 528b7b2d63 shader: Implement VMAD, VMNMX, VSETP 2021-07-22 21:51:24 -04:00
ReinUsesLisp b4310e8cb4 shader: Add missing I2I exception when CC is used 2021-07-22 21:51:24 -04:00
ReinUsesLisp e6b3119910 shader: Better interpolation and disabled attributes support 2021-07-22 21:51:24 -04:00
ReinUsesLisp 96a54aeea8 spirv: Remove dependencies on Environment when generating SPIR-V 2021-07-22 21:51:24 -04:00
ReinUsesLisp 43f71a1ff5 vk_pipeline_cache: Fix pipeline and shader caches 2021-07-22 21:51:24 -04:00
ReinUsesLisp 63ea42e0d5 shader: Implement front face 2021-07-22 21:51:24 -04:00
ReinUsesLisp 0b338e3102 shader: Fix structured control flow on KIL instructions
This could potentially leave unvisited blocks, leading to illegal phi
nodes.
2021-07-22 21:51:24 -04:00
FernandoS27 ed3f77cebe shader: Fix TXQ 2021-07-22 21:51:24 -04:00
ReinUsesLisp 47fc2a0510 shader: Fix rasterizer integration order issues 2021-07-22 21:51:24 -04:00
ReinUsesLisp e4ba306750 shader: Implement TXQ and fix FragDepth 2021-07-22 21:51:24 -04:00
ReinUsesLisp 4cd2c1588b shader: Refactor PTP and other minor changes 2021-07-22 21:51:24 -04:00
FernandoS27 ac81f51141 shader: Add IR opcode for ImageFetch 2021-07-22 21:51:24 -04:00
FernandoS27 f573d3642e shader: Implement TLD4.PTP 2021-07-22 21:51:24 -04:00
FernandoS27 cac54d1eb6 shader: Fix Array Indices in TEX/TLD4 2021-07-22 21:51:24 -04:00
FernandoS27 1d05850dee shader: Implement FragDepth 2021-07-22 21:51:24 -04:00
FernandoS27 94f6992630 shader: Implement TLD4S. 2021-07-22 21:51:24 -04:00
FernandoS27 d4974db16f shader: Implement TLD4 and TLD4_B 2021-07-22 21:51:24 -04:00
ameerj 483439a540 shader: Implement SHFL 2021-07-22 21:51:24 -04:00
ReinUsesLisp 7e8fc3e3c8 shader: Track first bindless argument instead of the instruction itself 2021-07-22 21:51:24 -04:00
ReinUsesLisp 1688302a0d shader: Properly insert Prologue instruction 2021-07-22 21:51:24 -04:00
ReinUsesLisp 5c546ef076 shader: Minor style nits 2021-07-22 21:51:24 -04:00
FernandoS27 c52b528cf7 shader: Fix F2I 2021-07-22 21:51:24 -04:00
ReinUsesLisp 24bc872af3 shader: Implement NDC [-1, 1], attribute types and default varying initialization 2021-07-22 21:51:24 -04:00
ReinUsesLisp 3095e9d9ec shader: Fix use-after-free bug in object_pool 2021-07-22 21:51:24 -04:00
ameerj 0705eff8f6 shader: Implement VOTE 2021-07-22 21:51:24 -04:00
ReinUsesLisp 9d5262ad26 vk_pipeline_cache: Fix ReleaseContents order 2021-07-22 21:51:24 -04:00
ReinUsesLisp 1e763c4c83 shader: Fix TEX mask 2021-07-22 21:51:24 -04:00
ReinUsesLisp 75b20d74c2 vk_pipeline_cache: Add pipeline cache 2021-07-22 21:51:24 -04:00
ReinUsesLisp fba49056aa vk_pipeline_cache: Add pipeline cache 2021-07-22 21:51:24 -04:00
ReinUsesLisp cdbb207953 shader: Fold interpolation multiplications 2021-07-22 21:51:24 -04:00
ReinUsesLisp c8234dc17d shader: Better but still partial interpolation support 2021-07-22 21:51:24 -04:00
ameerj 1a8e8498a4 shader: Implement DMNMX, DSET, DSETP 2021-07-22 21:51:24 -04:00
FernandoS27 1665e72c9e shader: Implement FADD32I 2021-07-22 21:51:24 -04:00
FernandoS27 9fe47baf87 shader: Implement F2F 2021-07-22 21:51:24 -04:00
ReinUsesLisp c05fc07b8f shader: Add missing fp64 usage flags 2021-07-22 21:51:24 -04:00
ameerj e7710fe30e shader: Implement DMUL and DFMA
Also add a missing const on DADD
2021-07-22 21:51:24 -04:00
ameerj d9bcca65b4 shader: Add FP64 register load/store helpers 2021-07-22 21:51:24 -04:00
ReinUsesLisp 9bf9276fe9 shader: Add support for fp16 comparisons and misc fixes 2021-07-22 21:51:24 -04:00
FernandoS27 d1e56df6ff shader: Fix floating point comparison for FP16 2021-07-22 21:51:23 -04:00
FernandoS27 57597e37ee shader: Implement HSETP2 2021-07-22 21:51:23 -04:00
FernandoS27 cabcf177a9 shader: Implement HSET2 2021-07-22 21:51:23 -04:00
FernandoS27 7646d50ae4 shader: Implement HMUL2 2021-07-22 21:51:23 -04:00
FernandoS27 fa85d2f603 shader: Implement HFMA2 2021-07-22 21:51:23 -04:00
ReinUsesLisp 5cd8970e73 spirv: Implement VertexId and InstanceId, refactor code 2021-07-22 21:51:23 -04:00
FernandoS27 8fe0b2388c shader: Refactor half floating instructions 2021-07-22 21:51:23 -04:00
ReinUsesLisp 6398d03341 shader: Implement I2F 2021-07-22 21:51:23 -04:00
ReinUsesLisp 2b8d3555f1 shader: Implement ISCADD (imm) 2021-07-22 21:51:23 -04:00
ReinUsesLisp 53a0b113d2 shader: Implement LOP32I 2021-07-22 21:51:23 -04:00
ReinUsesLisp 33090a74dd shader: Add partial rasterizer integration 2021-07-22 21:51:23 -04:00
ameerj 832f1169d6 shader: Implement DADD 2021-07-22 21:51:23 -04:00
ameerj 3c7ec88397 shader: Implement CSET and CSETP 2021-07-22 21:51:23 -04:00
ReinUsesLisp 187776e450 shader: Reorder phi nodes when redefined as undefined opcodes 2021-07-22 21:51:23 -04:00
ReinUsesLisp 609b8da584 shader: Fix instruction transitions in and out of Phi 2021-07-22 21:51:23 -04:00
ameerj ea4e293758 shader: Implement FSET and FSETP
Also fix oversight with adding SignedZeroInfNanPreserve execution mode.
2021-07-22 21:51:23 -04:00
ReinUsesLisp 1842c601ce shader: Implement TEXS 2021-07-22 21:51:23 -04:00
ReinUsesLisp db2e9d64aa shader: Implement CAL inlining function calls 2021-07-22 21:51:23 -04:00
ameerj 809a7282a4 spirv: Add SignedZeroInfNanPreserve logic 2021-07-22 21:51:23 -04:00
ameerj f8f0eea4eb shader: Implement FMNMX
And add a const in FCMP
2021-07-22 21:51:23 -04:00
ReinUsesLisp f99fd4d0c9 shader: Fix rebase issue 2021-07-22 21:51:23 -04:00
ameerj ab928b72c0 shader: Implement FCMP
still need to configure some settings for NV denorm flush and intel NaN
2021-07-22 21:51:23 -04:00
ReinUsesLisp 83c7592d3d shader: Partial implementation of LDC 2021-07-22 21:51:23 -04:00
ReinUsesLisp a956d3cdb3 shader: Initial support for textures and TEX 2021-07-22 21:51:23 -04:00
ameerj 449374cb13 shader: Implement R2P 2021-07-22 21:51:23 -04:00
ameerj 5d2857e57a shader: Implement SHF 2021-07-22 21:51:23 -04:00
ameerj 67a8a810d2 shader: Implement LEA 2021-07-22 21:51:23 -04:00
ReinUsesLisp e47fd18387 shader: Deduplicate HADD2 code 2021-07-22 21:51:23 -04:00
ameerj dc9f6bdc98 shader: Implement I2I 2021-07-22 21:51:23 -04:00
ReinUsesLisp 8230e271ea shader: Implement HADD2 2021-07-22 21:51:23 -04:00
ameerj d43926b401 shader: Implement LOP and LOP3 2021-07-22 21:51:23 -04:00
ameerj e17546c05f shader: Implement IADD3 2021-07-22 21:51:23 -04:00
ameerj 078a337de9 shader: Implement PSETP 2021-07-22 21:51:23 -04:00
ameerj c6e6e4bc7e Implement PSET, refactor common comparison funcs 2021-07-22 21:51:23 -04:00
ameerj f7e0d532a8 shader: Implement FLO 2021-07-22 21:51:23 -04:00
ameerj 14a3b85831 shader: Implement ISET, add common_funcs 2021-07-22 21:51:23 -04:00
ameerj a86f903ce3 shader: Make IMNMX, SHR, SEL stylistically more consistent 2021-07-22 21:51:22 -04:00
ameerj b098b8fc5c shader: Implement ICMP 2021-07-22 21:51:22 -04:00
ameerj 88324f800c shader: Implement IMNMX 2021-07-22 21:51:22 -04:00
ameerj b44b5a7468 shader: Implement BFI 2021-07-22 21:51:22 -04:00
ameerj bd2d3ba758 shader: Implement BFE 2021-07-22 21:51:22 -04:00
ameerj c134390062 shader: Implement POPC 2021-07-22 21:51:22 -04:00
ameerj b3d166ad4c shader: Implement SHR 2021-07-22 21:51:22 -04:00
ameerj 1040d61017 shader: Implement SEL 2021-07-22 21:51:22 -04:00
ReinUsesLisp ea61e5ba36 spirv: Move phi arguments emit to a separate function 2021-07-22 21:51:22 -04:00
ReinUsesLisp e14ffe25a6 shader: Avoid infinite recursion when tracking global memory 2021-07-22 21:51:22 -04:00
ReinUsesLisp 9585f4cd3f shader: Fix conditional execution of exit instructions 2021-07-22 21:51:22 -04:00
ReinUsesLisp 3d618df276 spirv: Add support for self-referencing phi nodes 2021-07-22 21:51:22 -04:00
ReinUsesLisp d0459ab2c2 shader: Fix control flow 2021-07-22 21:51:22 -04:00
ReinUsesLisp 215b21a1c0 shader: Implement more of XMAD and FFMA32I and fix XMAD.CBCC 2021-07-22 21:51:22 -04:00
ReinUsesLisp dda21fd317 shader: FMUL, select, RRO, and MUFU fixes 2021-07-22 21:51:22 -04:00
ReinUsesLisp 98bd83997c shader: Fix MOV(reg), add SHL variants and emit neg and abs instructions 2021-07-22 21:51:22 -04:00
ReinUsesLisp 16a5b4f494 spirv: Fixes and Intel specific workarounds 2021-07-22 21:51:22 -04:00
ReinUsesLisp e755a13d06 shader: Rename, implement FADD.SAT and P2R (imm) 2021-07-22 21:51:22 -04:00
ReinUsesLisp 6350a277a3 shader: Add denorm flush support 2021-07-22 21:51:22 -04:00
ReinUsesLisp a2fe90fa60 spirv: Add lower fp16 to fp32 pass 2021-07-22 21:51:22 -04:00
ReinUsesLisp a5f87011d3 shader: Primitive Vulkan integration 2021-07-22 21:51:22 -04:00
ReinUsesLisp 65069df8aa shader: Remove old shader management 2021-07-22 21:51:22 -04:00
ReinUsesLisp 2bb0069e4e shader: Add XMAD multiplication folding optimization 2021-07-22 21:51:22 -04:00
ReinUsesLisp 973936894d shader: Simplify ISCADD 2021-07-22 21:51:22 -04:00
ReinUsesLisp 073f346f8c shader: Add utility to resolve identities on a value 2021-07-22 21:51:22 -04:00
ReinUsesLisp a93521dc7e spirv: Implement EmitIdentity 2021-07-22 21:51:22 -04:00
ReinUsesLisp 605783f828 spirv: Initial bindings support 2021-07-22 21:51:22 -04:00
ReinUsesLisp dc384d68ac shader: Improve object pool 2021-07-22 21:51:22 -04:00
ReinUsesLisp 1c69500977 shader: Fix tracking 2021-07-22 21:51:22 -04:00
ReinUsesLisp 60342eb0c0 shader: Add support for forward declarations 2021-07-22 21:51:22 -04:00
ReinUsesLisp 756c643f08 shader: Support SSA loops on IR 2021-07-22 21:51:22 -04:00
ReinUsesLisp 76a3a2510f shader: Misc fixes 2021-07-22 21:51:22 -04:00
ReinUsesLisp c4d75e4b78 shader: Initial implementation of an AST 2021-07-22 21:51:22 -04:00
ReinUsesLisp 5ee600cf64 spirv: Initial SPIR-V support 2021-07-22 21:51:22 -04:00
ReinUsesLisp 8e9207253c shader: Better constant folding 2021-07-22 21:51:22 -04:00
ReinUsesLisp 0dcc0d5f8a shader: Properly store phi on Inst 2021-07-22 21:51:21 -04:00
ReinUsesLisp b229ffc0bc shader: Add pools and rename files 2021-07-22 21:51:21 -04:00
ReinUsesLisp f5b3324bca shader: Make typed IR 2021-07-22 21:51:21 -04:00
ReinUsesLisp 855d01d02b shader: Remove illegal character in SSA pass 2021-07-22 21:51:21 -04:00
ReinUsesLisp 37fc39de17 shader: Constant propagation and global memory to storage buffer 2021-07-22 21:51:21 -04:00
ReinUsesLisp f5605b424f shader: Initial instruction support 2021-07-22 21:51:21 -04:00
ReinUsesLisp 1b576ed4cb shader: SSA and dominance 2021-07-22 21:51:21 -04:00
ReinUsesLisp e6892e9da6 shader: Initial recompiler work 2021-07-22 21:51:21 -04:00
ameerj 0dfa52612f thread_worker: Fix compile time error
state is unused in the branch where with_state is false
2021-07-22 21:51:21 -04:00
bunnei f7454fabb3 Merge pull request #6686 from ReinUsesLisp/vk-optimal-copy
vk_texture_cache: Use VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL when possible
2021-07-22 12:51:13 -04:00
Morph 4b29df2ff2 Merge pull request #6693 from lat9nq/cmd-fullscreen-mode-2
yuzu_cmd: Make use of fullscreen_mode setting
2021-07-22 00:55:01 -04:00
bunnei 18a787b357 Merge pull request #6654 from german77/custom_threshold
input_common: Make button threshold customizable
2021-07-21 20:31:33 -04:00
lat9nq 1cba6817e0 yuzu_cmd: Make use of fullscreen_mode setting
Reverts 48259de0c1a6a1aca77eec31cb8aca5ca2b680dd to the previous
hierarchy and fixes the resolution issue with this fullscreen mode.
yuzu-cmd will now read the fullscreen_mode setting and use it
appropriately.
2021-07-21 19:48:03 -04:00
san 48bd60e5c3 yuzu-cmd: Fullscreen Improvements (#6656)
* emu_window_sdl2_vk: Use the generated SDL config

On Linux, due to the way we include SDL2 as a submodule, it makes it
difficult for us to specify which SDL_config.h we intended to include.
Before, CMake would default to the dummy one included with SDL and
ignore the generated one.

This tells CMake to use the generated one. In addition, we define
USING_GENERATED_CONFIG_H to throw an error in case the dummy config is
used by accident. Fixes Vulkan not working on Linux yuzu-cmd.

* emu_window_sdl2_vk: Specify the window manager if it should be supported

The original language "not implemented" is wrong if the implementation
exists but is not compiled. This causes a bit of a debugging headache
when it goes wrong. Log it if the window manager is known before
exiting.

* sdl_impl, emu_window: Remove clang ignore

Fixed upstream by
libsdl-org/SDL@25fc40b0bd

* Enable fullscreen support for Vulkan on yuzu-cmd

Hooked up the existing SDL2 logic for fullscreen support in the Vulkan window of yuzu-cmd.

* Change fullscreen logic to attempt desktop resolution first on yuzu-cmd

Changed the order in which we attempt to switch to fullscreen. First try desktop resolution first, if it fails fall back to streched fullscreen using windowed resolution.

Co-authored-by: lat9nq <22451773+lat9nq@users.noreply.github.com>
Co-authored-by: san <san+gitkraken@smederijmerlijn.nl>
2021-07-21 11:56:42 -07:00
bunnei b8a0a8bbac Merge pull request #6660 from Morph1984/controller_applet_rev8
applet_controller: Add preliminary support for version 8
2021-07-21 00:01:46 -04:00
bunnei 1bdd05134c hle: service: kernel_helpers: Remove unnecessary pragma once. 2021-07-20 18:54:56 -07:00
bunnei b9bb5338c0 hle: kernel: svc: Remove part of ExitProcess.
- ExitProcess is not actually implemented either way, and this needs more work before we implement.
2021-07-20 18:54:56 -07:00
bunnei 44ad911d6f hle: service: nvdrv: Remove unused kernel reference. 2021-07-20 18:54:56 -07:00
bunnei 1eb56afe47 hle: service: hid: npad: Remove unused kernel reference. 2021-07-20 18:54:56 -07:00
bunnei beeed68944 hle: kernel: Track and release server sessions, and protect methods with locks. 2021-07-20 18:54:56 -07:00
bunnei 179243473b hle: kernel: KProcess: Change process termination assert to a warning.
- Since we do not implement multiprocess right now, this should not be a crashing assert.
2021-07-20 18:54:56 -07:00
bunnei 81d111fd1b hle: kernel: Ensure current running process is closed. 2021-07-20 18:54:56 -07:00
bunnei 88350871df hle: kernel: Ensure global handle table is finalized before closing. 2021-07-20 18:54:56 -07:00
bunnei 43f2f83c30 kernel: svc: ConnectToNamedPort: Close extra reference to port. 2021-07-20 18:54:56 -07:00
bunnei 4e7c75d592 hle: service: sm: Refactor to better manage ports. 2021-07-20 18:54:55 -07:00
bunnei 66da530a81 hle: kernel: k_process: Close the handle table on shutdown. 2021-07-20 18:54:55 -07:00
bunnei d144950f11 hle: kernel: k_process: Close main thread reference after it is inserted into handle table. 2021-07-20 18:54:55 -07:00
bunnei 2c96cc5343 hle: kernel: Ensure global handle table is initialized. 2021-07-20 18:54:55 -07:00
bunnei b7140d7f00 hle: service: Add a helper module for managing kernel objects. 2021-07-20 18:54:55 -07:00
bunnei a4b3202b65 hle: kernel: Provide methods for tracking dangling kernel objects. 2021-07-20 18:54:55 -07:00
bunnei def3f59ed9 Merge pull request #6649 from german77/toggle_sdl
input_common: Support SDL toggle buttons
2021-07-20 20:35:20 -04:00
ReinUsesLisp fa3ebd5752 gl_buffer_cache: Use glClearNamedBufferSubData:GL_RED instead of GL_RGBA
Avoids reading out of bounds from the stack.
2021-07-20 18:51:45 -03:00
ReinUsesLisp 9d433f0bd9 buffer_cache: Simplify clear logic
Use existing helper functions and avoid looping when
only one buffer has to be active.
2021-07-20 18:50:51 -03:00
bunnei e72b0da651 Merge pull request #6629 from FernandoS27/accel-dma-2
DMAEngine: Accelerate BufferClear [accelerateDMA Part 2]
2021-07-20 17:35:05 -04:00
bunnei 29afacce57 Merge pull request #6658 from Morph1984/render-window-fix
bootmanager: Create a dummy render widget
2021-07-20 15:55:48 -04:00
Fernando S cabe8dba04 Merge pull request #6685 from ReinUsesLisp/radeonsi-client
gl_texture_cache: Workaround slow PBO downloads on radeonsi
2021-07-20 20:33:07 +02:00
ReinUsesLisp e544a2a207 vk_texture_cache: Use VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL when possible
Silences performance warnings generated from validation layers on each frame.
2021-07-20 14:38:58 -03:00
ReinUsesLisp 0b1ad8e66c gl_texture_cache: Workaround slow PBO downloads on radeonsi
There's an optimization bug on non-git mesa versions where not
specifying GL_CLIENT_STORAGE_BIT causes very slow reads on the CPU
side.

Add this bit for all vendors.
2021-07-20 14:02:11 -03:00
Chloe Marcec 7ce462a1f7 uuid: Directly compare UUID instead of checking per element
We can now update this for C++20
2021-07-21 02:36:57 +10:00
Fernando S 805f1888da vk_buffer_cache: Fix quad index array with 0 vertices (#6627) 2021-07-20 05:05:28 -03:00
Nicolas Jallamion d417596f27 input/sdl_impl: fix rumble support on DualSense. (#6683)
- value return can be different 0, is not error is normal, error is only -1.
2021-07-20 04:00:07 -04:00
Morph 03639b1262 applet_controller: Add preliminary support for version 8
Version 8 adds support for key remapping introduced in FW 11.0, we will not be implementing this for now.
2021-07-20 01:45:19 -04:00
Morph 13e270c3f5 bootmanager: Create a dummy render widget
This ensures that Qt positions the render window at the correct position on initializing the respective render backends.
2021-07-20 01:40:18 -04:00
Feng Chen 77f209e391 file_sys: Support load game collection (#6582)
Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
2021-07-20 01:10:05 -04:00
Rodrigo Locatti 4b477d0021 Merge pull request #6580 from ReinUsesLisp/xfb-radv
vk_buffer_cache: Use emulated null buffers for transform feedback
2021-07-19 23:01:19 -03:00
bunnei 40a1066bf7 Merge pull request #6652 from lat9nq/cmd-vulkan-fixes
yuzu-cmd: Linux Vulkan fixes
2021-07-19 20:54:03 -04:00
bunnei dbf91f78e8 Merge pull request #6651 from lat9nq/update-settings
yuzu-cmd: Update settings
2021-07-19 12:46:40 -04:00
Fernando S 03acdb4356 Merge pull request #6679 from yzct12345/fix-lets-go
Fix Pokemon Let's Go on Vulkan
2021-07-19 03:29:54 +02:00
Fernando S 55d9c6ece2 Merge pull request #6670 from ReinUsesLisp/prepare-rt
texture_cache: Always prepare image views on render targets
2021-07-19 03:21:25 +02:00
Fernando S a3598a71f5 Merge pull request #6669 from ReinUsesLisp/fix-samples-sizes
texture_cache/util: Fix size calculations of multisampled images
2021-07-19 03:21:03 +02:00
yzct12345 bb88da8b30 Update src/video_core/renderer_vulkan/vk_texture_cache.cpp
Co-authored-by: Vitor K <vitor-kiguchi@hotmail.com>
2021-07-18 22:23:32 +00:00
yzct12345 b0b92cd22b Update src/video_core/renderer_vulkan/vk_texture_cache.cpp
Co-authored-by: Vitor K <vitor-kiguchi@hotmail.com>
2021-07-18 22:23:12 +00:00
yzct12345 dce2c2325b Ignore wrong blit format 2021-07-18 21:56:06 +00:00
ReinUsesLisp 964ca3cda8 vk_texture_cache: Finalize renderpass when downloading images 2021-07-18 18:00:30 -03:00
ReinUsesLisp bfe3e0a5d3 vk_compute_pass: Fix pipeline barriers on non-initialized ASTC images 2021-07-18 18:00:14 -03:00
ReinUsesLisp b650d7ab8d vk_compute_pass: Fix ASTC buffer setup synchronization 2021-07-18 17:59:31 -03:00
ReinUsesLisp 21932acf5f texture_cache/util: Fix size calculations of multisampled images
On the texture cache we handle multisampled images by keeping their real
size in samples (e.g. 1920x1080 with 4 samples is 3840x2160).

This works nicely with size matches and other comparisons, but the
calculation for guest sizes was not having this in mind, and the size
was being multiplied (again) by the number of samples per dimension.
For example a 3840x2160 texture cache image had its width and height
multiplied by 2, resulting in a much larger texture.

Fix this issue.

- Fixes performance regression on cooking related titles when an
  unrelated bug was fixed.
2021-07-18 01:15:48 -03:00
ReinUsesLisp 931fcedfa8 texture_cache: Always prepare image views on render targets
Images used as render targets were not being "prepared", causing
desynchronizations on the texture cache. Needs #6669 to avoid
performance regressions on certain cooking titles.

- Fixes black shadows on Age of Calamity.
2021-07-18 00:49:32 -03:00
Ameer J 9acca738e2 Merge pull request #6659 from german77/mouse_panning
input_common: Fix mouse panning behaivour
2021-07-17 16:32:43 -04:00
german77 0ccd665a0a configure/ui: Add sliders for trigger buttons 2021-07-17 13:30:43 -05:00
german77 0fb8912834 input_common: Fix mouse panning behaivour 2021-07-16 18:57:29 -05:00
lat9nq 7a30ae6845 sdl_impl, emu_window: Remove clang ignore
Fixed upstream by
libsdl-org/SDL@25fc40b0bd
2021-07-16 15:43:12 -04:00
lat9nq 1b8bba7f0d emu_window_sdl2_vk: Specify the window manager if it should be supported
The original language "not implemented" is wrong if the implementation
exists but is not compiled. This causes a bit of a debugging headache
when it goes wrong. Log it if the window manager is known before
exiting.
2021-07-16 15:43:12 -04:00
lat9nq 6340c4801f emu_window_sdl2_vk: Use the generated SDL config
On Linux, due to the way we include SDL2 as a submodule, it makes it
difficult for us to specify which SDL_config.h we intended to include.
Before, CMake would default to the dummy one included with SDL and
ignore the generated one.

This tells CMake to use the generated one. In addition, we define
USING_GENERATED_CONFIG_H to throw an error in case the dummy config is
used by accident. Fixes Vulkan not working on Linux yuzu-cmd.
2021-07-16 15:43:02 -04:00
Morph 6252bf7321 configure_audio: Fix volume clamping to 0 2021-07-16 10:36:08 -04:00
lat9nq e9212fc86b yuzu_cmd: Add missing or update current settings
Many settings in common/settings.h are missing from yuzu-cmd, either
they were added to default_ini.h but not read in, or vice versa, or the
setting was altogether omitted from yuzu-cmd. Some defaults were
reported wrong, so those were fixed where noticed.
2021-07-16 02:46:14 -04:00
german77 9e0f89e081 input_common: Make button threshold customizable 2021-07-15 23:56:57 -05:00
lat9nq 5c8ce75823 default_ini: Remove deprecated settings
These settings are not being read in config.cpp AND they do not exist in
common/settings.h. Remove their references.
2021-07-15 23:27:42 -04:00
bunnei 24f798804c Merge pull request #6579 from ameerj/float-settings
settings: Eliminate usage of float-point setting values
2021-07-15 18:03:11 -04:00
german77 f098c2163b input_common: Support SDL toggle buttons 2021-07-15 14:31:58 -05:00
Fernando S 7f0f53bf92 Merge pull request #6635 from ameerj/intel-vk-sm3dw
vk_rasterizer: Only clear valid color attachments
2021-07-15 16:52:51 +02:00
Fernando S 51480d636e Merge pull request #6525 from ameerj/nvdec-fixes
nvdec: Fix Submit Ioctl data source, vic frame dimension computations
2021-07-15 15:17:50 +02:00
ameerj 34b718006e vic: Fix dimension compuation of YUV frames
Fixes out of bound memory crashes in Mario Golf
2021-07-15 00:51:50 -04:00
Morph 2cc5cdd3c4 applets/web: Resolve Nintendo CDN URLs
This fixes the hint videos in New Super Mario Bros. U Deluxe
2021-07-15 00:31:46 -04:00
ameerj f4ea325867 nvhost_nvdec_common: Read Submit ioctl data from object addr
Fixes Mario Golf intro video decoding.
2021-07-14 23:56:24 -04:00
ameerj fbb6cfda14 nvhost_nvdec_common: Fix {Slice/Write}Vectors return
Plus some minor cleanup for consistency.
2021-07-14 22:30:58 -04:00
Fernando Sahmkow a358a281bf Buffer cache: Fixes, Clang and Feedback. 2021-07-15 02:02:08 +02:00
Fernando Sahmkow 4fbb74e45b GPUMemoryManager: Force inmediate invalidation when writting block. 2021-07-14 18:39:31 +02:00
Fernando Sahmkow 1eeef16a6e Buffer Cache: Fixes to DMA Copy. 2021-07-14 18:25:33 +02:00
Fernando Sahmkow c55539fa95 DMAEngine: Revert flushing from Pitch to BlpockLinear. 2021-07-14 16:44:53 +02:00
Fernando Sahmkow 4220d6a7d6 BufferCache: fix clearing on forced download. 2021-07-14 16:44:15 +02:00
Morph d66442a4e1 service: Append service name prefix to common filenames 2021-07-14 02:09:14 -04:00
Morph 66b9de4b04 applets: Append applet_ prefix to backend applets 2021-07-14 01:07:09 -04:00
Morph 30498f3ce8 applets: Append qt_ prefix to Qt frontend applets 2021-07-14 01:07:09 -04:00
Ameer J be413e177a Merge pull request #6599 from german77/disable_rumble
npad: Disable vibration check if disabled
2021-07-13 16:11:59 -04:00
ameerj ad26c5a52f vk_rasterizer: Only clear valid color attachments 2021-07-13 16:04:27 -04:00
bunnei 55c63836b2 Merge pull request #6574 from lioncash/i18n
qt/main: Make title string more i18n-friendly
2021-07-12 22:12:09 -07:00
bunnei e6053e71b7 Merge pull request #6593 from german77/no_sdl
input_common: Fix build with SDL disabled
2021-07-12 22:11:39 -07:00
bunnei 41a1ea7b9c Merge pull request #6615 from ReinUsesLisp/httplib-debug-warnings
boxcat,web_service: Silence -Wmaybe-uninitialized when including httplib.h
2021-07-12 22:11:19 -07:00
bunnei 53a510463d Merge pull request #6618 from ReinUsesLisp/bad-ranges
content_archive: Remove unnecessary include to <ranges>
2021-07-12 22:10:50 -07:00
bunnei 0e9a34da46 Merge pull request #6571 from Kelebek1/Mix
audio_core: Replace NaN mix volume samples with silence
2021-07-12 22:09:05 -07:00
Fernando Sahmkow a0a9ff69fa DMAEngine: Accelerate BufferClear 2021-07-13 03:49:47 +02:00
Ameer J 3585cd875e Merge pull request #6597 from FernandoS27/accelerate-dma
DMAEngine: Introduce Accelerate DMA.
2021-07-12 12:49:11 -04:00
Fernando Sahmkow 2f222a20df accelerateDMA: Fixes and feedback. 2021-07-12 10:33:35 +02:00
ReinUsesLisp 57ecb7ea34 content_archive: Remove unnecessary include to <ranges>
Fixes build issues on clang.
2021-07-12 03:37:56 -03:00
ReinUsesLisp 89398ddbf4 web_service: Silence -Wmaybe-uninitialized on httplib.h 2021-07-12 03:30:45 -03:00
ReinUsesLisp 2733c4e186 boxcat: Silence -Wmaybe-uninitialized in httplib.h 2021-07-12 03:30:45 -03:00
Morph 662d46e6f3 Merge pull request #6576 from ameerj/unlock-fps-setting
settings: Disable FPS unlimit setting between title launches
2021-07-11 13:59:06 -04:00
german77 fcbad25072 npad: Disable vibration check if disabled 2021-07-10 20:06:07 -05:00
german77 77db68f9e3 input_common: Fix build with sdl disabled 2021-07-10 20:02:02 -05:00
Fernando Sahmkow 45da44d16a accelerateDMA: Accelerate Buffer Copies. 2021-07-11 01:33:17 +02:00
Fernando Sahmkow 1be1828db1 Buffer Cache: Address Feedback. 2021-07-10 21:34:55 +02:00
ameerj adbff795e9 settings: Disable FPS unlimit setting between title launches
Some titles crash if the FPS limit is disabled when launching. This change ensures that titles launch with the limit in-place to avoid issues.
In order to simplify the change, the UI toggle was removed as it will always be overridden at launch to be disabled.
The setting can still be toggled during gameplay with the hotkey, and indicated by the fps label in the status bar.
2021-07-10 15:11:17 -04:00
Fernando Sahmkow bdd0787048 Buffer Cache: Fix GCC copmpile error 2021-07-09 22:20:36 +02:00
Fernando Sahmkow 647ecefd4c Fence Manager: remove reference fencing. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow d9fc759460 BufferCache: Additional download fixes. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow 000f51250f Buffer Cache: Revert unnecessary range reduction. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow ee5dfe2c02 Fence Manager: Force ordering on WFI. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow ddb595bf7f Buffer Cache: Eliminate the AC Hack as the base game is fixed in Hades. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow 48d5b8bf3e Fence Manager: Add fences on Reference Count. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow 907da84f02 Videocore: Address Feedback & CLANG Format. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow 776da59abc Buffer Cache: Fix High Downloads and don't predownload on Extreme. 2021-07-09 22:20:36 +02:00
Fernando S 7d416865fd Merge pull request #6573 from lat9nq/cpu-settings-cleanup-2
core,common,yuzu qt: Add CPU accuracy option 'Auto'
2021-07-09 21:45:45 +02:00
lat9nq d42f980e0f yuzu qt: config: Only save renderer_debug as a global setting
This is a bug fix. Enabling graphics debug mode, then saving a custom
configuration causes graphics debugging to be saved and read from the
custom configuration.

Isolate it the same way we isolate the CPU settings.
2021-07-09 10:49:56 -04:00
Fernando S 853ce07510 Update src/yuzu/main.cpp
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2021-07-09 12:28:51 +02:00
ReinUsesLisp c61bfbce32 vk_buffer_cache: Use emulated null buffers for transform feedback
Vulkan does not support null buffers on transform feedback bindings.
Emulate these using the same null buffer we were using for index
buffers.
2021-07-09 01:27:47 -03:00
ameerj 4e2d71a8ce configure_input: Use u8 for mouse sensitivity 2021-07-08 23:24:31 -04:00
ameerj e2bb1ef5aa config: Remove float {Read,Write}Setting variants 2021-07-08 22:04:24 -04:00
ameerj 62979cbf0b configure_graphics: Use u8 for bg_color values 2021-07-08 21:45:01 -04:00
ameerj 86e3e8a4a9 configure_audio: Use u8 for volume value 2021-07-08 20:58:38 -04:00
Fernando Sahmkow 73d331d250 Settings: Eliminate ASYNC & MULTICORE Toggles and add GPU Accuracy Toggle. 2021-07-09 02:08:08 +02:00
ReinUsesLisp 976c29518e common/thread_worker: Stop workers on stop_token when waiting 2021-07-08 19:03:26 -03:00
ReinUsesLisp efd62f7130 common/thread_worker: Add support for stateful threads 2021-07-08 19:03:26 -03:00
FernandoS27 e5f8e2d2de common/thread_worker: Simplify logic 2021-07-08 19:03:26 -03:00
FernandoS27 fd43841060 common/thread_worker: Fix data race 2021-07-08 19:03:26 -03:00
ReinUsesLisp 6310150fcc common/thread_worker: Use unique function 2021-07-08 19:03:26 -03:00
ReinUsesLisp 3a0e4487ba common: Add unique function 2021-07-08 19:03:19 -03:00
ReinUsesLisp 8645319a49 common/thread_worker: Add wait for requests method 2021-07-08 19:00:39 -03:00
lat9nq 95163455a6 settings, arm_dynarmic, yuzu qt: Move CPU debugging option
Decouples the CPU debugging mode from the enumeration to its own
boolean. After this, it moves the CPU Debugging tab over to a sub tab
underneath the Debug tab in the configuration UI.
2021-07-08 16:56:44 -04:00
lat9nq 23660e8fd5 arm_dynarmic_64: Re-add fastmem_address_space_bits to Auto setting 2021-07-08 15:14:45 -04:00
Lioncash f2a07b95f0 qt/main: Make title string more i18n-friendly
Currently, whether or not the title is 32-bit or 64-bit was being
appended as a suffix to the title, which is fine for left-to-right
languages, but may not always fly so smoothly with some right-to-left
languages.

We also weren't marking that portion of the string as translatable,
which prevents translators from translating part of the title string.
2021-07-08 15:06:16 -04:00
lat9nq 07b5e2aee1 settings, yuzu qt: Add migration code for CPU accuracy
Old CPU Accuracy setting won't translate well into since we're adding
one at the beginning of the list. On first boot with the new setting,
just use the default setting.
2021-07-08 14:56:09 -04:00
lat9nq c92f2ecee8 arm_dynarmic{32,64}: Fixes from test build
Now sets optimizations regardless of the Settings. Drops unsafe fastmem
optimization.
2021-07-08 14:56:09 -04:00
lat9nq 14e4dbe61e core,common,yuzu qt: Add CPU accuracy option 'Auto'
The current CPU accuracy settings in yuzu are fairly polarized and
require more than common knowledge to know what the optimal settings for
yuzu would be. This adds a curated option called 'Auto' that applies a
few at the moment known-good unsafe optimizations to Dynarmic.
2021-07-08 14:56:09 -04:00
Ameer J 60e29dd3b0 Merge pull request #6539 from lat9nq/default-setting
general: Move most settings' defaults and labels into their definition
2021-07-08 14:46:31 -04:00
lat9nq d9109a708b general: Code formatting improvements
Slight improvements to readability.

Dropped suggestions for string_view (settings.h:101), pass by value
(settings.h:82), reverting double to a float (config.cpp:316), and other
smaller ones, some out of scope.

Addresses review feedback.

Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-07-08 14:07:10 -04:00
Feng Chen 4adb9d01f7 Out of bound blit (#6531)
* Fix out of bound blit error

* Fix code read

* Fix ci error

Co-authored-by: Feng Chen <chen.feng@gloritysolutions.com>
2021-07-08 11:06:09 -07:00
Kelebek1 51ba9450fe Replace NaN mix volume samples with silence.
Fixes Xenoblade Chronicles 2 blowing out the audio.
2021-07-08 17:42:15 +01:00
Morph e027ca45c1 Merge pull request #6564 from Kelebek1/Audio
Support more PCM formats
2021-07-08 12:14:58 -04:00
Morph 655e3c0a5c Merge pull request #6569 from Kelebek1/Vol
audio_core: Preserve front channel volume after 6 to 2 downmix
2021-07-08 12:09:21 -04:00
Kelebek1 0a4e300431 audio_core: Preserve front channel volume after 6 to 2 downmix
Many games report 6 channel output while only providing data for 2. We only output 2-channel audio regardless, and in the downmixing, front left/right only provide 36% of their volume. This is done assuming all of the other channels also contain valid data, but in many games they don't. This PR alters the downmixing to preserve front left/right, so volume is not lost.

This improves volume in Link's Awakening, New Super Mario Bros U, Disgaea 6, Super Kirby Clash.
2021-07-08 17:07:23 +01:00
bunnei e99c725050 Merge pull request #6567 from Kelebek1/Audio2
[audren] Report 2 channels active rather than 1
2021-07-07 14:52:08 -07:00
lat9nq 93bb8ce425 util_shaders: Fix BindImageTexture
According to
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3820#note_753371 we
need to set these to true for use with 3D textures.

Fixes BOTW teleporting on RadeonSI and iris.
2021-07-07 14:09:55 -04:00
bunnei 78063cc32b Merge pull request #6562 from Morph1984/flush-behavior
common: fs: More misc. changes
2021-07-07 00:40:31 -07:00
bunnei 661a0f6569 Merge pull request #6497 from FernandoS27/scotty-doesnt-know
GPU Memory Manager - Correct handling of non continuous backing memory.
2021-07-06 17:26:21 -07:00
Kelebek1 6089a29f54 Report 2 channels active. Fixes Tales of Vesperia's mono channel audio. 2021-07-06 18:52:49 +01:00
Kelebek1 b659019c90 Support more PCM formats. Fixes Ys IX audio. 2021-07-06 18:43:23 +01:00
Morph 64f22684d4 CMakeLists: Treat -Wsign-compare as an error on GCC/Clang
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
2021-07-06 12:50:09 -04:00
Morph 3d2b67f5e3 common: logging: backend: Close the file after exceeding the write limit
There's no point in keeping the file open after the write limit is exceeded. This allows the file to be committed to the disk shortly after it is closed and avoids redundantly checking whether or not the write limit is exceeded.
2021-07-06 05:59:47 -04:00
Morph d4671282a9 common: fs: file: Revert Flush to its previous behavior and add Commit
It became apparent that logging can continuously spam errors that trigger file flushing.
Since committing the files to disk is an expensive operation, this causes unnecessarily high disk usage.
As such, we will revert Flush() to the previous behavior and add a Commit() member function in the event that this behavior is needed.
2021-07-06 05:59:47 -04:00
Morph ab1259c88f common: fs: file: Flush the file in GetSize
This ensures that GetSize always retrieves the correct file size after a write operation.
2021-07-06 05:59:47 -04:00
bunnei 88cb6c26f3 Merge pull request #6537 from Morph1984/warnings
general: Enforce multiple warnings in MSVC
2021-07-05 17:09:23 -07:00
bunnei c47df4745e Merge pull request #6556 from Morph1984/default-mii
service: mii: Retrieve the correct default miis.
2021-07-05 13:51:00 -07:00
Ameer J 72b17e1988 Merge pull request #6540 from Kelebek1/nvdec
Slightly refactor NVDEC and codecs for readability and safety
2021-07-05 16:06:09 -04:00
Morph caf9cc3ecf Merge pull request #6561 from german77/analog_fix
input_common: Add missing modifier callback to analog from button
2021-07-05 12:47:42 -04:00
german77 cf1280874f input_common: Add missing modifier callback to analog from button 2021-07-05 11:39:42 -05:00
german77 99bf1aa49f profiler: Fix deprecated functions 2021-07-05 10:15:35 -05:00
Mai M 2e71ebb112 Merge pull request #6552 from Morph1984/c4189-msvc
CMakeLists: Enforce C4189 on MSVC
2021-07-04 22:16:28 -04:00
Fernando Sahmkow 82c04074c7 Texture Cache: Fix collision with multiple overlaps of the same sparse texture. 2021-07-04 22:32:36 +02:00
Fernando Sahmkow 9be87e6a71 Texture Cache: Fix GCC & Clang. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow 73d501ed4b Texture Cache: Address feedback. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow 083e0527fd Texture Cache: Improve accuracy of sparse texture detection. 2021-07-04 22:32:35 +02:00
Fernando Sahmkow 5854ca4ff0 Texture Cache: Initial Implementation of Sparse Textures. 2021-07-04 22:32:03 +02:00
Morph b3ca6f09bb service: mii: Retrieve the correct default miis.
We were including the first 2 default miis which are not meant to be shown in games. With this change, we properly retrieve the 6 default miis shown in games, with 3 of each gender.
2021-07-04 05:38:34 -04:00
Fernando Sahmkow e30d18801d TextureCacheOGL: Implement Image Copies for 1D and 1D Array. 2021-07-03 14:40:29 +02:00
Fernando Sahmkow 141f92619b TextureCache: Fix 1D to 2D overlapps. 2021-07-03 14:01:54 +02:00
Morph 3be5ca932a CMakeLists: Enforce C4189
This supplements C4101 by detecting initialized but unreferenced local variables
2021-07-03 05:51:31 -04:00
bunnei 4168a4d571 Merge pull request #6498 from Kelebek1/Audio
[audio_core] Decouple audio update and processing, and process at variable rate
2021-07-03 00:24:33 -07:00
lat9nq c316fc4f2d config: Read UISettings as basic settings
I must have been asleep or something. These need to be read with the new
ReadBasicSetting function.
2021-07-02 01:06:30 -04:00
lat9nq 2574064759 settings: Set resolution_factor default to 1
Fixes Disgaea 6 Demo issues.
2021-07-01 12:06:12 -04:00
Kelebek1 05fb3db000 Slightly refactor NVDEC and codecs for readability and safety 2021-07-01 06:22:05 +01:00
Kelebek1 07e637d8c6 Fix XC2/VOEZ crashing, add audio looping and a few misc fixes 2021-07-01 06:01:01 +01:00
Ameer J 00232f761a Merge pull request #6459 from lat9nq/ubuntu-fixes
cmake: Improve Linux dependency checking for externals
2021-06-30 21:47:57 -04:00
lat9nq e7a1c72fc5 yuzu_cmd: config: Pass a reference in
Also adds documentation for the ReadSetting function.

Address review comments.

Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-06-30 20:16:01 -04:00
Morph f3e895dfe3 Merge pull request #6471 from lat9nq/dump-as-mod
yuzu qt, core: Support LayeredFS mods from SDMC directory
2021-06-29 00:10:31 -04:00
lat9nq 3352742284 core, input_common: Miscellaneous fixes
bcat: Fix settings access

telemetry_session: Fix settings accesses

So this is what I get for testing with the web service disabled.

touch_from_button: Fix settings access for clang
2021-06-28 20:56:17 -04:00
lat9nq 843455fa98 yuzu qt: Make most UISettings a BasicSetting
For simple primitive settings, moves their defaults and labels to
definition time.

Also fixes typo and clang-format

yuzu qt: config: Fix rng_seed
2021-06-28 19:13:53 -04:00
lat9nq 794c444285 general: Make most settings a BasicSetting
Creates a new BasicSettings class in common/settings, and forces setting
a default and label for each setting that uses it in common/settings.
Moves defaults and labels from both frontends into common settings.
Creates a helper function in each frontend to facillitate reading the
settings now with the new default and label properties.

Settings::Setting is also now a subclass of Settings::BasicSetting. Also
adds documentation for both Setting and BasicSetting.
2021-06-28 17:32:17 -04:00
Morph f793874d29 Merge pull request #6502 from ameerj/vendor-title
main: Add GPU Vendor name to running title bar
2021-06-28 14:51:49 -04:00
Morph 4e2b26923a CMakeLists: Disable all warnings for external headers
This lets us avoid needing to wrap external headers with #pragma warning directives for warnings we treat as errors and avoids generating warnings for external code.

Thanks to MerryMage for pointing this out.
2021-06-28 14:24:28 -04:00
Morph 61fc23e127 video_core: Remove #pragma warning directives for external headers 2021-06-28 14:21:40 -04:00
Morph 1917128312 input_common: Remove #pragma warning directives for external headers 2021-06-28 14:20:25 -04:00
Morph 8f0cd4d87d CMakeLists: Enforce C4018, C4267, C4305, C4389 2021-06-28 14:20:25 -04:00
Morph 3dd396effa core: Enforce C4242 2021-06-28 14:20:25 -04:00
Morph b6c7707fe9 input_common: Enforce C4242 2021-06-28 14:20:25 -04:00
Morph a487c17aff video_core: Enforce C4242 2021-06-28 14:20:25 -04:00
Morph 263495a5d5 patch_manager: Do not apply LayeredFS mods when dumping
We should not apply any mods when dumping a game's RomFS.
2021-06-28 10:14:36 -04:00
Morph b3396ec358 filesystem: Open a read-only directory for SDMC mods
This prevents mod files from being locked due to the read-only share flag in Windows.
2021-06-28 10:08:08 -04:00
lat9nq bc4dc2135e core: Simplify SDMC mod loading
If someone else wants to support other mod formats in the SDMC
directory, that can be added later. For now, just allow RomFS modding
here and force people to do other types of mods the old way.

Addresses review comments.

Co-authored-by: LC <mathew1800@gmail.com>
2021-06-28 10:08:08 -04:00
lat9nq 329398cd41 core: Support LayeredFS mod from SDMC directory
Enables loading a mod directly from `[yuzu data
directory]/sdmc/atmosphere/contents/[title_id]`. For use with some
homebrew mod managers.
2021-06-28 10:08:07 -04:00
lat9nq 7d09c0a694 yuzu qt: Add option to dump to SDMC directory
Enables dumping the RomFS to SDMC directory, specifically '[yuzu data
directory]/sdmc/atmosphere/contents/[title_id]/romfs'.
2021-06-28 10:08:07 -04:00
Morph 2986e26179 video_core: Silence signed/unsigned mismatch warnings 2021-06-28 09:21:42 -04:00
ameerj 4cf87ac811 main: Display the instruction set of the running title in the window name
Displays whether the currently running title uses 64-bit instructions or only 32-bit instructions.
2021-06-28 00:37:24 -04:00
Kelebek1 b46191d104 Decouple audio processing and run at variable rate
Currently, processing of audio samples is called from AudioRenderer's Update method, using a fixed 4 buffers to process the given samples. Games call Update at variable rates, depending on framerate and/or sample count, which causes inconsistency in audio processing. From what I've seen, 60 FPS games update every ~0.004s, but 30 FPS/160 sample games update somewhere between 0.02 and 0.04, 5-10x slower. Not enough samples get fed to the backend, leading to a lot of audio skipping.

This PR seeks to address this by de-coupling the audio consumption and the audio update. Update remains the same without calling for buffer queuing, and the consume now schedules itself to run based on the sample rate and count.
2021-06-27 15:58:07 +01:00
Morph 783bfe6f32 Merge pull request #6529 from ReinUsesLisp/reaper-fixups
buffer_cache,texture_cache: Misc fixups from the memory reaper
2021-06-27 09:33:58 -04:00
bunnei 3b9006085f Merge pull request #6526 from bunnei/doom-update
services: Misc. minor changes for latest SDK update.
2021-06-26 01:21:55 -07:00
bunnei 2b36c8f843 hle: service: hwopus: OpenHardwareOpusDecoderEx: Remove unused buffer size. 2021-06-26 00:38:08 -07:00
lat9nq 2a3db91559 configuration: Defer to common/settings for per-game settings defaults
Avoids double-setting defaults, and avoids potential accidents when
inconsistently setting the default on new settings.
2021-06-26 02:45:14 -04:00
lat9nq 7f6059a8f1 common: Force defaults for Settings::Setting's
Requires a default value when creating each per-game setting.
2021-06-26 02:43:38 -04:00
ReinUsesLisp b89963e542 buffer_cache: Only flush downloaded size
Fixes a regression unintentionally introduced by the garbage collector.
This makes regular memory downloads only flush the requested sizes.

This negatively affected Koei Tecmo games.
2021-06-26 03:29:34 -03:00
ReinUsesLisp cc3a6c6f51 video_core: Enforce C4244
Enforce implicit integer casts to a smaller type as errors.
2021-06-26 03:29:34 -03:00
ReinUsesLisp d5154a3b19 codec,vic: Disable warnings in ffmpeg headers 2021-06-26 03:29:31 -03:00
ReinUsesLisp 0435cb0ffc vk_buffer_cache: Silence implicit cast warnings 2021-06-26 02:17:36 -03:00
ReinUsesLisp a0a7f569c0 buffer_cache/texture_cache: Make GC functions private 2021-06-26 02:17:36 -03:00
ReinUsesLisp 21e08723e7 buffer_cache: Silence implicit cast warning 2021-06-26 02:17:36 -03:00
ReinUsesLisp 5943f8f61d vulkan_device: Make device memory match the rest of the file
Match the style in the file.
2021-06-25 02:38:58 -03:00
bunnei 11be93a81c Merge pull request #6496 from ameerj/astc-fixes
astc: Various robustness enhancements for the gpu decoder
2021-06-24 21:47:05 -07:00
bunnei 01fb060f2a Merge pull request #6519 from Wunkolo/mem-size-literal
common: Replace common_sizes into user-literals
2021-06-24 19:09:12 -07:00
bunnei 42957785f0 hle: hle_helpers: Skip data payload offset checks on TIPC requests.
- TIPC does not use this.
2021-06-24 18:39:43 -07:00
bunnei 3a6d12430c hle: service: hwopus: Implement GetWorkBufferSizeEx and OpenHardwareOpusDecoderEx.
- This is used by the latest update of Doom Eternal.
2021-06-24 18:25:37 -07:00
bunnei 84abf1723b hle: service: aoc: Stub GetAddOnContentListChangedEventWithProcessId.
- This is used by the latest update of Doom Eternal.
2021-06-24 18:22:53 -07:00
bunnei 2c6a61d4dd audio_core: common: Bump audio revision to 9.
- This is used in fw 12.x.x games.
2021-06-24 18:22:10 -07:00
Wunkolo 722f9c3cb5 common: Replace common_sizes into user-literals
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc
user-literals within literals.h.

To keep the global namespace clean, users will have to use:

```
using namespace Common::Literals;
```

to access these literals.
2021-06-24 09:27:40 -07:00
bunnei 03b505f30d Merge pull request #6522 from Morph1984/pragma
general: Add missing #pragma once directives
2021-06-24 08:53:27 -07:00
Morph 5004b030df general: Add missing #pragma once directives 2021-06-24 07:20:57 -04:00
Chloe a9a9167009 Add missing includes (#6521)
* Add missing includes

* Add array
2021-06-24 03:24:17 -04:00
bunnei 1f0bb8bad2 Merge pull request #6517 from lioncash/fmtlib
externals: Update fmt to 8.0.0
2021-06-23 15:31:04 -07:00
bunnei dbf400b10c Merge pull request #6504 from Kelebek1/samples-played
[audout] Implement GetAudioOutPlayedSampleCount
2021-06-23 11:31:12 -07:00
Lioncash f4d6293427 General: Resolve fmt specifiers to adhere to 8.0.0 API where applicable
Also removes some deprecated API usages.
2021-06-23 13:48:21 -04:00
bunnei 59620e2b75 Merge pull request #6518 from lioncash/func
maxwell3d: Add missing return in default SizeInBytes() case
2021-06-23 09:43:00 -07:00
Lioncash 3d8516c16f maxwell3d: Add missing return in default SizeInBytes() case
We were returning '1' in ComponentCount()'s default case but were
neglecting to do the same with SizeInBytes().
2021-06-23 11:50:40 -04:00
Mai M 7503ca436b Merge pull request #6465 from FernandoS27/sex-on-the-beach
GPU: Implement a garbage collector for GPU Caches (project Reaper+)
2021-06-23 08:03:01 -04:00
Mai M 6f70ee25ee Merge pull request #6508 from ReinUsesLisp/bootmanager-stop-token
bootmanager: Use std::stop_source for stopping emulation
2021-06-23 02:35:42 -04:00
Morph 1570db4a56 Merge pull request #6514 from OZtistic/master
Simple resizing of Per-Game configuration window and removal of useless Help question mark button in the title bar
2021-06-22 23:19:13 -04:00
Mai M d790c559cd Merge pull request #6512 from ReinUsesLisp/wait-detached-stasks
common/detached_tasks: Wait for tasks before shutting down
2021-06-22 22:20:14 -04:00
Mai M eb03081a1c Merge pull request #6509 from ReinUsesLisp/mouse-datarace
input_common/mouse_input: Fix data race
2021-06-22 22:19:34 -04:00
Mai M 65e51665ea Merge pull request #6510 from ReinUsesLisp/npad-data-race
npad: Fix data race when updating devices
2021-06-22 22:17:57 -04:00
OZtistic 718f92c097 Simple resizing of the Per-Game configuration window and removal of useless Help question mark button in the title bar 2021-06-23 12:02:10 +10:00
bunnei 382d5c114c Merge pull request #6493 from Morph1984/fs-nodiscard
common: fs: Miscellaneous changes
2021-06-22 17:21:59 -07:00
bunnei 2b8f288319 Merge pull request #6472 from Morph1984/spl
service: spl: Implement general SPL service
2021-06-22 15:43:10 -07:00
bunnei 2b97b0c46c Merge pull request #6483 from Morph1984/get-tz-file
service: time: Use GetFileRelative to get files within subdirectories
2021-06-22 14:25:41 -07:00
Fernando Sahmkow 505b198e80 Reaper: Set minimum cleaning limit on OGL. 2021-06-22 22:07:17 +02:00
Morph 42e41ca939 common: fs: Add a description of a regular file in IsFile
This provides a more concrete example of what a regular file is and isn't.
2021-06-22 15:07:51 -04:00
Morph c74b4be699 vfs_real: Fix Mode to FileAccessMode conversion
These enforce requiring the file to exist prior to opening.
2021-06-22 15:07:51 -04:00
Morph f158fd9dd1 common: fs: Amend IsFile check in FileOpen / (Write/Append)StringToFile
This check was preventing files with the Write or Append file access modes from being created, as per the documented behavior in FileAccessMode.
This amends the check to test for the existence of a filesystem object prior to checking whether it is a regular file.
Thanks to liushuyu for pointing out that removing the check altogether would not guard against attempting to open non-regular files such as directories, symlinks, FIFO (pipes), sockets, block devices, or character devices.
The documentation has also been updated for these functions to clarify that a file refers to a regular file.
2021-06-22 15:06:58 -04:00
Morph e12844c5a3 common: fs: file: Remove [[nodiscard]] attribute from Flush
Similarly, Flush() is typically called to attempt to flush a file into the disk. In the one case where this is used, we do not care whether the flush has succeeded or not, making [[nodiscard]] unnecessary.
2021-06-22 13:36:24 -04:00
Morph f81ef990ac common: fs: Remove [[nodiscard]] attribute on Remove* functions
There are a lot of scenarios where we don't particularly care whether or not the removal operation and just simply attempt a removal.

As such, removing the [[nodiscard]] attribute is best for these functions.
2021-06-22 13:36:24 -04:00
bunnei 623d9f1730 Merge pull request #6506 from ReinUsesLisp/master-semaphore-jthread
vk_master_semaphore: Use jthread for debug thread
2021-06-22 08:44:25 -07:00
Mai M 99dcb0d0e1 Merge pull request #6511 from ReinUsesLisp/core-is-powered-data-race
core: Make is_powered_on atomic
2021-06-22 04:28:38 -04:00
Rodrigo Locatti 13edf2e071 core: Make is_powered_on atomic
Fixes potential data races when shutting down.
2021-06-22 04:33:07 -03:00
Rodrigo Locatti ee29cddce2 common/detached_tasks: Wait for tasks before shutting down
If this is not waited on, the synchronization primitives are destroyed
whe main exits and the detached task ends up signalling garbage and not
properly finishing.
2021-06-22 04:27:44 -03:00
Rodrigo Locatti c32066d766 npad: Fix data race when updating devices
Add a lock to avoid data races.
This reduces the number of -fsanitize=thread errors significantly.
2021-06-22 03:16:21 -03:00
Rodrigo Locatti 65df2a2ba0 input_common/mouse_input: Fix data race
Fix data race using std::jthread and std::stop_token.
2021-06-22 02:31:39 -03:00
bunnei abbadc27d8 Merge pull request #6481 from Morph1984/missing-peak-set
kernel: Fix missing peak set in KResourceLimit::SetLimitValue
2021-06-21 22:16:48 -07:00
Kelebek1 5015541902 Implement audout GetAudioOutPlayedSampleCount
Used in Ninja Gaiden games.
2021-06-22 04:39:17 +01:00
ReinUsesLisp 2b175430fd bootmanager: Use std::stop_source for stopping emulation
Use its std::stop_token to abort shader cache loading.

Using std::stop_token instead of std::atomic_bool allows the usage of
other utilities like std::stop_callback.
2021-06-22 00:04:57 -03:00
ReinUsesLisp 6d5036dcf2 vk_master_semaphore: Use jthread for debug thread 2021-06-21 19:56:07 -03:00
bunnei 3fb11c6e77 Merge pull request #6499 from FernandoS27/we-were-on-a-break
Update dynarmic and add new unsafe CPU option.
2021-06-21 14:56:08 -07:00
bunnei dce9f4452f Merge pull request #6475 from ameerj/unlimit-fps
nvflinger: Add experimental toggle to disable buffer swap interval limits
2021-06-21 11:58:12 -07:00
Mai M 0e0285a30e Merge pull request #6486 from CaptV0rt3x/httplib
externals: httplib: replace custom httplib header with upstream as submodule
2021-06-21 11:56:33 -04:00
lat9nq 8ec7ea11c8 gl_device: Expand on Mesa driver names
Makes this list a bit more capable at identifying Mesa drivers. Tries to
deal with two of the overloaded vendor strings in a more generic
fashion.
2021-06-20 23:04:07 -04:00
ameerj 59d6951aeb video_core: Add GPU vendor name to window title bar 2021-06-20 23:04:07 -04:00
Fernando Sahmkow 1592ec32bc Update dynarmic and add new unsafe CPU option. 2021-06-20 20:40:02 +02:00
Fernando Sahmkow 849c8dba46 Reaper: Guarantee correct deletion. 2021-06-20 19:11:41 +02:00
Fernando Sahmkow d2d4616cca Reaper: Upgrade label from unsafe to experimental as no regressions are known now. 2021-06-20 12:35:19 +02:00
ameerj 9a77d40804 util_shaders: Specify ASTC decoder memory barrier bits 2021-06-19 11:16:25 -04:00
ameerj 79621cca95 astc_decoder.comp: Remove unnecessary LUT SSBOs
We can move them to instead be compile time constants within the shader.
2021-06-19 10:56:13 -04:00
ameerj fe7d3006f5 astc: Various robustness enhancements for the gpu decoder
These changes should help in reducing crashes/drivers panics that may
occur due to synchronization issues between the shader completion and
later access of the decoded texture.
2021-06-19 09:00:33 -04:00
lat9nq bee420dcfb host_memory: Correct MEM_RESERVE_PLACEHOLDER
Microsoft defines `MEM_RESERVE_PLACEHOLDER` as `0x00040000`, but our
manually imported version of it drops the last zero.
2021-06-19 04:38:33 -04:00
Vortex b0965d25b9 externals: httplib: replace custom httplib header with upstream as submodule.
This also includes a minor change to web_service.cpp - to fix compatibility with upstream changes.
2021-06-19 02:18:58 +05:30
Morph be34265f5e service: time: Use GetFileRelative to get files within subdirectories
The timezone info file can be within subdirectories (such as Asia/Tokyo), use GetFileRelative instead of GetFile to get files within subdirectories.
2021-06-18 11:25:26 -04:00
Morph 3543d65449 kernel: Fix missing peak set in KResourceLimit::SetLimitValue 2021-06-18 07:27:48 -04:00
ameerj 74f5fcbd29 vulkan_debug_callback: Skip logging known false-positive validation errors
Avoids overwhelming the log with validation errors that are not applicable
2021-06-17 22:16:32 -04:00
Fernando Sahmkow b0d14ec124 Reaper: Correct size calculation on Vulkan. 2021-06-17 08:48:41 +02:00
ameerj 2f2d7a9b02 config: Add frame limiter toggle hotkey 2021-06-17 01:41:57 -04:00
ameerj 72a4091aec nvflinger: Add toggle to disable buffer swap interval limits
Enabling this setting will allow some titles to present more frames to
the screen as they become available in the nvflinger buffer queue.
2021-06-17 01:41:56 -04:00
bunnei 3e33ea27dc Merge pull request #6418 from clementgallet/sdl-audio-backend
Audio: SDL2 audio backend
2021-06-16 21:38:20 -07:00
Ameer J 3b8508bf64 Merge pull request #6469 from ReinUsesLisp/blit-view-compat
texture_cache/util: Avoid relaxed image views on different bytes per block
2021-06-16 21:08:07 -04:00
Fernando Sahmkow aa941d40cd Reaper: Change memory restrictions on TC depending on host memory on VK. 2021-06-17 00:29:48 +02:00
Fernando Sahmkow 2fd0207e2e Reaper: Address Feedback. 2021-06-16 21:35:03 +02:00
Fernando Sahmkow 25e2362427 Reaper: Setup settings and final tuning. 2021-06-16 21:35:03 +02:00
Fernando Sahmkow 978aabb1d0 Reaper: Tune it up to be an smart GC. 2021-06-16 21:35:02 +02:00
ReinUsesLisp cb0d987c90 Initial Reaper Setup
WIP
2021-06-16 21:35:02 +02:00
ReinUsesLisp 28f04b9477 vulkan_memory_allocator: Release allocations with no commits 2021-06-16 21:35:01 +02:00
bunnei ff1e34d198 Merge pull request #6464 from ameerj/disable-astc
textures: Add a toggle for GPU Accelerated ASTC decoder
2021-06-16 11:29:10 -07:00
Morph 9442c70be1 Merge pull request #6460 from Morph1984/fs-access-log-fix
fsp_srv: Fix filesystem access logging
2021-06-16 14:03:01 -04:00
Morph 996d006989 spl: Mark the other functions as unimplemented 2021-06-16 01:46:45 -04:00
Morph 09a98bdc2b spl: Implement spl::GetConfig 2021-06-16 01:46:45 -04:00
Morph 7588defe84 hle: api_version: Add HLE API version constants 2021-06-16 01:46:45 -04:00
Morph 684d567adc spl: Add the general SPL interface 2021-06-16 01:46:45 -04:00
Morph bb0caed2f1 spl: Add SPL types 2021-06-16 01:46:45 -04:00
Morph 8d7eec9b88 spl: Add SPL result codes 2021-06-16 01:07:58 -04:00
Morph a90f818e1c common: fs: file: Remove redundant call to WriteStringToFile
The Append open mode will create a new file if said file does not exist at a given path, making this call redundant.
2021-06-16 00:06:02 -04:00
Morph 20bb5fe3a1 fsp_srv: Fix filesystem access logging
This introduces a new setting Enable FS Access Log which saves the filesystem access log to sdmc:/FsAccessLog.txt

If this setting is not enabled, this will indicate to FS to not call OutputAccessLogToSdCard.

Fixes softlocks during loading in Xenoblade Chronicles 2 when certain DLC is enabled.
2021-06-16 00:06:02 -04:00
bunnei f9a637ef49 Merge pull request #6462 from Morph1984/proper-flush
common: fs: file: Flush the file to the disk when Flush() is called
2021-06-15 19:03:19 -07:00
ameerj 13b046aae1 astc_decoder: Fix LDR CEM1 endpoint calculation
Per the spec, L1 is clamped to the value 0xff if it is greater than 0xff. An oversight caused us to take the maximum of L1 and 0xff, rather than the minimum.

Huge thanks to wwylele for finding this.

Co-Authored-By: Weiyi Wang <wwylele@gmail.com>
2021-06-15 20:19:01 -04:00
ameerj a91f7f6957 yuzu_cmd/config: Add Accelerate ASTC and missing NVDEC emulation settings 2021-06-15 20:19:00 -04:00
ameerj 2ec9c87101 configure_graphics: Add Accelerate ASTC decoding setting 2021-06-15 20:19:00 -04:00
ameerj e5da434498 textures: Reintroduce CPU ASTC decoder
Users may want to fall back to the CPU ASTC texture decoder due to hangs
and crashes that may be caused by keeping the GPU under compute heavy
loads for extended periods of time. This is especially the case in games
such as Astral Chain which make extensive use of ASTC textures.
2021-06-15 20:19:00 -04:00
ameerj 7709a7cdc0 lm: Demote guest logs to LOG_DEBUG
Guest logs are not very useful, as they are intended for use by the game developers during development. As such, they provide little meaning to be logged by yuzu and tend to overwhelm the log output at times.
2021-06-14 22:23:27 -04:00
ReinUsesLisp b458f73a61 texture_cache/util: Avoid relaxed image views on different bytes per pixel
Avoids API usage errors on UE4 titles leading to crashes.
2021-06-14 21:03:57 -03:00
bunnei 2f02587965 Merge pull request #6456 from Morph1984/very-important-changes
configure_cpu_debug: Clarify settings behavior
2021-06-14 15:05:44 -07:00
Fernando Sahmkow 441cafdaf4 Merge pull request #6448 from Morph1984/recursive-dir-iterator
common: fs: Use the normal directory iterator in *Recursively functions
2021-06-14 15:47:04 +02:00
Morph e91bf05ce6 general: Remove extraneous includes 2021-06-13 11:32:43 -04:00
Morph 5c635f8d09 common: logging: Restructure backend code 2021-06-13 11:05:58 -04:00
Morph 9fa79c001d common: logging: backend: Wrap IOFile in a unique_ptr
Allows us to forward declare Common::FS::IOFile.
2021-06-13 11:05:58 -04:00
Morph d7537c6638 common: fs: file: Flush the file to the disk when Flush() is called
std::fflush does not guarantee that file buffers are flushed to the disk.

Use _commit on Windows and fsync on all other OSes to ensure that the file is flushed to the disk.
2021-06-13 07:47:57 -04:00
Morph 88f735f55a Merge pull request #6452 from german77/sixaxis_firmware_stub
hid: Stub IsFirmwareUpdateAvailableForSixAxisSensor
2021-06-13 05:28:32 -04:00
lat9nq c902147d82 cmake: Fix find_program usage for 3.15
yuzu requires CMake 3.15 yet find_program was using REQUIRED, which is
only available on 3.18 and later. Instead, we check for
"<VAR>-NOTFOUND".

In addition, check for additional requirements before building libusb or
FFmpeg with autotools. Otherwise, CMake configuration will pass yet
compilation will fail.
2021-06-13 01:15:54 -04:00
Morph eadb781320 configure_cpu_debug: Clarify settings behavior
This makes it clear that the disabled settings only take effect when CPU Accuracy is set to Debug Mode.
2021-06-13 00:27:33 -04:00
Morph 367c4a676f common: fs: Use the normal directory iterator in *Recursively functions
MSVC's implementation of recursive_directory_iterator throws an exception on an error despite a std::error_code being passed into its constructor. This is most likely a bug in MSVC's implementation since directory_iterator does not throw an exception on an error.

We can replace the usage of recursive_directory_iterator for now until MSVC fixes their implementation of it.
2021-06-12 01:39:07 -04:00
bunnei 1068cfe91d Merge pull request #6451 from Morph1984/check-disk-space-dump
yuzu: main: Ensure enough space is available for RomFS dumping
2021-06-11 13:23:23 -07:00
german77 7ae1e7c0bb hid: Stub IsFirmwareUpdateAvailableForSixAxisSensor 2021-06-11 14:44:46 -05:00
Mai M 653edced9b Merge pull request #6422 from FernandoS27/i-am-the-senate
Implement/Port Fastmem from Citra to Yuzu
2021-06-11 14:26:54 -04:00
Morph dfca39bf9c yuzu: main: Ensure enough space is available for RomFS dumping
This warns the user if there isn't enough free space to dump the entire RomFS to disk. It requires at least the size of the extracted RomFS + 1 GiB as a buffer of free space.
2021-06-11 14:04:11 -04:00
bunnei 27976eb579 Merge pull request #6443 from Morph1984/k-light-condition-variable
kernel: KLightConditionVariable: Update implementation to 12.x
2021-06-11 11:03:55 -07:00
Markus Wick 161ade6da0 common/host_memory: Implement a fallback if fastmem fails.
This falls back to the old approach of using a virtual buffer.

Windows is untested, but this build should fix support for Windows < 10 v1803. However without fastmem support at all.
2021-06-11 17:27:17 +02:00
ReinUsesLisp f664a4d4c1 common/host_shader: Load Windows 10 functions dynamically
Workaround old headers and libraries shipped on MinGW.
2021-06-11 17:27:17 +02:00
Fernando Sahmkow 86b5f4a630 GPUTHread: Remove async reads from Normal Accuracy. 2021-06-11 17:27:17 +02:00
ReinUsesLisp 57252b0c1d rasterizer: Update pages in batches 2021-06-11 17:27:17 +02:00
ReinUsesLisp f36a769085 host_memory: Support staged VirtualProtect calls 2021-06-11 17:27:17 +02:00
FernandoS27 3147b9e34c General: Add settings for fastmem and disabling adress space check. 2021-06-11 17:27:17 +02:00
Markus Wick 8d2a08553e common/host_memory: Optimize for huge tables.
In theory, if we have 2 MB continously mapped, this should save one layer of TLB.
Let's make it at least more likely by aligning the memory.
2021-06-11 17:27:06 +02:00
Markus Wick 99f6d60a99 core: Make use of fastmem 2021-06-11 17:27:06 +02:00
ReinUsesLisp ba034a5724 tests: Add tests for host memory 2021-06-11 17:27:06 +02:00
Markus Wick 9a4cec64e1 common/host_memory: Add Linux implementation 2021-06-11 17:27:06 +02:00
ReinUsesLisp 1f0491900b common/host_memory: Add interface and Windows implementation 2021-06-11 17:27:06 +02:00
bunnei 78d9caa5df Merge pull request #6407 from lat9nq/fix-libusb-2
cmake: Use autotools for libusb linking generally on GNU, and cleanup
2021-06-10 23:35:30 -07:00
bunnei f0732b09b8 Merge pull request #6445 from degasus/fix_ubsn
Fix GCC undefined behavior sanitizer.
2021-06-10 22:17:33 -07:00
Morph 006ca28fc8 kernel: Unconditionally set thread state when appropriate 2021-06-11 00:58:04 -04:00
Morph 3509855179 kernel: KLightConditionVariable: Update implementation to 12.x
Updates the implementation of KLightConditionVariable to FW 12.x
2021-06-11 00:58:04 -04:00
Markus Wick e7c2b054c1 Fix GCC undefined behavior sanitizer.
* Wrong alignment in u64 LOG_DEBUG -> memcpy.
* Huge shift exponent in stride calculation for linear buffer, unused result -> skipped.
* Large shift in buffer cache if word = 0, skip checking for set bits.

Non of those were critical, so this should not change any behavior.
At least with the assumption, that the last one used masking behavior, which always yield continuous_bits = 0.
2021-06-10 21:07:27 +02:00
bunnei cb75c58714 hle: service: sm: Remove redundant session reservation, etc.
- We were double-reserving, causing us to run out of sessions in Pokemon Sword & Shield.
2021-06-10 11:34:41 -07:00
bunnei 63bc3eef98 hle: service: Increase arbitrary max sessions limit.
- Pokemon Sword/Shield are still hitting this for some reason, causing an svcBreak.
2021-06-10 00:08:09 -07:00
bunnei 6c3c99c915 hle: kernel: KClientPort: Add an assert for session count.
- Prevents us from over decrementing num_sessions.
2021-06-09 22:36:42 -07:00
bunnei 73d30a5446 hle: service: sm: Fix GetService setup of session & port. 2021-06-09 22:29:18 -07:00
bunnei 407cf4ffdb hle: service: Use correct size for ServerSessionCountMax. 2021-06-09 22:04:36 -07:00
bunnei 6c84a78d74 hle: kernel: KServerSession: Fix client disconnected.
- Prevents a cloned session's handler from being overwritten by another disconnected session.
- Fixes session handler nullptr asserts with Pokemon Sword & Shield.
2021-06-09 21:37:11 -07:00
bunnei d06f7d9f6c kernel: svc: Add missing error check to CancelSynchronization.
- Avoids a potential crash if the handle is invalid, and also makes this code accurate to real kernel behavior.
2021-06-09 15:24:46 -07:00
Mai M 7b6da43bbf Merge pull request #6436 from liushuyu/master
src/common/CMakeLists.txt: fix variable escaping
2021-06-09 15:38:56 -04:00
bunnei c9d0bbb9f9 hle: service: Increase arbitrary max sessions limit.
- Pokemon Sword/Shield are still hitting this for some reason, causing an svcBreak.
2021-06-09 11:59:34 -07:00
bunnei 9d266a4aa3 Merge pull request #6413 from Kewlan/limitable_input_dialog_limit
limitable_input_dialog: Implement character limiter
2021-06-09 11:55:36 -07:00
liushuyu 44a2374808 src/common/CMakeLists.txt: fix variable escaping 2021-06-09 02:20:55 -06:00
Morph e68dd33d77 Merge pull request #6435 from lioncash/nodisc2
common/fs/path_util: Remove [[nodiscard]] from function with void return
2021-06-09 02:44:41 -04:00
bunnei 7cf63de1f9 Merge pull request #6434 from lioncash/tcontext
configure_ui: Add translation context for file-scope strings
2021-06-08 19:36:44 -07:00
bunnei e43731d736 Merge pull request #6428 from bunnei/service-thread-crash-fix
hle: kernel: Remove service thread manager and use weak_ptr.
2021-06-08 16:43:55 -07:00
Lioncash 178a1fe364 common/fs/path_util: Remove [[nodiscard]] from function with void return
We can't make use of the return value here, since we don't a return
value to work with.
2021-06-08 19:36:09 -04:00
Lioncash 54537b36cd configure_ui: Add translation context for file-scope strings
Allows for these strings to show up in the translation files.
2021-06-08 19:33:23 -04:00
Mai M ef8ddaa207 Merge pull request #6426 from lat9nq/context-menu-start
yuzu qt: Start games from context menu
2021-06-08 17:09:25 -04:00
bunnei b270cecbab hle: kernel: KServerSession: Work-around scenario where session is closed too early. 2021-06-08 13:39:20 -07:00
bunnei 4ad8a148ee hle: kernel: hle_ipc: Ensure SessionRequestHandler is valid. 2021-06-07 21:55:37 -07:00
bunnei 03980020e9 Merge pull request #6412 from clementgallet/yuzu-cmd-window-gl
yuzu-cmd: Fix OpenGL rendering
2021-06-07 21:12:17 -07:00
bunnei a3de201dcf hle: kernel: Remove service thread manager and use weak_ptr.
- We no longer need to queue up service threads to be destroyed.
- Fixes a race condition where a thread could be destroyed too early, which caused a crash in Pokemon Sword/Shield.
2021-06-07 21:10:51 -07:00
lat9nq e85f105a75 yuzu qt: Start games from context menu
This connects the BootGame function to the context menu. In addition,
there is an option to boot without using the custom configuration.
2021-06-07 20:27:51 -04:00
bunnei f50c6369bd Merge pull request #6410 from lat9nq/avoid-oob
decoders: Avoid out-of-bounds access
2021-06-07 10:51:17 -07:00
Clément Gallet 3af2ea232f Various suggestions by v1993 and lioncash 2021-06-07 12:51:59 +02:00
bunnei 558dda5e60 Merge pull request #6414 from bunnei/fix-service-threads
hle: kernel: Refactor to allocate a ServiceThread per service handler.
2021-06-06 22:52:07 -07:00
bunnei eeb8d0def8 hle: kernel: KServerSession: Use ASSERT_MSG where appropriate. 2021-06-06 22:09:25 -07:00
bunnei ff57fd7281 hle: kernel: k_server_session: Return service thread by strong pointer. 2021-06-06 17:54:06 -07:00
bunnei c833ca5fa0 hle: kernel: k_server_session: Ensure service thread is valid before dereference. 2021-06-06 17:03:36 -07:00
bunnei b5f37c3fcf Merge pull request #6400 from ameerj/disable-uniform-simplify
buffer_cache: Simplify uniform disabling logic
2021-06-06 15:42:20 -07:00
bunnei ea1ca74e7a hle: kernel: hle_ipc: Use default destructor for SessionRequestManager. 2021-06-06 15:41:16 -07:00
bunnei 38d8bcc574 hle: kernel: KAutoObjectWithListContainer: Use boost::instrusive::rbtree.
- Fixes some crashes introduced by our common intrusive red/black tree impl.
2021-06-06 15:39:11 -07:00
Clément Gallet 8219faf374 Add sdl2 audio description in the yuzu-cmd config file 2021-06-06 11:29:02 +02:00
Clément Gallet 34848e5eda Add SDL2 audio backend 2021-06-06 11:28:38 +02:00
Kewlan 667c113f10 limitable_input_dialog: Implement character limiter
When using GetText() you can now choose what set of characters the user can't enter.
2021-06-06 09:07:55 +02:00
Clément Gallet 49406504a2 Avoid -Wshadow warning
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-06-05 18:43:10 +02:00
Lioncash c811d0f69d result: Add [[nodiscard]] specifiers where applicable
The result code classes are used quite extensively throughout both the
kernel and service HLE code. We can mark these member functions as
[[nodiscard]] to prevent a few logic bugs from slipping through.
2021-06-05 06:09:07 -04:00
bunnei f40fab1aaf Merge pull request #6362 from lat9nq/reset-to-defaults
yuzu qt: Add settings reset button to general configuration
2021-06-04 21:07:39 -07:00
Mai M 908c4e2b99 Merge pull request #6411 from clementgallet/yuzu-cmd-touch-button
yuzu-cmd: Add touch_from_button in config file
2021-06-04 23:21:29 -04:00
bunnei 8bf7b19d1d hle: kernel: Refactor to allocate a ServiceThread per service handler.
- Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject.
- This results in race conditions with N sessions queuing requests to the same service interface.
- Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347.
2021-06-04 19:26:48 -07:00
Clément Gallet d94248f11b yuzu-cmd: Fix OpenGL rendering 2021-06-04 11:39:04 +02:00
lat9nq 8aed753c16 decoders: Break instead of continue
continue causes a memory leak in A Hat in Time.
2021-06-04 05:12:14 -04:00
lat9nq 54f2a92203 decoders: Avoid out-of-bounds access
This is not a real fix, so assert here and continue before crashing.
2021-06-04 05:03:54 -04:00
bunnei 3c2b21d3b9 Merge pull request #6392 from german77/controller-widget
settings: Disable controller preview if controller is not active
2021-06-04 00:40:04 -07:00
bunnei 65505640b9 Merge pull request #6389 from german77/Analog_button_fix
input_common: Analog button, use time based position
2021-06-03 21:06:38 -07:00
Maide 416bc9dce5 [game_list] Correct light theme loading (#6408)
Correct light theme loading

The setLayout call in game list instantiation will call resizing signals with default values in light theme, which was then being erroneously saved. setLayout doesn't seem to call resizing for any other theme, so I'm not sure why that happens.
2021-06-03 19:07:38 -04:00
Clément Gallet a009eeaa85 yuzu-cmd: Add touch_from_button in config file 2021-06-04 00:58:35 +02:00
lat9nq 21d81ee941 cmake: General improvements to libusb linking
Delegates libusb external communication to externals/CMakeLists.txt
Ensures an interface library `usb` for every pathway
input_common just links to the `usb` library now
externals/libusb/CMakeLists.txt sets variables to override SDL2's libusb
finding
Other minor cleanup
2021-06-03 03:49:35 -04:00
bunnei 5e19cefd59 Merge pull request #6402 from Kelebek1/UI
game_list: Stop the columns resizing on NAND install
2021-06-03 00:24:45 -07:00
bunnei e715158acf Merge pull request #6404 from lat9nq/revert_views
yuzu qt: Revert some usages of string_view
2021-06-02 22:11:35 -07:00
Morph 8977a5e928 fsp-srv: Replace one last instance of RESULT_SUCCESS 2021-06-02 21:40:14 -04:00
Chloe 8eb5da9a7c fspsrv: Implement DisableAutoSaveDataCreation (#6355)
- Used by Mii Edit
2021-06-02 17:46:29 -07:00
lat9nq 680de959a6 yuzu qt: Revert some usages of string_view
Causes a heap-use-after free reported by AddressSanitizer. This makes
use of std::filesystem::path, but due to that we have to use their
string() function which may not work for all characters.
2021-06-02 19:50:20 -04:00
bunnei 3a3c6b2446 Merge pull request #6308 from Morph1984/result
general: Replace RESULT_NAME with ResultName
2021-06-02 15:29:09 -07:00
bunnei 3aa1dc5030 Merge pull request #6403 from Kewlan/game-list-for-loop-optimization
game_list: Minor for loop optimizations
2021-06-02 15:27:54 -07:00
Kewlan 84dbd57545 game_list: Minor for loop optimizations
There's no need to check the first and last rows since they'll always be the Favorites and AddDir rows.
Also change the name of the clear_all variable for consistency.
2021-06-02 16:19:55 +02:00
Kelebek1 81f77ddfe7 Stop the columns resizing on NAND install 2021-06-02 06:27:08 +01:00
Morph c4d6d9dfd3 general: Replace RESULT_UNKNOWN with ResultUnknown
Transition to PascalCase for result names.
2021-06-02 00:39:27 -04:00
Morph 7ebc38a6d1 general: Replace RESULT_SUCCESS with ResultSuccess
Transition to PascalCase for result names.
2021-06-02 00:39:27 -04:00
Morph 255597ad04 Merge pull request #6395 from lioncash/result-move
common_funcs: Move R_ macros to result.h
2021-06-02 00:34:48 -04:00
Morph 02fcdf1a4a common: fs: fs_util: Move PathToUTF8String to fs_util 2021-06-02 00:26:26 -04:00
Morph 6545556483 common: fs: fs_util: Add more string conversion functions 2021-06-02 00:26:26 -04:00
bunnei 56070f371a Merge pull request #6361 from lat9nq/per-hb-cfg
yuzu qt: Handle per-game configs for title id 0
2021-06-01 17:24:08 -07:00
lat9nq 3fce0304cb yuzu qt: Use lambda and std::function for reset callback
Also makes use of std::move, and performs a clang-format cleanup.

This addresses review comments.

Co-authored-by: LC <mathew1800@gmail.com>
2021-06-01 17:22:06 -04:00
lat9nq 8d3c9567a2 yuzu: Add settings reset button to general configuration
Builds on german77's work to reset all settings back to their defaults.
This include UISettings and Settings values structs, but does not affect
save profiles, input profiles, and game directories.

This works from a button input in configure_general. When activated, it
calls a callback to close the whole configure dialog, then GMainWindow
deletes the old configuration, both on disk and in memory, and
reinitalizes a new one. It also resets a portion of the UI and calls the
telemetry window prompt.
2021-06-01 17:22:04 -04:00
fearlessTobi 6cab373b8e configuration: Initial work to reset all settings
This commit does not compile.

Initial work to add and connect a Reset to Defaults button to the
configure_general tab.

Co-authored-by: german77 <juangerman-13@hotmail.com>
2021-06-01 17:09:33 -04:00
ameerj 2a0dbf9b79 buffer_cache: Simplify uniform disabling logic 2021-06-01 13:26:58 -04:00
bunnei bfacb2dd28 Merge pull request #6318 from german77/dualJoycon
input_common: Add dual joycon support
2021-06-01 00:51:00 -07:00
bunnei 6f7e68ee56 Merge pull request #6367 from ReinUsesLisp/vma-host
vulkan_memory_allocator: Allow textures to be allocated in host memory
2021-05-31 23:35:11 -07:00
Lioncash cb111c0038 common_funcs: Move R_ macros to result.h
These macros all interact with the result code type, so they should
ideally be within this file as well, so all the common_funcs machinery
doesn't need to be pulled in just to use them.
2021-05-31 16:41:00 -04:00
bunnei 89c77a6b91 Merge pull request #6385 from degasus/save_memory_access
core/memory: Check our memory fallbacks for out-of-bound behavior.
2021-05-30 23:21:39 -07:00
german77 a5f5e8edb1 settings: Disable controller preview if controller is not active 2021-05-30 10:57:20 -05:00
bunnei 9c2c961435 Merge pull request #6377 from lioncash/point
common: Extract Point struct into common
2021-05-30 01:35:26 -07:00
bunnei 3c1b54384e Merge pull request #6387 from lioncash/class-token
k_class_token: Use variable templates where applicable
2021-05-29 23:55:17 -07:00
bunnei f8478eb045 Merge pull request #6386 from bunnei/shutdown-fix
video_core: gpu: WaitFence: Do not block threads during shutdown.
2021-05-29 23:52:52 -07:00
german77 b398e0783e input_common: Analog button, use time based position instead of frequent updates 2021-05-30 00:13:51 -05:00
Mai M 41fa521da1 Merge pull request #6374 from Morph1984/swkbd-textcheck-encoding
applets/swkbd: Only read the text check message on Failure/Confirm
2021-05-29 23:34:40 -04:00
Mai M dfffaab2a3 Merge pull request #6364 from german77/stub-lp2p
ldn: Add and stub lp2p:sys lp2p:app INetworkServiceMonitor INetworkService

Mario Kart Live: Home Circuit needs lp2p:sys lp2p:app INetworkServiceMonitor INetworkService to be able to progress.

Note: The game still fails to boot from unimplemented LDN and BSD services.
2021-05-29 23:33:57 -04:00
bunnei 709978a253 Merge pull request #6379 from degasus/update_dynarmic
externals: Update dynarmic.
2021-05-29 03:15:13 -07:00
Lioncash 2197782ecd k_class_token: Use variable templates where applicable
Same behavior, less code.
2021-05-29 05:25:34 -04:00
bunnei 137938f971 Merge pull request #6384 from lioncash/virtual
kernel: Add missing override specifiers
2021-05-29 02:11:40 -07:00
bunnei 6864ccfee8 Merge pull request #6382 from lioncash/null
k_thread: Move dereference after null check in Initialize()
2021-05-29 01:17:28 -07:00
bunnei 9aa144323b video_core: gpu: WaitFence: Do not block threads during shutdown.
- Fixes a hang on shutdown when NVFlinger thread is waiting on a syncpoint that will never occur.
- Commonly observed when stopping emulation in Super Mario Odyssey.
2021-05-29 01:06:04 -07:00
Markus Wick 870505def8 core/memory: Check our memory fallbacks for out-of-bound behavior.
This makes it by far harder to crash yuzu.

Also implement the 48bit masking of AARCH64 while touching this code.
2021-05-29 09:28:26 +02:00
bunnei fb86819b39 Merge pull request #6373 from bunnei/use-slabheap-tls
hle: kernel: KSlabHeap: Allow host or guest allocations.
2021-05-29 00:17:24 -07:00
Markus Wick 5aca25637f core/arm_interface: Improve the performance of memory fallbacks.
We just create one memory subsystem. This is a constant all the time.
So there is no need to call the non-inlined parent.Memory() helper on every callback.
2021-05-29 09:02:19 +02:00
Lioncash a9fcaa9c00 kernel: Add missing override specifiers
Over the course of the kernel refactoring a tiny bit of missing
overrides slipped through review, so we can add these.

While we're at it, we can remove redundant virtual keywords where
applicable as well.
2021-05-29 02:58:32 -04:00
Markus Wick 9f92beed0a Fix two GCC 11 warnings: Unneeded copies.
std::move created an unneeded copy.
iterating without reference also created copies.
2021-05-29 08:57:44 +02:00
Markus Wick 6203af4169 externals: Update dynarmic.
The new version supports fastmem on a64.
2021-05-29 08:53:01 +02:00
Lioncash 2d390c1911 k_thread: Move dereference after null check in Initialize()
Prevents a -Wnonnull warning on GCC.
2021-05-29 00:31:38 -04:00
bunnei 95b988ece3 Merge pull request #6371 from degasus/drop_ExceptionalExit
core/arm_interface: Call SVC after end of dynarmic block.
2021-05-28 17:45:05 -07:00
bunnei 639baf88f7 hle: kernel: KSlabHeap: Allow host or guest allocations.
- Use host allocations for kernel memory, as this is not properly emulated yet.
- Use guest allocations for TLS, as this needs to be backed by DeviceMemory.
2021-05-28 17:42:41 -07:00
bunnei 1a459cd780 Merge pull request #6356 from ogniK5377/ApplyNpadSystemCommonPolicy
hid: ApplyNpadSystemCommonPolicy
2021-05-28 10:05:20 -07:00
Lioncash dabb48cb06 touchscreen: Make use of common point struct 2021-05-28 08:15:22 -04:00
Lioncash f49ea1959b common: Extract point into a common struct
This is generic enough that it can be moved into the Common class for
reuse.
2021-05-28 08:12:49 -04:00
Lioncash c0e0c9f71f common/fs/file: Explicitly delete copy constructors
Relocates them to the same place the move equivalents are at for
consistent viewing.
2021-05-28 01:49:40 -04:00
Lioncash 1f79d51913 common/fs/file: Devirtualize destructor
IOFile is a final class, so there's no need for a virtual destructor.
2021-05-28 01:47:52 -04:00
Lioncash 0b7cade7b8 common/fs/file: Default initialize IOFile members
Prevents a potential uninitialized read vector in the move constructor.
2021-05-28 01:46:30 -04:00
Morph ed52a83511 applets/swkbd: Make use of std::move where applicable
Avoids redundant string copies
2021-05-27 23:45:56 -04:00
Morph 4b064097bd applets/swkbd: Only read the text check message on Failure/Confirm
Applications may leave this region of memory uninitialized when the text check result is not either Failure or Confirm.
Attempting to read uninitialized memory may cause an exception within the UTF16 to UTF8 string converter.
Fix this by only reading the text check message on Failure or Confirm.
2021-05-27 23:45:56 -04:00
bunnei e4f580af9a video_core: rasterizer_cache: Use u16 for cached page count.
- Greatly reduces the risk of overflow, at the cost of doubling the size of this array.
2021-05-27 14:47:24 -07:00
Markus Wick c9f9e77be3 core/arm_interface: Call SVC after end of dynarmic block.
So we can modify all of dynarmic states within SVC without ExceptionalExit.

Especially as the ExceptionalExit hack is dropped on upstream dynarmic.
2021-05-27 23:23:23 +02:00
Ameer J 1ed34cc1a3 Merge pull request #6346 from lat9nq/apply-config-pgc
yuzu qt: Add an Apply button to configuration dialogs
2021-05-27 13:07:53 -04:00
ReinUsesLisp 2fcb54aad0 vulkan_memory_allocator: Allow textures to be allocated in host memory
Allow Vulkan's allocator to use host memory when there's no more device
local memory. This delays OOM, but it will eventually still happen.
2021-05-27 05:50:48 -03:00
Mai M e948c4c9eb Merge pull request #6366 from lat9nq/bundled-qt-linux
cmake: Download Qt binaries on Linux if needed
2021-05-26 18:19:02 -04:00
lat9nq 94fb3063ce cmake: Download Qt binaries on Linux if needed
If the local version of Qt is older than the minimum version required by
yuzu, download a pre-built binary package from yuzu-emu/ext-linux-bin
and build yuzu with it, instead.

This also requires linking yuzu to the correct libraries after building
it, and copying over the required binaries when building yuzu.

This sets the Qt requirement to 5.12, which is intentionally behind the
versions used by our toolchains since they are not all updated yet to
5.15.
2021-05-26 15:29:45 -04:00
Markus Wick 09657c5787 core/arm: Drop ChangeProcessorID.
This code was used to switch the CPU ID on thread switches.
However since "hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.", the CPU ID is not a constant.
This has been dead code since this rewrite, and dropped in dynarmic as well. So there is no need to keep it.
2021-05-26 19:48:24 +02:00
german77 bfaf3f1bcd ldn: Add and stub lp2p:sys lp2p:app INetworkServiceMonitor INetworkService 2021-05-26 10:06:00 -05:00
Morph b72db64406 Merge pull request #6331 from lioncash/gesture
hid/gesture: Simplify point related code
2021-05-26 09:19:00 -04:00
lat9nq 646e4304c2 yuzu qt: Restore const qualifiers
This addresses review comments.

Co-authored-by: LC <mathew1800@gmail.com>
2021-05-25 21:39:57 -04:00
bunnei 451293a654 Merge pull request #6339 from Morph1984/swkbd-queuedconnection
applets/swkbd: Make use of QueuedConnection in returnPressed signal
2021-05-25 18:23:08 -07:00
lat9nq d8a19d286b yuzu qt: Handle per-game configs for title id 0
Currently with programs that have a 0 title id, yuzu loads the custom
configuration 0000000000000000.ini for per-game configs. This is not
ideal since many homebrews share this id. Instead for these programs, we
load a config that is simply the file name and `.ini` appended to it.
2021-05-25 20:10:41 -04:00
Morph e8f1d7145e common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)
* common: fs: fs_types: Create filesystem types

Contains various filesystem types used by the Common::FS library

* common: fs: fs_util: Add std::string to std::u8string conversion utility

* common: fs: path_util: Add utlity functions for paths

Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library

* common: fs: file: Rewrite the IOFile implementation

* common: fs: Reimplement Common::FS library using std::filesystem

* common: fs: fs_paths: Add fs_paths to replace common_paths

* common: fs: path_util: Add the rest of the path functions

* common: Remove the previous Common::FS implementation

* general: Remove unused fs includes

* string_util: Remove unused function and include

* nvidia_flags: Migrate to the new Common::FS library

* settings: Migrate to the new Common::FS library

* logging: backend: Migrate to the new Common::FS library

* core: Migrate to the new Common::FS library

* perf_stats: Migrate to the new Common::FS library

* reporter: Migrate to the new Common::FS library

* telemetry_session: Migrate to the new Common::FS library

* key_manager: Migrate to the new Common::FS library

* bis_factory: Migrate to the new Common::FS library

* registered_cache: Migrate to the new Common::FS library

* xts_archive: Migrate to the new Common::FS library

* service: acc: Migrate to the new Common::FS library

* applets/profile: Migrate to the new Common::FS library

* applets/web: Migrate to the new Common::FS library

* service: filesystem: Migrate to the new Common::FS library

* loader: Migrate to the new Common::FS library

* gl_shader_disk_cache: Migrate to the new Common::FS library

* nsight_aftermath_tracker: Migrate to the new Common::FS library

* vulkan_library: Migrate to the new Common::FS library

* configure_debug: Migrate to the new Common::FS library

* game_list_worker: Migrate to the new Common::FS library

* config: Migrate to the new Common::FS library

* configure_filesystem: Migrate to the new Common::FS library

* configure_per_game_addons: Migrate to the new Common::FS library

* configure_profile_manager: Migrate to the new Common::FS library

* configure_ui: Migrate to the new Common::FS library

* input_profiles: Migrate to the new Common::FS library

* yuzu_cmd: config: Migrate to the new Common::FS library

* yuzu_cmd: Migrate to the new Common::FS library

* vfs_real: Migrate to the new Common::FS library

* vfs: Migrate to the new Common::FS library

* vfs_libzip: Migrate to the new Common::FS library

* service: bcat: Migrate to the new Common::FS library

* yuzu: main: Migrate to the new Common::FS library

* vfs_real: Delete the contents of an existing file in CreateFile

Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now.

* input_profiles: Don't iterate the input profile dir if it does not exist

Silences an error produced in the log if the directory does not exist.

* game_list_worker: Skip parsing file if the returned VfsFile is nullptr

Prevents crashes in GetLoader when the virtual file is nullptr

* common: fs: Validate paths for path length

* service: filesystem: Open the mod load directory as read only
2021-05-25 19:32:56 -04:00
bunnei 5808c0a39f Merge pull request #6349 from german77/suppress_config_warning
settings: Suppress duplicate label name warning
2021-05-25 15:51:51 -07:00
bunnei db12c1dd91 Merge pull request #6353 from german77/handheld_docked
settings: Forbid docked mode on handheld
2021-05-25 13:02:20 -07:00
lat9nq 6dfcf41a13 yuzu qt: Add an Apply button to configuration dialogs
Most of the code already exists to do this, but the Apply button itself
was never added. This adds a button and boolean that tells yuzu to save
the configuration after applying settings, even if close/Cancel is
pressed on the dialog. Changes after applying will not be saved when
Cancel is pressed, though.
2021-05-25 02:25:39 -04:00
Morph 5eecd49108 kernel: process_capability: Add MapRegion capability
- Used by nx-hbloader
2021-05-25 01:44:46 -04:00
bunnei 7b169435b4 Merge pull request #6357 from lioncash/compression
common/compression: Make use of std::span
2021-05-24 18:50:26 -07:00
bunnei c1f4c84db4 Merge pull request #6312 from german77/analogMapping
input_common: Rewrite sdl analog mapping and fix controller disconnection crash
2021-05-24 12:02:37 -07:00
Lioncash e6e865f3d3 zstd_compression: Make use of std::span
Allows for the incoming data stream to be non-allocating.
2021-05-24 15:01:04 -04:00
Lioncash 790720089b lz4_compression: Make use of std::span
Allows making the incoming data stream non-allocating.
2021-05-24 15:00:59 -04:00
Chloe Marcec cf489391d7 hid: ApplyNpadSystemCommonPolicy
We already do this specifically for homebrew, so we can keep it stubbed out for the time being
2021-05-24 15:07:47 +10:00
german77 a724cf5fa1 settings: Forbid docked mode on handheld 2021-05-23 20:34:46 -05:00
bunnei 8e96b45a1f Merge pull request #6347 from bunnei/ipc-improvements-next-2
Various improvements to IPC and session management (Part 2)
2021-05-23 16:28:40 -07:00
german77 e99220d321 input_common: Add dual joycon support 2021-05-22 18:40:53 -05:00
german77 b5ba452aad settings: Suppress duplicate label name warning 2021-05-22 18:32:35 -05:00
Morph 54d9cd162d applets/swkbd: Make use of QueuedConnection in returnPressed signal
Some users have reported rare crashes when pressing the Enter key on the keyboard to confirm input in the normal software keyboard, particularly in Super Smash Bros. Ultimate while entering the name of a ruleset or controller layout.

It is suspected that the QLineEdit::returnPressed signal is causing a race condition as confirming input through other means does not produce the crash. Since Qt::QueuedConnection posts an event to the event queue of the callee's thread instead of executing it directly on the caller's thread, this eliminates any potential race conditions from occurring in this scenario.
2021-05-22 03:28:54 -04:00
bunnei 3af73d1335 Merge pull request #6248 from A-w-x/intelmesa
gl_device: Intel: Disable texture view formats workaround on mesa
2021-05-20 23:47:14 -07:00
bunnei 87fba53340 Merge pull request #6333 from Morph1984/swkbd-confirm-text
applets/swkbd: Send the correct text string on TextCheck::Confirm
2021-05-20 22:42:54 -07:00
bunnei 9d19382daf hle: kernel: service_thread: Take reference to KServerSession on service request. 2021-05-20 22:39:44 -07:00
bunnei ea851aaeb8 hle: kernel: k_port: Use AcceptSession to ensure SessionList state is correct.
- Fixes a use-after-free, work-around until we fixup session/port management.
2021-05-20 21:41:52 -07:00
bunnei 227f9e5ab2 hle: kernel: Use host memory allocations for KSlabMemory.
- There are some issues with the current workaround, we will just use host memory until we have a complete kernel memory implementation.
2021-05-20 21:41:52 -07:00
bunnei 78853f888a Revert "WORKAROUND: Do not use slab heap while we track down issues with resource management."
This reverts commit bb77b5d79f.
2021-05-20 21:41:52 -07:00
bunnei 14f50729e2 hle: kernel: hle_ipc: Simplify incoming/outgoing move/copy/domain objects. 2021-05-20 21:41:52 -07:00
bunnei d77adad0c4 common: tree: Avoid a crash on nullptr dereference. 2021-05-20 21:41:51 -07:00
bunnei 6e3c9d2b06 hle: kernel: Implement CloneCurrentObject and improve session management. 2021-05-20 21:41:49 -07:00
bunnei 7b1c7a5e6a Revert "WORKAROUND: temp. disable session resource limits while we work out issues"
This reverts commit 627eaf8c0e.
2021-05-20 21:40:30 -07:00
bunnei 53526d2c14 Merge pull request #6320 from Morph1984/get-pid
hle_ipc: Add a getter for PID
2021-05-20 21:40:03 -07:00
bunnei e1da49973d Merge pull request #6321 from lat9nq/per-game-cpu
configuration: Add CPU tab to game properties and slight per-game settings rework
2021-05-20 20:10:56 -07:00
lat9nq ea24c70e1d configure_cpu: Simplify UpdateGroup
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-05-20 01:11:56 -04:00
bunnei e0838acf77 Merge pull request #6297 from lioncash/common-conv
parent_of_member: Make sign conversion explicit in OffsetOfImpl()
2021-05-19 18:43:47 -07:00
bunnei 1e4bc2cb20 Merge pull request #6310 from german77/nanMotion
input_common: Sanitize motion data
2021-05-19 15:47:48 -07:00
lat9nq ec31c71a34 configuration_shared: Drop unused function and template another
Drops an unused variant of ApplyPerGameSetting, and turns the QComboBox
variants of SetPerGameSetting into a template.

Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-05-19 16:00:48 -04:00
Morph 798908da34 applets/swkbd: Send the correct text string on TextCheck::Confirm
Previously the text string for the inline software keyboard was being sent instead of the normal software keyboard, leading to empty text being sent all the time.
2021-05-19 00:26:32 -04:00
bunnei d1168fc5d8 Merge pull request #6317 from ameerj/fps-fix
perf_stats: Rework FPS counter to be more accurate
2021-05-18 19:56:29 -07:00
Morph bf87c33d40 KTransferMemory: Return size instead of size * PageSize in GetSize()
size is already the size in bytes. We do not need to multiply it by the page size
2021-05-18 13:14:28 -04:00
Lioncash 44e1952216 hid/gesture: Factor out last gesture retrieval into its own function
Deduplicates a commonly repeated expression.
2021-05-18 03:59:44 -04:00
Lioncash 4eb73ab98a hid/gesture: Ensure all ID arrays are initialized
Makes for deterministic initial state.
2021-05-18 03:39:21 -04:00
Lioncash 359b12ece1 hid/gesture: Make Point a template
We can now use this in a generic context to reuse it with the finger
position.
2021-05-18 03:39:18 -04:00
Lioncash 83a444ddf7 hid/gesture: Replace x,y members of GestureState with a Point
Simplifies assignments.
2021-05-18 03:32:42 -04:00
Lioncash ea1cb30004 hid/gesture: Add default comparators to Point
Simplifies some comparisons.
2021-05-18 03:32:42 -04:00
Lioncash 861039484d hid/gesture: Rename Points to Point
This only represents a single point
2021-05-18 03:32:38 -04:00
bunnei 7d0ec35aaa Merge pull request #6322 from ameerj/fast-null-buffer
buffer_cache: Ensure null buffers cannot take the fast uniform bind path
2021-05-17 15:45:36 -07:00
lat9nq d6c9f6acc5 general: Demote custom_rtc to regular setting 2021-05-17 15:54:30 -04:00
Mat M 440443ecd4 Merge pull request #6328 from Morph1984/enforce-c4715
CMakeLists: Enforce C4715 on MSVC
2021-05-17 13:20:58 -04:00
Morph 49378192aa CMakeLists: Enforce C4715 on MSVC
This is similar to -Werror=return-type
2021-05-17 03:48:58 -04:00
Morph 313e1b0f8f configure_debug: FIx duplicate labels
Duplicate labels were unintentionally introduced due to copy-paste. This silences the compilation warning produced by the presence of these duplicates.
2021-05-16 23:32:51 -04:00
Morph 7faacec6a4 yuzu/main: Fix version info in logging and about dialog 2021-05-16 22:17:17 -04:00
bunnei baa0060cd7 Merge pull request #6319 from Morph1984/no-install-base
main: Prevent installing base titles into NAND
2021-05-16 16:33:33 -07:00
ameerj 53c68f6bb3 buffer_cache: Ensure null buffers cannot take the fast uniform bind path
Fixes a crash in New Pokemon Snap
2021-05-16 07:43:40 -04:00
bunnei 91cae39587 Merge pull request #6284 from ameerj/shantae-fix
nvflinger: Create layers when they are queried but not found
2021-05-16 01:45:14 -07:00
bunnei 1e40ee003f Merge pull request #6296 from lioncash/shadow-error
core: Make variable shadowing a compile-time error
2021-05-16 01:35:46 -07:00
bunnei eaac594117 Merge pull request #6307 from Morph1984/fix-response-push-size
nifm, ssl: Fix incorrect response sizes
2021-05-16 01:32:04 -07:00
Morph c3bb08ad31 main: Prevent installing base titles into NAND
Many users have been installing their base titles into NAND instead of adding them into the games list. This prevents users from installing any base titles and warns the user about the action.
2021-05-16 04:13:57 -04:00
Morph c4f16c8e14 hle_ipc: unsigned -> u32
This is more concise and consistent with the rest of the codebase.
2021-05-16 04:11:00 -04:00
Morph 29ce6e48ed hle_ipc: Add a getter for PID 2021-05-16 04:10:42 -04:00
Lioncash eeae5217ba core: Make variable shadowing a compile-time error
Now that we have most of core free of shadowing, we can enable the
warning as an error to catch anything that may be remaining and also
eliminate this class of logic bug entirely.
2021-05-16 03:43:16 -04:00
bunnei 37e988258a Merge pull request #6316 from ameerj/title-fix
main: Add running title's version to window name on EA/mainline
2021-05-15 22:40:35 -07:00
lat9nq 04060711c2 configuration: Add CPU tab to game properties
Allows setting CPU accuracy to Accurate or Unsafe per-game, as well as
the accuracy options for Unsafe. Debug is not allowed here as a per-game
CPU accuracy.
2021-05-16 01:31:42 -04:00
bunnei 10ef4a9142 Merge pull request #6299 from bunnei/ipc-improvements
Various improvements to IPC and session management
2021-05-15 22:30:21 -07:00
bunnei fb753f4d8d Merge pull request #6289 from ameerj/oob-blit
texture_cache: Handle out of bound texture blits
2021-05-15 21:32:37 -07:00
Morph 0fdff05afa nifm, ssl: Fix incorrect response sizes 2021-05-16 00:20:48 -04:00
lat9nq 4158f88b49 configuration: Simplify applying per-game settings
Originally, every time we add a per-game setting, we'd have to guard for
it when setting it on the global config, and use a specific function to
do it for the per-game config.

This moves the global check into the ApplyPerGameSetting function so
that we can use it for changing both the global and per-game states.
Less work for the programmer.
2021-05-15 22:59:38 -04:00
lat9nq 11b43840a9 configuration_shared: Add some comments
Monke brain can't remember what all of these does a year later.
2021-05-15 22:07:20 -04:00
lat9nq 065b3eb53a general: Make CPU accuracy and related a Settings::Setting
Required to make CPU accuracy and unsafe settings available to use as a
per-game setting.
2021-05-15 20:46:48 -04:00
ameerj 453e90ef6f perf_stats: Rework FPS counter to be more accurate
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case.

This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics.
The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values.

The status bar update frequency was also changed from 2 seconds to 500ms.
2021-05-15 20:34:20 -04:00
ameerj 4981aa10aa main: Add title's version to window name on EA/mainline
Fixes the missing title version number on EA/mainline builds which override the title bar string.
2021-05-15 16:55:30 -04:00
german77 b79310def9 input_common: Implement SDL motion 2021-05-15 08:56:58 -05:00
german77 2d3df5d3f4 input_common: Fix crash when controller disconnects 2021-05-15 08:27:19 -05:00
german77 b41d05a12c input_common: Rewrite sdl analog mapping 2021-05-14 21:17:08 -05:00
german77 eac788499b input_common: Sanitize motion data 2021-05-13 13:41:32 -05:00
bunnei 5568354451 Merge pull request #6301 from Morph1984/ssl-ImportClientPki
ssl: Stub Import(Client/Server)Pki
2021-05-12 22:11:19 -07:00
Morph d1c74c3444 Merge pull request #6298 from Kewlan/toggled-show-add-on-refresh
configure_ui: Call RequestGameListUpdate when toggling "Show Add-Ons Column"
2021-05-12 21:06:04 -04:00
Morph 46f773ad5c ssl: Stub Import(Client/Server)Pki
- Used in JUMP FORCE Deluxe Edition
2021-05-12 21:04:13 -04:00
Morph 27c2d51a53 Merge pull request #6267 from german77/gestureRewrite
hid: Improve hardware accuracy of gestures
2021-05-12 09:17:23 -04:00
bunnei 9d01b31e3f common: tree: Avoid a nullptr dereference. 2021-05-11 15:40:20 -07:00
bunnei 006a51c86b hle: kernel: hle_ipc: Fix outgoing IPC response size calculation. 2021-05-11 12:27:43 -07:00
bunnei 627eaf8c0e WORKAROUND: temp. disable session resource limits while we work out issues 2021-05-11 10:51:39 -07:00
bunnei bb77b5d79f WORKAROUND: Do not use slab heap while we track down issues with resource management. 2021-05-11 10:27:18 -07:00
bunnei 2a7b1c1424 audren 2021-05-11 10:24:53 -07:00
bunnei a21dff4980 core: hle: ipc_helpers: Fix cast on raw_data_size calculation. 2021-05-10 20:34:38 -07:00
bunnei 1c07b56283 hle: service: sm: Add TIPC support.
- Fixes our error checking of names as well.
2021-05-10 20:34:38 -07:00
bunnei 232102c794 hle: kernel: hle_ipc: Improve IPC code and add initial support for TIPC.
- Fixes our move handles implementation to actually move objects.
- Simplifies the traditional IPC path.
2021-05-10 20:34:38 -07:00
bunnei 0f3b6928ab hle: service: sm: GetService: Reserve session resource when we create a KSession. 2021-05-10 20:34:38 -07:00
bunnei fe91306d87 hle: service: Add support for dispatching TIPC requests. 2021-05-10 20:34:38 -07:00
bunnei 80d920e464 hle: service: Implement IPC::CommandType::Close.
- This was not actually closing sessions before.
2021-05-10 20:34:38 -07:00
bunnei e9d3612085 hle: service: sm: Use RegisterNamedService to register the service. 2021-05-10 20:34:38 -07:00
bunnei 11413d71ad hle: service: sm: Improve Initialize implementation. 2021-05-10 20:34:38 -07:00
bunnei 6e284d951b hle: kernel: svc: Update ConnectToNamedPort to use new CreateNamedServicePort interface. 2021-05-10 20:34:38 -07:00
bunnei 777e7c52ba hle: kernel: Implement named service ports using service interface factory.
- This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static.
2021-05-10 20:34:38 -07:00
bunnei 14e52144e2 hle: kernel: KSession: Improve implementation of CloneCurrentObject. 2021-05-10 20:33:53 -07:00
bunnei 1e211a1b15 hle: service: sm: Increase point buffer size. 2021-05-10 15:43:42 -07:00
bunnei 66c7c7e5ab hle: ipc_helpers: Reserve session resource when we create a KSession. 2021-05-10 15:42:46 -07:00
bunnei 2c9d6156d2 hle: kernel: KClientPort: Cleanup comment format. 2021-05-10 15:41:46 -07:00
bunnei 29a31e30db hle: ipc: Add declarations for TIPC. 2021-05-10 15:05:10 -07:00
bunnei 4a781928dd hle: kernel: Further cleanup and add TIPC helpers. 2021-05-10 15:05:10 -07:00
bunnei ae86003503 hle: ipc_helpers: Update IPC response generation for TIPC. 2021-05-10 15:05:10 -07:00
Kewlan 182b56f54e configure_ui: Call RequestGameListUpdate when toggling "Show Add-Ons Column" 2021-05-10 18:49:30 +02:00
Lioncash 41852fb7e7 parent_of_member: Make sign conversion explicit in OffsetOfImpl()
Previously these conversions were implicit and causing quite a few
warnings on clang.
2021-05-10 08:07:33 -04:00
bunnei 6997b030b1 Merge pull request #6291 from lioncash/kern-shadow
kernel: Eliminate variable shadowing
2021-05-09 20:15:00 -07:00
german77 1b8951c31b kernel: Delete unused files 2021-05-09 11:15:31 -05:00
Lioncash e019da0487 kernel: Eliminate variable shadowing
Now that the large kernel refactor is merged, we can eliminate the
remaining variable shadowing cases.
2021-05-08 12:33:26 -04:00
bunnei 80460d421e Merge pull request #6266 from bunnei/kautoobject-refactor
Kernel Rework: Migrate kernel objects to KAutoObject
2021-05-07 23:30:17 -07:00
ameerj fc2626f02c texture_cache: Handle out of bound texture blits
Some games interleave a texture blit using regions which are out-of-bounds. This addresses the interleaving to avoid oob reads from the src texture.
2021-05-07 22:14:21 -04:00
bunnei e75a9872ea Merge pull request #6287 from lioncash/ldr-copy
ldr: Simplify memory copy within LoadNro()
2021-05-07 09:46:31 -07:00
Lioncash 6890201733 ldr: Simplify memory copy within LoadNro()
We can use the dedicated memory function for performing copies instead
of reading into a temporary buffer and then immediately writing it back
out to memory.

Eliminates a bit of heap memory churn.
2021-05-06 19:18:14 -04:00
ameerj 16528cb361 nvflinger: Create layers when they are queried but not found
Fixes Shantae softlock on boot.
2021-05-06 11:20:52 -04:00
bunnei afdbfb884c hle: kernel: KPageTable: CanContain should not be constexpr. 2021-05-05 16:40:55 -07:00
bunnei 14cb6883db hle: kernel: Move slab resource counts to Kernel. 2021-05-05 16:40:54 -07:00
bunnei 720906d0a5 fixup! hle: kernel: Migrate KSharedMemory to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei 37338198be fixup! hle: kernel: Migrate more of KThread to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei b784918391 fixup! common: bit_util: Add BIT macro. 2021-05-05 16:40:54 -07:00
bunnei 636dd1917e fixup! hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:54 -07:00
bunnei 0cbeafef3e fixup! hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:54 -07:00
bunnei 4ebb8f0dfe kernel: svc: Remove unused RetrieveResourceLimitValue function. 2021-05-05 16:40:54 -07:00
bunnei 89966df98c hle: kernel: Fix un/sign mismatch errors with NUM_CPU_CORES. 2021-05-05 16:40:54 -07:00
bunnei fd11e0722b fixup! hle: kernel: Add initial impl. of slab setup. 2021-05-05 16:40:54 -07:00
bunnei 7341a973df fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:54 -07:00
bunnei 464b640058 fixup! hle: kernel: Migrate more of KThread to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei e2e26f8299 common: parent_of_member: Fix build for OffsetOf(). 2021-05-05 16:40:54 -07:00
bunnei 396379c2c0 fixup! common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC. 2021-05-05 16:40:54 -07:00
bunnei 3fa3fa47e5 fixup! hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei a50cc0c3f8 fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:54 -07:00
bunnei 9536ae2f2e fixup! hle: kernel: Add initial impl. of KLinkedList. 2021-05-05 16:40:54 -07:00
bunnei a4fc003902 fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:54 -07:00
bunnei 8ea927fb3b fixup! hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei 0dfa7a1417 fixup! hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei dc0abc7315 fixup! hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei e04364fcf4 fixup! hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject. 2021-05-05 16:40:53 -07:00