Commit graph

60 commits

Author SHA1 Message Date
Andrea Pappacoda
6a2efdda2f 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 b2eb103829
2022-07-27 12:53:49 +02:00
Andrea Pappacoda
b2eb103829 chore: add missing SPDX tags
Follow-up to 2b87305d31
2022-04-28 18:24:11 +02:00
Morph
2b87305d31 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
Liam
1027ffa911 OpenGL: fix S8D24 to ABGR8 conversions 2022-04-06 19:44:33 -04:00
Liam
9277c9c297 Address review comments 2022-03-16 18:00:42 -04:00
Liam
aea505f83d Vulkan: convert S8D24 <-> ABGR8 2022-03-15 20:05:21 -04:00
ameerj
09dc136a39 astc_decoder: Combine FastReplicate functions to work around new NV driver bug
The new Nvidia drivers have a bug where the FastReplicateTo6 function produces a lookup into the REPLICATE_TO_8 table rather than the REPLICATE_TO_6 table.

This seems to be an optimization gone wrong. Combining the logic of the FastReplicate functions seems to address the bug.
2022-01-16 16:13:20 -05:00
Fernando Sahmkow
dc87895c22 Texture Cache: Correct conversion shaders. 2021-11-22 00:21:42 +01:00
Fernando Sahmkow
09a236dbbf TextureCache: Simplify blitting of D24S8 formats and fix bugs. 2021-11-22 00:00:01 +01:00
Fernando Sahmkow
5b92772fe6 HostShaders: Fix D24S8 convertion shaders. 2021-11-21 21:04:04 +01:00
Fernando Sahmkow
1bd224dda0 TextureCache: Assure full conversions on depth/stencil write shaders. 2021-11-20 06:17:01 +01:00
Fernando Sahmkow
df1eabfc53 TextureCache: Add R16G16 to D24S8 converter. 2021-11-20 00:02:12 +01:00
Fernando Sahmkow
4241b9e26c TextureCache: Add B10G11R11 to D24S8 converter. 2021-11-19 23:22:44 +01:00
Fernando Sahmkow
5e58fd30b6 TextureCache: Implement additional D24S8 convertions. 2021-11-19 06:27:44 +01:00
Fernando Sahmkow
a21d1447ab Vulkan: implement D24S8 <-> RGBA8 convertions. 2021-11-19 03:17:02 +01:00
FernandoS27
9ba0a1e022 HostShader: fix Gaussian filter. 2021-11-16 22:11:33 +01:00
ameerj
9db1c7f6c9 host_shaders: Misc copyright/style changes 2021-11-16 22:11:33 +01:00
Marshall Mohror
c2f855fb98 Presentation: Only use FP16 in scaling shaders on supported devices in Vulkan 2021-11-16 22:11:32 +01:00
Fernando Sahmkow
59680838a9 HostShader: Fix gaussian and add attribution. 2021-11-16 22:11:32 +01:00
FernandoS27
0a3e7c6f14 Vulkan: Implement FXAA 2021-11-16 22:11:32 +01:00
Marshall Mohror
be286aaa66 OpenGL: Implement FXAA 2021-11-16 22:11:32 +01:00
FernandoS27
f54d6dee54 VideoCore: Add gaussian filtering. 2021-11-16 22:11:32 +01:00
Marshall Mohror
887480c513 Update scaleforce to use FP16 2021-11-16 22:11:32 +01:00
Marshall Mohror
2173534da5 vulkan: Implement FidelityFX Super Resolution 2021-11-16 22:11:31 +01:00
ameerj
8539edc252 Renderers: Unify post processing filter shaders 2021-11-16 22:11:29 +01:00
Fernando Sahmkow
bca25d2a0f Renderer: Implement Bicubic and ScaleForce filters. 2021-11-16 22:11:29 +01:00
ameerj
933b5dff61 host_shaders: Remove opengl_copy_bgra.comp 2021-09-16 19:49:13 -04:00
ameerj
bfb2325618 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
2ff4eb5def 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
59ff9e51f2 astc_decoder: Make use of uvec4 for payload data 2021-07-31 22:28:04 -04:00
ameerj
8f9c7a4ba2 astc_decoder: Simplify Select2DPartition 2021-07-31 21:36:26 -04:00
ameerj
958ede1ed9 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
Ameer J
00232f761a Merge pull request #6459 from lat9nq/ubuntu-fixes
cmake: Improve Linux dependency checking for externals
2021-06-30 21:47:57 -04:00
ameerj
79621cca95 astc_decoder.comp: Remove unnecessary LUT SSBOs
We can move them to instead be compile time constants within the shader.
2021-06-19 10:56:13 -04:00
ameerj
fe7d3006f5 astc: Various robustness enhancements for the gpu decoder
These changes should help in reducing crashes/drivers panics that may
occur due to synchronization issues between the shader completion and
later access of the decoded texture.
2021-06-19 09:00:33 -04:00
ameerj
13b046aae1 astc_decoder: Fix LDR CEM1 endpoint calculation
Per the spec, L1 is clamped to the value 0xff if it is greater than 0xff. An oversight caused us to take the maximum of L1 and 0xff, rather than the minimum.

Huge thanks to wwylele for finding this.

Co-Authored-By: Weiyi Wang <wwylele@gmail.com>
2021-06-15 20:19:01 -04:00
lat9nq
c902147d82 cmake: Fix find_program usage for 3.15
yuzu requires CMake 3.15 yet find_program was using REQUIRED, which is
only available on 3.18 and later. Instead, we check for
"<VAR>-NOTFOUND".

In addition, check for additional requirements before building libusb or
FFmpeg with autotools. Otherwise, CMake configuration will pass yet
compilation will fail.
2021-06-13 01:15:54 -04:00
ameerj
e0977af861 astc_decoder: Refactor for style and more efficient memory use 2021-03-25 16:53:51 -04:00
Rodrigo Locatti
bca641cf8a astc_decoder: Reimplement Layers
Reimplements the approach to decoding layers in the compute shader. Fixes multilayer astc decoding when using Vulkan.
2021-03-13 12:16:03 -05:00
ameerj
1a1076f154 astc_decoder: Fix out of bounds memory access
resolves a crash with some anamolous textures found in Astral Chain.
2021-03-13 12:16:03 -05:00
ameerj
cac341dbc7 renderer_vulkan: Accelerate ASTC decoding
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2021-03-13 12:16:03 -05:00
ameerj
bdec905c4a host_shaders: Modify shader cmake integration to allow for larger shaders
using a raw string to encapsulate the entire shader code limits us to shaders of size less than 2KB. This change overcomes this limitation.
2021-03-13 12:16:03 -05:00
ameerj
113734e488 renderer_opengl: Accelerate ASTC texture decoding with a compute shader
ASTC texture decoding is currently handled by a CPU decoder for GPU's without native ASTC decoding support (most desktop GPUs). This is the cause for noticeable performance degradation in titles which use the format extensively.

This commit adds support to accelerate ASTC decoding using a compute shader on OpenGL for GPUs without native support.
2021-03-13 12:16:03 -05:00
ameerj
594860b216 renderer_opengl: Swizzle BGR textures on copy
OpenGL does not natively support BGR internal formats, which causes many BGR textures to render incorrectly, with Red and Blue channels swapped.

This commit aims to address this by swizzling the blue and red channels on texture copies when a BGR format is encountered.
2021-03-04 14:14:19 -05:00
ReinUsesLisp
2dfce2fca6 video_core: Reimplement the buffer cache
Reimplement the buffer cache using cached bindings and page level
granularity for modification tracking. This also drops the usage of
shared pointers and virtual functions from the cache.

- Bindings are cached, allowing to skip work when the game changes few
  bits between draws.
- OpenGL Assembly shaders no longer copy when a region has been modified
  from the GPU to emulate constant buffers, instead GL_EXT_memory_object
  is used to alias sub-buffers within the same allocation.
- OpenGL Assembly shaders stream constant buffer data using
  glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In
  theory this should save one hash table resolve inside the driver
  compared to glBufferSubData.
- A new OpenGL stream buffer is implemented based on fences for drivers
  that are not Nvidia's proprietary, due to their low performance on
  partial glBufferSubData calls synchronized with 3D rendering (that
  some games use a lot).
- Most optimizations are shared between APIs now, allowing Vulkan to
  cache more bindings than before, skipping unnecesarry work.

This commit adds the necessary infrastructure to use Vulkan object from
OpenGL. Overall, it improves performance and fixes some bugs present on
the old cache. There are still some edge cases hit by some games that
harm performance on some vendors, this are planned to be fixed in later
commits.
2021-02-13 02:17:22 -03:00
lat9nq
255834538c video_core: host_shaders: Don't pass --quiet to glslangValidator if unavailable
Prevents CMake from calling `glslangValidator` with `--quiet` when it is
not available, i.e. on older downstream versions from Ubuntu.
2021-02-01 23:39:54 -05:00
ReinUsesLisp
459be8c220 host_shaders/cmake: Pass --quiet to glslang to keep it quiet
Silences noisy builds on toolchains.
2021-01-24 04:55:23 -03:00
ReinUsesLisp
b8bc5d95af host_shaders: Add Vulkan assembler compute shaders 2020-12-30 02:03:50 -03:00
ReinUsesLisp
82723df129 host_shaders: Add helper to blit depth stencil fragment shader 2020-12-30 02:02:07 -03:00
ReinUsesLisp
627b4c3387 host_shaders: Add texture color blit fragment shader 2020-12-30 02:00:48 -03:00