Commit Graph

928 Commits (c112986869517a02b1571e02f339c4ed4e074b29)

Author SHA1 Message Date
Liam 77b0d01639 spirv_emit_context: declare GroupNonUniform capability for SubgroupLocalInvocationId 3 years ago
liamwhite 75e16547f8
Merge pull request #9300 from ameerj/pch
CMake: Use precompiled headers to improve compile times
3 years ago
liamwhite 22aff09b33
Merge pull request #9289 from liamwhite/fruit-company
general: fix compile for Apple Clang
3 years ago
Matías Locatti c043ba8467
Merge pull request #9303 from liamwhite/new-vulkan-init
Vulkan: update initialization
3 years ago
Liam 3ef006b5ab shader_recompiler: add gl_Layer translation GS for older hardware 3 years ago
ameerj 5b5612c1cc CMake: Consolidate common PCH headers 3 years ago
ameerj 37bc5118ea CMake: Use precompiled headers 3 years ago
ameerj cae6c13ffb value.h: remove recursive include 3 years ago
Liam 2956a33463 Vulkan: update initialization
Co-authored-by: bylaws <bylaws@users.noreply.github.com>
3 years ago
Liam 9737615948 general: fix compile for Apple Clang 3 years ago
Liam 0d033e6b45 spirv_emit_context: add missing flat decoration 3 years ago
liamwhite 9c67334031
Merge pull request #9253 from vonchenplus/attr_layer
shader: Implement miss attribute layer
3 years ago
FengChen 60e0d4a177 shader: Implement miss attribute layer 3 years ago
liamwhite c973029374
Merge pull request #9167 from vonchenplus/tess
video_core: Fix few issues in Tess stage
3 years ago
Morph c9bb888adf
ir/texture_pass: Use host_info instead of querying Settings::values (#9176) 3 years ago
FengChen a4472b5526 video_core: Fix few issues in Tess stage 3 years ago
Feng Chen 75596c07e0
video_core: Fix SNORM texture buffer emulating error (#9001) 3 years ago
bunnei 38e4382f53
Merge pull request #8858 from vonchenplus/mipmap
video_core: Generate mipmap texture by drawing
3 years ago
Feng Chen 165bce3c2d
Revert "shader_recompiler/dead_code_elimination: Add DeadBranchElimination pass" 3 years ago
bunnei cbb6c24215
Merge pull request #8873 from vonchenplus/fix_legacy_location_error
video_core: Fix legacy to generic location unpaired
3 years ago
Morph 3822e31323 CMakeLists: Disable C4100 and C4324
Disabling C4100 is similar to -Wno-unused-parameter
3 years ago
Morph cae108404a CMakeLists: Remove redundant warnings
These warnings are already included in /W3.
3 years ago
Morph f3c40f4a20 CMakeLists: Treat MSVC warnings as errors 3 years ago
Morph e6ab1f673b general: Enforce C4800 everywhere except in video_core 3 years ago
Morph 93297d14d8 CMakeLists: Remove all redundant warnings
These are already explicitly or implicitly set in src/CMakeLists.txt
3 years ago
FengChen 20139f8a55 Address feedback 3 years ago
Liam White afab6c143c General: Fix compilation for GCC 3 years ago
Fernando Sahmkow 3d02143476 Shader Decompiler: implement better tracking for Vulkan samplers. 3 years ago
Fernando Sahmkow ba34cf0a69 Shader Decompiler: Check for shift when deriving composite samplers. 3 years ago
Fernando Sahmkow a283eda320 Shader Decompiler: Fix dangerous behavior of invalid iterator insertion. 3 years ago
Liam ae7062d522 shader_recompiler: add extended LDC to GLASM backend 3 years ago
Andrea Pappacoda 4a493cb10f
chore: fix some typos
Fix some typos reported by Lintian
3 years ago
FengChen d4cb0eac87 video_core: Fix legacy to generic location unpaired 3 years ago
Feng Chen c864cb5772
Merge branch 'master' into mipmap 3 years ago
FengChen 9a95c7fa14 video_core: Generate mipmap texture by drawing 3 years ago
Morph 9533365486 style: General style changes to match with the rest of the codebase 3 years ago
FengChen b2a6dde438 video_code: support rectangle texture 3 years ago
Kelebek1 f580946b0d Add missed shader defines. Fixes Xenoblade Chronicles 3 booting with Vulkan. 3 years ago
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
3 years ago
Mai 103997ee56
Merge pull request #8383 from Morph1984/shadow-of-the-past
yuzu: Make variable shadowing a compile-time error
3 years ago
Liam d11547024c general: fix compilation on GCC 12 3 years ago
lat9nq 963ed37fd6 structured_control_flow: Remove constexpr Flow::Block
This seems to be unsupported in newer libstdc++ versions due to
Flow::Block's base class being a non-literal type. It's not clear to me
why this was permitted in earlier versions.
3 years ago
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.
3 years ago
Lioncash f981e90af3 general: Avoid ambiguous format_to compilation errors
Ensures that we're using the fmt version of format_to.

These are also the only three outliers. All of the other formatters we
have are properly qualified.
3 years ago
Liam 709d7fd92c GCC 12 fixes 4 years ago
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.
4 years ago
Fernando S 4d5900aaa1
Merge pull request #8133 from liamwhite/gl-spv-cbuf
shader_recompiler: support const buffer indirect addressing on OpenGL
4 years ago
Liam 1ab771c3ad shader_recompiler: Decrease indirect cbuf limit to match hardware 4 years ago
Andrea Pappacoda 0c214cb5b9
fix: typos 4 years ago
Liam 7d5a38ea6c shader_compiler: support const buffer indirect addressing in GLSL 4 years ago
Liam a45baa0e78 shader_recompiler: support const buffer indirect addressing on OpenGL SPIR-V 4 years ago
Mai M 7382e7a5c8
Merge pull request #8095 from bylaws/master
shader_recompiler: Include <bit> header when std::count{r,l}_zero is used
4 years ago
ameerj 67159e3be7 dead_code_elimination_pass: Remove unreachable Phi arguments 4 years ago
Billy Laws dd862dff66 Include <bit> header when std::count{r,l}_zero is used
Needed for compilation with older libc++ releases
4 years ago
ameerj f10d40a0a2 shader_recompiler/dead_code_elimination: Add DeadBranchElimination pass
This adds a pass to eliminate if(false) branches within the shader code
4 years ago
Ameer J 75046a3351
Merge pull request #8038 from liamwhite/exit-register-detection
shader_recompiler/EXIT: increment output register on failed enable test
4 years ago
ameerj 866b7c20a8 general: Fix clang/gcc build errors 4 years ago
ameerj 574a2c4b77 shader_recompiler: Reduce unused includes 4 years ago
Liam 536d7ed7b1 Address review comments 4 years ago
Liam d400b618a7 shader_recompiler/EXIT: skip render targets with no outputs 4 years ago
Liam 6fa17f3372 shader_recompiler/EXIT: increment output register on failed enable test 4 years ago
Liam 3009d0bd7d Address review comments 4 years ago
Liam e228a40db8 shader_recompiler: Use functions for indirect const buffer accesses 4 years ago
Liam 3ac522ba41 Address review comments 4 years ago
Liam 1415542f73 shader_recompiler: Implement LDC.IS address mode 4 years ago
Liam 52895fab67 shader: add support for const buffer indirect addressing 4 years ago
Fernando S cd07a43724
Merge pull request #8008 from ameerj/rescale-offsets-array
rescaling_pass: Fix rescaling Color2DArray ImageFetch offsets
4 years ago
Fernando Sahmkow 185fc03c3c Shader decompiler: do constant propgation before texture pass. 4 years ago
Fernando Sahmkow ec9f0f064e Shader decompiler: Fix storage tracking in deko3d. 4 years ago
ameerj f87f8d4610 rescaling_pass: Fix rescaling Color2DArray ImageFetch offsets
ImageFetch offsets for 2D array coordinates have a different composite size than the coordinates. The rescaling pass was not taking this into account.

Fixes broken shaders when scaling is enabled in Astral Chain, and likely other titles.
4 years ago
ameerj e8c50e709e emit_spirv, vk_compute_pass: Resolve VS2022 compiler errors 4 years ago
Markus Wick c78c8190d5 shader_recompiler/LOP3: Use brute force python results within switch/case.
Thanks to @asLody for optimizing this function. This raised the focus that this function should be optimized more.

The current table assumes that the host GPU is able to invert for free, so only AND,OR,XOR are accumulated in the performance metrik.

Performance results:

Instructions
0: 8
1: 30
2: 114
3: 80
4: 24

Latency
0: 8
1: 30
2: 194
3: 24
4 years ago
ameerj e394e1ecc4 emit_glsl_atomic: Implement 32x2 fallback atomic ops 4 years ago
ameerj 90a0506d56 lower_int64_to_int32: Add 64-bit atomic fallbacks 4 years ago
ameerj ad58d7eae7 shaders: Add U64->U32x2 Atomic fallback functions 4 years ago
ameerj 4790ba7839 spirv_atomic: Define U32x2 storage buffers for 64-bit storage atomics
Some drivers do not support 64-bit atomics, and fallback to atomically modifying U32x2 vectors. This change ensures that U32x2 storage vectors are defined in the spir-v shader when 64-bit atomics are used.

Fixes a hang on some devices, notably Intel GPUs, when booting Pokemon Legends Arceus
4 years ago
Morph 8dea7fa129
Merge pull request #7786 from ameerj/vmnmx-sel
video_minimum_maximum: Implement src operand selectors
4 years ago
ameerj beaf7654bb emit_spirv: Add Xfb execution mode when transform feedback is used
Fixes Transform Feedback on Vulkan AMD drivers.
4 years ago
ameerj 74e6e3623f video_minimum_maximum: Implement src operand selectors
Used by Pokemon Legends: Arceus
4 years ago
Lioncash b46ec4efea shader_recompiler: Remove unnecessary [[nodiscard]]
Since ConvertLegacyToGeneric has a void return value, there's nothing
that is actually returned by the function.
4 years ago
v1993 a943600019
shader_recompiler: fix potential OOB access
Found by static analysis with PVS-Studio. Original check wasn't actually checking for OOB and would segfault in case of it.
4 years ago
liushuyu 09f4f3f23b
logging/log.h: move enum class formatter to a separate file ...
... to common/logging/formatter.h
4 years ago
liushuyu 42f653ab6f
logging: adapt to changes in fmt 8.1 4 years ago
Narr the Reg 524674aafc glsl: Remove unreachable return 4 years ago
Fernando Sahmkow f58ee3f15f ShaderDecompiler: Add a debug option to dump the game's shaders. 4 years ago
Fernando S ae7da0b12d
Merge pull request #7629 from ameerj/nv-driver-fixes
shaders: Add fixes for NVIDIA drivers 495+
4 years ago
ameerj 8c907c620d glsl: Add boolean reference workaround 4 years ago
ameerj b84d429c2e glsl_context_get_set: Add alternative cbuf type for broken drivers
some drivers have a bug bitwise converting floating point cbuf values to uint variables. This adds a workaround for these drivers to make all cbufs uint and convert to floating point as needed.
4 years ago
ameerj 9f34be5a61 emit_glsl_integer: Use negation work around 4 years ago
ameerj 14ac0c2923 shader: Add integer attribute get optimization pass
Works around an nvidia driver bug, where casting the integer attributes to float and back to an integer always returned 0.
4 years ago
bunnei 279c7bcc1a
Merge pull request #7618 from goldenx86/patch-4
Increase boost requirement to 1.78.0
4 years ago
Matías Locatti c7235e67ef
Empty spaces 4 years ago
Matías Locatti 840d5520d2
Changes to avoid warnings in SSE4.2 optimized SPIR-V 4 years ago
ameerj 37addf7a94 emit_glasm_context_get_set: Fix GetAttribute return value type.
GetAttribute expects an F32 result type at the IR level, this fixes the return value of attributes which were not returning an F32
4 years ago
ameerj 640fc1418b emit_glsl_floating_point: Fix FPNeg on newer Nvidia drivers 4 years ago
vonchenplus 4908a07c20 Address format clang 4 years ago
vonchenplus 6ebc972c2b Remove spirv handle legacy related code 4 years ago
vonchenplus 94652e122d Remove glsl handle legacy related code 4 years ago
Feng Chen e49184e606
Merge branch 'yuzu-emu:master' into convert_legacy 4 years ago
Mai M edbde7a220
Merge pull request #7522 from ameerj/shader-recompiler-filenames
shader_recompiler/backend: Minor organization and refactoring to reduce compile time overhead
4 years ago
ameerj 7105204a7e emit_spirv: Reduce emit_spirv.h include overhead
emit_spirv.h is included in video_core, which was propagating further includes that video_core did not depend on.
4 years ago
ameerj 1e1f7b3234 glasm: Move implemented instructions from not_implemented.cpp 4 years ago
ameerj f32b2bcd20 shader_recompiler: Adjust emit_context includes 4 years ago
ameerj 5286a7bc4c shader_recompiler: Rename backend emit_context files 4 years ago
ameerj 41aec2773f general: Add missing copyright notices 4 years ago
Feng Chen 4dd85f86a8 Implement convert legacy to generic 4 years ago
Fernando Sahmkow 6f98690963 ShaderCache: Better fix for Shuffling gl_FragCoord 4 years ago
FernandoS27 de1c8c5c2c Texture Cahe/Shader decompiler: Resize PointSize on rescaling, refactor and make reaper more agressive on 4Gb GPUs. 4 years ago
ameerj 618de4e787 vulkan: Fix rescaling push constant usage 4 years ago
ameerj 581ea90062 rescaling_pass: Fix IR errors when unscalable texture types are encountered 4 years ago
ameerj 99eec162da rescaling_pass: Logic simplification and minor style cleanup 4 years ago
ameerj 276565973f rescaling_pass: Scale ImageFetch offset if it exists
Plus some code deduplication
4 years ago
ameerj dd66384451 rescaling_pass: Enable PatchImageQueryDimensions on fragment stages 4 years ago
ameerj b027fac794 gl_texture_cache/rescaling_pass: minor cleanup 4 years ago
ameerj edb5844240 rescaling_pass: Fix and simplify shuffle/fragcoord pass 4 years ago
Fernando Sahmkow b3a9c8f108 Shader: Don't rescale FragCoord if used by Shuffle 4 years ago
ameerj 68e038404c shader, video_core: Fix GCC build errors 4 years ago
ameerj 65781f88f8 emit_spirv: Fix RescalingLayout alignment 4 years ago
Fernando Sahmkow dfa8291526 RescalingPass: Agregate pixels on texelFetch while on Fragment Shader 4 years ago
Fernando Sahmkow 8f78444de3 shader: Fix TextureSize check on rescaling. 4 years ago
ameerj dc28284437 emit_spirv: Fix RescalingLayout alignment 4 years ago
ReinUsesLisp e66d5b88a6 shader: Properly scale image reads and add GL SPIR-V support
Thanks for everything!
4 years ago
ReinUsesLisp fc9bb3c3fe shader: Properly blacklist and scale image loads 4 years ago
ReinUsesLisp cfeb161c7e glsl/glasm: Pass and use scaling parameters in shaders 4 years ago
ameerj f086c82e1f gl_graphics_pipeline: Add downscale factor to shader uniforms 4 years ago
ReinUsesLisp 656adee630 spirv: Implement rescaling patching 4 years ago
ReinUsesLisp 01379c5e3c shader/rescaling_pass: Patch more instructions 4 years ago
ReinUsesLisp c15332c44f shader: Add IsTextureScaled opcode 4 years ago
ReinUsesLisp c892359d1b shader: Add copy constructor to instructions 4 years ago
ReinUsesLisp 95761cc6a7 shader: Add integer division opcodes 4 years ago
ReinUsesLisp e580299467 shader: Fix rescaling pass 4 years ago
ReinUsesLisp 1672e9ba09 shader: Fix resolution scaling pass 4 years ago
ReinUsesLisp fb924ea85c shader: Add resolution down factor opcode 4 years ago
Fernando Sahmkow 360e897ccd ShaderDecompiler: Add initial support for rescaling. 4 years ago
bunnei 30442d8a89
Merge pull request #7260 from vonchenplus/spirv_support_legacy_attribute_v2
shader: Spirv support legacy attribute v2
4 years ago
Feng Chen f2a4204245 Simply legacy attribute implement 4 years ago
bunnei 7ce29ea74e
Merge pull request #7262 from FernandoS27/Buffalo-buffalo-Buffalo-buffalo-buffalo
ShaderCache: Order Phi Arguments from farthest away to nearest.
4 years ago
Fernando Sahmkow 2d4bbd83e6 Shader Cahe: Fix Phi Nodes on GLASM. 4 years ago
Fernando Sahmkow 194579bc4f ShaderCache: Fix Phi Nodes Type on OGL. 4 years ago
Fernando Sahmkow c50ad56bf5 ShaderCache: Order Phi Arguments from farthest away to nearest. 4 years ago
vonchenplus 49f9a44235 Support gl_FogFragCoord attribute 4 years ago
Fernando S 7aa0d97eed
Merge pull request #7201 from ameerj/spirv-depth-sampling
emit_spirv_image: Fix depth image implicit lod sample in non-fragment stages
4 years ago
vonchenplus 36c21ff6cb Support gl_BackSecondaryColor attribute 4 years ago
vonchenplus 92bebecf46 Support gl_FrontSecondaryColor attribute 4 years ago
vonchenplus b04c7b6343 Support gl_BackColor attribute 4 years ago
Fernando Sahmkow e5291e2031 TexturePass: Fix clamping of images as this allowed negative indices. 4 years ago
ameerj 06894b0711 emit_spirv_image: Fix depth image implicit lod sample in compute
Ensures all drivers behave the same way in this case.
4 years ago
Ameer J 3791c7ca82
Merge pull request #7077 from FernandoS27/face-down
A series of fixes to queries and indexed samplers.
4 years ago
Fernando Sahmkow 3f4444b552 Shader Compiler: avoid overflowed indices on indixed samplers. 4 years ago
Morph e29f3b87f1 style: Remove extra space preceding the :: operator 4 years ago