Commit graph

14961 commits

Author SHA1 Message Date
ReinUsesLisp
20f8c8dfff shader_decompiler: Visit source nodes even when they assign to RZ
Some operations like atomicMin were ignored because they returned were
being stored to RZ. This operations have a side effect and it was being
ignored.
2020-05-21 23:16:03 -03:00
ReinUsesLisp
262aea9b19 vk_shader_decompiler: Don't assert for void returns
Atomic instructions can be used without returning anything and this is
valid code. Remove the assert.
2020-05-21 23:16:03 -03:00
Neodyblue
7b868d1057 qt_themes: remove unknown qss property from dark theme
Qdarkstyle's qss file uses an overflow property.
According to `https://doc.qt.io/qt-5/stylesheet-reference.html`,
the property `overflow` doesn't exist, which leads to a warning message
in the console.
2020-05-21 17:51:53 -07:00
ReinUsesLisp
9223dc7a10 buffer_cache: Remove unused boost headers 2020-05-21 16:44:00 -03:00
ReinUsesLisp
f8678b635a map_interval: Add interval allocator and drop hack
Drop the std::list hack to allocate memory indefinitely.

Instead use a custom allocator that keeps references valid until
destruction. This allocates fixed chunks of memory and puts pointers in
a free list. When an allocation is no longer used put it back to the
free list, this doesn't heap allocate because std::vector doesn't change
the capacity. If the free list is empty, allocate a new chunk.
2020-05-21 16:44:00 -03:00
ReinUsesLisp
4d06e9f5cc buffer_cache: Use boost::container::small_vector for maps in range
Most overlaps in the buffer cache only contain one mapped address.
We can avoid close to all heap allocations once the buffer cache is
warmed up by using a small_vector with a stack size of one.
2020-05-21 16:44:00 -03:00
ReinUsesLisp
7a45f97357 buffer_cache: Use boost::intrusive::set for caching
Instead of using boost::icl::interval_map for caching, use
boost::intrusive::set. interval_map is intended as a container where the
keys can overlap with one another; we don't need this for caching
buffers and a std::set-like data structure that allows us to search with
lower_bound is enough.
2020-05-21 16:44:00 -03:00
ReinUsesLisp
c7f9bceb80 buffer_cache: Remove shared pointers
Removing shared pointers is a first step to be able to use intrusive
objects and keep allocations close to one another in memory.
2020-05-21 16:02:54 -03:00
ReinUsesLisp
3460d01352 buffer_cache: Minor style changes
Minor style changes. Mostly done so I avoid editing it while doing other
changes.
2020-05-21 16:02:20 -03:00
VolcaEM
4f1136dfca clang-format 2020-05-21 10:43:55 +02:00
VolcaEM
f7d23b21d0 nifm: correct assert in CreateTemporaryNetworkProfile
This has been wrong since bd66646f8b
I haven't found a game that called this function (and I haven't tried this on a real Switch), and because of this I haven't been able to check if the number in assert OR the string in the assert is wrong, but one of the two is wrong:
NetworkProfileData is 0x18E, while SfNetworkProfileData is 0x17C, according to Switchbrew
Switchbrew doesn't officially say that NetworkProfileData's size is 0x18E but it's possible to calculate its size since Switchbrew provides the size and the offset of all the components of NetworkProfileData (which isn't currently implemented in yuzu, alongside SfNetworkProfileData)
NetworkProfileData documentation: https://switchbrew.org/wiki/Network_Interface_services#NetworkProfileData
SfNetworkProfileData documentation: https://switchbrew.org/wiki/Network_Interface_services#SfNetworkProfileData
Since I trust ogniK's work on reversing NIFM, I'd assume this was just a typo in the string
2020-05-21 10:23:53 +02:00
bunnei
9d095bbb06 Merge pull request #3946 from ogniK5377/sysverdat-10-0-2
file_sys: Update SystemVersion archive to version 10.0.2
2020-05-20 19:21:27 -04:00
ReinUsesLisp
a075bbcf36 renderer_opengl: Add assembly program code paths
Add code required to use OpenGL assembly programs based on
NV_gpu_program5. Decompilation for ARB programs is intended to be added
in a follow up commit. This does **not** include ARB decompilation and
it's not in an usable state.

The intention behind assembly programs is to reduce shader stutter
significantly on drivers supporting NV_gpu_program5 (and other required
extensions). Currently only Nvidia's proprietary driver supports these
extensions.

Add a UI option hidden for now to avoid people enabling this option
accidentally.

This code path has some limitations that OpenGL compatibility doesn't
have:
- NV_shader_storage_buffer_object is limited to 16 entries for a single
OpenGL context state (I don't know if this is an intended limitation, an
specification issue or I am missing something). Currently causes issues
on The Legend of Zelda: Link's Awakening.
- NV_parameter_buffer_object can't bind buffers using an offset
different to zero. The used workaround is to copy to a temporary buffer
(this doesn't happen often so it's not an issue).

On the other hand, it has the following advantages:
- Shaders build a lot faster.
- We have control over how floating point rounding is done over
individual instructions (SPIR-V on Vulkan can't do this).
- Operations on shared memory can be unsigned and signed.
- Transform feedbacks are dynamic state (not yet implemented).
- Parameter buffers (uniform buffers) are per stage, matching NVN and
hardware's behavior.
- The API to bind and create assembly programs makes sense, unlike
ARB_separate_shader_objects.
2020-05-19 18:00:04 -03:00
ReinUsesLisp
541a254c2e yuzu: Add frontend settings for assembly shaders
Add settings for assembly shaders. Currently hidden to avoid users from
accidentally enabled them.
2020-05-19 17:53:17 -03:00
bunnei
3b781db425 Merge pull request #3926 from ogniK5377/keyboard-states
hid: Clear keyboard states & fix logic issue
2020-05-19 15:55:14 -04:00
Morph
e54e7d322e maxwell_to_vk: Add format B8G8R8A8_SRGB
Add format B8G8R8A8_SRGB and add Attachable capability for B8G8R8A8_UNORM
Used by Bravely Default II
2020-05-18 13:02:09 -04:00
Fernando Sahmkow
b9eff4d004 OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled.
This commit aims to help easing debugging of driver crashes without
having to modify existing code.
2020-05-17 21:45:09 -04:00
Morph
c02daca95c main: Log host system memory parameters
Logs both physical memory and swapfile sizes, this is useful for support.
2020-05-17 14:45:12 -04:00
bunnei
c5fbedf14c Merge pull request #3665 from bunnei/device-save
FS: Improve emulation of device saves
2020-05-16 12:39:58 -04:00
bunnei
c04e78c136 Merge pull request #3945 from ogniK5377/nvflinger-pixformat
nv_flinger: Use enum for pixel format instead of u32
2020-05-16 02:00:50 -04:00
bunnei
be4c8be8a4 Merge pull request #3944 from ogniK5377/dma_mget
DmaPusher: Remove dead code in step
2020-05-16 02:00:14 -04:00
David Marcec
d50dd8f7a0 file_sys: Update SystemVersion archive to version 10.0.2 2020-05-16 13:56:06 +10:00
David Marcec
97c023e3f0 nv_flinger: Use enum for pixel format instead of u32 2020-05-16 13:47:55 +10:00
David Marcec
67d7c0f45e DmaPusher: Remove dead code in step 2020-05-16 12:42:27 +10:00
bunnei
738e2cca7c Merge pull request #3942 from ReinUsesLisp/flush-and-invalidate
vk_rasterizer: Match OpenGL's FlushAndInvalidate behavior
2020-05-15 21:34:07 -04:00
ReinUsesLisp
635a3add8b vk_rasterizer: Match OpenGL's FlushAndInvalidate behavior
Match OpenGL's behavior. This can fix or simplify bisecting issues on
Vulkan.
2020-05-15 20:40:08 -03:00
Morph
eedbf90664 frontend: Set minimum window size to 640x360 instead of 1280x720 (#3413) 2020-05-15 22:22:27 +02:00
bunnei
9e03fc2e29 Merge pull request #3927 from jroweboy/fix-bug
Frontend: Remove tracking for context wrapper
2020-05-14 00:07:38 -04:00
bunnei
84bd1a0189 Merge pull request #3757 from ogniK5377/better-voice-mixing
audio_renderer: Better voice mixing and 6 channel downmixing
2020-05-13 22:46:41 -04:00
bunnei
bcfcfaca32 Merge pull request #3909 from bunnei/timezone
Improve time zone support
2020-05-13 21:41:45 -04:00
bunnei
b0d4fdb600 Merge pull request #3899 from ReinUsesLisp/float-comparisons
shader_ir: Add separate instructions for ordered and unordered comparisons and fix NE on GLSL
2020-05-13 09:51:14 -04:00
ReinUsesLisp
a7c7f48177 vk_rasterizer: Implement constant attributes
Constant attributes (in OpenGL known disabled attributes) are not
supported on Vulkan, even with extensions. To emulate this behavior we
return zero on reads from disabled vertex attributes in shader code.
This has no caching cost because attribute formats are not dynamic state
on Vulkan and we have to store it in the pipeline cache anyway.

- Fixes Animal Crossing: New Horizons terrain borders
2020-05-13 04:36:47 -03:00
ReinUsesLisp
305164eaac vk_rasterizer: Remove buffer check in attribute selection
This was a left over from OpenGL when disabled buffers where not properly
emulated. We no longer have to assert this as it is checked in vertex
buffer initialization.
2020-05-13 04:36:47 -03:00
bunnei
053399a553 time_zone: Use std::chrono::seconds for strong typing. 2020-05-12 18:44:07 -04:00
James Rowe
99f5c3ca7f Frontend: Remove tracking for context wrapper 2020-05-11 23:50:03 -06:00
David Marcec
e6886a756c hid: Clear keyboard states & fix logic issue
Previously we never cleared the states of the entries and the key would stay held down, also looping over the key bytes for each key lead to setting every bit for the key state instead of the key we wanted
2020-05-12 12:40:50 +10:00
bunnei
250593c05d Merge pull request #3816 from ReinUsesLisp/vk-rasterizer-enable
vk_graphics_pipeline: Implement rasterizer_enable on Vulkan
2020-05-11 18:22:51 -04:00
bunnei
f42b9c0a85 hle: service: time_zone_manager: Use current time zone setting. 2020-05-11 17:55:25 -04:00
bunnei
7aadcb796c common: Add module to get the current time zone. 2020-05-11 17:51:26 -04:00
bunnei
8588ac0645 core: settings: Add a setting for time zone. 2020-05-11 17:50:07 -04:00
bunnei
7188362d5b Merge pull request #3925 from ogniK5377/hid-SendKeyboardLockKeyEvent
Stub hid:SendKeyboardLockKeyEvent
2020-05-11 13:33:06 -04:00
David Marcec
9f8eb0c39a fix logic error & scale sample volume based on voice volume 2020-05-11 12:56:15 -04:00
David Marcec
7965018e64 pass by const ref instead 2020-05-11 12:56:15 -04:00
David Marcec
de00a5eb8c audio_renderer: Better voice mixing and 6 channel downmixing
Supersedes #3738 and #3321
2020-05-11 12:56:15 -04:00
bunnei
ee3b9071b5 service: fsp_srv: Stub implementation of OpenMultiCommitManager. 2020-05-11 12:54:30 -04:00
bunnei
3439618956 yuzu: game_list: Fix 'Open Save Data Location' for device saves. 2020-05-11 12:54:30 -04:00
bunnei
97e2eb439c file_sys: savefata_factory: Update to support DeviceSaveData. 2020-05-11 12:54:30 -04:00
bunnei
f870a935d4 file_sys: control_metadata: Expose device_save_data_size. 2020-05-11 12:54:30 -04:00
David Marcec
26bd4978a3 Stub SendKeyboardLockKeyEvent
Needed for Puchikon 4 SmileBASIC 1.0.0
2020-05-12 01:01:50 +10:00
bunnei
9891fcf41e Merge pull request #3896 from jroweboy/remove-clang-format-check-from-patreon
CI: Don't check clang format on early access builds
2020-05-10 02:54:22 -04:00