Commit graph

15043 commits

Author SHA1 Message Date
Fernando Sahmkow
fe8ea9e0c9 Merge pull request #3766 from ReinUsesLisp/renderpass-cache-key
vk_renderpass_cache: Pack renderpass cache key and unify keys
2020-04-27 16:05:14 -04:00
Fernando Sahmkow
2043198e50 Merge pull request #3756 from ReinUsesLisp/integrated-devices
vk_memory_manager: Remove unified memory model flag
2020-04-27 16:04:22 -04:00
Mat M
ba644d9560 Merge pull request #3797 from slashiee/hid-stub
services: hid: Stub StopSevenSixAxisSensor.
2020-04-27 15:37:08 -04:00
bunnei
d952b2e1da Merge pull request #3742 from FernandoS27/command-list
Optimize GPU Command Lists and Introduce Fast GPU Time Option
2020-04-27 00:18:46 -04:00
ReinUsesLisp
8e3af5d3ca texture_cache: Reintroduce preserve_contents accurately
This reverts commit 1f1e80c67d.

preserve_contents proved to be a meaningful optimization. This commit
reintroduces it but properly implemented on OpenGL.

We have to make sure the clear removes all the previous contents of the
image.

It's not currently implemented on Vulkan because we can do smart things
there that's preferred to be introduced in a separate commit.
2020-04-26 19:53:02 -03:00
bunnei
f5bd43b7f0 Merge pull request #3795 from vitor-k/fix-folder
Fix "Port citra-emu/citra#4956: "Fixes to game list sorting" #3611"
2020-04-26 13:55:26 -04:00
bunnei
c9b8476b99 Merge pull request #3744 from lioncash/table2
service: Update function tables
2020-04-26 04:15:47 -04:00
Rodrigo Locatti
0f7a89c2ef Merge pull request #3753 from ReinUsesLisp/ac-vulkan
{gl,vk}_rasterizer: Add lazy default buffer maker and use it for empty buffers
2020-04-26 01:55:43 -03:00
ReinUsesLisp
9b433b2467 shader/memory_util: Deduplicate code
Deduplicate code shared between vk_pipeline_cache and gl_shader_cache as
well as shader decoder code.

While we are at it, fix a bug in gl_shader_cache where compute shaders
had an start offset of a stage shader.
2020-04-26 01:38:51 -03:00
bunnei
ed2f950518 Merge pull request #3791 from Kewlan/hotkey-config-plus
configuration: Add Restore Default and Clear options to hotkeys
2020-04-26 00:33:08 -04:00
bunnei
cc25a04993 Merge pull request #3761 from Kewlan/stick-modifier-slider
configure_input_player: Use slider to edit modifier scale
2020-04-25 22:55:41 -04:00
ReinUsesLisp
7442f21c5b shader/arithmetic_integer: Fix edge case and mark IADD.X Rd.CC as unimplemented
IADD.X Rd.CC requires some extra logic that is not currently
implemented. Abort when this is hit.
2020-04-25 22:58:33 -03:00
ReinUsesLisp
45cb8fc72a shader/arithmetic_integer: Change IAdd to UAdd to avoid signed overflow
Signed integer addition overflow might be undefined behavior. It's free
to change operations to UAdd and use unsigned integers to avoid
potential bugs.
2020-04-25 22:57:54 -03:00
ReinUsesLisp
6404cd824b shader/arithmetic_integer: Implement IADD.X
IADD.X takes the carry flag and adds it to the result. This is generally
used to emulate 64-bit operations with 32-bit registers.
2020-04-25 22:56:11 -03:00
ReinUsesLisp
7e8f51273c shader/arithmetic_integer: Implement CC for IADD 2020-04-25 22:55:26 -03:00
ReinUsesLisp
26dc95c7bc decode/register_set_predicate: Implement CC
P2R CC takes the state of condition codes and puts them into a register.
We already have this implemented for PR (predicates). This commit
implements CC over that.
2020-04-25 22:54:42 -03:00
ReinUsesLisp
491e2cbfd7 decode/register_set_predicate: Use move for shared pointers
Avoid atomic counters used by shared pointers.
2020-04-25 22:54:14 -03:00
M&M
381eed14f6 services: hid: Stub StopSevenSixAxisSensor.
- Used by The Legend of Zelda: Breath of the Wild v1.6.0
2020-04-25 15:38:56 -07:00
Vitor Kiguchi
de072fd257 Fix the mistake in the port and update the comment for clarity 2020-04-25 15:01:20 -03:00
bunnei
6cd0fc2a95 Merge pull request #3721 from ReinUsesLisp/sort-devices
vulkan/wrapper: Sort physical devices
2020-04-25 03:27:40 -04:00
bunnei
05a54192f8 Merge pull request #3734 from ReinUsesLisp/half-float-mods
decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bits
2020-04-25 00:41:43 -04:00
bunnei
01c26ad131 Merge pull request #3780 from lioncash/process
svc: Re-add MapProcessCodeMemory/UnmapProcessCodeMemory
2020-04-24 23:22:26 -04:00
ReinUsesLisp
88a6c10687 vk_rasterizer: Pack texceptions and color formats on invalid formats
Sometimes for unknown reasons NVN games can bind a render target format
of 0. This may be a yuzu bug.

With the commits before this the formats were specified without being
"packed", assuming all formats and texceptions will be written like in
the color_attachments vector.

To address this issue, iterate all render targets and pack them as they
are valid. This way they will match color_attachments.

- Fixes validation errors and graphical issues on Breath of the Wild.
2020-04-24 22:21:29 -03:00
Kewlan
37b1427ea9 Add Restore Defaults and Clear options to hotkeys 2020-04-24 23:50:26 +02:00
bunnei
d1294ad83b Merge pull request #3749 from ReinUsesLisp/lea-imm
shader/arithmetic_integer: Fix LEA_IMM encoding
2020-04-24 14:30:13 -04:00
Fernando Sahmkow
b19e1d2c09 Revert: shader_decode: Fix LD, LDG when track constant buffer. 2020-04-24 11:00:54 -04:00
Zach Hilman
f9a92d2468 Merge pull request #3786 from degasus/fix_warnings
Fix -Werror=conversion and -Wdeprecated-copy issues
2020-04-24 08:54:45 -04:00
Markus Wick
1acd6b34e9 Fix -Wdeprecated-copy warning. 2020-04-24 09:33:04 +02:00
Markus Wick
ac24f0506c Fix -Werror=conversion error. 2020-04-24 09:33:04 +02:00
David Marcec
efe3e5c7c6 vi: Don't let uninitialized data pass as a response for SetBufferCount
Currently SetBufferCount doesn't write to the out buffer which then contains uninitialized data. This leads to non-zero data which leads to responding with different error codes
2020-04-24 17:24:58 +10:00
bunnei
957454cfa5 Merge pull request #3760 from Morph1984/trailing-filedir-separator
frontend/filesystem: Add a trailing separator to the string path
2020-04-24 01:44:32 -04:00
Lioncash
dca9c90af3 physical_core: Make use of std::make_unique instead of std::make_shared in ctor
We can also allow unicorn to be constructed in 32-bit mode or 64-bit
mode to satisfy the need for both interpreter instances.

Allows this code to compile successfully of non x86-64 architectures.
2020-04-24 00:20:58 -04:00
Rodrigo Locatti
25bd2ba359 Merge pull request #3777 from lioncash/warn
page_table: Remove unused captures
2020-04-23 21:47:54 -03:00
Rodrigo Locatti
eef3218a82 Merge pull request #3778 from lioncash/unused-var
svc: Remove unused variable
2020-04-23 21:47:24 -03:00
Rodrigo Locatti
28525c8afb Merge pull request #3781 from lioncash/docs
shared_memory: Amend doxygen reference
2020-04-23 21:46:35 -03:00
Lioncash
9a5a6ebe0a shared_memory: Amend doxygen reference
Amends the parameter to match the documentation reference.

Resolves a -Wdocumentation warning with clang.
2020-04-23 18:42:14 -04:00
Lioncash
224d3c6b9d svc: Re-add MapProcessCodeMemory/UnmapProcessCodeMemory
These were lost in the re-implementation of the virtual memory manager.
2020-04-23 18:12:04 -04:00
Lioncash
2fc4351547 svc: Remove unused variable
Since the VMM refactor, this is no longer used or needed.
2020-04-23 17:53:26 -04:00
Lioncash
a881161d3c page_table: Remove unused captures
Any time the lambda function is called, the permission being used in the
capture would be passed in as an argument to the lambda, so the capture
is unnecessary.
2020-04-23 17:33:08 -04:00
ReinUsesLisp
3e808936a8 decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bits
The encoding for negation and absolute value was wrong.
Extracting is now done manually. Similar instructions having different
encodings is the rule, not the exception. To keep sanity and readability
I preferred to extract the desired bit manually.

This is implemented against nxas:
8dbc389957/table.h (L68)

That is itself tested against nvdisasm (Nvidia's official disassembler).
2020-04-23 18:29:38 -03:00
ReinUsesLisp
0034e6310d shader/texture: Support multiple unknown sampler properties
This allows deducing some properties from the texture instruction before
asking the runtime. By doing this we can handle type mismatches in some
instructions from the renderer instead of the shader decoder.

Fixes texelFetch issues with games using 2D texture instructions on a 1D
sampler.
2020-04-23 18:04:13 -03:00
ReinUsesLisp
c9b4c56d69 shader_ir: Turn classes into data structures 2020-04-23 18:00:06 -03:00
ReinUsesLisp
f78f26b75a vk_rasterizer: Fix framebuffer creation validation errors
Framebuffer creation was ignoring the number of color attachments.
2020-04-23 17:34:16 -03:00
ReinUsesLisp
ab7eae6fff vk_pipeline_cache: Unify pipeline cache keys into a single operation
This allows us to call Common::CityHash and std::memcmp only once for
GraphicsPipelineCacheKey. While we are at it, do the same for compute.
2020-04-23 17:34:16 -03:00
ReinUsesLisp
7b76c67803 vk_renderpass_cache: Pack renderpass cache key to 12 bytes 2020-04-23 17:34:16 -03:00
Rodrigo Locatti
d23435c112 Merge pull request #3768 from H27CK/cmd-title-fmt
Fix format error in performance statistics
2020-04-23 16:14:33 -03:00
gxcreator
a9c6146a12 Fixed packaging on some systems with different QT5 path 2020-04-23 21:45:07 +03:00
bunnei
da893629a0 kernel: memory: Improve implementation of device shared memory. (#3707)
* kernel: memory: Improve implementation of device shared memory.

* fixup! kernel: memory: Improve implementation of device shared memory.

* fixup! kernel: memory: Improve implementation of device shared memory.
2020-04-23 11:37:12 -04:00
Fernando Sahmkow
0cf32d6184 Clang Format. 2020-04-23 08:52:58 -04:00
Fernando Sahmkow
c8f4549d43 GPU: Add Fast GPU Time Option. 2020-04-23 08:52:57 -04:00