Commit Graph

12390 Commits

Author SHA1 Message Date
ReinUsesLisp 8a031dc233 video_core/texture: Use a LUT to convert sRGB texture borders
This is a reversed look up table extracted from
https://gist.github.com/rygorous/2203834#file-gistfile1-cpp-L41-L62

that is used in
04d4e9e587/source/maxwell/tsc_generate.cpp (L38)

Games usually bind 0xFD expecting a float texture border of 1.0f.
The conversion previous to this commit was multiplying the uint8 sRGB
texture border color by 255. This is close to 1.0f but when that
difference matters, some graphical glitches appear.

This look up table is manually changed in the edges, clamping towards
0.0f and 1.0f.

While we are at it, move this logic to its own translation unit.
2020-04-07 20:38:14 -03:00
enler d7dc7964f1 file_sys: fix LayeredFS error when loading some games made with… (#3602)
* fix LayeredFS error when loading some games made with the Unity
2020-04-07 02:03:32 +02:00
Fernando Sahmkow 3a6baefff4 Merge pull request #3513 from ReinUsesLisp/native-astc
video_core: Use native ASTC when available
2020-04-06 09:21:11 -04:00
Fernando Sahmkow f6d6689b13 Merge pull request #3592 from ReinUsesLisp/ipa
shader_decompiler: Remove FragCoord.w hack and change IPA implementation
2020-04-05 19:29:40 -04:00
Fernando Sahmkow 5e8119cf04 Merge pull request #3589 from ReinUsesLisp/fix-clears
gl_rasterizer: Mark cleared textures as dirty
2020-04-05 19:29:26 -04:00
bunnei a8b66a6b61 Merge pull request #3579 from Kewlan/reorder-shoulder
configuration: Reorder shoulder buttons
2020-04-03 11:28:14 -04:00
Fernando Sahmkow a2fb02c1e2 Merge pull request #3563 from bunnei/fix-ldr-memstate
services: ldr: Fix MemoryState for read/write regions of NROs.
2020-04-03 10:14:56 -04:00
ReinUsesLisp ab3a1db282 shader/memory: Silence no return value warning
Silences a warning about control paths not all returning a value.
2020-04-02 03:34:27 -03:00
Rodrigo Locatti 5bd5340d17 Merge pull request #3552 from jroweboy/single-context
Refactor Context management (Fixes renderdoc on opengl issues)
2020-04-02 01:38:25 -03:00
ReinUsesLisp d66cae7bd5 shader_decompiler: Remove FragCoord.w hack and change IPA implementation
Credits go to gdkchan and Ryujinx. The pull request used for this can
be found here: https://github.com/Ryujinx/Ryujinx/pull/1082

yuzu was already using the header for interpolation, but it was missing
the FragCoord.w multiplication described in the linked pull request.
This commit finally removes the FragCoord.w == 1.0f hack from the shader
decompiler.

While we are at it, this commit renames some enumerations to match
Nvidia's documentation (linked below) and fixes component declaration
order in the shader program header (z and w were swapped).

https://github.com/NVIDIA/open-gpu-doc/blob/master/Shader-Program-Header/Shader-Program-Header.html
2020-04-01 21:48:55 -03:00
ReinUsesLisp c7472afb1d gl_texture_cache: Fix software ASTC fallback 2020-04-01 01:44:15 -03:00
ReinUsesLisp d97580b02a vk_device: Add missing ASTC queries 2020-04-01 01:14:04 -03:00
ReinUsesLisp abb4d942b0 video_core: Use native ASTC when available 2020-04-01 01:14:04 -03:00
ReinUsesLisp d740491a9b gl_device: Detect if ASTC is reported and expose it 2020-04-01 01:14:04 -03:00
Rodrigo Locatti 44c1492086 Merge pull request #3591 from ReinUsesLisp/vk-wrapper-part2
renderer_vulkan/wrapper: Add a Vulkan wrapper (part 2 of 2)
2020-03-31 22:14:26 -03:00
ReinUsesLisp 83b47aa0d9 renderer_vulkan/wrapper: Add vkEnumerateInstanceExtensionProperties wrapper 2020-03-31 21:32:08 -03:00
ReinUsesLisp c3332558df renderer_vulkan/wrapper: Add command buffer handle 2020-03-31 21:32:08 -03:00
ReinUsesLisp 010a965e64 renderer_vulkan/wrapper: Add physical device handle 2020-03-31 21:32:08 -03:00
ReinUsesLisp 319737fd89 renderer_vulkan/wrapper: Add device handle 2020-03-31 21:32:08 -03:00
ReinUsesLisp a04066352b renderer_vulkan/wrapper: Add swapchain handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp cea9fdab2e renderer_vulkan/wrapper: Add fence handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp 00c88c7d6d renderer_vulkan/wrapper: Add device memory handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp e84b3a9f71 renderer_vulkan/wrapper: Add pool handles 2020-03-31 21:32:07 -03:00
ReinUsesLisp 2ed17b8c92 renderer_vulkan/wrapper: Add buffer and image handles 2020-03-31 21:32:07 -03:00
ReinUsesLisp 01bf15ce40 renderer_vulkan/wrapper: Add queue handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp 467a8c3285 renderer_vulkan/wrapper: Add instance handle 2020-03-31 21:32:07 -03:00
Morph bda37c4bb4 capsrv: Split Capture services into individual files and stub GetAlbumContentsFileListForApplication (#3571)
* Organize capture services into individual files

* Stub GetAlbumContentsFileListForApplication

* Address feedback
2020-03-31 19:16:36 -04:00
Fernando Sahmkow 207bfbf720 Merge pull request #3561 from ReinUsesLisp/f2f-conversion
shader/conversion: Fix F2F rounding operations with different sizes
2020-03-31 14:45:02 -04:00
Fernando Sahmkow 8a4af4f128 Merge pull request #3577 from ReinUsesLisp/lea
shader/lea: Fix LEA implementation
2020-03-31 14:36:07 -04:00
ReinUsesLisp 89f68281ff gl_rasterizer: Mark cleared textures as dirty
Fixes a potential edge case where cleared textures read from the CPU
were not flushed.
2020-03-31 05:51:56 -03:00
Rodrigo Locatti 00dde9cf72 Merge pull request #3506 from namkazt/patch-9
shader_decode: Implement partial ATOM/ATOMS instr
2020-03-31 00:56:28 -03:00
Nguyen Dac Nam e0add44428 clang-format 2020-03-31 08:08:06 +07:00
Nguyen Dac Nam 455a771f6c shader_decode: fix by suggestion 2020-03-31 08:02:44 +07:00
Rodrigo Locatti 8fa9aa08f7 Merge pull request #3566 from ReinUsesLisp/vk-wrapper-part1
renderer_vulkan/wrapper: Add a Vulkan wrapper (part 1 of 2)
2020-03-30 21:57:36 -03:00
bunnei bf2221c7f7 Merge pull request #3560 from ReinUsesLisp/fix-stencil
gl_rasterizer: Synchronize stencil testing on clears
2020-03-30 17:03:07 -04:00
James Rowe e345e46a98 Frontend: Don't call DoneCurrent if the context isnt already current 2020-03-30 14:57:42 -06:00
namkazy 5961fe334c clang-format 2020-03-30 20:46:21 +07:00
namkazy 39880b6fcb gl_decompiler: min/max op not implement yet 2020-03-30 18:48:22 +07:00
namkazy fd7fb7c1b7 shader_decode: ATOM/ATOMS: add function to avoid code repetition 2020-03-30 18:47:50 +07:00
namkazy 3a65713029 shader_decode: merge GlobalAtomicOp to AtomicOp 2020-03-30 18:47:00 +07:00
Nguyen Dac Nam 3809c15721 shader_decode: implement ATOM operation for S32 and U32 2020-03-30 17:44:48 +07:00
namkazy 93a5b51a1f clang-format 2020-03-30 17:44:48 +07:00
Nguyen Dac Nam e57c348d6e shader_decode: implement ATOMS instr partial. 2020-03-30 17:44:46 +07:00
Nguyen Dac Nam 2095823163 vk_decompiler: add atomic op and handler function. 2020-03-30 17:44:45 +07:00
Nguyen Dac Nam f3880c13fa gl_decompiler: add atomic op 2020-03-30 17:44:45 +07:00
Nguyen Dac Nam cf457eafff shader: node - update correct comment 2020-03-30 17:44:44 +07:00
Nguyen Dac Nam 407064c658 shader_decode: add Atomic op for common usage 2020-03-30 17:44:44 +07:00
Kewlan f2a6ce9b8c Re-order the shoulder buttons both in the configuration menu, and in the code. 2020-03-29 14:37:23 +02:00
bunnei e842f70c4a Merge pull request #3568 from bunnei/time-calcspan
services: time: Implement CalculateSpanBetween.
2020-03-29 00:03:55 -04:00
bunnei 183ef674cf Merge pull request #3545 from FearlessTobi/audren-rev
audio_core: Accept Audren REV8
2020-03-28 22:08:19 -04:00