yzct12345
02e98f6c93
texture_cache: Don't change copyright year
2021-08-05 20:52:12 +00:00
yzct12345
5566f3dbc0
texture_cache: Address ameerj's review
2021-08-05 20:46:24 +00:00
yzct12345
4edfa6ad8f
memory: Address lioncash's review
2021-08-05 20:29:43 +00:00
bunnei
e1a92db519
Merge pull request #6813 from Morph1984/hex-string-to-uuid
...
common: uuid: Add hex string to UUID constructor
2021-08-05 13:29:11 -07:00
yzct12345
6df9611059
memory: Clean up code
2021-08-05 20:11:14 +00:00
yzct12345
7e846be376
assert: Verify formatting
2021-08-05 17:46:22 +00:00
yzct12345
346149dcf9
assert: Avoid empty macros
2021-08-05 17:21:56 +00:00
yzct12345
f9563c8f24
texture_cache: Split templates out
2021-08-05 13:52:30 +00:00
Mai M
a1cb453470
Merge pull request #6819 from Morph1984/i-am-dumb
...
applet_swkbd: Include the null terminator in the buffer size calculation
2021-08-04 23:32:01 -04:00
Mai M
9a7d2e3659
Merge pull request #6818 from Morph1984/hex-util-bug
...
hex_util: Fix incorrect array size in AsArray
2021-08-04 23:31:04 -04:00
Morph
f10dc35dd0
applet_swkbd: Include the null terminator in the buffer size calculation
...
Some games may interpret the read string as a null-terminated string instead of just reading the string up to buffer_size.
2021-08-04 22:32:09 -04:00
Morph
7b39215c8a
hex_util: Fix incorrect array size in AsArray
...
Although this isn't used, this is a potential bug as HexStringToArray will perform an out-of-bounds read.
2021-08-04 22:16:29 -04:00
lat9nq
be16d92060
config: Read connected setting for controllers
...
Currently yuzu will read the mapping but does not connect a controller
despite adding subsequent configurations for it. Read the `connected`
setting for now as a boolean like the Qt frontend.
2021-08-04 17:09:35 -04:00
german77
1fb158ce90
settings_ui: Add emulated joystick position dot to controller preview
2021-08-04 11:46:54 -05:00
Morph
705f111058
common: uuid: Add hex string to UUID constructor
...
This allows for easily converting a hex string into a Common::UUID, which is backed by a 128 bit unsigned integer.
2021-08-04 10:45:41 -04:00
yzct12345
2868d4ba84
nvdec: Implement VA-API hardware video acceleration ( #6713 )
...
* nvdec: VA-API
* Verify formatting
* Forgot a semicolon for Windows
* Clarify comment about AV_PIX_FMT_NV12
* Fix assert log spam from missing negation
* vic: Remove forgotten debug code
* Address lioncash's review
* Mention VA-API is Intel/AMD
* Address v1993's review
* Hopefully fix CMakeLists style this time
* vic: Improve cache locality
* vic: Fix off-by-one error
* codec: Async
* codec: Forgot the GetValue()
* nvdec: Address ameerj's review
* codec: Fallback to CPU without VA-API support
* cmake: Address lat9nq's review
* cmake: Make VA-API optional
* vaapi: Multiple GPU
* Apply suggestions from code review
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
* nvdec: Address ameerj's review
* codec: Use anonymous instead of static
* nvdec: Remove enum and fix memory leak
* nvdec: Address ameerj's review
* codec: Remove preparation for threading
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-08-03 23:43:11 -04:00
Morph
d16a337d98
Merge pull request #6805 from lat9nq/fix-user-profiles
...
config: Only read/write current_user on global config
2021-08-02 23:58:41 -04:00
lat9nq
6ab0c6a808
config: Only read/write current_user on global config
2021-08-02 18:29:24 -04:00
spholz
e71f78d04c
network: fix ternary operator in Socket::SendTo
2021-08-02 20:12:12 +02:00
yzct12345
f56d0db5bd
decoders: Optimize swizzle copy performance ( #6790 )
...
This makes UnswizzleTexture up to two times faster. It is the main bottleneck in NVDEC video decoding.
2021-08-02 11:18:58 -04:00
san
3e26141483
yuzu-cmd: hide cursor when in fullscreen
...
Exposed the SDL_ShowCursor function to EmuWindow baseclass. When creating the window (GL or VK) in fullscreen it now automatically hides the cursor.
2021-08-01 21:46:13 +02:00
Malte Jürgens
381aacdbb1
game_list: Make game list folder icons smaller ( #6762 )
...
Makes the default game list folder icons 48x48 by default instead of 64x64, and allows for selecting small (24x24) and large (72x72) icon sizes.
2021-08-01 12:59:36 -04:00
Morph
3b4d427993
service: set: Correct copy amount in GetAvailableLanguageCodes
2021-08-01 11:59:52 -04:00
Fernando S
30f0b7cf31
Merge pull request #6720 from ameerj/vk-screenshot
...
renderer_vulkan: Implement screenshots
2021-08-01 13:31:33 +02:00
Ameer J
db32c3762b
Merge pull request #6765 from ReinUsesLisp/y-negate-vk
...
vk_rasterizer: Flip viewport on Y_NEGATE
2021-08-01 01:47:37 -04:00
ameerj
c439fc9be9
astc_decoder: Reduce workgroup size
...
This reduces the amount of over dispatching when there are odd dimensions (i.e. ASTC 8x5), which rarely evenly divide into 32x32.
2021-08-01 01:22:27 -04:00
ameerj
5ab8053511
astc_decoder: Compute offset swizzles in-shader
...
Alleviates the dependency on the swizzle table and a uniform which is constant for all ASTC texture sizes.
2021-08-01 01:22:26 -04:00
ameerj
b2862e4772
astc_decoder: Make use of uvec4 for payload data
2021-07-31 22:28:04 -04:00
ameerj
a75d70fa90
astc_decoder: Simplify Select2DPartition
2021-07-31 21:36:26 -04:00
ameerj
5665d05547
astc_decoder: Optimize the use EncodingData
...
This buffer was a list of EncodingData structures sorted by their bit length, with some duplication from the cpu decoder implementation.
We can take advantage of its sorted property to optimize its usage in the shader.
Thanks to wwylele for the optimization idea.
2021-07-31 21:36:26 -04:00
ameerj
15c0c213b1
astc.h: Move data to cpp implementation
...
Moves leftover values that are no longer used by the gpu decoder back to the cpp implementation.
2021-07-31 21:26:42 -04:00
lat9nq
3862511a9a
settings: Use std::clamp where possible
...
Addresses PR review
Co-authored-by: PixelyIon <pixelyion@protonmail.com>
2021-07-31 17:20:12 -04:00
Morph
9143fe5d3a
hle: api_version: Update HOS version to 12.1.0
...
Keeps us up to date with reporting the system version.
2021-07-31 14:39:49 -04:00
lat9nq
e9cf08c241
settings: Remove unnecessary std::move usages
...
Addresses review feedback.
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-07-30 18:44:50 -04:00
bunnei
47f13a9df4
Merge pull request #6752 from Morph1984/pt-br
...
service: ns, set: Add PT_BR (Brazilian Portuguese)
2021-07-30 14:42:11 -07:00
bunnei
2c7fdee7a7
Merge pull request #6775 from lat9nq/cmd-remove-global-core
...
emu_window: Remove global system instance
2021-07-30 13:28:24 -07:00
bunnei
7530594602
Merge pull request #6759 from ReinUsesLisp/pipeline-statistics
...
renderer_vulkan: Add setting to log pipeline statistics
2021-07-30 11:18:52 -07:00
lat9nq
7737bdfd1a
settings: Fix function virtualization
...
Fixes a theoretical scenario where a Setting is using the BasicSetting's
GetValue function. In practice this probably only happens on yuzu-cmd,
where there is no need for a Setting's additional features. Need to fix
regardless.
2021-07-30 13:33:35 -04:00
lat9nq
a1f19b61f8
settings: Implement setting ranges
...
Clamps the setting's values against the specified minimum and maximum
values.
2021-07-30 13:33:21 -04:00
lat9nq
335de3fdf5
emu_window: Remove global system instance
...
It was just the one in emu_window_sdl2, but since _gl and _vk inherit
from it, they all needed adjustments.
Leaves just the one auto system& in main().
2021-07-30 10:43:58 -04:00
Morph
ba3d230421
applet_swkbd: Correct string buffer size calculation
...
The buffer size here does not include the initial 8 bytes.
2021-07-30 02:19:04 -04:00
Morph
275db94bb8
configure_system: Add Brazilian Portuguese to the list of languages
2021-07-30 02:15:53 -04:00
Morph
6ca8ed9e58
service: set: Correct 4.0.0 max_entries to 0x40 (64) instead of 17
2021-07-30 02:15:53 -04:00
Morph
21ff0a3d6e
service: ns, set: Add PT_BR (Brazilian Portuguese)
2021-07-30 02:15:53 -04:00
Morph
db07ca6c7f
Merge pull request #6767 from ReinUsesLisp/fold-float-pack
...
shader: Fold UnpackFloat2x16 and PackFloat2x16
2021-07-30 02:07:52 -04:00
bunnei
a98f14e9b0
Merge pull request #6722 from ReinUsesLisp/xmad-opts
...
shader: Fold integer FMA from Nvidia's pattern
2021-07-29 18:45:37 -07:00
ReinUsesLisp
8c9febe8f7
shader: Fold UnpackFloat2x16 and PackFloat2x16
...
Simplifies the code a bit when possible. These instructions should be
no-ops codegen wise.
2021-07-29 21:22:52 -03:00
Ameer J
23b3333f72
Merge pull request #6751 from Morph1984/languagecode
...
service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese
2021-07-29 14:41:03 -04:00
bunnei
5acf020389
Merge pull request #6742 from Morph1984/uuid
...
common: uuid: Return a lower-case hex string in Format
2021-07-29 09:37:15 -07:00
ReinUsesLisp
b185567a03
vk_rasterizer: Flip viewport on Y_NEGATE
...
Matches OpenGL's behavior. I don't believe this register flips geometry,
but we have to try to match behavior on both backends.
2021-07-29 02:17:53 -03:00
ameerj
7ac99bb127
renderers: Add explicit invert_y bool to screenshot callback
...
OpenGL and Vulkan images render in different coordinate systems. This allows us to specify the coordinate system of the screenshot within each renderer
2021-07-28 21:46:08 -04:00
ameerj
75e7f54fb0
renderer_vulkan: Implement screenshots
2021-07-28 21:45:55 -04:00
ameerj
548bac8989
vk_blit_screen: Add public CreateFramebuffer method
2021-07-28 21:43:02 -04:00
ameerj
1e6c5d323d
vk_blit_screen: Make Draw method more generic
...
Allows specifying the framebuffer and render area dimensions, rather than being hard coded for the render window.
2021-07-28 21:37:30 -04:00
bunnei
124e3b4819
Merge pull request #6760 from ReinUsesLisp/fp16-collect
...
shader: Mark ConvertF16F32 and ConvertF32F16 as fp16 instructions
2021-07-28 14:55:06 -07:00
bunnei
f771d92e44
Merge pull request #6758 from jbeich/fastmem
...
host_memory: enable fastmem on FreeBSD
2021-07-28 13:01:54 -07:00
bunnei
d05e6003f0
Merge pull request #6700 from lat9nq/fullscreen-enum
...
general: Implement FullscreenMode enumeration
2021-07-28 11:36:42 -07:00
Morph
5593a3716e
Merge pull request #6671 from jls47/master
...
applets/web: Addressing QT Navigation issues in Linux
2021-07-27 22:46:27 -04:00
ReinUsesLisp
1bb46b7d64
shader: Mark ConvertF16F32 and ConvertF32F16 as fp16 instructions
...
Fixes instances where fp16 types are not declared on SPIR-V but they are
used. This shouldn't happen on master, as it's been uncovered by an
additional optimization pass.
2021-07-27 21:33:05 -03:00
ReinUsesLisp
3b006f4fe2
renderer_vulkan: Add setting to log pipeline statistics
...
Use VK_KHR_pipeline_executable_properties when enabled and available to
log statistics about the pipeline cache in a game.
For example, this is on Turing GPUs when generating a pipeline cache
from Super Smash Bros. Ultimate:
Average pipeline statistics
==========================================
Code size: 6433.167
Register count: 32.939
More advanced results could be presented, at the moment it's just an
average of all 3D and compute pipelines.
2021-07-27 21:29:24 -03:00
bunnei
92887a65f0
Merge pull request #6749 from lioncash/rtarget
...
render_target: Add missing initializer for size extent
2021-07-27 17:28:53 -07:00
bunnei
6053f2e1fe
Merge pull request #6730 from Morph1984/buf_to_stdstring
...
common: fs: fs_util: Add BufferToUTF8String
2021-07-27 15:50:54 -07:00
Jan Beich
353be2306c
host_memory: Add workaround for FreeBSD 12
...
src/common/host_memory.cpp:360:14: error: use of undeclared identifier
'memfd_create'
fd = memfd_create("HostMemory", 0);
^
2021-07-27 20:15:23 +00:00
Jan Beich
c4cd82fa7c
host_memory: Enable Linux implementation on FreeBSD
...
HW.Memory <Critical> common/host_memory.cpp:HostMemory:492: Fastmem unavailable, falling back to VirtualBuffer for memory allocation
2021-07-27 20:09:43 +00:00
Rodrigo Locatti
ab206d6378
Merge pull request #6748 from lioncash/engine-init
...
video_core/engine: Consistently initialize rasterizer pointers
2021-07-27 16:17:20 -03:00
Rodrigo Locatti
5da97c57cd
Merge pull request #6744 from lioncash/exc
...
exception: Make constructors explicit
2021-07-27 16:11:17 -03:00
bunnei
2717e79c74
Merge pull request #6745 from lioncash/copies
...
video_core: Remove some unused variables
2021-07-27 11:38:32 -07:00
jls47
ef29ed75b0
qt_web_browser: Fix lambda capture for HIDButton
2021-07-27 11:31:12 -04:00
jls47
3109d1c3db
qt_web_browser: Focus on the first link element
...
Focusing on the first link element fixes element navigation upon loading the web applet in games such as Super Mario Odyssey
2021-07-27 11:31:11 -04:00
Morph
a6359fe9ae
service: ns: Remove unused ns_language header
2021-07-27 08:59:26 -04:00
Morph
d7cd316a6c
service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese
2021-07-27 08:54:41 -04:00
Lioncash
00e100de08
render_target: Add missing initializer for size extent
...
Everything else has a default constructor that does the straightforward
thing of initializing most members to a default value, except for the
size.
We explicitly initialize the size (and others, for consistency), to
prevent potential uninitialized reads from occurring. Particularly given
the largeish surface area that this struct is used in.
2021-07-27 07:41:21 -04:00
Lioncash
f8964dd89a
video_core/engine: Consistently initialize rasterizer pointers
...
Ensures all of the engines have consistent and deterministic
initialization of the rasterizer pointers.
2021-07-27 07:30:57 -04:00
Lioncash
8c82c594f0
vulkan_wrapper: Fix SetObjectName() always indicating objects as images
...
We should be using the passed in object type instead.
2021-07-27 07:19:15 -04:00
Lioncash
ec56a17acd
buffer_cache: Remove unused small_vector in CommitAsyncFlushesHigh()
...
Given this is non-trivial, the constructor is required to execute, so
this removes a bit of redundant codegen.
2021-07-27 06:24:44 -04:00
Lioncash
075a744e38
gl_shader_cache: Remove unused variable
2021-07-27 06:23:49 -04:00
Lioncash
296728ec46
vk_compute_pass: Remove unused captures
...
Resolves two compiler warnings.
2021-07-27 06:17:52 -04:00
Lioncash
c27ddb44de
exception: Make constructors explicit
...
Ensures that exception construction is always explicit.
2021-07-27 04:15:14 -04:00
Lioncash
e490ddf327
exception: Make what() member function nodiscard
2021-07-27 04:14:32 -04:00
Lioncash
90f3678ada
exception: Narrow down specific header
...
We can use the <exception> header instead of pulling in all of the
exception-style classes.
2021-07-27 04:09:18 -04:00
Morph
f5f04cce01
common: fs: fs_util: Add BufferToUTF8String
...
Allows for direct conversion to std::string without having to convert std::u8string to std::string
2021-07-27 00:02:22 -04:00
Morph
b9b48aee7d
common: uuid: Return a lower-case hex string in Format
2021-07-26 23:54:59 -04:00
bunnei
d6c799494c
Merge pull request #6696 from ameerj/speed-limit-rename
...
general: Rename "Frame Limit" references to "Speed Limit"
2021-07-26 18:51:00 -07:00
Rodrigo Locatti
7511f65e31
Merge pull request #6741 from ReinUsesLisp/stream-remove
...
vk_stream_buffer: Remove unused stream buffer
2021-07-26 20:35:01 -03:00
Rodrigo Locatti
1a94b3f452
Merge pull request #6740 from K0bin/hvv-fallback
...
Handle allocation failure in Staging buffer
2021-07-26 20:34:44 -03:00
Robin Kertels
75050c788c
vk_staging_buffer_pool: Fall back to host memory when allocation fails
2021-07-26 23:37:18 +02:00
Rodrigo Locatti
c6991fa900
Merge pull request #6728 from ReinUsesLisp/null-buffer-usage
...
vk_buffer_cache: Add transform feedback usage to null buffer
2021-07-26 18:30:45 -03:00
Rodrigo Locatti
6c432d5349
Merge pull request #6729 from ReinUsesLisp/quad-indexed-barrier
...
vk_compute_pass: Fix pipeline barrier for indexed quads
2021-07-26 18:30:05 -03:00
ReinUsesLisp
5f9a4817a5
vk_stream_buffer: Remove unused stream buffer
...
Remove unused file.
2021-07-26 18:19:53 -03:00
Rodrigo Locatti
c0f99558fb
Merge pull request #6724 from lioncash/nodisc-shader
...
shader_recompiler: Remove unnecessary [[nodiscard]] instances
2021-07-26 16:35:21 -03:00
Rodrigo Locatti
de0b89792c
Merge pull request #6726 from lioncash/hguard
...
emit_spirv_instructions: Add missing header guard
2021-07-26 16:35:11 -03:00
Rodrigo Locatti
3d97f1e6cf
Merge pull request #6727 from lioncash/topology
...
emit_glasm: Fix LINESS_ADJACENCY typo in InputPrimitive()
2021-07-26 16:35:03 -03:00
Vamsi Krishna
c05bbf375d
configure_graphics: reword GLASM option
...
Change wording to explain that GLASM is actually short for Assembly Shaders
2021-07-26 20:49:31 +05:30
Rodrigo Locatti
b2b3fcdccd
Merge pull request #6723 from lioncash/shader
...
object_pool: Add missing return in Chunk move assignment operator
2021-07-26 06:01:21 -03:00
Rodrigo Locatti
4afc2de129
Merge pull request #6725 from lioncash/control-token
...
control_flow: Fix duplicate switch case in OpcodeToken
2021-07-26 06:00:23 -03:00
ReinUsesLisp
771dcb2a56
vk_compute_pass: Fix pipeline barrier for indexed quads
...
Use an index buffer barrier instead of a vertex input read barrier.
2021-07-26 05:51:09 -03:00
ReinUsesLisp
27ed6e7c2b
vk_buffer_cache: Add transform feedback usage to null buffer
...
Fixes bad API usages on Vulkan.
2021-07-26 05:49:37 -03:00
Lioncash
3e7813e49d
emit_glasm: Fix LINESS_ADJACENCY typo in InputPrimitive()
...
This should be LINES_ADJACENCY
2021-07-26 04:44:56 -04:00
Lioncash
c2915d9f2f
emit_spirv_instructions: Add missing header guard
2021-07-26 04:28:35 -04:00
Lioncash
06ca911621
shader_recompiler: Remove unnecessary [[nodiscard]] instances
...
[[nodiscard]] doesn't do anything on functions with a void return type
and causes superfluous warnings.
2021-07-26 04:23:59 -04:00
Lioncash
0b67df1f7c
control_flow: Fix duplicate switch case in OpcodeToken
...
This previously duplicated the case of the PBK case above it.
2021-07-26 04:16:34 -04:00
Lioncash
89ad9df0e9
object_pool: Add missing return in Chunk move assignment operator
...
Prevents undefined behavior from occurring.
2021-07-26 04:01:05 -04:00
ReinUsesLisp
66a0cedba3
shader: Fold integer FMA from Nvidia's pattern
...
Fold shaders doing "a * b + c" on integers from the pattern generated by
Nvidia's GL compiler.
On a somewhat complex compute shader it reduces the code size by 16
instructions from 2 matches on Turing GPUs.
On Intel as extracted from KHR_pipeline_executable_properties:
Before the optimization:
```
Instruction Count: 2057
Basic Block Count: 45
Scratch Memory Size: 14752
Spill Count: 232
Fill Count: 261
SEND Count: 610
Cycle Count: 11325
```
After the optimization:
```
Instruction Count: 2046
Basic Block Count: 44
Scratch Memory Size: 13728
Spill Count: 219
Fill Count: 268
SEND Count: 604
Cycle Count: 11367
```
2021-07-26 04:58:02 -03:00
ReinUsesLisp
09fb41dc63
shader: Use TryInstRecursive on XMAD multiply folding
...
Simplify a bit the logic.
2021-07-26 04:15:27 -03:00
ReinUsesLisp
f6f0383b49
shader: Add TryInstRecursive utility to values
2021-07-26 01:31:05 -03:00
bunnei
c09557acd8
Merge pull request #6697 from ameerj/fps-cap
...
config, nvflinger: Add FPS cap setting
2021-07-25 16:23:44 -07:00
lat9nq
09d6cc9943
Merge branch 'master' into fullscreen-enum
2021-07-25 15:31:33 -04:00
bunnei
7e272d3cd8
Merge pull request #6575 from FernandoS27/new_settings
...
Settings: Eliminate ASYNC & MULTICORE Toggles and add GPU Accuracy to status bar
2021-07-25 11:45:45 -07:00
Morph
b5c3cb8763
Merge pull request #6709 from ameerj/screenshot-path
...
main: Fix screenshot filepath construction
2021-07-25 14:41:38 -04:00
bunnei
98b26b6e12
Merge pull request #6585 from ameerj/hades
...
Shader Decompiler Rewrite
2021-07-25 11:39:04 -07:00
ameerj
9dd35b7b66
main: Fix screenshot filepath construction
...
The screenshot directory path returned does not have a trailing directory separator character. This caused screenshots to be saved in the parent directory of the configured screenshot directory.
This fixes that behavior
2021-07-25 14:24:08 -04:00
bunnei
c2aaf51370
Merge pull request #6699 from lat9nq/common-threads
...
common: Publically link to pthreads
2021-07-25 10:43:11 -07:00
bunnei
84b9c42642
Merge pull request #6690 from ReinUsesLisp/dma-clear-fixups
...
buffer_cache: Misc fixups related to buffer clears
2021-07-24 01:27:50 -04:00
ameerj
c80ae87b4e
renderer_base: Removed redundant settings
...
use_framelimiter was not being used internally by the renderers.
set_background_color was always set to true as there is no toggle for the renderer background color, instead users directly choose the color of their choice.
2021-07-23 22:10:01 -04:00
ameerj
9dfbc9bdce
general: Rename "Frame Limit" references to "Speed Limit"
...
This setting is best referred to as a speed limit, as it involves the limits of all timing based aspects of the emulator, not only framerate.
This allows us to differentiate it from the fps unlocker setting.
2021-07-23 22:10:01 -04:00
ameerj
2c6e274b39
config, nvflinger: Add FPS cap setting
...
Allows finer tuning of the FPS limit.
2021-07-23 22:04:36 -04:00
bunnei
2656020608
Merge pull request #6551 from bunnei/improve-kernel-obj
...
Improve management of kernel objects
2021-07-23 21:23:56 -04:00
lat9nq
d8b00fd863
configuration: Use combobox apply template where possible
...
We don't need to manually apply this setting now that a template can do
this for us.
2021-07-23 10:18:07 -04:00
lat9nq
b11c81cc13
general: Implement FullscreenMode enumeration
...
Prevents us from using an unclear 0 or 1 to describe the fullscreen
mode.
2021-07-23 10:14:37 -04:00
lat9nq
eb61824ea5
common: Publically link to pthreads
...
Common requires pthreads but does not refer to it when linking to other
modules. Fix this by linking to Threads where necessary.
2021-07-23 09:47:52 -04:00
ReinUsesLisp
7f13104c17
shader: Support out of bound local memory reads and immediate writes
...
Support ignoring immediate out of bound writes. Writing dynamically out
of bounds is not yet supported (e.g. R0+0x4).
Reading out of bounds yields zero. This is supported checking for the
size from the IR; if the input is immediate, the optimization passes
will drop it.
2021-07-22 21:51:41 -04:00
ReinUsesLisp
a55ff22900
vulkan/blit_image: Commit descriptor sets within worker thread
...
Fixes race condition caused. The descriptor pool is not thread safe, so
we have to commit descriptor sets within the same thread.
2021-07-22 21:51:40 -04:00
ReinUsesLisp
f6796cad9c
vulkan_device: Blacklist Volta and older from VK_KHR_push_descriptor
...
Causes crashes on Link's Awakening intro. It's hard to debug if it's our
fault due to bugs in validation layers.
2021-07-22 21:51:40 -04:00
ReinUsesLisp
a741513e65
qt: Remove "experimental" from asynchronous shader building UI
2021-07-22 21:51:40 -04:00
ReinUsesLisp
3c6d440015
Revert "renderers: Disable async shader compilation"
...
This reverts commit 4a152767286717fa69bfc94846a124a366f70065.
2021-07-22 21:51:40 -04:00
ReinUsesLisp
8381490a04
opengl: Fix asynchronous shaders
...
Wait for shader to build before configuring it, and wait for the shader
to build before sharing it with other contexts.
2021-07-22 21:51:40 -04:00
ReinUsesLisp
258f35515d
shader_environment: Receive cache version from outside
...
This allows us invalidating OpenGL and Vulkan separately in the future.
2021-07-22 21:51:40 -04:00
ReinUsesLisp
4a82450c81
cmake: Remove shader cache version
2021-07-22 21:51:40 -04:00
ameerj
56478bc9ac
shader: Fix disabled attribute default values
2021-07-22 21:51:40 -04:00
ameerj
c9528282d9
gl_device: Simplify GLASM setting logic
2021-07-22 21:51:40 -04:00
ameerj
56c30dd9e0
glsl: Simplify FCMP emission
2021-07-22 21:51:40 -04:00
ameerj
79d2684261
glsl: Update TessellationControl gl_in
...
Adheres to GL_ARB_separate_shader_objects requirements
2021-07-22 21:51:40 -04:00
ReinUsesLisp
e1ed218b41
renderer_opengl: Use ARB_separate_shader_objects
...
Ensures that states set for a particular stage are not attached to other
stages which may not need them.
2021-07-22 21:51:40 -04:00
ameerj
fc7bed21b5
shader: Implement ISETP.X
2021-07-22 21:51:40 -04:00
ReinUsesLisp
bf2956d77a
shader: Avoid usage of C++20 ranges to build in clang
2021-07-22 21:51:40 -04:00
ameerj
94af0a00f6
glsl: Clamp shared mem size to GL_MAX_COMPUTE_SHARED_MEMORY_SIZE
2021-07-22 21:51:40 -04:00
ReinUsesLisp
8c166c68d4
gl_shader_cache: Properly implement asynchronous shaders
2021-07-22 21:51:40 -04:00
lat9nq
49946cf780
shader_recompiler, video_core: Resolve clang errors
...
Silences the following warnings-turned-errors:
-Wsign-conversion
-Wunused-private-field
-Wbraced-scalar-init
-Wunused-variable
And some other errors
2021-07-22 21:51:40 -04:00
ameerj
4e4b8775b5
main: Update Shader Cache menu options
...
This change adds two new context menu items to remove either the OpenGL or the Vulkan shader caches individually, and the provides the option to remove all caches for the selected title.
This also changes the behavior of the open shader cache option. Now it creates the shader cache directory for the title if it does not yet exist.
2021-07-22 21:51:40 -04:00
ameerj
41493fbe89
renderers: Fix clang formatting
2021-07-22 21:51:40 -04:00
ReinUsesLisp
2235a51b5d
shader: Manually convert from array<u32> to bitset instead of using bit_cast
2021-07-22 21:51:40 -04:00
ameerj
8390286a89
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
be54aad1c4
maxwell_to_vk: Add R16_SNORM
2021-07-22 21:51:40 -04:00
lat9nq
18fb9bdfa8
configure_graphics: Mark SPIR-V as Experimental, Mesa only
2021-07-22 21:51:40 -04:00
ameerj
41c6cb70f9
glsl: Fix tracking of info.uses_shadow_lod
2021-07-22 21:51:40 -04:00
ameerj
11f04f1022
shader: Ignore global memory ops on devices lacking int64 support
2021-07-22 21:51:40 -04:00
lat9nq
55233c2861
vulkan_device: Add missing include algorithm
2021-07-22 21:51:40 -04:00
ameerj
7277d7fe96
vulkan_device: Blacklist ampere devices from float16 math
2021-07-22 21:51:40 -04:00
ameerj
57f222c56e
dual_vertex_pass: Clang format
2021-07-22 21:51:40 -04:00
ameerj
dbee32d302
gl_shader_cache: Fixes for async shaders
2021-07-22 21:51:40 -04:00
ReinUsesLisp
57171b23f9
vulkan_device: Enable VK_EXT_extended_dynamic_state on RADV 21.2 onward
2021-07-22 21:51:40 -04:00
ReinUsesLisp
8722668b3c
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
1b27a2b597
configure_graphics: Re-order vulkan device populating
2021-07-22 21:51:40 -04:00
lat9nq
2e5af95541
shader: GCC fmt 8.0.0 fixes
2021-07-22 21:51:40 -04:00
ameerj
b9069c7891
shader: Account for 33-bit IADD3 scenario
2021-07-22 21:51:40 -04:00
ReinUsesLisp
b21bf79bd2
shader: Only apply shift on register mode for IADD3
2021-07-22 21:51:39 -04:00
ReinUsesLisp
fba6bd92d4
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
5643a909bc
shader: Fix disabled and unwritten attributes and varyings
2021-07-22 21:51:39 -04:00
ameerj
65daec8b75
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
8289eb108f
opengl: Implement LOP.CC
...
Used by MH:Rise
2021-07-22 21:51:39 -04:00
ReinUsesLisp
f94f0be521
vk_graphics_pipeline: Implement smooth lines
2021-07-22 21:51:39 -04:00
ReinUsesLisp
57a8921e01
vk_graphics_pipeline: Implement line width
2021-07-22 21:51:39 -04:00
ReinUsesLisp
5b2b0634a1
spirv: Fix code emission when descriptor aliasing is unsupported
...
Fixes OpenGL.
2021-07-22 21:51:39 -04:00
lat9nq
fb9b1787f8
video_core: Enable GL SPIR-V shaders
2021-07-22 21:51:39 -04:00
lat9nq
1152d66ddd
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
00fa09dc45
glsl: Declare local memory in main
2021-07-22 21:51:39 -04:00
ameerj
f7352411f0
glsl: Add passthrough geometry shader support
2021-07-22 21:51:39 -04:00
ReinUsesLisp
8612b5fec5
shader: Use std::bit_cast instead of Common::BitCast for passthrough
2021-07-22 21:51:39 -04:00
ReinUsesLisp
8a3427a4c8
glasm: Add passthrough geometry shader support
2021-07-22 21:51:39 -04:00
ReinUsesLisp
7dafa96ab5
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
4f052a1f39
vk_graphics_pipeline: Implement conservative rendering
2021-07-22 21:51:39 -04:00
ReinUsesLisp
ecd6b4356b
shader: Only verify shader when graphics debugging is enabled
2021-07-22 21:51:39 -04:00
ReinUsesLisp
395bed3a0a
shader: Unify shader stage types
2021-07-22 21:51:39 -04:00
lat9nq
257d2aab74
lower_int64_to_int32: Add missing include
2021-07-22 21:51:39 -04:00
ReinUsesLisp
fb166b5ff4
shader: Emulate 64-bit integers when not supported
...
Useful for mobile and Intel Xe devices.
2021-07-22 21:51:39 -04:00
ReinUsesLisp
d8d5501459
shader: Add int64 to int32 lowering pass
2021-07-22 21:51:39 -04:00
ReinUsesLisp
04ef2160f9
shader: Teach global memory base tracker to follow vectors
2021-07-22 21:51:39 -04:00
ReinUsesLisp
97e80dda55
shader: Add constant propagation to integer vectors
2021-07-22 21:51:39 -04:00
ameerj
27ca8a0e13
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
4397053d5c
shader: Remove IAbs64
2021-07-22 21:51:39 -04:00
ameerj
bc6e399ae3
glsl: Fix IADD CC
2021-07-22 21:51:39 -04:00
ameerj
a7536825df
shader_recompiler: Fix IADD3 input partitioning
2021-07-22 21:51:39 -04:00
ReinUsesLisp
808ef97a08
shader: Move loop safety tests to code emission
2021-07-22 21:51:39 -04:00
ReinUsesLisp
3877918e96
gl_graphics_pipeline: Fix assembly shaders check for transform feedbacks
2021-07-22 21:51:39 -04:00
ameerj
cbce9ddd4a
glsl: Remove frag color initialization
2021-07-22 21:51:39 -04:00
ameerj
3a2dd1b483
glasm: Implement SetAttribute ViewportMask
2021-07-22 21:51:39 -04:00
ReinUsesLisp
9bd0531384
gl_graphics_pipeline: Inline hash and operator== key functions
2021-07-22 21:51:39 -04:00
ReinUsesLisp
f5db8c7440
gl_shader_cache: Check previous pipeline before checking hash map
...
Port optimization from Vulkan.
2021-07-22 21:51:39 -04:00
ReinUsesLisp
218dedca1f
gl_graphics_pipeline: Port optimizations from Vulkan pipelines
2021-07-22 21:51:39 -04:00
ameerj
1c648f176c
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
1d182fc0f5
shader: Calibrate loop safety threshold
2021-07-22 21:51:38 -04:00
ReinUsesLisp
df9b7e18f5
buffer_cache: Fix debugging leftover
2021-07-22 21:51:38 -04:00
Morph
cfbc85839d
glsl: Add missing ; in EmitSetSampleMask
...
Fixes shader compilation in Okami HD
2021-07-22 21:51:38 -04:00
ReinUsesLisp
838d7e4ca5
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
9e066dcb15
glsl: Fix output varying initialization when transform feedback is used
2021-07-22 21:51:38 -04:00
ameerj
fcff19e0fa
shaders: Allow shader notify when async shaders is disabled
2021-07-22 21:51:38 -04:00
ameerj
a0365217f5
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
0cd08b3e72
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
59fead3a47
spirv: Properly handle devices without int8 and int16
2021-07-22 21:51:38 -04:00
ReinUsesLisp
b5e78607ad
spirv: Handle small storage buffer loads on devices with no support
2021-07-22 21:51:38 -04:00
ReinUsesLisp
ca67077ca8
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
ccbd24fe00
glsl: Fix cbuf component indexing bug falback
2021-07-22 21:51:38 -04:00
ReinUsesLisp
1091995f8e
shader: Simplify MergeDualVertexPrograms
2021-07-22 21:51:38 -04:00
ReinUsesLisp
374eeda1a3
shader: Properly manage attributes not written from previous stages
2021-07-22 21:51:38 -04:00
ReinUsesLisp
892b8aa2ad
glsl: Only declare fragment outputs on fragment shaders
2021-07-22 21:51:38 -04:00
ReinUsesLisp
0ffea97e2e
shader: Split profile and runtime info headers
2021-07-22 21:51:38 -04:00
ReinUsesLisp
cbbca26d18
shader: Add support for native 16-bit floats
2021-07-22 21:51:38 -04:00
ReinUsesLisp
376aa94819
shader: Rename maxwell/program.h to translate_program.h
2021-07-22 21:51:38 -04:00
ReinUsesLisp
69f9b97e7e
vulkan_device: Blacklist VK_EXT_vertex_input_dynamic_state on Intel
2021-07-22 21:51:38 -04:00
ameerj
12ef06ba8b
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
d36f667bc0
glsl: Address rest of feedback
2021-07-22 21:51:38 -04:00
ameerj
c5dfa0b630
glsl: Move gl_Position/generic attribute initialization to EmitProlgue
2021-07-22 21:51:38 -04:00
ameerj
3b339fbbf6
glsl: Conditionally use fine/coarse derivatives based on device support
2021-07-22 21:51:38 -04:00
ameerj
6eea88d614
glsl: Cleanup/Address feedback
2021-07-22 21:51:38 -04:00
ameerj
74f683787e
gl_shader_cache: Implement async shaders
2021-07-22 21:51:38 -04:00
ameerj
ae4e452759
glsl: Add Shader_GLSL logging
2021-07-22 21:51:38 -04:00
ameerj
6c6a451d6a
glsl: Add LoopSafety instructions
2021-07-22 21:51:38 -04:00
ameerj
a0d0704aff
glsl: Conditionally add EXT_texture_shadow_lod
2021-07-22 21:51:38 -04:00
ameerj
5e7b2b9661
glsl: Add stubs for sparse queries and variable aoffi when not supported
2021-07-22 21:51:38 -04:00
ameerj
6aa1bf7b6f
glsl: Implement legacy varyings
2021-07-22 21:51:38 -04:00
ameerj
ff3de0fb6b
gl_shader_cache: Remove const from pipeline source arguments
2021-07-22 21:51:38 -04:00
ameerj
413eb6983f
gl_shader_cache: Move OGL shader compilation to the respective Pipeline constructor
2021-07-22 21:51:38 -04:00
ameerj
39c29664f9
glsl: Minor cleanup
2021-07-22 21:51:38 -04:00
ameerj
427a2596a1
glsl: Fix Cbuf getters for F32 type
2021-07-22 21:51:38 -04:00
ameerj
7c82f20b52
glsl: Add immediate index oob checking for Cbuf getters
2021-07-22 21:51:38 -04:00
ameerj
84c86e03cd
glsl: Refactor GetCbuf functions to reduce code duplication
2021-07-22 21:51:38 -04:00
ameerj
e81c73a874
glsl: Address more feedback. Implement indexed texture reads
2021-07-22 21:51:38 -04:00
ameerj
7d89a82a48
glsl: Remove Signed Integer variables
2021-07-22 21:51:38 -04:00
ameerj
4759db28d0
glsl: Address Rodrigo's feedback
2021-07-22 21:51:38 -04:00
ameerj
85399e119d
glsl: Reorganize backend code, remove unneeded [[maybe_unused]]
2021-07-22 21:51:37 -04:00
ameerj
e7c8f8911f
glsl: Implement SampleId and SetSampleMask
...
plus some minor refactoring of implementations
2021-07-22 21:51:37 -04:00
ameerj
d1a68f7997
glsl: Add gl_PerVertex in for GS
2021-07-22 21:51:37 -04:00
ameerj
a926695234
glsl: Use existing tracking for enabling EXT_shader_image_load_formatted
2021-07-22 21:51:37 -04:00
ameerj
14bd73db36
glsl: Enable early fragment tests
2021-07-22 21:51:37 -04:00
ameerj
6650c4799d
gl_rasterizer: Add texture fetch barrier for fragments
...
Fixes flicker seen in XC2
2021-07-22 21:51:37 -04:00
ameerj
3f31a547e0
glsl: Implement more attribute getters and setters
2021-07-22 21:51:37 -04:00
ameerj
8bb8bbf4ae
glsl: Implement fswzadd
...
and wip nv thread shuffle impl
2021-07-22 21:51:37 -04:00
ameerj
c542204113
glsl: Implement indexed attribute loads
2021-07-22 21:51:37 -04:00
ameerj
2a504b4765
glsl: Conditionally add GL_ARB_sparse_texture2
2021-07-22 21:51:37 -04:00
ameerj
970fc39d98
glsl: Rebase fixes
2021-07-22 21:51:37 -04:00
ameerj
fc0db612ab
glsl: Conditionally use GL_EXT_shader_image_load_formatted
...
Fix for SULD.D
2021-07-22 21:51:37 -04:00
ameerj
fb839061fb
glsl: Remove output generic indexing for geometry stage
2021-07-22 21:51:37 -04:00
ameerj
258106038e
glsl: Allow dynamic tracking of variable allocation
2021-07-22 21:51:37 -04:00
ameerj
465903468e
glsl: Implement barriers
2021-07-22 21:51:37 -04:00
ameerj
421847cf1e
glsl: Implement image atomics and set layer
...
along with some more cleanup/oversight fixes
2021-07-22 21:51:37 -04:00
ameerj
d41aef03c7
glsl: Fix image gather logic
2021-07-22 21:51:37 -04:00
ameerj
35e78d558d
glsl: Add cbuf access workaround for devices with component indexing bug
2021-07-22 21:51:37 -04:00
ameerj
747b8556a4
glsl: Use textureGrad fallback when EXT_texture_shadow_lod is unsupported
2021-07-22 21:51:37 -04:00
ameerj
d12f2b8ccf
emit_glsl_image: Use immediate offsets when possible
2021-07-22 21:51:37 -04:00
ameerj
0a0b0a73d8
glsl: Fix <32-bit SSBO writes
...
and more cleanup
2021-07-22 21:51:37 -04:00