Commit graph

6368 commits

Author SHA1 Message Date
Matías Locatti
c043ba8467
Merge pull request #9303 from liamwhite/new-vulkan-init
Vulkan: update initialization
2022-12-02 18:32:54 -03:00
Liam
3ef006b5ab shader_recompiler: add gl_Layer translation GS for older hardware 2022-12-01 09:51:27 -05:00
Feng Chen
cb5400b34d video_core: Fine tuning the index drawing judgment logic 2022-12-01 19:14:58 +08:00
Liam
be05cb640c vulkan_common: quiet some validation errors 2022-11-30 19:18:05 -05:00
ameerj
5b5612c1cc CMake: Consolidate common PCH headers 2022-11-30 18:30:30 -05:00
Kelebek1
a78372110c Respect render mode override 2022-11-30 01:43:36 +00:00
ameerj
37bc5118ea CMake: Use precompiled headers 2022-11-29 18:50:49 -05:00
liamwhite
c845d8a9e8
Merge pull request #9352 from lioncash/vidcast
engines: Remove unnecessary casts
2022-11-29 18:45:16 -05:00
Lioncash
b6d93b2c77 host1x/syncpoint_manager: Eliminate unnecessary std::function construction
We can just pass the function object through, and if it's a valid
function, then it will automatically be converted.
2022-11-29 08:58:50 -05:00
Lioncash
c4af7b3f5c host1x/syncpoint_manager: Pass DeregisterAction() handle as const-ref
The handle is only compared against and not modified in any way, so we
can pass it by const reference.

This also allows us to mark the respective parameters for
DeregisterGuestAction() and DeregisterHostAction() as const references
as well.
2022-11-29 08:55:33 -05:00
Lioncash
96ffc174aa maxwell_3d: Mark shifted value as unsigned
Otherwise this is technically creating a signed int result that gets
converted. Just a consistency change.

While we're in the area, we can mark Samples() as const.
2022-11-29 08:39:33 -05:00
Lioncash
d7ec031419 engines: Remove unnecessary casts
In a few cases we have some casts that can be trivially removed.
2022-11-29 08:38:46 -05:00
Lioncash
a9efea8ae9 video_core/surface: Eliminate casts in GetFormatType()
We can just compare directly and get rid of verbose casting.
2022-11-28 20:25:44 -05:00
Liam
89dd7dc180 video_core: add null backend 2022-11-28 19:49:09 -05:00
Liam
2956a33463 Vulkan: update initialization
Co-authored-by: bylaws <bylaws@users.noreply.github.com>
2022-11-27 14:58:28 -05:00
bunnei
3ab8d9ac7c
Merge pull request #9276 from goldenx86/fsrSlider
FSR Sharpening Slider
2022-11-27 00:13:15 -08:00
liamwhite
3e53d8138c
Merge pull request #9288 from vonchenplus/deferred_draw
video_core: Fine tune maxwell drawing trigger mechanism
2022-11-26 09:35:45 -05:00
liamwhite
ddca512f3f
Merge pull request #9307 from Morph1984/not-used-correctly
maxwell_to_vk: Fix format usage bits and add R16_SINT
2022-11-26 09:08:55 -05:00
liamwhite
20b62dbd30
Merge pull request #9194 from FernandoS27/yfc-fermi2d
YFC - Fermi2D: Rework blit engine and add a software blitter.
2022-11-24 21:48:41 -05:00
Fernando Sahmkow
826e0785bf Fermi2D: Cleanup and address feedback. 2022-11-24 21:00:48 +01:00
Fernando Sahmkow
3b582d5fb2 GPU: Fix buffer cache issue, engine upload not inlining memory in multiline and pessismistic invalidation. 2022-11-24 20:57:16 +01:00
Fernando Sahmkow
7356ab1de6 GPU: Implement additional render target formats. 2022-11-24 20:35:44 +01:00
Fernando Sahmkow
daf2ef8f1c MaxwellDMA: Implement BlockLinear to BlockLinear copies. 2022-11-24 20:35:44 +01:00
Fernando Sahmkow
5fbd6954ef Fermi2D: Implement Bilinear software filtering and address feedback. 2022-11-24 20:35:44 +01:00
Fernando Sahmkow
957840be91 Fermi2D: Rework blit engine and add a software blitter. 2022-11-24 20:35:44 +01:00
Matías Locatti
f209e976f4 FSR Sharpening Slider part 1 - only a global slider 2022-11-24 04:22:13 -05:00
Morph
852de7a771 maxwell_to_vk: Add R16_SINT
This was somehow missed when the format was added to GL
2022-11-23 21:30:58 -05:00
Morph
ca154d466a maxwell_to_vk: Fix format usage bits
- VK_FORMAT_B8G8R8A8_UNORM supports the STORAGE_IMAGE_BIT
- VK_FORMAT_R4G4B4A4_UNORM_PACK16 does not support the COLOR_ATTACHMENT_BIT
2022-11-23 21:29:43 -05:00
Liam
9737615948 general: fix compile for Apple Clang 2022-11-22 22:22:28 -05:00
FengChen
1d57851fc7 video_core: Optimize maxwell drawing trigger mechanism 2022-11-22 17:53:26 +08:00
liamwhite
7f1c6def1f
Merge pull request #9216 from vonchenplus/reimp_inline_index_buffer
video_core: Reimplement inline index buffer binding
2022-11-20 12:08:08 -05:00
Morph
69c92b8156
Merge pull request #9249 from goldenx86/available-vram
Add available Vulkan VRAM to log files
2022-11-20 00:21:29 -05:00
bunnei
4975f60162
Merge pull request #9252 from liamwhite/radv-superiority
maxwell3d: HLE multi-layer clear macro
2022-11-19 01:46:48 -08:00
Morph
e5a446a0df
Merge pull request #9229 from Docteh/achy_breaky_heart
Add break for default cases
2022-11-17 19:20:18 -05:00
Liam
4c42655a2d maxwell3d: full HLE for multi-layer clears 2022-11-17 08:31:43 -05:00
Liam
ece0c1095d maxwell3d: HLE multi-layer clear macro 2022-11-16 22:28:58 -05:00
Matías Locatti
7c50a916c7
Update renderer_vulkan.cpp 2022-11-16 05:53:42 -03:00
Feng Chen
cb971ad654 video_core: Reimplement inline index buffer binding 2022-11-15 12:10:44 +08:00
Kyle Kienapfel
6fa3faec65 Add break for default cases
Visual Studio has an option to search all files in a solution, so I
did a search in there for "default:" looking for any missing break
statements.

I've left out default statements that return something, and that throw
something, even if via ThrowInvalidType. UNREACHABLE leads towards throw

R_THROW macro leads towards a return
2022-11-13 16:30:55 -08:00
bunnei
08091ff3e3
Merge pull request #9226 from Kelebek1/regs_regression
[video_core] Fix a couple regs regressions
2022-11-12 02:27:06 -08:00
liamwhite
e4d55e4ee4
Merge pull request #9204 from vonchenplus/dma_copy_1d_random_crash
video_core: Fix dma copy 1D random crash
2022-11-11 17:56:41 -05:00
liamwhite
c973029374
Merge pull request #9167 from vonchenplus/tess
video_core: Fix few issues in Tess stage
2022-11-11 08:03:40 -05:00
Kelebek1
33ea0fdfe8 Fix regs regression with OpenGL two-sided stencil, and re-add data invalidation reg 2022-11-11 04:04:36 +00:00
Morph
c9bb888adf
ir/texture_pass: Use host_info instead of querying Settings::values (#9176) 2022-11-11 03:32:53 +01:00
FengChen
d03afd6f4b video_core: Fix dma copy 1D random crash 2022-11-11 00:23:45 +08:00
Liam
cbaf642ffe Initial ARM64 support 2022-11-09 16:58:49 -05:00
FengChen
a4472b5526 video_core: Fix few issues in Tess stage 2022-11-07 15:42:42 +08:00
FengChen
aa97f39ba8 video_core:Fix vmm kinds size error 2022-11-06 22:31:22 +08:00
Fernando S
df38c03a09
Merge pull request #9163 from vonchenplus/draw_error
video_core: Fix drawing trigger mechanism regression
2022-11-06 01:13:59 +01:00
Morph
8baf036cdc
Merge pull request #9189 from vonchenplus/stupid
video_core: Fix scaling graphical regressions for multiple games
2022-11-05 11:57:52 -04:00
FengChen
7283010305 video_core: Fix scaling graphical regressions for multiple games 2022-11-05 17:21:02 +08:00
gidoly
9fc1bcc7b2
Update shader cache version. (#9175) 2022-11-04 03:16:01 -04:00
Feng Chen
75596c07e0
video_core: Fix SNORM texture buffer emulating error (#9001) 2022-11-04 02:39:42 -04:00
bunnei
38e4382f53
Merge pull request #8858 from vonchenplus/mipmap
video_core: Generate mipmap texture by drawing
2022-11-03 22:21:58 -07:00
Fernando S
3794851f7f
Merge pull request #9154 from liamwhite/new-fb
vk_blit_screen: recreate swapchain images on guest format change
2022-11-04 01:25:34 +01:00
Morph
74275d0968
Merge pull request #9097 from liamwhite/intel-spv-compiler
video_core: don't build ASTC decoder shader unless requested
2022-11-03 19:29:33 -04:00
liamwhite
de4afde065
Merge pull request #9143 from K0bin/scheduler-empty
vk_scheduler: Remove recorded_counts
2022-10-31 21:37:46 -04:00
FengChen
b42b894785 video_core: Fix drawing trigger mechanism regression 2022-10-31 21:57:38 +08:00
Fernando Sahmkow
67e0d38152 Vulkan: Fix regression caused by limiting render area to width/height of rendef targets. 2022-10-30 21:24:28 +01:00
Liam
808e22984f vk_blit_screen: recreate swapchain images on guest format change 2022-10-30 15:04:16 -04:00
bunnei
72bff8ba11
Merge pull request #9140 from vonchenplus/darw_index_bufferx_first_error
video_core: Fix drawing trigger mechanism regression
2022-10-29 16:10:53 -07:00
Robin Kertels
dce242858a
vk_scheduler: Remove recorded_counts 2022-10-28 03:42:43 +02:00
FengChen
f6e7cae62c video_core: Fix drawing trigger mechanism regression 2022-10-27 13:26:52 +08:00
FengChen
0ec1801bc1 video_core: Catch vulkan clear op not all channel need clear 2022-10-25 22:39:29 +08:00
liamwhite
fa913a702f
Merge pull request #9112 from vonchenplus/deferred_draw
video_core: Reimplementing the maxwell drawing trigger mechanism
2022-10-25 09:42:59 -04:00
bunnei
cbb6c24215
Merge pull request #8873 from vonchenplus/fix_legacy_location_error
video_core: Fix legacy to generic location unpaired
2022-10-24 10:50:24 -07:00
Morph
42c4ef7373 general: Resolve -Wunused-but-set-variable 2022-10-22 15:02:04 -04:00
Morph
c7e079a5d4 general: Resolve -Wunused-lambda-capture and C5233 2022-10-22 15:02:04 -04:00
Morph
bad3025951 decoders: Use 2's complement instead of unary -
Resolves C4146 on MSVC
2022-10-22 15:02:04 -04:00
Morph
93297d14d8 CMakeLists: Remove all redundant warnings
These are already explicitly or implicitly set in src/CMakeLists.txt
2022-10-22 15:02:04 -04:00
Fernando S
0860fffd78
Merge pull request #9095 from FernandoS27/meat-good-vegetable-bad
Maxwell3D/Puller: Fix regressions and syncing issues.
2022-10-22 13:06:03 +02:00
FengChen
2f90694797 video_core: Implement maxwell inline_index method 2022-10-22 16:58:23 +08:00
FengChen
1f54cd4ac7 video_coare: Reimplementing the maxwell drawing trigger mechanism 2022-10-21 17:09:22 +08:00
Morph
f16db300c6 format_lookup_table: Implement R32_B24G8 with D32_FLOAT_S8_UINT
This format is similar to Z32_FLOAT_X24S8_UINT, which is implemented with D32_FLOAT_S8_UINT.

Used in Persona 5 Royal
2022-10-21 01:54:57 -04:00
Liam
9524e28d20 video_core: don't build ASTC decoder shader unless requested 2022-10-19 18:52:42 -04:00
liamwhite
560bca57a2
Merge pull request #9071 from bunnei/mp-mm
Kernel Multiprocess (Part 1) - Persist memory & core timing
2022-10-19 16:27:43 -04:00
Fernando S
b8a70c9999
Merge pull request #9084 from vonchenplus/dma_copy
video_core: implement 1D copies based on VMM 'kind'
2022-10-19 06:56:00 +02:00
Fernando Sahmkow
3cb4498142 Maxwell3D/Puller: Fix regressions and syncing issues. 2022-10-19 06:21:51 +02:00
bunnei
d00245d444 video_core: renderer_vulkan: vk_query_cache: Avoid shutdown crash in QueryPool::Reserve. 2022-10-18 19:13:35 -07:00
FengChen
23b6569fc2 video_core: implement 1D copies based on VMM 'kind' 2022-10-17 15:35:12 +08:00
FengChen
99507d0188 video_core: Implement memory manager page kind 2022-10-17 15:33:29 +08:00
Morph
ddf5577799 video_core: Fix spelling of "synchronize" 2022-10-16 00:50:53 -04:00
Morph
d3114c620d renderer_(opengl/vulkan): Fix tessellation clockwise parameter
This should be assigned CW only on Triangles_CW rather than not Triangles_CCW, making CCW the default winding order rather than CW.
2022-10-13 15:52:56 -04:00
bunnei
dbacb31f61
Merge pull request #9027 from yuzu-emu/revert-8987-another-name-for-reinforcement-steel
Revert "vulkan: automatically use larger staging buffer sizes when possible"
2022-10-12 15:36:56 -07:00
bunnei
e158167139
Merge pull request #9024 from liamwhite/async-screenshot
video_core: don't block rendering on screenshots
2022-10-12 13:26:32 -07:00
bunnei
77177a7e33
Merge pull request #9049 from liamwhite/monkeyhawk
syncpoint_manager: ensure handle is removable before removing
2022-10-12 12:34:22 -07:00
Liam
b1cd6cec19 syncpoint_manager: ensure handle is removable before removing 2022-10-10 19:22:26 -04:00
Kelebek1
4496030ea9 Fix stencil func registers, make clip control equivalent to how it was before, but surely wrong. 2022-10-10 20:59:57 +01:00
Fernando S
55e6d0dae0
Merge pull request #8766 from Kelebek1/regs
[video_core] Update 3D registers
2022-10-09 07:04:03 +02:00
Mai
155213484b
Merge pull request #9016 from liamwhite/drunken-schedule
vk_scheduler: wait for command processing to complete
2022-10-07 20:27:16 -04:00
Liam
a5476541f2 video_core: don't block rendering on screenshots 2022-10-07 17:33:59 -04:00
Kelebek1
752659aef3 Update 3D regs 2022-10-07 14:13:45 +01:00
liamwhite
20cf09471a
Revert "vulkan: automatically use larger staging buffer sizes when possible" 2022-10-07 04:49:08 -04:00
Byte
df6dffa30b vulkan_blitter: Fix pool allocation double free. 2022-10-06 21:00:54 +02:00
Liam
aedd739631 maxwell_dma: remove warnings from implemented functionality 2022-10-06 21:00:54 +02:00
Fernando Sahmkow
ca3db0d7c9 General: address feedback 2022-10-06 21:00:54 +02:00
Liam
0d99b7962d state_tracker: workaround channel setup for homebrew 2022-10-06 21:00:54 +02:00
Morph
fedd983f96 general: Format licenses as per SPDX guidelines 2022-10-06 21:00:54 +02:00
Fernando Sahmkow
c2b7de66b3 Address Feedback from bylaws. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
fe24c65153 General: Fix clang format. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
cdce7f781b Vulkan Swapchain: Overall improvements. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
ada09778d9 Vulkan Texture Cache: Limit render area to the max width/height of the targets. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
8fd1d769fe ImageBase: Basic fixes. 2022-10-06 21:00:53 +02:00
Liam White
afab6c143c General: Fix compilation for GCC 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
fd7afda1e8 VideoCore: Implement formats needed for N64 emulation. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
770e19f51a Buffer Cache: Deduce vertex array limit from memory layout when limit is the highest possible. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
8bb604b3be VideoCore: Add option to dump the macros. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
a9ca39f859 NVDRV: Further improvements. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
b59ca4df0c Buffer Cache: Basic fixes. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
98317f2b77 Decoders: Improve overall speed. 2022-10-06 21:00:53 +02:00
bunnei
f5fd6b5c86 DMA & InlineToMemory Engines Rework. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
b2099fbdcc Maxwell3D: Add small_index_2 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
7cfa28a666 Memory Manager: ensure safety of GPU to CPU address. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
5a568b1655 MemoryManager: Fix errors popping out. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
ba34cf0a69 Shader Decompiler: Check for shift when deriving composite samplers. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
359f22b808 MemoryManager: Finish up the initial implementation. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
5caa150e9a OpenGL: Fix TickWork 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
bc8b3d225e VideoCore: Refactor fencing system. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
4d60410dd9 MemoryManager: initial multi paging system implementation. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
98b5e236d4 Vulkan: Fix Scissor on Clears 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
920429fde7 NVDRV: Further refactors and eliminate old code. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
2931101e6f NVDRV: Refactor Host1x 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
668e80a9f4 VideoCore: Refactor syncing. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
e44ac8b821 Texture Cache: Fix GC and GPU Modified on Joins. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
f350c3d74e Texture cache: Fix the remaining issues with memory mnagement and unmapping. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
9cf4c8831d Texture cache: Fix dangling references on multichannel. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
e462191482 Refactor VideoCore to use AS sepparate from Channel. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
bb74973bba General: Rebase fixes. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
6fc4012396 VideoCore: Extra Fixes. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
feb49c822d NVDRV: Remake ASGPU 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
0f4ae3cc52 MemoryManager: Temporary Fix for NVDEC. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow
cbaf3fb433 VideoCore: Update MemoryManager 2022-10-06 21:00:51 +02:00
Fernando Sahmkow
3f8e7a5585 VideoCore: Fix channels with disk pipeline/shader cache. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow
d7990c159e OpenGl: Implement Channels. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow
2c62563ab5 NVHOST_CTRl: Implement missing method and fix some stuffs. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow
139ea93512 VideoCore: implement channels on gpu caches. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow
39a5ce4e69 NvHost: Remake Ctrl Implementation. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow
1a49991676 Texture Cache: Add ASTC 10x5 Format. 2022-10-06 16:45:40 +02:00
bunnei
d55096ce85
Merge pull request #9013 from liamwhite/spinning-a-yarn
common: remove "yuzu:" prefix from thread names
2022-10-05 18:53:42 -07:00
Fernando S
71fe9fd0f2
Merge pull request #8987 from liamwhite/another-name-for-reinforcement-steel
vulkan: automatically use larger staging buffer sizes when possible
2022-10-05 08:54:22 +02:00
bunnei
fc0ace6048
Merge pull request #9005 from liamwhite/micro-fit
macro_jit_x64: cancel exit for taken branch
2022-10-04 20:08:02 -07:00
bunnei
92c0ad23eb
Merge pull request #9010 from liamwhite/buttwise
macro_jit_x64: fix miscompilation of bit extraction operations
2022-10-04 15:52:39 -07:00
Liam
7969d4d5de vk_scheduler: wait for command processing to complete 2022-10-03 20:03:25 -04:00
Liam
35d3e7db2a common: remove "yuzu:" prefix from thread names 2022-10-03 18:43:56 -04:00
liamwhite
188932768e
Merge pull request #6598 from FernandoS27/falklands-are-british
MacroHLE: Add MultidrawIndirect HLE Macro.
2022-10-01 20:58:03 -04:00
Fernando Sahmkow
a60b669ef4 MacroHLE: Add MultidrawIndirect HLE Macro. 2022-10-01 20:57:00 -04:00
Liam
1225627515 macro_jit_x64: fix miscompilation of bit extraction operations 2022-10-01 20:31:21 -04:00
bunnei
4242064560
Merge pull request #8874 from vonchenplus/align_index_buffer_size
Align index buffe size when vertex_buffer_unified_memory enable
2022-10-01 10:28:50 -07:00
Liam
b80f7faebe macro_jit_x64: cancel exit for taken branch 2022-10-01 01:32:24 -04:00
bunnei
d9e375acc3
Merge pull request #8910 from vonchenplus/astc_decode_error
video_core: Modify astc texture decode error fill value
2022-09-30 15:34:11 -07:00
Liam
087c6c2ef1 vulkan: automatically use larger staging buffer sizes when possible 2022-09-25 02:28:03 -04:00
FengChen
d4cb0eac87 video_core: Fix legacy to generic location unpaired 2022-09-20 12:03:31 +08:00
Feng Chen
c864cb5772
Merge branch 'master' into mipmap 2022-09-20 11:56:43 +08:00
FengChen
9a95c7fa14 video_core: Generate mipmap texture by drawing 2022-09-20 11:55:43 +08:00
Morph
809126c94a astc: Enable parallel CPU astc decoding
Given the issues with GPU accelerated ASTC decoding with NVIDIA's latest drivers, parallelize astc decoding on the CPU.
Uses half the available threads in the system for astc decoding.
2022-09-16 10:16:42 -04:00
FengChen
88007077e2 video_core: Modify astc texture decode error fill value 2022-09-15 17:04:44 +08:00
FengChen
92b1f8d5da Align index buffe size when vertex_buffer_unified_memory enable 2022-09-10 20:01:33 +08:00
lat9nq
0cef3b47f3
Merge pull request #8819 from liamwhite/cash-money
video_core: add option for pessimistic flushing
2022-09-08 22:46:58 -04:00
Morph
9533365486 style: General style changes to match with the rest of the codebase 2022-08-31 08:51:47 -04:00
Morph
7e379207ec (shader/pipeline)_cache: Raise shader/pipeline cache version
Since the following commit: a83a5d2e4c , many games will refuse to boot unless the shader/pipeline cache has been invalidated.
2022-08-31 08:39:37 -04:00
Fernando S
a83a5d2e4c
Merge pull request #8752 from vonchenplus/rectangle_texture
video_code: support rectangle texture
2022-08-31 10:40:45 +02:00
Liam
db3eb168cd video_core: add option for pessimistic flushing 2022-08-25 12:32:14 -04:00
FengChen
b2a6dde438 video_code: support rectangle texture 2022-08-25 12:45:58 +08:00
Narr the Reg
0c8aeb09d2 video_core: vulkan: rasterizer: Workaround on viewport swizzle on AMD 2022-08-23 18:38:34 -05:00
liamwhite
064f836d1c
Merge pull request #8784 from Docteh/nosnek
code: dodge PAGE_SIZE #define
2022-08-21 12:59:01 -04:00
vonchenplus
0a8c5c8622 video_core: support framebuffer crop rect top not zero 2022-08-20 21:41:40 +08:00
Kyle Kienapfel
14e9de6678 code: dodge PAGE_SIZE #define
Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number
This is great except in yuzu we're using PAGE_SIZE as a variable

Specific example
`static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;`

PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables.
Simply deleted the underscores, and then added YUZU_ prefix

Might be worth noting that there are multiple uses in different classes/namespaces
This list may not be exhaustive

Core::Memory   12 bits (4096)
QueryCacheBase 12 bits
ShaderCache    14 bits (16384)
TextureCache   20 bits (1048576, or 1MB)

Fixes #8779
2022-08-19 16:08:40 -07:00
Liam
c5c425914f video_core: implement R16G16B16X16 texture format 2022-08-19 17:17:38 -04:00
bunnei
d04bc95934
Merge pull request #8739 from merryhime/swizzle_table
video_core/textures/decoders: Avoid SWIZZLE_TABLE
2022-08-13 22:03:32 -07:00
Merry
f2fbf6d910 video_core/textures/decoders: Avoid SWIZZLE_TABLE 2022-08-09 00:27:26 +01:00
DJRobX
d8b160c883 Make vsync setting work for Vulkan 2022-08-07 20:57:47 -07:00
bunnei
9dc8d02acc
Merge pull request #8658 from liamwhite/plgp
video_core: differentiate between tiled and untiled framebuffer sizes for unaccelerated blits
2022-08-06 23:00:46 -07:00
bunnei
0f2fc6335e
Merge pull request #8700 from liamwhite/xc3-vk-crash
vk_texture_cache: return VK_NULL_HANDLE for views of null images
2022-08-06 13:11:34 -07:00
Liam
c40cec5e58 renderer_vulkan: add format fallbacks for R16G16B16_SFLOAT, R16G16B16_SSCALED, R8G8B8_SSCALED 2022-08-02 18:39:33 -04:00
Liam
1d364adf3e vk_texture_cache: return VK_NULL_HANDLE for views of null images 2022-08-02 13:31:42 -04:00
bunnei
5ae0e5ba67
Merge pull request #8678 from liamwhite/stop-waiting
video_core: stop waiting for shader compilation on user cancel
2022-07-31 14:47:43 -07:00
Liam
b9360681df renderer_opengl: delete shader source after linking 2022-07-30 13:21:26 -04:00
Liam
fc013d88cb video_core: stop waiting for shader compilation on user cancel 2022-07-29 23:33:40 -04:00
Liam
cbe5b8a13e video_core: differentiate between tiled and untiled framebuffer sizes for unaccelerated copies 2022-07-27 21:52:06 -04:00
liamwhite
ea861cc1c4
Merge pull request #8542 from Morph1984/gpu-use-old-q
gpu_thread: Use the previous MPSCQueue implementation
2022-07-27 15:55:28 -04:00
Andrea Pappacoda
cdb240f3d4
chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to 01cf05bc75
2022-07-27 12:53:49 +02:00
Liam
382b41b18f video_core: use correct byte size for framebuffer 2022-07-19 17:46:26 -04:00
bunnei
02282477e7 yuzu: settings: Remove framerate cap and merge unlocked framerate setting.
- These were all somewhat redundant.
2022-07-16 23:11:39 -07:00
Morph
fa09f7aa6c gpu_thread: Use the previous MPSCQueue implementation
The bounded MPSCQueue implementation causes crashes in Fire Emblem Three Houses, use the previous implementation for now.
2022-07-06 01:33:17 -04:00
Morph
aec129c1ab renderer_(gl/vk): Implement ASTC_10x6_UNORM
- Used by Monster Hunter Rise Update 10.0.2
2022-07-05 20:33:43 -04:00
lat9nq
d41ffb592c
Revert "vulkan_device: Block AMDVLK's VK_KHR_push_descriptor" 2022-06-29 16:35:06 -04:00
german77
c34a95fa25 video_core: Replace VKUpdateDescriptorQueue with UpdateDescriptorQueue 2022-06-26 20:21:45 -05:00
german77
b5d6194f6d video_core: Replace VKSwapchain with Swapchain 2022-06-26 20:21:45 -05:00
german77
a5e419535f video_core: Replace VKQueryCache with QueryCache 2022-06-26 20:21:45 -05:00
german77
9775fae4eb video_core: Replace VKScheduler with Scheduler 2022-06-26 20:21:45 -05:00
german77
a262dc02b5 video_core: Replace VKBlitScreen with BlitScreen 2022-06-26 20:21:45 -05:00
german77
fca5752690 video_core: Replace VKFenceManager with FenceManager 2022-06-26 20:21:45 -05:00
liamwhite
0ae4eae9a6
Merge pull request #8460 from Morph1984/bounded-q
bounded_threadsafe_queue: Use constexpr capacity and mask
2022-06-15 19:39:22 -04:00
Morph
25429998e3 bounded_threadsafe_queue: Use constexpr capacity and mask
While this is the primary change, we also:
- Remove the mpsc namespace and rename Queue to MPSCQueue
- Make Slot a private struct within MPSCQueue
- Remove the AlignedAllocator template argument, as we use std::allocator
- Replace instances of mask + 1 with capacity, and mask + 2 with capacity + 1
2022-06-15 16:59:13 -04:00
Morph
4572634a4e vk_compute_pass: Explicitly cast to VkAccessFlags
According to the standard, a narrowing conversion is an implicit conversion from an integer or unscoped enumeration type to an integer type that cannot represent all the values of the original type, except when the value is a literal or constant expression.
MSVC, unlike GCC or Clang, determines this to be a narrowing conversion despite the enumeration exclusively containing values that fit within the range of a 32 bit integer, emitting a warning since designated initializers prohibit narrowing conversions.
To solve this, explicitly cast to the type we are initializing.
2022-06-15 07:12:16 -04:00
Mai
103997ee56
Merge pull request #8383 from Morph1984/shadow-of-the-past
yuzu: Make variable shadowing a compile-time error
2022-06-14 21:08:58 -04:00
Morph
5568763a57 vk_compute_pass: Use VK_ACCESS_NONE
This enumeration was introduced in Vulkan 1.3, prefer using this instead of defaulting the enum.

Also resolves a narrowing conversion warning on MSVC.
2022-06-14 09:14:13 -04:00
Mai
a3b12e3809
Merge pull request #8439 from liamwhite/monkey-compiler
general: fix compilation on GCC 12
2022-06-14 08:34:16 -04:00
Morph
fcfe192e83 vk_compute_pass: Silence Wextra warning
Silences a warning about using enumerated and non-enumerated types in a conditional expression.
2022-06-14 05:29:57 -04:00
Liam
ebecdd3a74 general: fix compilation on MinGW GCC 12 2022-06-13 20:09:32 -04:00
Liam
084d7d6b01 common: Change semantics of UNREACHABLE to unconditionally crash 2022-06-13 20:09:00 -04:00
Morph
efc89c032b CMakeLists: Make variable shadowing a compile-time error
Now that the entire project is free of variable shadowing, we can enforce this as a compile time error to prevent any further introduction of this logic bug.
2022-06-13 18:19:23 -04:00
bunnei
5282efac1b
Merge pull request #8413 from behunin/bounded-queue
gpu_thread: Move to bounded queue
2022-06-11 00:07:18 -07:00
bunnei
ae83d5c6d3
Merge pull request #8393 from lat9nq/default-vulkan
general: Set renderer_backend's default to Vulkan
2022-06-11 00:06:59 -07:00
Levi Behunin
4dd6bcd206 gpu_thread: Move to bounded queue 2022-06-02 19:37:46 -06:00
Billy Laws
ea89cf8639 Maxwell3D: Fix 3D semaphore counter type 0 handling
Counter type 0 actually releases the semaphore payload rather than a constant zero as was previously thought. This is required by Skyrim.
2022-06-02 21:46:38 +01:00
Liam
989d4a7a41 core/debugger: Improved stepping mechanism and misc fixes 2022-06-01 02:15:15 -04:00
lat9nq
b43ae9d5ed vulkan_library: Add debug logging 2022-05-30 10:57:59 -04:00
bunnei
1c8b509441
Merge pull request #8332 from Morph1984/reduce_exec_size
general: Use smaller array types where applicable
2022-05-29 02:33:24 -07:00
bunnei
a9beb4746e
Merge pull request #8379 from lat9nq/amd-push-desc-workaround
vulkan_device: Block AMDVLK's VK_KHR_push_descriptor
2022-05-25 13:07:39 -07:00
bunnei
79352ee9d5
Merge pull request #8369 from lat9nq/amd-wmel-workaround
vulkan_device: Workaround extension bug
2022-05-25 13:07:28 -07:00
lat9nq
3a8c2ae328 vulkan_device: Workaround extension bug
A bug occurs in yuzu when VK_KHR_workgroup_memory_explicit_layout is
available but 16-bit integers are not supported in the host driver.

Disable usage of the extension when this case arises.
2022-05-25 01:22:15 -04:00
lat9nq
7f53cd1e96 vulkan_device: Block AMDVLK's VK_KHR_push_descriptor
Recent AMD Vulkan drivers (22.5.2 or 2.0.226 for specifically Vulkan)
have a broken VK_KHR_push_descriptor implementation that causes a crash
in yuzu. Disable it for the time being.
2022-05-25 01:17:48 -04:00
bunnei
4118aad491
Merge pull request #8311 from asLody/fix-stencil-faces
vk_rasterizer: fix stencil test when two faces are disabled
2022-05-24 18:37:31 -07:00
Alexandre Bouvier
020982508d video_core: Support new VkResult 2022-05-17 17:37:10 +02:00
Morph
370d3fa1e3 video_core/surface: Use u8 for PixelFormat block tables
Using this smaller type saves 33280 bytes in the compiled executable.
2022-05-13 00:51:11 -04:00
Morph
b3f8c7ce58 codecs/vp9: Use u8 for norm and map luts
Using this smaller type saves 1536 bytes in the compiled executable.
2022-05-13 00:51:05 -04:00
Morph
2fb6df3fe9
Merge pull request #8314 from liamwhite/gl-flip-2
OpenGL: interpret face flips according to GL NDC
2022-05-11 17:51:18 -04:00
Morph
dca63391b6
Merge pull request #8313 from liamwhite/dma-bpp
maxwell_dma: fix bytes_per_pixel
2022-05-11 17:51:02 -04:00
Liam
e7ba9fd7e1 maxwell_dma: use fallback if remapping is enabled 2022-05-10 19:26:48 -04:00
Liam
e158951695 video_core/macro: clear code on upload address assignment 2022-05-10 17:07:21 -04:00
Fernando Sahmkow
5562ae9cc5 VideoCore: Add option to dump the macros.
Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
2022-05-08 21:37:34 -04:00
Liam
7fe5004f90 video_core/macro_jit_x64: warn on invalid parameter access 2022-05-08 02:48:03 -04:00
Liam
b317f54f22 OpenGL: implement face flips according to NDC 2022-05-06 20:05:21 -04:00
Liam
4f1a2c2562 maxwell_dma: fix bytes per pixel 2022-05-06 18:18:00 -04:00
Lody
535bc61b4c vk_rasterizer: fix stencil test when two faces are disabled 2022-05-06 14:47:55 +08:00
Mai M
ca28b447ac
Merge pull request #8280 from Tachi107/spdx-fixup
chore: add missing SPDX tags
2022-04-28 23:28:42 -04:00
Mai M
5687bc6e10
Merge pull request #8282 from liamwhite/gcc-12
GCC 12 fixes
2022-04-28 23:28:07 -04:00
Liam
709d7fd92c GCC 12 fixes 2022-04-28 16:50:34 -04:00
Andrea Pappacoda
01cf05bc75
chore: add missing SPDX tags
Follow-up to 99ceb03a1c
2022-04-28 18:24:11 +02:00
Morph
213120a98b renderer_vulkan: Update screen info if the framebuffer size has changed 2022-04-26 02:48:40 -04:00
Morph
99ceb03a1c general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
german77
3e77466b86 bootmanager: Don't create another screenshot request if previous one is not done yet 2022-04-18 01:00:48 -05:00
Fernando Sahmkow
f783883bf8 video_core: implement formats for N64 emulation 2022-04-14 11:06:27 -04:00
Liam
d4571b123d buffer_cache: cap vertex buffer sizes 2022-04-14 10:46:48 -04:00
Liam
a24e7ba61b maxwell3d: add small_index_2 register 2022-04-14 09:57:06 -04:00
bunnei
bf3c6f8812
Merge pull request #8149 from liamwhite/front-face
OpenGL: flip front faces if Z scale is inverted
2022-04-09 01:39:39 -07:00
Merry
bbc585881a video_core: Replace lock_guard with scoped_lock 2022-04-07 19:44:07 +01:00
Fernando S
4265372099
Merge pull request #8161 from liamwhite/gl-s8d24
OpenGL: fix S8D24 to ABGR8 conversions
2022-04-07 16:59:41 +02:00
Fernando S
03d5794183
Merge pull request #8152 from liamwhite/gl-crop
OpenGL: fix cropping
2022-04-07 16:58:59 +02:00
Liam
52ebdd42c6 OpenGL: fix S8D24 to ABGR8 conversions 2022-04-06 19:44:33 -04:00
bunnei
02473ea7d5
Revert "texture_cache/util: Remove unneeded ReadBlockUnsafe" 2022-04-04 16:26:53 -07:00
ameerj
494c41dd5a texture_cache/util: Remove unneeded ReadBlockUnsafe
This call was reading GPU memory into the dst buffer, which is then overwritten by the SwizzleTexture call.
2022-04-04 15:57:54 -04:00
Liam
b7be6a4316 OpenGL: fix cropping 2022-04-04 12:51:09 -04:00
Liam
c59c035d74 Vulkan: crop to screen dimensions if crop not explicitly requested 2022-04-04 11:45:15 -04:00
Liam
a57531854e OpenGL: propagate face flip condition 2022-04-04 10:32:14 -04:00
Liam
cb913e5c02 OpenGL: flip front faces if Z scale is inverted 2022-04-04 10:19:40 -04:00
Andrea Pappacoda
0c214cb5b9
fix: typos 2022-04-02 16:34:07 +02:00
Fernando S
550844e5e8
Merge pull request #8128 from FernandoS27/gc-fixes
GPU Garbage Collection: Fix regressions.
2022-04-01 17:19:55 +02:00
Fernando S
b1fdc02465
Merge pull request #8066 from ameerj/gpu-decode-fixes
codec: Fix GPU decoder detection on Windows and a memory leak
2022-04-01 01:37:22 +02:00