summaryrefslogtreecommitdiffstats
path: root/src/video_core (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #9229 from Docteh/achy_breaky_heartMorph2022-11-189-0/+16
|\ | | | | Add break for default cases
| * Add break for default casesKyle Kienapfel2022-11-149-0/+16
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #9226 from Kelebek1/regs_regressionbunnei2022-11-126-5/+32
|\ \ | | | | | | [video_core] Fix a couple regs regressions
| * | Fix regs regression with OpenGL two-sided stencil, and re-add data invalidation regKelebek12022-11-116-5/+32
| |/
* | Merge pull request #9204 from vonchenplus/dma_copy_1d_random_crashliamwhite2022-11-111-17/+20
|\ \ | | | | | | video_core: Fix dma copy 1D random crash
| * | video_core: Fix dma copy 1D random crashFengChen2022-11-101-17/+20
| | |
* | | Merge pull request #9167 from vonchenplus/tessliamwhite2022-11-112-1/+3
|\ \ \ | |_|/ |/| | video_core: Fix few issues in Tess stage
| * | video_core: Fix few issues in Tess stageFengChen2022-11-072-1/+3
| | |
* | | ir/texture_pass: Use host_info instead of querying Settings::values (#9176)Morph2022-11-118-8/+10
| | |
* | | Initial ARM64 supportLiam2022-11-092-3/+15
| |/ |/|
* | video_core:Fix vmm kinds size errorFengChen2022-11-061-1/+1
|/
* Merge pull request #9163 from vonchenplus/draw_errorFernando S2022-11-061-32/+25
|\ | | | | video_core: Fix drawing trigger mechanism regression
| * video_core: Fix drawing trigger mechanism regressionFengChen2022-10-311-32/+25
| |
* | Merge pull request #9189 from vonchenplus/stupidMorph2022-11-051-4/+4
|\ \ | | | | | | video_core: Fix scaling graphical regressions for multiple games
| * | video_core: Fix scaling graphical regressions for multiple gamesFengChen2022-11-051-4/+4
| | |
* | | Update shader cache version. (#9175)gidoly2022-11-041-1/+1
|/ /
* | video_core: Fix SNORM texture buffer emulating error (#9001)Feng Chen2022-11-048-36/+109
| |
* | Merge pull request #8858 from vonchenplus/mipmapbunnei2022-11-049-7/+96
|\ \ | | | | | | video_core: Generate mipmap texture by drawing
| * \ Merge branch 'master' into mipmapFeng Chen2022-09-204-28/+42
| |\ \
| * | | video_core: Generate mipmap texture by drawingFengChen2022-09-209-7/+96
| | | |
* | | | Merge pull request #9154 from liamwhite/new-fbFernando S2022-11-042-1/+10
|\ \ \ \ | | | | | | | | | | vk_blit_screen: recreate swapchain images on guest format change
| * | | | vk_blit_screen: recreate swapchain images on guest format changeLiam2022-10-302-1/+10
| | | | |
* | | | | Merge pull request #9097 from liamwhite/intel-spv-compilerMorph2022-11-044-14/+19
|\ \ \ \ \ | | | | | | | | | | | | video_core: don't build ASTC decoder shader unless requested
| * | | | | video_core: don't build ASTC decoder shader unless requestedLiam2022-10-204-14/+19
| | | | | |
* | | | | | Merge pull request #9143 from K0bin/scheduler-emptyliamwhite2022-11-011-3/+1
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | vk_scheduler: Remove recorded_counts
| * | | | | vk_scheduler: Remove recorded_countsRobin Kertels2022-10-281-3/+1
| | | | | |
* | | | | | Vulkan: Fix regression caused by limiting render area to width/height of rendef targets.Fernando Sahmkow2022-10-301-6/+6
| |_|/ / / |/| | | |
* | | | | Merge pull request #9140 from vonchenplus/darw_index_bufferx_first_errorbunnei2022-10-302-61/+70
|\ \ \ \ \ | | | | | | | | | | | | video_core: Fix drawing trigger mechanism regression
| * | | | | video_core: Fix drawing trigger mechanism regressionFengChen2022-10-272-61/+70
| |/ / / /
* / / / / video_core: Catch vulkan clear op not all channel need clearFengChen2022-10-251-8/+13
|/ / / /
* | | | Merge pull request #9112 from vonchenplus/deferred_drawliamwhite2022-10-2510-232/+203
|\ \ \ \ | | | | | | | | | | video_core: Reimplementing the maxwell drawing trigger mechanism
| * | | | video_core: Implement maxwell inline_index methodFengChen2022-10-226-74/+130
| | | | |
| * | | | video_coare: Reimplementing the maxwell drawing trigger mechanismFengChen2022-10-2110-224/+139
| |/ / /
* | | | Merge pull request #8873 from vonchenplus/fix_legacy_location_errorbunnei2022-10-242-0/+2
|\ \ \ \ | | | | | | | | | | video_core: Fix legacy to generic location unpaired
| * | | | video_core: Fix legacy to generic location unpairedFengChen2022-09-202-0/+2
| | | | |
* | | | | general: Resolve -Wunused-but-set-variableMorph2022-10-221-2/+2
| | | | |
* | | | | general: Resolve -Wunused-lambda-capture and C5233Morph2022-10-222-6/+6
| | | | |
* | | | | decoders: Use 2's complement instead of unary -Morph2022-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | Resolves C4146 on MSVC
* | | | | CMakeLists: Remove all redundant warningsMorph2022-10-221-7/+1
| | | | | | | | | | | | | | | | | | | | These are already explicitly or implicitly set in src/CMakeLists.txt
* | | | | Merge pull request #9095 from FernandoS27/meat-good-vegetable-badFernando S2022-10-222-13/+9
|\ \ \ \ \ | | | | | | | | | | | | Maxwell3D/Puller: Fix regressions and syncing issues.
| * | | | | Maxwell3D/Puller: Fix regressions and syncing issues.Fernando Sahmkow2022-10-192-13/+9
| | | | | |
* | | | | | format_lookup_table: Implement R32_B24G8 with D32_FLOAT_S8_UINTMorph2022-10-211-0/+2
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | This format is similar to Z32_FLOAT_X24S8_UINT, which is implemented with D32_FLOAT_S8_UINT. Used in Persona 5 Royal
* | | | | Merge pull request #9071 from bunnei/mp-mmliamwhite2022-10-191-3/+4
|\ \ \ \ \ | | | | | | | | | | | | Kernel Multiprocess (Part 1) - Persist memory & core timing
| * | | | | video_core: renderer_vulkan: vk_query_cache: Avoid shutdown crash in QueryPool::Reserve.bunnei2022-10-191-3/+4
| | | | | |
* | | | | | Merge pull request #9084 from vonchenplus/dma_copyFernando S2022-10-196-69/+407
|\ \ \ \ \ \ | |/ / / / / |/| | | | | video_core: implement 1D copies based on VMM 'kind'
| * | | | | video_core: implement 1D copies based on VMM 'kind'FengChen2022-10-172-56/+73
| | | | | |
| * | | | | video_core: Implement memory manager page kindFengChen2022-10-174-13/+334
| | | | | |
* | | | | | video_core: Fix spelling of "synchronize"Morph2022-10-162-5/+5
|/ / / / /
* | | | | renderer_(opengl/vulkan): Fix tessellation clockwise parameterMorph2022-10-133-6/+6
| | | | | | | | | | | | | | | | | | | | This should be assigned CW only on Triangles_CW rather than not Triangles_CCW, making CCW the default winding order rather than CW.
* | | | | Merge pull request #9027 from yuzu-emu/revert-8987-another-name-for-reinforcement-steelbunnei2022-10-132-60/+27
|\ \ \ \ \ | | | | | | | | | | | | Revert "vulkan: automatically use larger staging buffer sizes when possible"
| * | | | | Revert "vulkan: automatically use larger staging buffer sizes when possible"liamwhite2022-10-072-60/+27
| | | | | |
* | | | | | Merge pull request #9024 from liamwhite/async-screenshotbunnei2022-10-121-1/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | video_core: don't block rendering on screenshots
| * | | | | | video_core: don't block rendering on screenshotsLiam2022-10-071-1/+7
| |/ / / / /
* | | | | | Merge pull request #9049 from liamwhite/monkeyhawkbunnei2022-10-121-1/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | syncpoint_manager: ensure handle is removable before removing
| * | | | | | syncpoint_manager: ensure handle is removable before removingLiam2022-10-111-1/+11
| | |/ / / / | |/| | | |
* / | | | | Fix stencil func registers, make clip control equivalent to how it was before, but surely wrong.Kelebek12022-10-108-44/+51
|/ / / / /
* | | | | Merge pull request #8766 from Kelebek1/regsFernando S2022-10-0929-2043/+3974
|\ \ \ \ \ | | | | | | | | | | | | [video_core] Update 3D registers
| * | | | | Update 3D regsKelebek12022-10-0729-2043/+3974
| |/ / / /
* | | | | Merge pull request #9016 from liamwhite/drunken-scheduleMai2022-10-081-2/+4
|\ \ \ \ \ | |/ / / / |/| | | | vk_scheduler: wait for command processing to complete
| * | | | vk_scheduler: wait for command processing to completeLiam2022-10-041-2/+4
| | | | |
* | | | | vulkan_blitter: Fix pool allocation double free.Byte2022-10-063-25/+10
| | | | |
* | | | | maxwell_dma: remove warnings from implemented functionalityLiam2022-10-061-2/+0
| | | | |
* | | | | General: address feedbackFernando Sahmkow2022-10-0611-33/+32
| | | | |
* | | | | state_tracker: workaround channel setup for homebrewLiam2022-10-065-4/+9
| | | | |
* | | | | general: Format licenses as per SPDX guidelinesMorph2022-10-0618-51/+38
| | | | |
* | | | | Address Feedback from bylaws.Fernando Sahmkow2022-10-061-1/+1
| | | | |
* | | | | General: Fix clang format.Fernando Sahmkow2022-10-066-16/+12
| | | | |
* | | | | Vulkan Swapchain: Overall improvements.Fernando Sahmkow2022-10-062-4/+13
| | | | |
* | | | | Vulkan Texture Cache: Limit render area to the max width/height of the targets.Fernando Sahmkow2022-10-064-9/+29
| | | | |
* | | | | ImageBase: Basic fixes.Fernando Sahmkow2022-10-061-8/+5
| | | | |
* | | | | General: Fix compilation for GCCLiam White2022-10-061-1/+2
| | | | |
* | | | | VideoCore: Implement formats needed for N64 emulation.Fernando Sahmkow2022-10-066-10/+10
| | | | |
* | | | | Buffer Cache: Deduce vertex array limit from memory layout when limit is the highest possible.Fernando Sahmkow2022-10-063-4/+12
| | | | |
* | | | | VideoCore: Add option to dump the macros.Fernando Sahmkow2022-10-061-0/+1
| | | | |
* | | | | NVDRV: Further improvements.Fernando Sahmkow2022-10-063-32/+22
| | | | |
* | | | | Buffer Cache: Basic fixes.Fernando Sahmkow2022-10-061-15/+22
| | | | |
* | | | | Decoders: Improve overall speed.Fernando Sahmkow2022-10-061-4/+11
| | | | |
* | | | | DMA & InlineToMemory Engines Rework.bunnei2022-10-0620-242/+315
| | | | |
* | | | | Maxwell3D: Add small_index_2Fernando Sahmkow2022-10-061-0/+2
| | | | |
* | | | | Memory Manager: ensure safety of GPU to CPU address.Fernando Sahmkow2022-10-061-0/+3
| | | | |
* | | | | MemoryManager: Fix errors popping out.Fernando Sahmkow2022-10-061-4/+8
| | | | |
* | | | | Shader Decompiler: Check for shift when deriving composite samplers.Fernando Sahmkow2022-10-064-8/+11
| | | | |
* | | | | MemoryManager: Finish up the initial implementation.Fernando Sahmkow2022-10-062-50/+138
| | | | |
* | | | | OpenGL: Fix TickWorkFernando Sahmkow2022-10-061-0/+4
| | | | |
* | | | | VideoCore: Refactor fencing system.Fernando Sahmkow2022-10-0617-152/+146
| | | | |
* | | | | MemoryManager: initial multi paging system implementation.Fernando Sahmkow2022-10-062-189/+304
| | | | |
* | | | | Vulkan: Fix Scissor on ClearsFernando Sahmkow2022-10-061-1/+8
| | | | |
* | | | | NVDRV: Further refactors and eliminate old code.Fernando Sahmkow2022-10-066-94/+4
| | | | |
* | | | | NVDRV: Refactor Host1xFernando Sahmkow2022-10-0624-108/+138
| | | | |
* | | | | VideoCore: Refactor syncing.Fernando Sahmkow2022-10-0637-240/+595
| | | | |
* | | | | Texture Cache: Fix GC and GPU Modified on Joins.Fernando Sahmkow2022-10-061-3/+5
| | | | |
* | | | | Texture cache: Fix the remaining issues with memory mnagement and unmapping.Fernando Sahmkow2022-10-0611-16/+60
| | | | |
* | | | | Texture cache: Fix dangling references on multichannel.Fernando Sahmkow2022-10-063-27/+36
| | | | |
* | | | | Refactor VideoCore to use AS sepparate from Channel.Fernando Sahmkow2022-10-069-152/+164
| | | | |
* | | | | General: Rebase fixes.Fernando Sahmkow2022-10-061-7/+6
| | | | |
* | | | | VideoCore: Extra Fixes.Fernando Sahmkow2022-10-062-2/+2
| | | | |
* | | | | NVDRV: Remake ASGPUFernando Sahmkow2022-10-062-4/+9
| | | | |
* | | | | MemoryManager: Temporary Fix for NVDEC.Fernando Sahmkow2022-10-061-1/+1
| | | | |
* | | | | VideoCore: Update MemoryManagerFernando Sahmkow2022-10-062-163/+82
| | | | |
* | | | | VideoCore: Fix channels with disk pipeline/shader cache.Fernando Sahmkow2022-10-0611-71/+87
| | | | |
* | | | | OpenGl: Implement Channels.Fernando Sahmkow2022-10-069-118/+186
| | | | |
* | | | | NVHOST_CTRl: Implement missing method and fix some stuffs.Fernando Sahmkow2022-10-061-0/+5
| | | | |
* | | | | VideoCore: implement channels on gpu caches.Fernando Sahmkow2022-10-0644-779/+1396
| | | | |
* | | | | NvHost: Remake Ctrl Implementation.Fernando Sahmkow2022-10-061-1/+1
| | | | |
* | | | | Texture Cache: Add ASTC 10x5 Format.Fernando Sahmkow2022-10-066-0/+23
| | | | |
* | | | | Merge pull request #9013 from liamwhite/spinning-a-yarnbunnei2022-10-065-6/+6
|\ \ \ \ \ | | | | | | | | | | | | common: remove "yuzu:" prefix from thread names
| * | | | | common: remove "yuzu:" prefix from thread namesLiam2022-10-045-6/+6
| |/ / / /
* | | | | Merge pull request #8987 from liamwhite/another-name-for-reinforcement-steelFernando S2022-10-052-27/+60
|\ \ \ \ \ | | | | | | | | | | | | vulkan: automatically use larger staging buffer sizes when possible
| * | | | | vulkan: automatically use larger staging buffer sizes when possibleLiam2022-09-252-27/+60
| | |_|_|/ | |/| | |
* | | | | Merge pull request #9005 from liamwhite/micro-fitbunnei2022-10-051-11/+5
|\ \ \ \ \ | | | | | | | | | | | | macro_jit_x64: cancel exit for taken branch
| * | | | | macro_jit_x64: cancel exit for taken branchLiam2022-10-011-11/+5
| | | | | |
* | | | | | Merge pull request #9010 from liamwhite/buttwisebunnei2022-10-051-37/+9
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | macro_jit_x64: fix miscompilation of bit extraction operations
| * | | | | macro_jit_x64: fix miscompilation of bit extraction operationsLiam2022-10-021-37/+9
| |/ / / /
* | | | | Merge pull request #6598 from FernandoS27/falklands-are-britishliamwhite2022-10-021-1/+62
|\ \ \ \ \ | | | | | | | | | | | | MacroHLE: Add MultidrawIndirect HLE Macro.
| * | | | | MacroHLE: Add MultidrawIndirect HLE Macro.Fernando Sahmkow2022-10-021-1/+62
| |/ / / /
* | | | | Merge pull request #8874 from vonchenplus/align_index_buffer_sizebunnei2022-10-011-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | Align index buffe size when vertex_buffer_unified_memory enable
| * | | | Align index buffe size when vertex_buffer_unified_memory enableFengChen2022-09-101-1/+1
| | |/ / | |/| |
* | | | Merge pull request #8910 from vonchenplus/astc_decode_errorbunnei2022-10-012-2/+2
|\ \ \ \ | |_|/ / |/| | | video_core: Modify astc texture decode error fill value
| * | | video_core: Modify astc texture decode error fill valueFengChen2022-09-152-2/+2
| |/ /
* / / astc: Enable parallel CPU astc decodingMorph2022-09-161-21/+35
|/ / | | | | | | | | 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.
* | Merge pull request #8819 from liamwhite/cash-moneylat9nq2022-09-091-1/+4
|\ \ | | | | | | video_core: add option for pessimistic flushing
| * | video_core: add option for pessimistic flushingLiam2022-08-251-1/+4
| | |
* | | style: General style changes to match with the rest of the codebaseMorph2022-08-311-5/+2
| | |
* | | (shader/pipeline)_cache: Raise shader/pipeline cache versionMorph2022-08-312-2/+2
| |/ |/| | | | | Since the following commit: https://github.com/yuzu-emu/yuzu/commit/a83a5d2e4c8932df864dd4cea2b04d87a12c8760 , many games will refuse to boot unless the shader/pipeline cache has been invalidated.
* | Merge pull request #8752 from vonchenplus/rectangle_textureFernando S2022-08-314-13/+18
|\ \ | | | | | | video_code: support rectangle texture
| * | video_code: support rectangle textureFengChen2022-08-254-13/+18
| | |
* | | video_core: vulkan: rasterizer: Workaround on viewport swizzle on AMDNarr the Reg2022-08-241-1/+8
| |/ |/|
* | Merge pull request #8784 from Docteh/nosnekliamwhite2022-08-219-60/+62
|\ \ | | | | | | code: dodge PAGE_SIZE #define
| * | code: dodge PAGE_SIZE #defineKyle Kienapfel2022-08-209-60/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | video_core: support framebuffer crop rect top not zerovonchenplus2022-08-202-12/+25
| | |
* | | video_core: implement R16G16B16X16 texture formatLiam2022-08-191-1/+1
|/ /
* | Merge pull request #8739 from merryhime/swizzle_tablebunnei2022-08-142-15/+48
|\ \ | | | | | | video_core/textures/decoders: Avoid SWIZZLE_TABLE
| * | video_core/textures/decoders: Avoid SWIZZLE_TABLEMerry2022-08-092-15/+48
| |/
* / Make vsync setting work for VulkanDJRobX2022-08-081-2/+3
|/
* Merge pull request #8658 from liamwhite/plgpbunnei2022-08-071-9/+7
|\ | | | | video_core: differentiate between tiled and untiled framebuffer sizes for unaccelerated blits
| * video_core: differentiate between tiled and untiled framebuffer sizes for unaccelerated copiesLiam2022-07-281-9/+7
| |
* | Merge pull request #8700 from liamwhite/xc3-vk-crashbunnei2022-08-061-0/+12
|\ \ | | | | | | vk_texture_cache: return VK_NULL_HANDLE for views of null images
| * | vk_texture_cache: return VK_NULL_HANDLE for views of null imagesLiam2022-08-021-0/+12
| | |
* | | renderer_vulkan: add format fallbacks for R16G16B16_SFLOAT, R16G16B16_SSCALED, R8G8B8_SSCALEDLiam2022-08-035-273/+337
|/ /
* | Merge pull request #8678 from liamwhite/stop-waitingbunnei2022-07-312-2/+2
|\ \ | | | | | | video_core: stop waiting for shader compilation on user cancel
| * | video_core: stop waiting for shader compilation on user cancelLiam2022-07-302-2/+2
| | |
* | | renderer_opengl: delete shader source after linkingLiam2022-07-301-0/+1
|/ /
* | Merge pull request #8542 from Morph1984/gpu-use-old-qliamwhite2022-07-272-4/+3
|\ \ | | | | | | gpu_thread: Use the previous MPSCQueue implementation
| * | gpu_thread: Use the previous MPSCQueue implementationMorph2022-07-062-4/+3
| | | | | | | | | | | | The bounded MPSCQueue implementation causes crashes in Fire Emblem Three Houses, use the previous implementation for now.
* | | chore: make yuzu REUSE compliantAndrea Pappacoda2022-07-2720-42/+46
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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 01cf05bc75b1e47beb08937439f3ed9339e7b254
* | video_core: use correct byte size for framebufferLiam2022-07-191-5/+8
| |
* | yuzu: settings: Remove framerate cap and merge unlocked framerate setting.bunnei2022-07-171-3/+3
| | | | | | | | - These were all somewhat redundant.
* | renderer_(gl/vk): Implement ASTC_10x6_UNORMMorph2022-07-067-1/+16
|/ | | | - Used by Monster Hunter Rise Update 10.0.2
* Revert "vulkan_device: Block AMDVLK's VK_KHR_push_descriptor"lat9nq2022-06-291-11/+0
|
* video_core: Replace VKUpdateDescriptorQueue with UpdateDescriptorQueuegerman772022-06-2714-33/+33
|
* video_core: Replace VKSwapchain with Swapchaingerman772022-06-275-25/+23
|
* video_core: Replace VKQueryCache with QueryCachegerman772022-06-276-28/+27
|
* video_core: Replace VKScheduler with Schedulergerman772022-06-2735-111/+110
|
* video_core: Replace VKBlitScreen with BlitScreengerman772022-06-273-51/+51
|
* video_core: Replace VKFenceManager with FenceManagergerman772022-06-273-15/+14
|
* Merge pull request #8460 from Morph1984/bounded-qliamwhite2022-06-161-1/+1
|\ | | | | bounded_threadsafe_queue: Use constexpr capacity and mask
| * bounded_threadsafe_queue: Use constexpr capacity and maskMorph2022-06-151-1/+1
| | | | | | | | | | | | | | | | 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
* | vk_compute_pass: Explicitly cast to VkAccessFlagsMorph2022-06-151-25/+26
| | | | | | | | | | | | 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.
* | Merge pull request #8383 from Morph1984/shadow-of-the-pastMai2022-06-151-5/+0
|\ \ | | | | | | yuzu: Make variable shadowing a compile-time error
| * | CMakeLists: Make variable shadowing a compile-time errorMorph2022-06-141-5/+0
| |/ | | | | | | 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.
* | vk_compute_pass: Use VK_ACCESS_NONEMorph2022-06-141-1/+1
| | | | | | | | | | | | This enumeration was introduced in Vulkan 1.3, prefer using this instead of defaulting the enum. Also resolves a narrowing conversion warning on MSVC.
* | Merge pull request #8439 from liamwhite/monkey-compilerMai2022-06-1430-104/+105
|\ \ | | | | | | general: fix compilation on GCC 12
| * | general: fix compilation on MinGW GCC 12Liam2022-06-141-1/+1
| | |
| * | common: Change semantics of UNREACHABLE to unconditionally crashLiam2022-06-1429-103/+104
| |/
* / vk_compute_pass: Silence Wextra warningMorph2022-06-141-1/+1
|/ | | | Silences a warning about using enumerated and non-enumerated types in a conditional expression.
* Merge pull request #8413 from behunin/bounded-queuebunnei2022-06-112-4/+5
|\ | | | | gpu_thread: Move to bounded queue
| * gpu_thread: Move to bounded queueLevi Behunin2022-06-032-4/+5
| |
* | Merge pull request #8393 from lat9nq/default-vulkanbunnei2022-06-111-0/+4
|\ \ | | | | | | general: Set renderer_backend's default to Vulkan
| * | vulkan_library: Add debug logginglat9nq2022-05-301-0/+4
| | |
* | | Maxwell3D: Fix 3D semaphore counter type 0 handlingBilly Laws2022-06-022-3/+3
| |/ |/| | | | | Counter type 0 actually releases the semaphore payload rather than a constant zero as was previously thought. This is required by Skyrim.
* | core/debugger: Improved stepping mechanism and misc fixesLiam2022-06-011-0/+4
|/
* Merge pull request #8332 from Morph1984/reduce_exec_sizebunnei2022-05-292-7/+7
|\ | | | | general: Use smaller array types where applicable
| * video_core/surface: Use u8 for PixelFormat block tablesMorph2022-05-131-3/+3
| | | | | | | | Using this smaller type saves 33280 bytes in the compiled executable.
| * codecs/vp9: Use u8 for norm and map lutsMorph2022-05-131-4/+4
| | | | | | | | Using this smaller type saves 1536 bytes in the compiled executable.
* | Merge pull request #8379 from lat9nq/amd-push-desc-workaroundbunnei2022-05-251-0/+11
|\ \ | | | | | | vulkan_device: Block AMDVLK's VK_KHR_push_descriptor
| * | vulkan_device: Block AMDVLK's VK_KHR_push_descriptorlat9nq2022-05-251-0/+11
| | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #8369 from lat9nq/amd-wmel-workaroundbunnei2022-05-251-1/+6
|\ \ \ | | | | | | | | vulkan_device: Workaround extension bug
| * | | vulkan_device: Workaround extension buglat9nq2022-05-251-1/+6
| |/ / | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #8311 from asLody/fix-stencil-facesbunnei2022-05-251-2/+2
|\ \ \ | |/ / |/| | vk_rasterizer: fix stencil test when two faces are disabled
| * | vk_rasterizer: fix stencil test when two faces are disabledLody2022-05-061-2/+2
| | |
* | | video_core: Support new VkResultAlexandre Bouvier2022-05-171-0/+2
| |/ |/|
* | Merge pull request #8314 from liamwhite/gl-flip-2Morph2022-05-111-4/+3
|\ \ | | | | | | OpenGL: interpret face flips according to GL NDC
| * | OpenGL: implement face flips according to NDCLiam2022-05-071-4/+3
| |/
* | Merge pull request #8313 from liamwhite/dma-bppMorph2022-05-111-3/+6
|\ \ | | | | | | maxwell_dma: fix bytes_per_pixel
| * | maxwell_dma: use fallback if remapping is enabledLiam2022-05-111-3/+6
| | |
| * | maxwell_dma: fix bytes per pixelLiam2022-05-071-3/+3
| |/
* | video_core/macro: clear code on upload address assignmentLiam2022-05-103-0/+10
| |
* | VideoCore: Add option to dump the macros.Fernando Sahmkow2022-05-091-0/+27
| | | | | | | | Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
* | video_core/macro_jit_x64: warn on invalid parameter accessLiam2022-05-081-3/+21
|/
* Merge pull request #8280 from Tachi107/spdx-fixupMai M2022-04-298-151/+17
|\ | | | | chore: add missing SPDX tags
| * chore: add missing SPDX tagsAndrea Pappacoda2022-04-288-151/+17
| | | | | | | | Follow-up to 99ceb03a1cfcf35968cab589ea188a8c406cda52
* | Merge pull request #8282 from liamwhite/gcc-12Mai M2022-04-291-2/+2
|\ \ | |/ |/| GCC 12 fixes
| * GCC 12 fixesLiam2022-04-281-2/+2
| |
* | renderer_vulkan: Update screen info if the framebuffer size has changedMorph2022-04-261-0/+5
|/
* general: Convert source file copyright comments over to SPDXMorph2022-04-23225-675/+450
| | | | | 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.
* bootmanager: Don't create another screenshot request if previous one is not done yetgerman772022-04-182-0/+7
|
* video_core: implement formats for N64 emulationFernando Sahmkow2022-04-148-7/+102
|
* buffer_cache: cap vertex buffer sizesLiam2022-04-141-1/+14
|
* maxwell3d: add small_index_2 registerLiam2022-04-142-1/+11
|
* Merge pull request #8149 from liamwhite/front-facebunnei2022-04-091-1/+8
|\ | | | | OpenGL: flip front faces if Z scale is inverted
| * OpenGL: propagate face flip conditionLiam2022-04-041-4/+10
| |
| * OpenGL: flip front faces if Z scale is invertedLiam2022-04-041-2/+3
| |
* | video_core: Replace lock_guard with scoped_lockMerry2022-04-0711-18/+18
| |
* | Merge pull request #8161 from liamwhite/gl-s8d24Fernando S2022-04-076-4/+58
|\ \ | | | | | | OpenGL: fix S8D24 to ABGR8 conversions
| * | OpenGL: fix S8D24 to ABGR8 conversionsLiam2022-04-076-4/+58
| | |
| * | Revert "texture_cache/util: Remove unneeded ReadBlockUnsafe"bunnei2022-04-051-0/+1
| | |
| * | texture_cache/util: Remove unneeded ReadBlockUnsafeameerj2022-04-041-1/+0
| |/ | | | | | | This call was reading GPU memory into the dst buffer, which is then overwritten by the SwizzleTexture call.
* | Merge pull request #8152 from liamwhite/gl-cropFernando S2022-04-073-1/+10
|\ \ | | | | | | OpenGL: fix cropping
| * | OpenGL: fix croppingLiam2022-04-043-1/+10
| |/
* / Vulkan: crop to screen dimensions if crop not explicitly requestedLiam2022-04-041-2/+3
|/
* fix: typosAndrea Pappacoda2022-04-021-1/+1
|
* Merge pull request #8128 from FernandoS27/gc-fixesFernando S2022-04-012-3/+1
|\ | | | | GPU Garbage Collection: Fix regressions.
| * GPU Garbage Collection: Fix regressions.Fernando Sahmkow2022-04-012-3/+1
| |
* | Merge pull request #8066 from ameerj/gpu-decode-fixesFernando S2022-04-011-14/+21
|\ \ | |/ |/| codec: Fix GPU decoder detection on Windows and a memory leak
| * codec: Plug GPU decoder memory leakameerj2022-03-221-0/+2
| |
| * codec: Disable HW_FRAMES method check on Windowsameerj2022-03-221-14/+19
| | | | | | | | | | | | It was reported that this method causes crashes on certain Linux decoding backends, hence the check to avoid it. This subsequently caused Windows GPU decoders to never be selected and always fall back to CPU decoding, disable the check on Windows for now.
* | Merge pull request #8076 from ameerj/nv-vk-msaa-scalebunnei2022-03-313-7/+8
|\ \ | | | | | | Vulkan: Use 3D helpers for MSAA scaling on NV drivers 510+
| * | Vulkan: Use 3D helpers for MSAA scaling on NV drivers 510+ameerj2022-03-243-7/+8
| | | | | | | | | | | | Nvidia Vulkan drivers 510+ crash when blitting MSAA images. Fall-back to 3D scale helpers for MSAA image scaling.
* | | gl_rasterizer: Avoid scenario locking already owned mutexameerj2022-03-291-3/+3
| | | | | | | | | | | | | | | | | | gpu.TickWork() may lock the texture_cache and buffer_cache mutexes, which are owned by the thread prior to invoking TickWork(). Defer invoking gpu.TickWork() until the scope ends, where the owned mutexes are released.
* | | Revert "Memory GPU <-> CPU: reduce infighting in the texture cache by adding CPU Cached memory."bunnei2022-03-265-64/+3
| | |
* | | Texture Cache: Add Cached CPU system.Fernando Sahmkow2022-03-255-3/+64
| | |
* | | Merge pull request #7720 from FernandoS27/yfc-gcbunnei2022-03-2520-43/+259
|\ \ \ | | | | | | | | First Nugget: Reworked Garbage Collection to be smarter [originally from Project YFC]
| * | | GC: Address Feedback.Fernando Sahmkow2022-03-257-29/+37
| | | |
| * | | Garbage Collection: Final tuning.Fernando Sahmkow2022-03-256-24/+36
| | | |
| * | | Buffer Cache: Tune to the levels of the new GC.Fernando Sahmkow2022-03-256-6/+78
| | | |
| * | | Garbage Collection: Redesign the algorithm to do a better use of memory.Fernando Sahmkow2022-03-2513-32/+156
| | | |
* | | | hle: nvflinger: Migrate android namespace -> Service::android.bunnei2022-03-256-18/+18
| | | |
* | | | hle: vi: Integrate new NVFlinger and HosBinderDriverServer service.bunnei2022-03-251-0/+1
| | | |
* | | | hle: nvflinger: Move BufferTransformFlags to its own header.bunnei2022-03-251-17/+2
| | | |
* | | | hle: nvflinger: Move PixelFormat to its own header.bunnei2022-03-256-23/+19
|/ / /
* / / buffer_cache: reset cached write bits after flushing invalidationsLiam2022-03-241-1/+2
|/ /
* | Merge pull request #8048 from ameerj/include-purgebunnei2022-03-2276-138/+14
|\ \ | |/ |/| general: Reduce unused includes across the project
| * general: Fix clang/gcc build errorsameerj2022-03-202-0/+2
| |
| * common: Reduce unused includesameerj2022-03-191-0/+1
| |
| * video_core: Reduce unused includesameerj2022-03-1975-139/+12
| |
* | Merge pull request #7812 from FernandoS27/made-straight-from-the-nutbunnei2022-03-201-6/+14
|\ \ | | | | | | BufferCache: Find direction of the stream buffer increase.
| * | BufferCache: Find direction of the stream buffer increase.Fernando Sahmkow2022-03-201-6/+14
| | |
* | | Merge pull request #8036 from ameerj/starbit-nvFernando S2022-03-201-5/+0
|\ \ \ | | | | | | | | vk_texture_cache: Do not reinterpret DepthStencil source images
| * | | vk_texture_cache: Do not reinterpret DepthStencil source imagesameerj2022-03-181-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | Fixes star pointer interactions in Super Mario Galaxy on some drivers, notably Nvidia. Co-Authored-By: Fernando S. <1731197+fernandos27@users.noreply.github.com>
* | | | Merge pull request #7840 from lioncash/bitorbunnei2022-03-201-15/+3
|\ \ \ \ | |_|_|/ |/| | | texture_cache: Amend unintended bitwise OR in SynchronizeAliases
| * | | texture_cache: Ensure has_blacklisted is always initializedLioncash2022-02-021-1/+1
| | | | | | | | | | | | | | | | Resolves a -Wmaybe_uninitialized warning
| * | | texture_cache: Remove dead code within SynchronizeAliasesLioncash2022-02-021-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since these were being copied by value, none of the changes applied in the loop would be reflected. However, from the looks of it, this would already be applied within CopyImage() anyways, so this can be removed.
| * | | texture_cache: Amend unintended bitwise OR in SynchronizeAliasesLioncash2022-02-021-1/+1
| | | |
* | | | general: Reduce core.h includesameerj2022-03-184-5/+0
| |/ / |/| |
* | | Merge pull request #8030 from liamwhite/s8d24-conversionFernando S2022-03-185-2/+41
|\ \ \ | | | | | | | | Vulkan: convert S8D24 <-> ABGR8
| * | | Address review commentsLiam2022-03-162-2/+2
| | | |
| * | | Vulkan: convert S8D24 <-> ABGR8Liam2022-03-165-2/+41
| | | |
* | | | Merge pull request #8023 from ameerj/kirby-pop-inFernando S2022-03-162-70/+12
|\ \ \ \ | |/ / / |/| | | maxwell_3d: Implement a safer CB data upload
| * | | maxwell_3d: Implement a safer CB data uploadameerj2022-03-152-70/+12
| | | | | | | | | | | | | | | | This makes constant buffer uploads safer and more accurate by updating the GPU memory as soon as the CB Data method is invoked. The previous implementation was deferring the updates until a different maxwell 3d method was detected, then writing all CB data at once.
* | | | Merge pull request #8000 from liamwhite/hagiFernando S2022-03-153-3/+77
|\ \ \ \ | |/ / / |/| | | Initial support for Wii Hagi emulator
| * | | Maxwell3D: Link to override constant definition in nouveaubyte[]2022-03-141-0/+2
| | | |
| * | | Maxwell3D: restore original topology when topology overrides are disabledbyte[]2022-03-141-0/+2
| | | |
| * | | Maxwell3D: Use override constants from nouveauLiam2022-03-142-2/+37
| | | | | | | | | | | | | | | | This fixes some incorrect rendering in Sunshine
| * | | Maxwell3D: Restrict topology override effect to after the register is setLiam2022-03-122-1/+5
| | | |
| * | | Maxwell3D: mark index buffers as dirty after updating countsLiam2022-03-111-0/+2
| | | |
| * | | TextureCacheRuntime: allow converting D24S8 to ABGR8Liam2022-03-111-1/+2
| | | | | | | | | | | | | | | | I can't see how this would be useful, but Galaxy uses it.
| * | | Maxwell3D: read small-index draw and primitive topology override registersLiam2022-03-112-2/+30
| | | | | | | | | | | | | | | | This allows Galaxy and Sunshine to render for the first time.
* | | | emit_spirv, vk_compute_pass: Resolve VS2022 compiler errorsameerj2022-03-121-1/+2
|/ / /
* | | Merge pull request #7986 from lat9nq/vk-callbackbunnei2022-03-081-0/+1
|\ \ \ | | | | | | | | core, video_core: Fix two crashes when failing to create the emulated GPU instance
| * | | video_core: Cancel Scoped's exit call on GPU failurelat9nq2022-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CreateRenderer fails, the GraphicsContext that was std::move'd into it is destroyed before the Scoped that was created to manage its currency. In that case, the GraphicsContext::Scoped will still call its destructor at the ending of the function. And because the context is destroyed, the Scoped will cause a crash as it attempts to call a destroyed object's DoneCurrent function. Since we know when the call would be invalid, call the Scoped's Cancel method. This prevents it from calling a method on a destroyed object.
* | | | Merge pull request #7930 from asLody/dma-semaphoreFernando S2022-03-072-1/+21
|\ \ \ \ | |/ / / |/| | | MaxwellDMA: Implement semaphore operations
| * | | MaxwellDMA: Implement semaphore operationsLody2022-03-072-1/+21
| | | |
* | | | gl_graphics_pipeline: Improve shader builder synchronization using fences (#7969)Ameer J2022-03-062-21/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gl_graphics_pipeline: Improve shader builder synchronization Make use of GLsync objects to ensure better synchronization between shader builder threads and the main context * gl_graphics_pipeline: Make built_fence access threadsafe * gl_graphics_pipeline: Use GLsync objects only when building in parallel * gl_graphics_pipeline: Replace GetSync calls with non-blocking waits The spec states that a ClientWait on a Fence object ensures the changes propagate to the calling context
* | | | gl_fence_manager: Minor optimization to signal queryingameerj2022-02-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Per the spec, bufSize is the number of integers that will be written, in this case, 1. Also, the length argument is optional if the information of the number of elements written is not needed.
* | | | Merge pull request #7953 from ameerj/radv-rdna2-crashbunnei2022-02-261-4/+21
|\ \ \ \ | | | | | | | | | | vulkan_device: Blacklist RADV on RDNA2 from VK_EXT_vertex_input_dynamic_state
| * | | | vulkan_device: Blacklist RADV on RDNA2 from VK_EXT_vertex_input_dynamic_stateAmeer J2022-02-261-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RDNA2 devices running under the RADV driver were crashing when VK_EXT_vertex_input_dynamic_state was enabled. Blacklisting these devices until a proper fix is established.
* | | | | Merge pull request #7948 from Morph1984/11-11-10-floatMai M2022-02-262-0/+4
|\ \ \ \ \ | | | | | | | | | | | | maxwell_to_(gl/vk): Add 11_11_10 float vertex format
| * | | | | maxwell_to_(gl/vk): Add 11_11_10 float vertex formatMorph2022-02-252-0/+4
| |/ / / / | | | | | | | | | | | | | | | - Used by パワプロクンポケットR
* / / / / vk_blit_screen: Add missing format bgra8Lody2022-02-241-0/+2
|/ / / /
* / / / vulkan_device: fix missing format in ANVvoidanix2022-02-213-2/+21
|/ / / | | | | | | | | | | | | Currently Mesa's ANV driver does not support VK_FORMAT_B5G6R5_UNORM_PACK16, implement an alternative for it.
* | | Merge pull request #7814 from FernandoS27/another-bug-in-my-schedulebunnei2022-02-032-4/+6
|\ \ \ | | | | | | | | Vulkan: Fix Scheduler Chunks when their FuncType is 0.
| * | | Vulkan: Fix Scheduler Chunks when their FuncType is 0.Fernando Sahmkow2022-01-312-4/+6
| | |/ | |/|
* | | general: Replace NonCopyable struct with equivalentsLioncash2022-02-022-15/+43
| |/ |/|
* | Merge pull request #7824 from lioncash/scacheMorph2022-02-012-4/+3
|\ \ | | | | | | video_core/shader_cache: Take std::span in RemoveShadersFromStorage()
| * | video_core/shader_cache: Remove unused algorithm includeLioncash2022-02-011-1/+0
| | |
| * | video_core/shader_cache: Take std::span in RemoveShadersFromStorage()Lioncash2022-02-012-3/+3
| |/ | | | | | | | | Same behavior, but without the need to move into the function to avoid an allocation.
* | Rasterizer: Refactor inlineToMemory.Fernando Sahmkow2022-02-019-15/+16
| |
* | GPU: Improve syncing.Fernando Sahmkow2022-01-291-3/+10
| |
* | Rasterizer: Implement Inline2Memory Acceleration.Fernando Sahmkow2022-01-2914-6/+122
| |
* | Inline2Memory: Flush before writting buffer.Fernando Sahmkow2022-01-292-2/+3
|/
* buffer_cache: Reduce stream buffer allocations when expanding from the leftameerj2022-01-271-0/+2
| | | | | The existing stream buffer optimization accounts for size increases at the end of the allocated buffer. This adds the same optimization, increasing the size from the beginning of the buffer as well to reduce buffer allocations when expanding the same buffer from the left.
* common/xbyak_api: Make BuildRegSet() constexprLioncash2022-01-261-1/+1
| | | | | This allows us to eliminate any static constructors that would have been emitted due to the function not being constexpr.
* Merge pull request #7780 from lioncash/macrobunnei2022-01-269-213/+204
|\ | | | | video_core/macro: Move impl classes into their cpp files
| * video_core/macro: Add missing <cstring> headerLioncash2022-01-251-2/+3
| | | | | | | | Necessary since memcpy is used.
| * video_core/macro_interpreter: Move impl class to the cpp fileLioncash2022-01-252-84/+86
| | | | | | | | | | Keeps the implementation hidden from the intended API and lessens the header dependencies on the interpreter's header.
| * video_core/macro_hle: Return unique_ptr directly from GetHLEProgram()Lioncash2022-01-253-7/+7
| | | | | | | | Same behavior, but less code and header dependencies.
| * video_core/macro: Remove unused parameter from Execute()Lioncash2022-01-253-4/+3
| | | | | | | | Simplifies the function interface.
| * video_core/macro_jit_x64: Remove unused impl class memberLioncash2022-01-251-1/+0
| | | | | | | | Reduces the size of the impl class a tiny bit.
| * video_core/macro_jit_x64: Decouple PersistentCallerSavedRegs() from implLioncash2022-01-251-5/+4
| | | | | | | | This doesn't depend on class state and can just be a regular function.
| * video_core/macro_jit_x64: Move impl class into cpp fileLioncash2022-01-252-87/+86
| | | | | | | | | | | | | | Keeps the implementation internalized and also reduces API-facing header dependencies. Notably, this fully internalizes all of the xbyak externals.
| * video_core/macro_hle: Move impl class into cpp fileLioncash2022-01-252-27/+19
| | | | | | | | | | | | | | | | Given it's intended to be an internal implementation class, we can move it into the cpp file to ensure that. This also lets us move some header dependencies into the cpp file as well.
* | Merge pull request #7779 from lioncash/gpu-ifaceMorph2022-01-251-16/+0
|\ \ | | | | | | gpu: Remove obsoleted CDmaPusher() accessors
| * | gpu: Tidy up forward declarationsLioncash2022-01-251-10/+0
| | | | | | | | | | | | | | | Over time a few forward declarations became unnecessary, so we can remove these to tidy up the header a little bit.
| * | gpu: Remove obsoleted CDMAPusher() accessorsLioncash2022-01-251-6/+0
| |/ | | | | | | | | These were obsoleted in 2c47f8aa1886522898b5b3a73185b5662be3e9f3 but were accidentally overlooked.
* / vk_fsr: Replace comma operator with semicolonLioncash2022-01-251-1/+1
|/ | | | | | Generally, we should be ending statements with a semicolon not a comma Resolves a clang diagnostic.
* video_core: constify AVCodec for ffmpeg >= 5.0Jan Beich2022-01-201-1/+1
| | | | | | src/video_core/command_classes/codecs/codec.cpp:177:16: error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers av_codec = avcodec_find_decoder(codec); ^~~~~~~~~~~~~~~~~~~~~~~~~~~
* vulkan_device: Fix sType for VkPhysicalDeviceShaderAtomicInt64FeaturesGeorg Lehmann2022-01-191-1/+1
|
* astc_decoder: Combine FastReplicate functions to work around new NV driver bugameerj2022-01-161-34/+46
| | | | | | 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.
* Merge pull request #7658 from ameerj/sparse-fixesFernando S2022-01-063-61/+44
|\ | | | | video_core/memory_manager: Fixes for sparse memory management
| * video_core/memory_manager: Fixes for sparse memory managementameerj2021-12-312-14/+12
| |
| * video_core/memory_manager: Deduplicate Read/WriteBlockameerj2021-12-312-47/+32
| |
* | Merge pull request #7673 from german77/no_returnMai M2022-01-051-1/+1
|\ \ | | | | | | glsl: Remove unreachable return
| * | video_core: Remove unnecesary maybe_unused flagNarr the Reg2022-01-051-1/+1
| | |
* | | Merge pull request #7636 from vonchenplus/buffer_queue_querybunnei2022-01-041-1/+0
|\ \ \ | | | | | | | | core:hle:service:nvflinger Implement few type in bufferqueue query method
| * | | Remove invalid header includeFeng Chen2021-12-281-1/+0
| | |/ | |/|
* | | Merge pull request #7670 from ameerj/vsync-blockFernando S2022-01-042-8/+27
|\ \ \ | |_|/ |/| | gpu: Add shut down method to synchronize threads before destruction
| * | gpu: Add shut down method to synchronize threads before destructionameerj2022-01-042-0/+13
| | |
| * | Revert "Merge pull request #7668 from ameerj/fence-stop-token"ameerj2022-01-042-8/+14
| | | | | | | | | | | | | | | This reverts commit e7733544779f2706d108682dd027d44e7fa5ff4b, reversing changes made to abbbdc2bc027ed7af236625ae8427a46df63f7e7.
* | | Merge pull request #7251 from FernandoS27/shader-dumpbunnei2022-01-044-1/+79
|\ \ \ | |/ / |/| | ShaderDecompiler: Add a debug option to dump the game's shaders.
| * | ShaderDecompiler: Add a debug option to dump the game's shaders.Fernando Sahmkow2022-01-044-1/+79
| | |
* | | gpu: Use std::stop_token in WaitFence for VSync threadameerj2022-01-032-14/+8
|/ / | | | | | | Fixes a hang that may occur when stopping emulation and the VSync thread is blocked on the syncpoint condition variable.
* | Merge pull request #7624 from ameerj/intel-msaa-scaleFernando S2022-01-034-20/+35
|\ \ | | | | | | vk_texture_cache: Use 3D scale helpers for MSAA texture scaling on Intel Windows drivers
| * | vk_texture_cache: Use 3D scale helpers for MSAA texture scaling on Intel Windows driversameerj2021-12-244-20/+35
| | | | | | | | | | | | Fixes a crash when scaling MSAA textures in titles such as Sonic Colors Ultimate.
* | | Merge pull request #7629 from ameerj/nv-driver-fixesFernando S2022-01-033-7/+15
|\ \ \ | | | | | | | | shaders: Add fixes for NVIDIA drivers 495+
| * | | glsl: Add boolean reference workaroundameerj2021-12-303-0/+7
| | | |
| * | | glsl_context_get_set: Add alternative cbuf type for broken driversameerj2021-12-303-7/+8
| | | | | | | | | | | | | | | | 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.
* | | | texture_cache/util: Fix s32 overflow when resolving overlapsameerj2022-01-011-5/+5
| |_|/ |/| |
* | | Merge pull request #7622 from ameerj/vk-rescale-invalid-ptrbunnei2021-12-285-8/+21
|\ \ \ | |/ / |/| | vk_texture_cache: Fix invalidated pointer access
| * | vk_texture_cache: Fix invalidated pointer accessameerj2021-12-245-8/+21
| |/ | | | | | | | | The vulkan ImageView held a reference to its source image for rescale status checking. This pointer is sometimes invalidated when the texture cache slot_images container is resized. To avoid an invalid pointer dereference, the ImageView now holds a reference to the container itself.
* / blit_image: Remove unused functionameerj2021-12-242-50/+0
|/
* Merge pull request #7375 from vonchenplus/convert_legacyFernando S2021-12-222-0/+5
|\ | | | | Convert all legacy attributes to generic attributes
| * Address format clangvonchenplus2021-12-182-2/+2
| |
| * Merge branch 'yuzu-emu:master' into convert_legacyFeng Chen2021-12-1828-130/+698
| |\
| * | Implement convert legacy to genericFeng Chen2021-11-192-0/+5
| | |
* | | Merge pull request #7599 from FernandoS27/primrestart-vulkanbunnei2021-12-223-5/+50
|\ \ \ | | | | | | | | Vulkan: Fix Primitive Restart and implement Logical Operations
| * | | Vulkan: Fix the checks for primitive restart extension.Fernando Sahmkow2021-12-183-21/+28
| | | |
| * | | Vulkan: implement Logical Operations.Fernando Sahmkow2021-12-182-3/+3
| | | |
| * | | Vulkan: Implement VK_EXT_primitive_topology_list_restartFernando Sahmkow2021-12-183-2/+40
| | |/ | |/|
* | | video_core/codecs: re-enable VAAPI/VDPAU on BSDs after 72aa418b0b41Jan Beich2021-12-181-1/+1
| | |
* | | Merge pull request #7587 from liushuyu/fix-linux-decodingbunnei2021-12-181-0/+6
|\ \ \ | | | | | | | | [Patch v2] externals/ffmpeg: refactor ffmpeg searching and handling in cmake
| * | | video_core/codecs: (re-spin) refactor ffmpeg searching and handlingliushuyu2021-12-161-0/+6
| | | |
* | | | Merge pull request #7399 from ameerj/art-refactorFernando S2021-12-188-152/+147
|\ \ \ \ | |_|/ / |/| | | video_core: Refactoring post A.R.T. merge
| * | | vk_texture_cache: Add ABGR src format check for D24S8 conversionsameerj2021-12-051-1/+5
| | | |
| * | | renderer_opengl: Minor refactoring of filter selectionameerj2021-12-051-30/+20
| | | |
| * | | texture_cache: Fix image convert dimensions assertionameerj2021-12-051-1/+12
| | | |
| * | | blit_image: Refactor upscale factors usageameerj2021-12-056-62/+53
| | | | | | | | | | | | | | | | The image view itself can be queried to see if it is being rescaled or not, removing the need to pass the upscale/down shift factors from the texture cache.
| * | | vk_texture_cache: Add a function to ImageView to check if src image is rescaledameerj2021-12-052-4/+22
| | | |
| * | | blit_image: Refactor ConvertPipeline functionsameerj2021-12-052-29/+15
| | | |
| * | | blit_image: Refactor ConvertPipelineEx functionsameerj2021-12-052-33/+18
| | | | | | | | | | | | | | | | reduces much of the duplication between the color/depth variants
| * | | vk_blit_screen: Minor refactor of filter pipeline selectionameerj2021-12-051-21/+16
| | | |
| * | | Revert "Merge pull request #7395 from Morph1984/resolve-comments"ameerj2021-12-053-16/+31
| | | | | | | | | | | | | | | | | | | | This reverts commit d20f91da11fe7c5d5f1bd4f63cc3b4d221be67a4, reversing changes made to 5082712b4e44ebfe48bd587ea2fa38767b7339cb.
* | | | Merge pull request #7551 from vonchenplus/fix_blit_image_view_mismatchingbunnei2021-12-161-1/+6
|\ \ \ \ | |_|/ / |/| | | Fix blit image/view not compatible
| * | | Fix blit image/view not compatibleFeng Chen2021-12-101-1/+6
| | | |
* | | | Revert "video_core/codecs: refactor ffmpeg searching and handling in cmake"bunnei2021-12-151-6/+0
| | | |
* | | | Merge pull request #7565 from liushuyu/fix-linux-decodingbunnei2021-12-151-0/+6
|\ \ \ \ | | | | | | | | | | video_core/codecs: refactor ffmpeg searching and handling in cmake
| * | | | CI: fix CI on Linuxliushuyu2021-12-141-3/+0
| | | | |
| * | | | video_core/codecs: skip decoders that use hw frames ...liushuyu2021-12-141-0/+9
| |/ / / | | | | | | | | | | | | | | | | ... this would resolve some edge-cases where multiple devices are present and ffmpeg is unable to auto-supply the hw surfaces
* | | | maxwell_to_vk: Add ASTC_2D_5X4_UNORMMorph2021-12-111-1/+1
| | | |
* | | | maxwell_to_vk: Add ASTC_2D_8X5_UNORMMorph2021-12-091-1/+1
|/ / / | | | | | | | | | - Used by Lego City Undercover
* | | Merge pull request #7495 from FernandoS27/text-blit-fix-againMorph2021-12-091-3/+6
|\ \ \ | | | | | | | | Texture Cache: Fix mismatching image/views on blits
| * | | Texture Cache: Fix crashes on NVIDIA.Fernando Sahmkow2021-12-041-3/+6
| |/ /
* | | renderer_vulkan: Add R16G16_UINTMorph2021-12-082-1/+2
| | | | | | | | | | | | - Used by Immortals Fenyx Rising
* | | Merge pull request #7488 from vonchenplus/support_multiple_videos_playingbunnei2021-12-082-32/+16
|\ \ \ | |/ / |/| | Support multiple videos playing
| * | Address feedbackFeng Chen2021-12-041-4/+5
| | |
| * | Support multiple videos playingFeng Chen2021-12-022-32/+15
| | |
* | | Merge pull request #7467 from liushuyu/fix-linux-decodingbunnei2021-12-042-66/+50
|\ \ \ | | | | | | | | video_core/codecs: more robust ffmpeg hwdecoder selection logic
| * | | video_core/cmake: link against libva explicitly ...liushuyu2021-12-031-0/+1
| | | | | | | | | | | | | | | | ... to fix build on Flatpak (and self-builds)
| * | | video_core/codecs: more fixes for VAAPI detection ...liushuyu2021-12-031-63/+25
| | | | | | | | | | | | | | | | | | | | * skip impersonated VAAPI implementaions ("imposter detection") * place VAAPI priority below CUDA/NVDEC/CUVID
| * | | video_core/codec: address commentsliushuyu2021-12-031-8/+12
| | | |
| * | | video_core/codecs: more robust ffmpeg hwdecoder selection logicliushuyu2021-12-031-10/+27
| |/ /
* / / general: Replace high_resolution_clock with steady_clockMorph2021-12-022-2/+2
|/ / | | | | | | On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
* | Add missing pixel format mappingFeng Chen2021-11-291-0/+2
| |
* | Merge pull request #7396 from FernandoS27/blit-this-mfFernando S2021-11-2814-223/+168
|\ \ | | | | | | TextureCache: Eliminate format deduction as full depth conversion has been supported.
| * | Texture Cache: Secure insertions against deletions.Fernando Sahmkow2021-11-281-3/+13
| | |
| * | Texture Cache: Redesigning the blitting system (again).Fernando Sahmkow2021-11-273-23/+64
| | |
| * | Texture Cache: Further fix regressions.Fernando Sahmkow2021-11-261-11/+15
| | |
| * | Texture Cache: Fix issue with blitting 3D textures.Fernando Sahmkow2021-11-221-2/+4
| | |
| * | Texture Cache: Correct conversion shaders.Fernando Sahmkow2021-11-222-2/+2
| | |
| * | Texture Cache: Always copy on NVIDIA.Fernando Sahmkow2021-11-221-0/+5
| | |
| * | TextureCache: Simplify blitting of D24S8 formats and fix bugs.Fernando Sahmkow2021-11-2210-195/+73
| | |
| * | VulkanTexturECache: Use reinterpret on D32_S8 formats.Fernando Sahmkow2021-11-211-2/+7
| | |
| * | HostShaders: Fix D24S8 convertion shaders.Fernando Sahmkow2021-11-216-23/+47
| | |
| * | TextureCache: Eliminate format deduction as full depth conversion has been supported.Fernando Sahmkow2021-11-212-29/+5
| | |
* | | video_core/codec: address commentsliushuyu2021-11-251-17/+11
| | |
* | | video_core/codecs: fix multiple decoding issues on Linux ...liushuyu2021-11-251-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * when someone installed Intel video drivers on an AMD system, the decoder will select the Intel VA-API decoding driver and yuzu will crash due to incorrect driver selection; the fix will check if the currently about-to-use driver is loaded in the kernel * when using NVIDIA driver on Linux with a ffmpeg that does not have CUDA capability enabled, the decoder will crash; the fix simply making the decoder prefers the VDPAU driver over CUDA on Linux
* | | Merge pull request #7395 from Morph1984/resolve-commentsbunnei2021-11-213-31/+16
|\ \ \ | | | | | | | | general: Resolve comments in PR #7368
| * | | vk_texture_cache: Mark VkBufferUsageFlags as static constexprMorph2021-11-211-3/+3
| | | |
| * | | vk_blit_image: Consolidate CreatePipelineTargetEx functionsMorph2021-11-212-28/+13
| |/ /
* | | Merge pull request #7389 from ameerj/screenshot-1xbunnei2021-11-212-8/+0
|\ \ \ | |/ / |/| | Fix screenshot dimensions when at 1x scale
| * | Fix screenshot dimensions when at 1x scaleameerj2021-11-202-8/+0
| | | | | | | | | | | | | | | | | | | | | This was regressed by ART. Prior to ART, the screenshots were saved at the title's framebuffer resolution. A misunderstanding of the existing logic led to screenshot dimensions becoming dependent on the host render window size. This changes the behavior to match how it was prior to ART at 1x, with screenshots now always being the title's framebuffer dimensions scaled by the resolution scaling factor.
* | | Merge pull request #7368 from FernandoS27/vulkan-convbunnei2021-11-2117-23/+588
|\ \ \ | |/ / |/| | Fix ART Blit detection regression and add D24S8 <-> RGBA8 conv to Vulkan
| * | TextureCache: Refactor and fix linux compiling.Fernando Sahmkow2021-11-202-9/+4
| | |
| * | TextureCache: Assure full conversions on depth/stencil write shaders.Fernando Sahmkow2021-11-203-6/+6
| | |
| * | TextureCache: Implement buffer copies on Vulkan.Fernando Sahmkow2021-11-206-9/+193
| | |
| * | TextureCache: Add R16G16 to D24S8 converter.Fernando Sahmkow2021-11-205-0/+38
| | |
| * | TextureCache: Add B10G11R11 to D24S8 converter.Fernando Sahmkow2021-11-195-13/+84
| | |
| * | TextureCache: Further fixes on resolve algorithm.Fernando Sahmkow2021-11-192-16/+17
| | |
| * | TextureCache: Implement additional D24S8 convertions.Fernando Sahmkow2021-11-196-0/+86
| | |
| * | TextureCache: force same image format when resolving an image.Fernando Sahmkow2021-11-192-2/+9
| | |
| * | TextureCache: Fix regression caused by ART and improve blit detection algorithm to be smarter.Fernando Sahmkow2021-11-192-10/+27
| | |
| * | Vulkan: implement D24S8 <-> RGBA8 convertions.Fernando Sahmkow2021-11-196-0/+166
| |/
* | Merge pull request #7294 from vonchenplus/fix_image_update_error_when_width_too_smallbunnei2021-11-202-10/+18
|\ \ | | | | | | Fix image update/download error when width too small
| * | Fix image update/download error when width too smallFeng Chen2021-11-172-10/+18
| | |
* | | Merge pull request #7357 from Morph1984/s8_uintbunnei2021-11-1910-9/+64
|\ \ \ | |_|/ |/| | video_core: Implement S8_UINT format
| * | renderer_vulkan: Implement S8_UINT stencil formatMorph2021-11-183-0/+18
| | | | | | | | | | | | It should be noted that on Windows, only nvidia gpus support this format natively as of this commit.
| * | renderer_opengl: Implement S8_UINT stencil formatMorph2021-11-173-6/+25
| | |
| * | video_core: Add S8_UINT stencil formatMorph2021-11-174-3/+21
| |/
* | gl_texture_cache: Round format conversion PBO to next power of 2ameerj2021-11-181-1/+5
| |
* | texture_cache: Use pixel format conversion when supported by the runtimeameerj2021-11-175-0/+15
| |
* | gl_texture_cache: Make FormatConversionPass more genericameerj2021-11-171-7/+12
| | | | | | | | This allows the usage of the FormatConversionPass to be applied to more than the previously used BGR conversion scenarios.
* | gl_texture_cache: Rename BGRCopyPass to FormatConversionPassameerj2021-11-172-21/+18
|/
* TextureCache: Fix Automatic Anisotropic.Fernando Sahmkow2021-11-171-6/+5
|
* TextureCache: OGL query device memory if possible.FernandoS272021-11-172-2/+14
|
* TextureCache: Fix OGL cleaningFernando Sahmkow2021-11-175-0/+43
|
* TextureCache: Add automatic anisotropic filtering and refactor code.Fernando Sahmkow2021-11-163-15/+16
|
* TextureCache: Make a better Anisotropic setter.Fernando Sahmkow2021-11-163-20/+17
|
* Texture Cache: revert Image changes.Fernando Sahmkow2021-11-161-0/+4
|
* HostShader: fix Gaussian filter.FernandoS272021-11-161-2/+2
|
* Texture Cahe/Shader decompiler: Resize PointSize on rescaling, refactor and make reaper more agressive on 4Gb GPUs.FernandoS272021-11-164-22/+8
|
* texture_cache: Refactor Render Target scaling functionameerj2021-11-162-14/+24
|
* gl_resource_manager: Ensure non EXT_framebuffer objects are createdameerj2021-11-162-13/+8
|
* Texture Cache: Fix memory usage on ScaleDown.FernandoS272021-11-161-4/+0
|
* OpenGL: Fix viewport/Scissor scaling on downscaling.FernandoS272021-11-161-6/+28
|
* Vulkan: fix regression.FernandoS272021-11-161-14/+17
|
* host_shaders: Misc copyright/style changesameerj2021-11-164-10/+12
|
* FSR: Fix GCC build errorsameerj2021-11-163-43/+50
|
* Vulkan: Reimplement FSR constant generation functions to avoid GCC warningsMarshall Mohror2021-11-162-9/+145
|
* vk_blit_screen: Fix AA destruction orderameerj2021-11-161-9/+10
|
* Presentation: Only use FP16 in scaling shaders on supported devices in VulkanMarshall Mohror2021-11-1614-116/+197
|
* renderer_vulkan/blit_image: Use generic color state on Depth to Color blitsameerj2021-11-161-1/+1
| | | | Fixes Bayonetta 2 on AMD
* vk_texture_cache: Refactor 3D scaling helpersameerj2021-11-162-113/+74
|
* gl_rasterizer: Fix ScissorTest and Clear when scalingameerj2021-11-161-10/+6
|
* gl_texture_cache: Simplify scaling proceduresameerj2021-11-162-57/+28
|
* OpenGlTextureCache: Fix state invalidation on rescaling.Fernando Sahmkow2021-11-163-2/+17
|
* VulkanBufferCache: Avoid adding barriers between multiple copies.Fernando Sahmkow2021-11-163-5/+43
|
* HostShader: Fix gaussian and add attribution.Fernando Sahmkow2021-11-161-23/+19
|
* Vulkan: Fix FXAA in AMD.Fernando Sahmkow2021-11-161-2/+40
|
* Texture Cache: Fix blitting.Fernando Sahmkow2021-11-161-2/+2
|
* Vulkan: Implement FXAAFernandoS272021-11-163-22/+387
|
* OpenGL: fix FXAA with scalingMarshall Mohror2021-11-162-9/+31
|
* OpenGL: Implement FXAAMarshall Mohror2021-11-166-35/+194
|
* QtGUI: Add buttton to toggle the filter.FernandoS272021-11-161-0/+1
|
* VideoCore: Add gaussian filtering.FernandoS272021-11-166-0/+132
|
* TextureCache: Improve Reaper.FernandoS272021-11-162-14/+26
|
* Vulkan: fix waiting on semaphore.FernandoS272021-11-161-1/+3
|
* Update scaleforce to use FP16Marshall Mohror2021-11-161-88/+55
|
* TextureCache: fix rescaling in aliases and overlap joins.FernandoS272021-11-164-23/+48
|
* Presentation: Fix turning FSR on and off in settingsMarshall Mohror2021-11-161-0/+11
|
* Video Core: fix building for GCC.Fernando Sahmkow2021-11-164-22/+40
|
* Vulkan Rasterizer: Fix clears on integer textures.FernandoS272021-11-163-1/+84
|
* Texture cache: fix Intel with rescaler.FernandoS272021-11-161-2/+2
|
* TextureCache: Fix blitting filter in Vulkan and correct viewport/scissor calculation when downscaling.FernandoS272021-11-162-20/+44
|
* Texture Cache: fix memory managment and optimize scaled downloads, uploads.Fernando Sahmkow2021-11-167-28/+57
|
* Texture Cache: ease the requirements of textures being blacklisted.Fernando Sahmkow2021-11-162-22/+7
|
* Vulkan: Fix Blit Depth StencilFernando Sahmkow2021-11-162-14/+20
|
* Texture Cache: Fix downscaling and correct memory comsumption.Fernando Sahmkow2021-11-168-36/+147
|
* Presentation: add Nearest Neighbor filter.Fernando Sahmkow2021-11-164-9/+56
|
* vulkan: Implement FidelityFX Super ResolutionMarshall Mohror2021-11-169-17/+637
|
* Texture Cache: Rescale conversions between depth and colorFernandoS272021-11-166-25/+37
|
* Texture cache: Fix memory consumption and ignore rating when a depth texture is rendered.Fernando Sahmkow2021-11-163-7/+19
|
* vulkan: Fix rescaling push constant usageameerj2021-11-164-35/+42
|
* Texture Cahe: Fix downscaling on SMO.Fernando Sahmkow2021-11-163-0/+8
|
* texture_cache_base: Remove unused function declarationsameerj2021-11-161-8/+0
|
* vk_texture_cache: Use 3D to scale images when blit is unsupportedameerj2021-11-164-29/+87
|
* texture_cache: Fix infinitely recursive ImageCanRescale checkameerj2021-11-163-10/+13
|
* vk_texture_cache: Fix BlitScale of non-2D imagesameerj2021-11-161-10/+9
|
* video_core: Refactor resolution scale functionameerj2021-11-163-46/+20
|
* texture_cache: Fix image resolves when src/dst are not both scaledameerj2021-11-161-5/+8
|
* video_core,yuzu: Move UpdateRescalingInfo call to video_corelat9nq2021-11-161-0/+2
| | | | | | This only needs to happen once per game boot, so we can just call it during CreateGPU and be done with it, avoiding the need to call it in the frontends.
* gl_texture_cache: Disable scissor test when scaling texturesameerj2021-11-161-0/+8
| | | | Fixes a bug on BOTW where some objects were no longer being rendered after blitting
* vk_texture_cache: Fix unsupported blit format error checkingameerj2021-11-162-9/+9
|
* vk_texture_cache: Fix early returns on unsupported scalesameerj2021-11-162-19/+11
|
* video_core: Misc resolution scaling related refactoringameerj2021-11-167-46/+50
|
* texture_cache: Refactor scaled image size calculationameerj2021-11-162-12/+13
|
* Texture Cache: Fix calculations when scaling.Fernando Sahmkow2021-11-161-0/+12
|
* gl_texture_cache: Fix BGR pbo size for scaled texturesameerj2021-11-161-11/+10
|
* Texture Cache: Fix Rescaling on MultisampleFernando Sahmkow2021-11-163-8/+21
|
* TextureCache: Base fixes on rescaling.Fernando Sahmkow2021-11-162-4/+6
|
* vk_texture_cache: Simplify scaled image managementameerj2021-11-162-107/+34
|
* gl_texture_cache: Fix scaling backup logicameerj2021-11-162-20/+16
|
* vk_rasterizer: Fix scaling on Y_NEGATEameerj2021-11-161-3/+9
|
* vk_texture_cache: Use nearest neighbor scaling when availableameerj2021-11-164-29/+36
|
* gl_texture_cache: Fix depth and integer format scaling blitsameerj2021-11-162-16/+61
|
* gl_texture_cache/rescaling_pass: minor cleanupameerj2021-11-162-4/+2
|
* vk_texture_cache: Minor cleanupameerj2021-11-162-11/+8
|
* image_info: Mark MSAA textures as non-rescalableameerj2021-11-161-2/+2
| | | | Blitting or resolving multisampled images requires the dimensions of the src and dst to be equal for valid usage, making them difficult for resolution scaling using the current implementation.
* gl_texture_cache: Simplify scalingameerj2021-11-162-31/+39
| | | | | We don't need to reconstruct new textures every time we ScaleUp/ScaleDown. We can scale up once, and revert to the original texture whenever scaling down. Fixes memory leaks due to glDeleteTextures being deferred for later handling on some drivers
* Renderers: Unify post processing filter shadersameerj2021-11-167-211/+36
|
* gl_texture_cache: fix scaling on uploadameerj2021-11-161-0/+7
|
* Renderer: Implement Bicubic and ScaleForce filters.Fernando Sahmkow2021-11-169-13/+537
|
* Texture Cache: fix scaling on upload and stop scaling on base resolution.Fernando Sahmkow2021-11-161-14/+32
|
* shader, video_core: Fix GCC build errorsameerj2021-11-162-10/+3
|
* emit_spirv: Fix RescalingLayout alignmentameerj2021-11-162-4/+7
|
* TextureCache: Fix Buffer Views Scaling.Fernando Sahmkow2021-11-162-5/+9
|
* Texture Cache: Correctly fix Blits Rescaling.Fernando Sahmkow2021-11-161-9/+12
|
* texture_cache: Disable dst_image scaling in BlitImageameerj2021-11-161-5/+7
| | | | Fixes scaling in Super Mario Party
* emit_spirv: Fix RescalingLayout alignmentameerj2021-11-161-1/+1
|
* shader: Properly scale image reads and add GL SPIR-V supportReinUsesLisp2021-11-165-26/+57
| | | | Thanks for everything!
* shader: Properly blacklist and scale image loadsReinUsesLisp2021-11-164-8/+12
|
* texture_cache: Add getter to query if image view is rescaledReinUsesLisp2021-11-165-22/+12
|
* vk_rasterizer: Minor style changeReinUsesLisp2021-11-161-2/+2
|
* gl_texture_cache: Fix scaling blitsReinUsesLisp2021-11-161-20/+12
|
* glsl/glasm: Pass and use scaling parameters in shadersReinUsesLisp2021-11-163-21/+40
|
* gl_rasterizer: Properly scale viewports and scissorsReinUsesLisp2021-11-161-23/+24
|
* gl_texture_cache: Fix multi layered texture Scaleameerj2021-11-161-11/+15
|
* gl_compute_pipeline: Add downscale factor to shader uniformsameerj2021-11-161-0/+9
|
* gl_rasterizer: Fix rescale dirty state checkingameerj2021-11-161-4/+9
|
* gl_graphics_pipeline: Add downscale factor to shader uniformsameerj2021-11-161-1/+14
|
* texture_cache: Fix blacklists on computeReinUsesLisp2021-11-161-1/+1
|
* texture_cache: Simplify image view queries and blacklistingReinUsesLisp2021-11-1616-192/+192
|
* Vulkan: Fix downscaling Blit.Fernando Sahmkow2021-11-161-14/+18
|
* Texture Cache: Implement Rating System.Fernando Sahmkow2021-11-165-15/+47
|
* OpenGL: set linear mag filter when blitting a downscaled image.Fernando Sahmkow2021-11-161-0/+1
|
* Vulkan: Fix AA when rescaling.Fernando Sahmkow2021-11-161-1/+1
|
* Texture Cache: Implement Blacklisting.Fernando Sahmkow2021-11-165-4/+90
|
* vulkan: Implement rescaling shader patchingReinUsesLisp2021-11-168-27/+103
|
* vk_texture_cache: Properly scale blit source imagesReinUsesLisp2021-11-161-2/+2
|
* vk_graphics_pipeline: Use Shader::NumDescriptors when possibleReinUsesLisp2021-11-161-18/+6
|
* opengl: Use Shader::NumDescriptors when possibleReinUsesLisp2021-11-163-46/+20
|
* texture_cache: Add image gettersReinUsesLisp2021-11-162-0/+16
|
* gl_texture_cache: Simplify rescalingameerj2021-11-162-19/+15
|
* texture_cache: Fix typo in aliased image rescalingameerj2021-11-161-1/+1
|
* vk_texture_cache: Simplify and optimize scaling blitsReinUsesLisp2021-11-161-106/+62
|
* vk_texture_cache: Fix scaling blit validation errorsReinUsesLisp2021-11-161-81/+78
|
* gl_texture_cache: Implement ScaleDownameerj2021-11-162-26/+36
|
* gl_texture_cache: Rescale fixes for multi-layered texturesameerj2021-11-162-16/+32
|
* Texture Cache: Implement Rescaling on Aliases and Blits.Fernando Sahmkow2021-11-161-5/+53
|
* Fix blits with mipsReinUsesLisp2021-11-161-12/+16
|
* Fix blitsReinUsesLisp2021-11-161-10/+10
|
* renderer_gl: Resolution scaling fixesameerj2021-11-163-61/+107
|
* TextureCache: Fix rescaling of ImageCopiesFernando Sahmkow2021-11-163-18/+67
|
* TextureCache: Modify Viewports/Scissors according to Rescale.Fernando Sahmkow2021-11-165-35/+89
|
* Settings: eliminate rescaling_factor.Fernando Sahmkow2021-11-162-6/+5
|
* Texture Cache: More rescaling fixes.Fernando Sahmkow2021-11-164-84/+96
|
* gl_texture_cache: WIP texture rescaleameerj2021-11-162-3/+69
|
* Texture Cache: Implement Vulkan UpScaling & DownScalingFernando Sahmkow2021-11-166-42/+327
|
* VideoCore: Initial Setup for the Resolution Scaler.Fernando Sahmkow2021-11-169-18/+236
|
* codes: Rename ComposeFrameHeader to ComposeFrameameerj2021-11-137-14/+14
| | | | These functions were composing the entire frame, not just the headers. Rename to more accurately describe them.
* vp8: Implement header compositionameerj2021-11-134-6/+90
| | | | Enables frame decoding with FFmpeg
* codecs: Add VP8 codec classameerj2021-11-139-20/+90
|
* vulkan_device: Add missing vulkan image format R5G6B5 in GetFormatPropertiesFeng Chen2021-11-051-0/+1
| | | - Used by Dragon Quest Builders
* gl_rasterizer: Remove unused includesMorph2021-11-011-4/+2
| | | | This removes unused includes, especially the core includes which were causing this file to be recompiled every time files included by those headers are modified.
* gl_device: Force GLASM on NVIDIA drivers 495-496lat9nq2021-10-291-0/+15
| | | | | | | | | GLSL shaders currently do not render correctly on the recent NVIDIA drivers. This adds a check that forces assembly shaders for these drivers since they seem unaffected and adds a warning informing of the decision. Developers can disable the check by enabling graphics debugging.
* Merge pull request #7206 from vonchenplus/fix_vulkan_viewport_issueFernando S2021-10-241-0/+1
|\ | | | | Vulkan Rasterizer: Fix viewport issue
| * Fix vulkan viewport issueFeng Chen2021-10-221-0/+1
| |
* | Merge pull request #7070 from FernandoS27/want-you-badAmeer J2021-10-246-3/+31
|\ \ | | | | | | Vulkan Rasterizer: Correct DepthBias/PolygonOffset on Vulkan.
| * | Vulran Rasterizer: address feedback.Fernando Sahmkow2021-10-231-3/+5
| | |
| * | Vulkan Rasterizer: Correct DepthBias/PolygonOffset on Vulkan.Fernando Sahmkow2021-09-236-3/+29
| | |
* | | Merge pull request #7198 from ameerj/settings-chronobunnei2021-10-191-0/+1
|\ \ \ | |_|/ |/| | settings: Remove std::chrono usage
| * | settings: Remove std::chrono usageameerj2021-10-171-0/+1
| | | | | | | | | | | | Alleviates the dependency on chrono for all files that include settings.h
* | | Merge pull request #7077 from FernandoS27/face-downAmeer J2021-10-172-5/+6
|\ \ \ | | | | | | | | A series of fixes to queries and indexed samplers.
| * | | Vulkan Query Cache: make sure to wait for the query result.Fernando Sahmkow2021-09-241-1/+2
| | | |
| * | | QueryCache: Flush queries in order of running.Fernando Sahmkow2021-09-241-4/+4
| | |/ | |/|
* | | Merge pull request #7127 from FernandoS27/i-saw-a-wabbitAmeer J2021-10-172-5/+14
|\ \ \ | |_|/ |/| | A few fixes on Vulkan and Rasterizer Caching
| * | Vulkan: Fix failing barrier on refresh.Fernando Sahmkow2021-10-041-1/+2
| | |
| * | RasterizerInterface: Correct size of CPU addresses to cache.FernandoS272021-10-041-1/+1
| | |
| * | Vulkan: Fix the master SemaphoreFernandoS272021-10-041-4/+12
| | |
* | | Merge pull request #7157 from ameerj/vic-surface-sizeMorph2021-10-141-16/+15
|\ \ \ | | | | | | | | vic: Use the minimum of surface/frame dimensions when writing the final frame to the GPU
| * | | vic: Use the minimum of surface/frame dimensions when writing the final frame to the GPUameerj2021-10-111-16/+15
| | | | | | | | | | | | | | | | Addresses possible buffer overflow behavior.
* | | | Merge pull request #7109 from vonchenplus/fix_h264_max__reference_num_errorAmeer J2021-10-121-1/+6
|\ \ \ \ | |/ / / |/| | | h264: Use max allowed max_num_ref_frames when using CPU decoding
| * | | h264: Use max allowed max_num_ref_frames when using CPU decodingFeng Chen2021-10-101-1/+6
| | |/ | |/|
* | | vic: Allow surface to be higher than frameValeri2021-10-091-2/+3
| | | | | | | | | | | | | | | Touhou Genso Wanderer Lotus Labyrinth R decodes 1920x1080 videos into 1920x1088 surface. Only allow mismatch for height, since larger width would result in increasingly offset rows and somewhat defeat entire purpose of this check.
* | | vic: Avoid memory corruption when multiple streams with different dimensions are decodedameerj2021-10-081-0/+9
| | | | | | | | | | | | This is a work around to avoid buffer overflow errors until multi channel/multi stream decoding is supported.
* | | vic: Refactor frame writing methodsameerj2021-10-072-138/+146
| | |
* | | vic: Implement RGBX frame formatameerj2021-10-072-3/+15
| | |
* | | Merge pull request #7118 from ameerj/vc-gpu-implFernando S2021-10-0616-639/+854
|\ \ \ | | | | | | | | gpu: Migrate implementation to the cpp file
| * | | nvhost_ctrl: Refactor usage of gpu.LockSync()ameerj2021-10-032-20/+1
| | | | | | | | | | | | | | | | This seems to only be used to protect a later gpu function call. So we can move the lock into that call instead.
| * | | gpu: Migrate implementation to the cpp fileameerj2021-10-0317-627/+862
| | | |
* | | | Merge pull request #7115 from ameerj/log-compilebunnei2021-10-051-0/+1
|\ \ \ \ | | | | | | | | | | common/logging: Reduce dependent header include overhead
| * | | | common/logging: Move Log::Entry declaration to a separate headerameerj2021-10-021-0/+1
| |/ / / | | | | | | | | | | | | This reduces the load of requiring to include std::chrono in all files which include log.h
* | | | Merge pull request #7101 from ameerj/vk-tess-topologybunnei2021-10-051-1/+10
|\ \ \ \ | |/ / / |/| | | vk_graphics_pipeline: Force patch list topology when tessellation is used
| * | | vk_graphics_pipeline: Force patch list topology when tessellation is usedameerj2021-09-281-1/+10
| | | | | | | | | | | | | | | | Fixes a crash on some drivers when tessellation is used but the IA topology is not patch list.
* | | | Merge pull request #7061 from ameerj/dma-buffer-miscbunnei2021-09-304-39/+37
|\ \ \ \ | | | | | | | | | | buffer_cache, maxwell_dma: Minor refactoring and code fixes
| * | | | maxwell_dma: Minor refactoringameerj2021-09-202-33/+33
| | | | |
| * | | | buffer_cache: Minor fixesameerj2021-09-202-6/+4
| | | | | | | | | | | | | | | | | | | | Loop through the tmp_intervals by reference, rather than by copy, and fix gl clear buffer size calculation.
* | | | | Merge pull request #7036 from ameerj/ogl-bgr-v2bunnei2021-09-307-118/+59
|\ \ \ \ \ | |_|/ / / |/| | | | gl_texture_cache: Unify BGR copy passes using PBOs
| * | | | host_shaders: Remove opengl_copy_bgra.compameerj2021-09-174-19/+0
| | | | |
| * | | | gl_texture_cache: Migrate BGRCopyPass from util_shadersameerj2021-09-174-42/+48
| | | | | | | | | | | | | | | | | | | | The BGR copies no longer use shaders.
| * | | | util_shaders: Unify BGRA copy passesameerj2021-09-165-82/+36
| | | | |
* | | | | Merge pull request #7076 from ameerj/amd-botwbunnei2021-09-283-11/+22
|\ \ \ \ \ | | | | | | | | | | | | vk_texture_cache: Disable cube compatibility flag on non-mesa AMD GCN4 and earlier
| * | | | | vk_texture_cache: Disable cube compatibility flag on non-mesa AMD GCN4 and earlierameerj2021-09-243-11/+22
| | |_|/ / | |/| | | | | | | | | | | | | Fixes rainbow textures on BOTW.
* | | | | Merge pull request #7078 from ameerj/vc-jthread-fixesMorph2021-09-261-1/+1
|\ \ \ \ \ | | | | | | | | | | | | video_core: Fix jthread related hangs when stopping emulation
| * | | | | video_core: Fix jthread related hangs when stopping emulationameerj2021-09-241-1/+1
| |/ / / / | | | | | | | | | | | | | | | jthread on some compilers is more picky when it comes to the order in which objects are destroyed.
* / / / / general: Update style to clang-format-12ameerj2021-09-243-13/+9
|/ / / /
* | | | Merge pull request #7003 from ameerj/unlocked-present-modebunnei2021-09-203-4/+38
|\ \ \ \ | |_|/ / |/| | | vk_swapchain: Use immediate present mode when mailbox is unavailable and FPS is unlocked
| * | | vk_swapchain: Use immediate present mode when mailbox is unavailable and FPS is unlockedameerj2021-09-133-4/+38
| | | | | | | | | | | | | | | | Allows drivers that do not support VK_PRESENT_MODE_MAILBOX_KHR the ability to present at a framerate higher than the monitor's refresh rate when the FPS is unlocked.
* | | | Merge pull request #7019 from ameerj/videocore-jthreadbunnei2021-09-196-81/+26
|\ \ \ \ | |_|_|/ |/| | | videocore: Use std::jthread for worker threads
| * | | vk_scheduler: Use std::jthreadameerj2021-09-162-17/+9
| | | |
| * | | gpu: Use std::jthread for async gpu threadameerj2021-09-164-64/+17
| | |/ | |/|
* | | Merge pull request #7011 from ameerj/vk-validation-0x0bunnei2021-09-171-0/+1
|\ \ \ | | | | | | | | vulkan_debug_callback: Ignore InvalidCommandBuffer-VkDescriptorSet errors
| * | | vulkan_debug_callback: Ignore InvalidCommandBuffer-VkDescriptorSet errorsameerj2021-09-141-0/+1
| |/ / | | | | | | | | | | | | | | | This validation error is spammed on some titles, asserting that VkDescriptorSet 0x0[] was destroyed. This is likely a validation layer bug when using VK_KHR_push_descriptor, which can avoid using traditional VkDescriptorSet. It should be safe to ignore for now.
* | | Merge pull request #7027 from ameerj/sorry-amdFernando S2021-09-161-14/+3
|\ \ \ | | | | | | | | vulkan_device: Reorder Float16Int8 declaration
| * | | vulkan_device: Reorder Float16Int8 declarationameerj2021-09-161-1/+2
| | | | | | | | | | | | | | | | This variable was going out of scope before its usage in the vulkan device creation, causing a crash on very specific drivers.
| * | | Revert "Merge pull request #7006 from FernandoS27/a-motherfucking-driver"ameerj2021-09-161-13/+1
| |/ / | | | | | | | | | | | | This reverts commit 62e88d0e7455e37840db7e2a8e199bc6ca176966, reversing changes made to edf3da346f4ec0ca492b427f4f693d56e84abc52.
* / / renderers: Log total pipeline countMorph2021-09-142-0/+4
|/ /
* | Merge pull request #6943 from FernandoS27/omae-wa-mou-shindeiruMorph2021-09-131-6/+20
|\ \ | | | | | | Vulkan: Disable VK_EXT_SAMPLER_FILTER_MINMAX in GCN AMD
| * | Vulkan: Disable VK_EXT_SAMPLER_FILTER_MINMAX in GCN AMD since it's broken.Fernando Sahmkow2021-09-131-6/+20
| | |
* | | Merge pull request #7006 from FernandoS27/a-motherfucking-driverMorph2021-09-131-1/+13
|\ \ \ | |/ / |/| | Vulkan: Blacklist Int8Float16 Extension on AMD on driver 21.9.1
| * | Vulkan: Blacklist Int8Float16 Extension on AMD on driver 21.9.1Fernando Sahmkow2021-09-131-1/+13
| | |
* | | Merge pull request #6944 from FernandoS27/dear-drunk-meMorph2021-09-133-3/+14
|\ \ \ | | | | | | | | Vulkan/Descriptors: Increase sets per pool on AMD propietary driver.
| * | | Vulkan/Descriptors: Increase sets per pool on AMFD propietary driver.Fernando Sahmkow2021-09-133-3/+14
| | | |
* | | | Merge pull request #7001 from ameerj/wario-fixFernando S2021-09-131-6/+8
|\ \ \ \ | |_|_|/ |/| | | vk_rasterizer: Fix dynamic StencilOp updating when two faces are enabled
| * | | vk_rasterizer: Fix dynamic StencilOp updating when two faces are enabledameerj2021-09-121-6/+8
| | | | | | | | | | | | | | | | This function was incorrectly using the stencil_two_side_enable register when dynamically updating the StencilOp.
* | | | Merge pull request #7002 from ameerj/vk-state-unusedMai M2021-09-121-4/+0
|\ \ \ \ | | | | | | | | | | vk_state_tracker: Remove unused function
| * | | | vk_state_tracker: Remove unused functionameerj2021-09-121-4/+0
| |/ / /
* | | | shader_environment: Add missing <algorithm> includeMorph2021-09-111-0/+1
| | | |
* | | | vk_descriptor_pool: Add missing <algorithm> includeMorph2021-09-111-0/+1
| | | |
* | | | slot_vector: Add missing <algorithm> includeMorph2021-09-111-0/+1
| | | |
* | | | video_core/memory_manager: Add missing <algorithm> includeMorph2021-09-111-0/+2
| | | |
* | | | codec: Add missing <string_view> includeMorph2021-09-111-0/+1
|/ / /
* | | Merge pull request #6846 from ameerj/nvdec-gpu-decodeFernando S2021-09-115-96/+144
|\ \ \ | | | | | | | | nvdec: Add GPU video decoding for all capable drivers and platforms
| * | | h264: Lower max_num_ref_framesameerj2021-08-161-1/+2
| | | | | | | | | | | | | | | | GPU decoding seems to be more picky when it comes to the maximum number of reference frames.
| * | | configure_graphics: Add GPU nvdec decoding as an optionameerj2021-08-162-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Some system configurations may see visual regressions or lower performance using GPU decoding compared to CPU decoding. This setting provides the option for users to specify their decoding preference. Co-Authored-By: yzct12345 <87620833+yzct12345@users.noreply.github.com>
| * | | codec: Improve libav memory alloc and cleanupameerj2021-08-162-14/+19
| | | |
| * | | codec: Fallback to CPU decoding if no compatible GPU format is foundameerj2021-08-162-22/+32
| | | |
| * | | cmake: Add VDPAU and NVDEC support to FFmpeglat9nq2021-08-161-0/+1
| | | | | | | | | | | | | | | | Adds {h264_,vp9_}{nvdec,vdpau} hwaccels.
| * | | codec: Replace deprecated av_init_packet usageameerj2021-08-121-9/+13
| | | |
| * | | nvdec: Implement GPU accelerated decoding for all platformsameerj2021-08-122-70/+92
| | | | | | | | | | | | | | | | Supplements the VAAPI intel gpu decoder by implementing the D3D11VA decoder for Windows, and CUVID/VDPAU for Nvidia and AMD on drivers linux respectively.
* | | | Merge pull request #6901 from ameerj/vk-clear-bitsFernando S2021-09-113-6/+24
|\ \ \ \ | | | | | | | | | | vk_rasterizer: Only clear depth/stencil buffers when specified in attachment aspect mask
| * | | | vk_rasterizer: Only clear depth and stencil buffers when set in attachment aspect maskameerj2021-08-213-6/+24
| | | | | | | | | | | | | | | | | | | | Silences validation errors for clearing the depth/stencil buffers of framebuffer attachments that were not specified to have depth/stencil usage.
* | | | | Merge pull request #6941 from ameerj/swapchain-srgbFernando S2021-09-115-11/+37
|\ \ \ \ \ | | | | | | | | | | | | vk_swapchain: Prefer linear swapchain format when presenting sRGB images
| * | | | | vulkan_device: Enable VK_KHR_swapchain_mutable_format if availableameerj2021-08-293-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | Silences validation errors when creating sRGB image views of linear swapchain images
| * | | | | vk_swapchain: Prefer linear swapchain format when presenting sRGB imagesameerj2021-08-293-11/+10
| | |_|/ / | |/| | | | | | | | | | | | | Fixes broken sRGB when presenting from a secondary GPU.
* | | | | Merge pull request #6953 from ameerj/anv-semaphoreFernando S2021-09-115-26/+33
|\ \ \ \ \ | | | | | | | | | | | | renderer_vulkan: Wait on present semaphore at queue submit
| * | | | | renderer_vulkan: Wait on present semaphore at queue submitameerj2021-09-025-26/+33
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The present semaphore is being signalled by the call to acquire the swapchain image. This semaphore is meant to be waited on when rendering to the swapchain image. Currently it is waited on when presenting, but moving its usage to be waited on in the command buffer submission allows for proper usage of this semaphore. Fixes the device lost when launching titles on the Intel Linux Mesa driver.
* / | | | Fix blend equation enum errorFeng Chen2021-09-071-4/+4
|/ / / /
* | | | Merge pull request #6900 from ameerj/attr-reorderbunnei2021-09-023-0/+7
|\ \ \ \ | | | | | | | | | | structured_control_flow: Add DemoteCombinationPass
| * | | | structured_control_flow: Conditionally invoke demote reorder passameerj2021-08-303-0/+7
| |/ / / | | | | | | | | | | | | This is only needed on select drivers when a fragment shader discards/demotes.
* | | | Merge pull request #6897 from FernandoS27/pineapple-does-not-belong-in-pizzabunnei2021-08-315-103/+80
|\ \ \ \ | | | | | | | | | | Project <tentative title>: Rework Garbage Collection.
| * | | | Garbage Collection: Make it more agressive on high priority mode.Fernando Sahmkow2021-08-293-5/+5
| | | | |
| * | | | Garbage Collection: Adress Feedback.Fernando Sahmkow2021-08-293-5/+12
| | | | |
| * | | | Garbage Collection: enable as default, eliminate option.Fernando Sahmkow2021-08-282-3/+2
| | | | |
| * | | | VideoCore: Rework Garbage Collection.Fernando Sahmkow2021-08-285-101/+72
| |/ / /
* | | | Merge pull request #6879 from ameerj/decoder-assertbunnei2021-08-312-9/+3
|\ \ \ \ | | | | | | | | | | vk_blit_screen: Fix non-accelerated texture size calculation
| * | | | vk_blit_screen: Fix non-accelerated texture size calculationameerj2021-08-162-9/+3
| | | | | | | | | | | | | | | | | | | | Addresses the potential OOB access in UnswizzleTexture.
* | | | | vp9_types: Minor refactor of VP9 info structs.ameerj2021-08-261-32/+29
| | | | |
* | | | | vp9_types: Remove unused Vp9PictureInfo membersameerj2021-08-262-24/+1
| |/ / / |/| | |
* | | | Merge pull request #6919 from ameerj/vk-int8-capabilityFernando S2021-08-253-9/+19
|\ \ \ \ | | | | | | | | | | vulkan_device: Add a check for int8 support
| * | | | vulkan_device: Add a check for int8 supportameerj2021-08-253-9/+19
| | |/ / | |/| | | | | | | | | | Silences validation errors when shaders use int8 without specifying its support to the API
* | | | Merge pull request #6894 from FernandoS27/bunneis-left-earAmeer J2021-08-251-0/+1
|\ \ \ \ | |/ / / |/| | | GPU_MemoryManger: Fix GetSubmappedRange.
| * | | GPU_MemoryManger: Fix GetSubmappedRange.Fernando Sahmkow2021-08-191-0/+1
| | | |
* | | | Merge pull request #6888 from v1993/patch-3Ameer J2021-08-211-1/+1
|\ \ \ \ | | | | | | | | | | video_core: eliminate constant ternary
| * | | | video_core: eliminate constant ternaryValeri2021-08-191-1/+1
| |/ / / | | | | | | | | `via_header_index` is already checked above, so it would never be true in this branch
* / / / xbyak: Update include pathMerry2021-08-151-1/+1
|/ / /
* | | Merge pull request #6861 from yzct12345/const-mempy-is-all-the-speedbunnei2021-08-151-57/+116
|\ \ \ | |/ / |/| | decoders: Optimize memcpy for the other functions
| * | decoders: Templates allow memcpy optimizationsyzct123452021-08-121-57/+116
| |/
* | Merge pull request #6838 from ameerj/sws-alignbunnei2021-08-121-3/+2
|\ \ | |/ |/| vic: Specify sws_scale height stride.
| * vic: Specify sws_scale height stride.ameerj2021-08-101-3/+2
| | | | | | | | Silences a sws_scale runtime warning about unaligned strides.
* | Merge pull request #6820 from yzct12345/split-cacheFernando S2021-08-1013-427/+420
|\ \ | | | | | | texture_cache: Split out template definitions
| * | texture_cache: Address ameerj's reviewyzct123452021-08-083-7/+4
| | |
| * | texture_cache: Address ameerj's reviewyzct123452021-08-074-10/+5
| | |
| * | texture_cache: Don't change copyright yearyzct123452021-08-054-4/+4
| | |
| * | texture_cache: Address ameerj's reviewyzct123452021-08-0512-1821/+1821
| | |
| * | texture_cache: Split templates outyzct123452021-08-057-1532/+1533
| | |
* | | Merge pull request #6844 from ameerj/vp9-empty-frameMai M2021-08-092-3/+3
|\ \ \ | | | | | | | | vp9: Ensure the first frame is complete
| * | | vp9: Ensure the first frame is completeameerj2021-08-082-3/+3
| | |/ | |/| | | | | | | Silences a runtime error due to the first frame missing the frame data, and being set to hidden despite being a key-frame.
* | | Merge pull request #6834 from K0bin/buffer-image-granularityFernando S2021-08-082-2/+8
|\ \ \ | |/ / |/| | Respect Vulkan bufferImageGranularity
| * | vulkan_memory_allocator: Respect bufferImageGranularityRobin Kertels2021-08-072-2/+8
| | |
* | | Merge pull request #6830 from ameerj/nvdec-unimpld-codecbunnei2021-08-071-1/+1
|\ \ \ | |/ / |/| | nvdec: Better logging for unimplemented codecs
| * | nvdec: Better logging for unimplemented codecsameerj2021-08-071-1/+1
| | |
* | | Merge pull request #6791 from ameerj/astc-optbunnei2021-08-077-421/+251
|\ \ \ | |/ / |/| | astc_decoder: Various performance and memory optimizations
| * | astc_decoder: Reduce workgroup sizeameerj2021-08-013-5/+5
| | | | | | | | | | | | This reduces the amount of over dispatching when there are odd dimensions (i.e. ASTC 8x5), which rarely evenly divide into 32x32.
| * | astc_decoder: Compute offset swizzles in-shaderameerj2021-08-014-109/+25
| | | | | | | | | | | | Alleviates the dependency on the swizzle table and a uniform which is constant for all ASTC texture sizes.
| * | astc_decoder: Make use of uvec4 for payload dataameerj2021-08-011-79/+43
| | |
| * | astc_decoder: Simplify Select2DPartitionameerj2021-08-011-38/+19
| | |
| * | astc_decoder: Optimize the use EncodingDataameerj2021-08-016-138/+108
| | | | | | | | | | | | | | | | | | | | | 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.
| * | astc.h: Move data to cpp implementationameerj2021-08-012-64/+63
| | | | | | | | | | | | Moves leftover values that are no longer used by the gpu decoder back to the cpp implementation.
* | | Merge pull request #6799 from ameerj/vp9-fixesbunnei2021-08-073-106/+48
|\ \ \ | |_|/ |/| | nvdec: Fix VP9 reference frame refreshes
| * | vp9: Cleanup unused variablesameerj2021-08-073-58/+17
| | | | | | | | | | | | | | | With reference frames refreshes fix, we no longer need to buffer two frames in advance. We can also remove other unused or otherwise unneeded variables.
| * | vp9: Fix reference frame refreshesameerj2021-08-072-48/+31
| |/ | | | | | | This resolves the artifacting when decoding VP9 streams.
* | nvdec: Implement VA-API hardware video acceleration (#6713)yzct123452021-08-045-72/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | decoders: Optimize swizzle copy performance (#6790)yzct123452021-08-021-9/+43
| | | | | | This makes UnswizzleTexture up to two times faster. It is the main bottleneck in NVDEC video decoding.
* | Merge pull request #6720 from ameerj/vk-screenshotFernando S2021-08-017-73/+245
|\ \ | | | | | | renderer_vulkan: Implement screenshots
| * | renderers: Add explicit invert_y bool to screenshot callbackameerj2021-07-294-5/+5
| | | | | | | | | | | | OpenGL and Vulkan images render in different coordinate systems. This allows us to specify the coordinate system of the screenshot within each renderer
| * | renderer_vulkan: Implement screenshotsameerj2021-07-292-0/+152
| | |
| * | vk_blit_screen: Add public CreateFramebuffer methodameerj2021-07-292-14/+18
| | |
| * | vk_blit_screen: Make Draw method more genericameerj2021-07-293-55/+71
| | | | | | | | | | | | Allows specifying the framebuffer and render area dimensions, rather than being hard coded for the render window.
* | | Merge pull request #6765 from ReinUsesLisp/y-negate-vkAmeer J2021-08-011-2/+7
|\ \ \ | |_|/ |/| | vk_rasterizer: Flip viewport on Y_NEGATE
| * | vk_rasterizer: Flip viewport on Y_NEGATEReinUsesLisp2021-07-291-2/+7
| |/ | | | | | | | | Matches OpenGL's behavior. I don't believe this register flips geometry, but we have to try to match behavior on both backends.
* | Merge pull request #6759 from ReinUsesLisp/pipeline-statisticsbunnei2021-07-3013-19/+278
|\ \ | |/ |/| renderer_vulkan: Add setting to log pipeline statistics
| * renderer_vulkan: Add setting to log pipeline statisticsReinUsesLisp2021-07-2813-19/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #6749 from lioncash/rtargetbunnei2021-07-281-3/+3
|\ \ | |/ |/| render_target: Add missing initializer for size extent
| * render_target: Add missing initializer for size extentLioncash2021-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #6748 from lioncash/engine-initRodrigo Locatti2021-07-272-2/+2
|\ \ | | | | | | video_core/engine: Consistently initialize rasterizer pointers
| * | video_core/engine: Consistently initialize rasterizer pointersLioncash2021-07-272-2/+2
| |/ | | | | | | | | Ensures all of the engines have consistent and deterministic initialization of the rasterizer pointers.
* | Merge pull request #6745 from lioncash/copiesbunnei2021-07-273-5/+2
|\ \ | | | | | | video_core: Remove some unused variables
| * | buffer_cache: Remove unused small_vector in CommitAsyncFlushesHigh()Lioncash2021-07-271-1/+0
| | | | | | | | | | | | | | | Given this is non-trivial, the constructor is required to execute, so this removes a bit of redundant codegen.
| * | gl_shader_cache: Remove unused variableLioncash2021-07-271-1/+0
| | |
| * | vk_compute_pass: Remove unused capturesLioncash2021-07-271-3/+2
| |/ | | | | | | Resolves two compiler warnings.
* / vulkan_wrapper: Fix SetObjectName() always indicating objects as imagesLioncash2021-07-271-1/+1
|/ | | | We should be using the passed in object type instead.
* Merge pull request #6696 from ameerj/speed-limit-renamebunnei2021-07-273-12/+4
|\ | | | | general: Rename "Frame Limit" references to "Speed Limit"
| * renderer_base: Removed redundant settingsameerj2021-07-243-12/+4
| | | | | | | | | | 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.
| * general: Rename "Frame Limit" references to "Speed Limit"ameerj2021-07-241-1/+1
| | | | | | | | | | 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.
* | Merge pull request #6741 from ReinUsesLisp/stream-removeRodrigo Locatti2021-07-272-244/+0
|\ \ | | | | | | vk_stream_buffer: Remove unused stream buffer
| * | vk_stream_buffer: Remove unused stream bufferReinUsesLisp2021-07-262-244/+0
| | | | | | | | | | | | Remove unused file.
* | | Merge pull request #6740 from K0bin/hvv-fallbackRodrigo Locatti2021-07-271-8/+21
|\ \ \ | | | | | | | | Handle allocation failure in Staging buffer
| * | | vk_staging_buffer_pool: Fall back to host memory when allocation failsRobin Kertels2021-07-261-8/+21
| |/ /
* | | Merge pull request #6728 from ReinUsesLisp/null-buffer-usageRodrigo Locatti2021-07-261-3/+7
|\ \ \ | | | | | | | | vk_buffer_cache: Add transform feedback usage to null buffer
| * | | vk_buffer_cache: Add transform feedback usage to null bufferReinUsesLisp2021-07-261-3/+7
| |/ / | | | | | | | | | Fixes bad API usages on Vulkan.
* / / vk_compute_pass: Fix pipeline barrier for indexed quadsReinUsesLisp2021-07-261-1/+1
|/ / | | | | | | Use an index buffer barrier instead of a vertex input read barrier.
* | Merge pull request #6585 from ameerj/hadesbunnei2021-07-25163-26949/+7358
|\ \ | | | | | | Shader Decompiler Rewrite
| * | vulkan/blit_image: Commit descriptor sets within worker threadReinUsesLisp2021-07-231-9/+7
| | | | | | | | | | | | | | | Fixes race condition caused. The descriptor pool is not thread safe, so we have to commit descriptor sets within the same thread.
| * | vulkan_device: Blacklist Volta and older from VK_KHR_push_descriptorReinUsesLisp2021-07-231-4/+39
| | | | | | | | | | | | | | | Causes crashes on Link's Awakening intro. It's hard to debug if it's our fault due to bugs in validation layers.
| * | Revert "renderers: Disable async shader compilation"ReinUsesLisp2021-07-232-5/+3
| | | | | | | | | | | | This reverts commit 4a152767286717fa69bfc94846a124a366f70065.
| * | opengl: Fix asynchronous shadersReinUsesLisp2021-07-232-4/+33
| | | | | | | | | | | | | | | Wait for shader to build before configuring it, and wait for the shader to build before sharing it with other contexts.
| * | shader_environment: Receive cache version from outsideReinUsesLisp2021-07-234-16/+23
| | | | | | | | | | | | This allows us invalidating OpenGL and Vulkan separately in the future.
| * | shader: Fix disabled attribute default valuesameerj2021-07-231-1/+1
| | |
| * | gl_device: Simplify GLASM setting logicameerj2021-07-231-15/+8
| | |
| * | renderer_opengl: Use ARB_separate_shader_objectsReinUsesLisp2021-07-239-116/+154
| | | | | | | | | | | | | | | Ensures that states set for a particular stage are not attached to other stages which may not need them.
| * | glsl: Clamp shared mem size to GL_MAX_COMPUTE_SHARED_MEMORY_SIZEameerj2021-07-231-0/+1
| | |
| * | gl_shader_cache: Properly implement asynchronous shadersReinUsesLisp2021-07-231-1/+1
| | |
| * | shader_recompiler, video_core: Resolve clang errorslat9nq2021-07-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silences the following warnings-turned-errors: -Wsign-conversion -Wunused-private-field -Wbraced-scalar-init -Wunused-variable And some other errors
| * | renderers: Fix clang formattingameerj2021-07-234-9/+13
| | |
| * | renderers: Disable async shader compilationameerj2021-07-232-3/+5
| | | | | | | | | | | | The current implementation is prone to causing graphical issues. Disable until a better solution is implemented.
| * | maxwell_to_vk: Add R16_SNORMReinUsesLisp2021-07-232-1/+2
| | |
| * | shader: Ignore global memory ops on devices lacking int64 supportameerj2021-07-232-0/+2
| | |
| * | vulkan_device: Add missing include algorithmlat9nq2021-07-231-0/+1
| | |
| * | vulkan_device: Blacklist ampere devices from float16 mathameerj2021-07-232-12/+23
| | |
| * | gl_shader_cache: Fixes for async shadersameerj2021-07-232-2/+25
| | |
| * | vulkan_device: Enable VK_EXT_extended_dynamic_state on RADV 21.2 onwardReinUsesLisp2021-07-231-4/+7
| | |
| * | emit_spirv: Workaround VK_KHR_shader_float_controls on fp16 NvidiaReinUsesLisp2021-07-232-0/+2
| | | | | | | | | | | | Fix regression on Fire Emblem: Three Houses when using native fp16.
| * | vk_rasterizer: Workaround bug in VK_EXT_vertex_input_dynamic_stateReinUsesLisp2021-07-234-19/+20
| | | | | | | | | | | | | | | Workaround potential bug on Nvidia's driver where only updating high attributes leaves low attributes out dated.
| * | shader: Fix disabled and unwritten attributes and varyingsReinUsesLisp2021-07-231-15/+20
| | |
| * | vk_graphics_pipeline: Implement smooth linesReinUsesLisp2021-07-235-5/+65
| | |
| * | vk_graphics_pipeline: Implement line widthReinUsesLisp2021-07-238-8/+36
| | |
| * | video_core: Enable GL SPIR-V shaderslat9nq2021-07-237-38/+105
| | |
| * | general: Add setting shader_backendlat9nq2021-07-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | glasm: Add passthrough geometry shader supportReinUsesLisp2021-07-233-1/+7
| | |
| * | shader: Rework varyings and implement passthrough geometry shadersReinUsesLisp2021-07-237-15/+43
| | | | | | | | | | | | | | | | | | Put all varyings into a single std::bitset with helpers to access it. Implement passthrough geometry shaders using host's.
| * | vk_graphics_pipeline: Implement conservative renderingReinUsesLisp2021-07-236-10/+44
| | |
| * | shader: Unify shader stage typesReinUsesLisp2021-07-2314-53/+28
| | |
| * | shader: Emulate 64-bit integers when not supportedReinUsesLisp2021-07-235-2/+13
| | | | | | | | | | | | Useful for mobile and Intel Xe devices.
| * | gl_graphics_pipeline: Fix assembly shaders check for transform feedbacksReinUsesLisp2021-07-231-1/+1
| | |
| * | gl_graphics_pipeline: Inline hash and operator== key functionsReinUsesLisp2021-07-232-12/+8
| | |
| * | gl_shader_cache: Check previous pipeline before checking hash mapReinUsesLisp2021-07-235-29/+41
| | | | | | | | | | | | Port optimization from Vulkan.
| * | gl_graphics_pipeline: Port optimizations from Vulkan pipelinesReinUsesLisp2021-07-232-57/+141
| | |
| * | buffer_cache: Fix debugging leftoverReinUsesLisp2021-07-231-1/+1
| | |
| * | buffer_cache: Fix size reductions not having in mind bind sizesReinUsesLisp2021-07-231-7/+23
| | | | | | | | | | | | | | | A buffer binding can change between shaders without changing the shaders. This lead to outdated bindings on OpenGL.
| * | shaders: Allow shader notify when async shaders is disabledameerj2021-07-232-11/+9
| | |
| * | vk_graphics_pipeline: Use VK_KHR_push_descriptor when availableReinUsesLisp2021-07-238-36/+88
| | | | | | | | | | | | ~51% faster on Nvidia compared to previous method.
| * | shader: Properly manage attributes not written from previous stagesReinUsesLisp2021-07-232-5/+22
| | |
| * | shader: Split profile and runtime info headersReinUsesLisp2021-07-232-1/+2
| | |
| * | shader: Add support for native 16-bit floatsReinUsesLisp2021-07-235-10/+24
| | |
| * | shader: Rename maxwell/program.h to translate_program.hReinUsesLisp2021-07-232-2/+2
| | |
| * | vulkan_device: Blacklist VK_EXT_vertex_input_dynamic_state on IntelReinUsesLisp2021-07-231-0/+4
| | |
| * | glsl: Address rest of feedbackameerj2021-07-234-17/+22
| | |
| * | glsl: Conditionally use fine/coarse derivatives based on device supportameerj2021-07-231-0/+1
| | |
| * | glsl: Cleanup/Address feedbackameerj2021-07-231-0/+2
| | |
| * | gl_shader_cache: Implement async shadersameerj2021-07-237-107/+154
| | |
| * | glsl: Add stubs for sparse queries and variable aoffi when not supportedameerj2021-07-233-0/+8
| | |
| * | gl_shader_cache: Remove const from pipeline source argumentsameerj2021-07-234-6/+6
| | |
| * | gl_shader_cache: Move OGL shader compilation to the respective Pipeline constructorameerj2021-07-235-76/+79
| | |
| * | glsl: Address more feedback. Implement indexed texture readsameerj2021-07-231-3/+3
| | |
| * | gl_rasterizer: Add texture fetch barrier for fragmentsameerj2021-07-231-1/+1
| | | | | | | | | | | | Fixes flicker seen in XC2
| * | glsl: Implement fswzaddameerj2021-07-231-0/+1
| | | | | | | | | | | | and wip nv thread shuffle impl
| * | glsl: Rebase fixesameerj2021-07-232-3/+5
| | |
| * | glsl: Use textureGrad fallback when EXT_texture_shadow_lod is unsupportedameerj2021-07-231-0/+1
| | |
| * | glsl: skip gl_ViewportIndex write if device does not support itameerj2021-07-231-0/+1
| | |
| * | glsl: Implement transform feedbackameerj2021-07-231-5/+13
| | |
| * | glsl: Implement VOTE for subgroup size potentially largerameerj2021-07-233-1/+7
| | |
| * | glsl: Implement some attribute getters and settersameerj2021-07-231-1/+0
| | |
| * | glsl: Query GL Device for FP16 extension supportameerj2021-07-233-0/+14
| | |
| * | glsl: Fixup build issuesReinUsesLisp2021-07-231-1/+1
| | |
| * | glsl: Initial backendameerj2021-07-231-2/+5
| | |
| * | vk_rasterizer: Exit render passes on fragment barriersReinUsesLisp2021-07-231-0/+1
| | |
| * | vk_graphics_pipeline: Fix path with no VK_EXT_extended_dynamic_stateRodrigo Locatti2021-07-231-1/+1
| | |
| * | buffer_cache: Invalidate fast buffers on computeReinUsesLisp2021-07-231-0/+1
| | |
| * | shader: Add shader loop safety check settingslat9nq2021-07-231-2/+2
| | | | | | | | | | | | Also add a setting for enable Nsight Aftermath.
| * | vulkan_device: Enable VK_EXT_vertex_input_dynamic_stateReinUsesLisp2021-07-231-0/+28
| | |
| * | vk_pipeline_cache: Skip cached pipelines with different dynamic stateReinUsesLisp2021-07-231-0/+6
| | |
| * | vulkan: Add VK_EXT_vertex_input_dynamic_state supportReinUsesLisp2021-07-2311-116/+291
| | | | | | | | | | | | | | | Reduces the number of total pipelines generated on Vulkan. Tested on Super Smash Bros. Ultimate.
| * | shader: Reorder shader cache directoriesReinUsesLisp2021-07-232-18/+12
| | |
| * | vk_rasterizer: Implement first indexReinUsesLisp2021-07-231-2/+5
| | |
| * | vulkan: Use VK_EXT_provoking_vertex when availableReinUsesLisp2021-07-236-4/+52
| | |
| * | gl_buffer_cache: Use unorm internal formats for snorm texture buffer viewsameerj2021-07-231-1/+24
| | | | | | | | | | | | Fixes black textures in UE4 games
| * | shader_environment: Fix local memory size calculationsReinUsesLisp2021-07-231-3/+3
| | |
| * | buffer_cache: Fix copy based uniform bindings trackingReinUsesLisp2021-07-232-9/+22
| | |
| * | shader_environment: Add shader_local_memory_crs_size to local memory sizeameerj2021-07-231-1/+1
| | | | | | | | | | | | Fixes DOOM 2016 missing local memory
| * | gl_texture_cache: Create image storage viewsReinUsesLisp2021-07-234-38/+126
| | | | | | | | | | | | Fixes SULD.D tests.
| * | gl_shader_util: Move shader utility code to a separate fileReinUsesLisp2021-07-237-245/+106
| | |
| * | gl_shader_cache: Store workers in shader cache objectReinUsesLisp2021-07-232-58/+78
| | |
| * | vk_pipeline_cache,shader_notify: Add shader notificationsReinUsesLisp2021-07-239-90/+121
| | |
| * | vk_pipeline_cache: Add asynchronous shadersReinUsesLisp2021-07-233-3/+33
| | |
| * | vk_rasterizer: Flush work on clear and dispatchesReinUsesLisp2021-07-231-0/+3
| | |
| * | DMA: Restrict optimised path for BlockToLinear further.FernandoS272021-07-231-1/+2
| | |
| * | vk_swapchain: Handle outdated swapchainsReinUsesLisp2021-07-233-17/+34
| | | | | | | | | | | | Fixes pixelated presentation on Intel devices.
| * | shader: Fix VertexA Shaders.FernandoS272021-07-231-5/+21
| | |
| * | vk_buffer_cache: Handle null texture buffersReinUsesLisp2021-07-231-0/+4
| | | | | | | | | | | | Fixes a crash on Age of Calamity cutscenes.
| * | nsight_aftermath_tracker: Fix SPIR-V module writesReinUsesLisp2021-07-231-1/+1
| | |
| * | vk_pipeline_cache: Set support_derivative_control to trueReinUsesLisp2021-07-231-0/+1
| | |
| * | glasm: Use ARB_derivative_control conditionallyReinUsesLisp2021-07-233-0/+7
| | |
| * | buffer_cache: Reduce uniform buffer size from shader usageReinUsesLisp2021-07-239-35/+61
| | | | | | | | | | | | Increases performance significantly on certain titles.
| * | transform_feedback: Read buffer stride from index instead of layoutReinUsesLisp2021-07-231-1/+2
| | |
| * | fixed_pipeline_state: Use regular for loop instead of ranges for perfReinUsesLisp2021-07-231-2/+3
| | | | | | | | | | | | MSVC generates better code for it.
| * | vk_swapchain: Avoid recreating the swapchain on each frameReinUsesLisp2021-07-232-15/+9
| | | | | | | | | | | | | | | Recreate only when requested (or sRGB is changed) instead of tracking the frontend's size. That size is still used as a hint.
| * | vulkan: Conditionally use shaderInt16ReinUsesLisp2021-07-233-2/+9
| | | | | | | | | | | | Add support for Polaris AMD devices.
| * | vulkan: Enable depth bounds and use it conditionallyReinUsesLisp2021-07-234-2/+17
| | | | | | | | | | | | Intel devices pre-Xe don't support this.
| * | vk_buffer_cache: Add transform feedback usage to buffersReinUsesLisp2021-07-231-15/+22
| | |
| * | opengl: Declare fragment outputs even if they are not usedReinUsesLisp2021-07-232-0/+9
| | | | | | | | | | | | | | | | | | Fixes Ori and the Blind Forest's menu on GLASM. For some reason (probably high level optimizations) it is not sanitized on SPIR-V for OpenGL. Vulkan is unaffected by this change.
| * | buffer_cache: Mark uniform buffers as dirty if any enable bit changesReinUsesLisp2021-07-235-7/+17
| | |
| * | vulkan_device: Enable float64 and int64 conditionallyReinUsesLisp2021-07-232-2/+6
| | | | | | | | | | | | Add Intel Xe support.
| * | texture_cache: Reduce invalid image/sampler error severityReinUsesLisp2021-07-231-7/+7
| | |
| * | shader: Handle host exceptionsReinUsesLisp2021-07-234-32/+55
| | |
| * | glasm: Prepare XFB from state instead of global registersReinUsesLisp2021-07-231-4/+2
| | |
| * | glasm: Use storage buffers instead of global memory when possibleReinUsesLisp2021-07-2311-67/+120
| | |
| * | gl_shader_cache: Add disk shader cacheReinUsesLisp2021-07-233-11/+116
| | |
| * | video_core,shader: Clang-format fixesReinUsesLisp2021-07-232-5/+10
| | |
| * | gl_shader_cache: Rename Program abstractions into PipelineReinUsesLisp2021-07-2310-104/+104
| | |
| * | gl_shader_cache: Do not flip tessellation on OpenGLReinUsesLisp2021-07-231-2/+1
| | |
| * | gl_graphics_program: Fix texture buffer bindingsReinUsesLisp2021-07-231-24/+35
| | |
| * | gl_shader_cache: Conditionally use viewport maskReinUsesLisp2021-07-231-1/+1
| | |
| * | gl_shader_cache,glasm: Conditionally use typeless image reads extensionReinUsesLisp2021-07-232-37/+39
| | |
| * | gl_shader_cache: Improve GLASM error print logicReinUsesLisp2021-07-231-7/+10
| | |
| * | glasm: Implement forced early ZReinUsesLisp2021-07-231-2/+2
| | |
| * | glasm: Set transform feedback stateReinUsesLisp2021-07-235-113/+132
| | |
| * | video_core: Abstract transform feedback translation utilityReinUsesLisp2021-07-236-111/+145
| | |
| * | gl_shader_cache: Pass shader runtime informationReinUsesLisp2021-07-231-2/+74
| | |
| * | shader: Split profile and runtime information in separate structsReinUsesLisp2021-07-233-237/+212
| | |
| * | gl_shader_manager: Zero initialize current assembly programsReinUsesLisp2021-07-231-1/+1
| | |
| * | gl_shader_manager: Remove unintentionally committed #pragmaReinUsesLisp2021-07-231-2/+0
| | |
| * | renderer_opengl: State track compute assembly programsReinUsesLisp2021-07-233-4/+21
| | |
| * | renderer_opengl: State track assembly programsReinUsesLisp2021-07-233-23/+56
| | |
| * | HACK: Bind stages before and after bindingsReinUsesLisp2021-07-231-0/+11
| | | | | | | | | | | | | | | | | | | | | Works around a bug where program parameters are only applied to the current stage, and this one wasn't bound at the moment. Affects all SSBO usages on GLASM.
| * | glasm: Support textures used in more than one stageReinUsesLisp2021-07-231-1/+1
| | |
| * | opengl: Initial (broken) support to GLASM shadersReinUsesLisp2021-07-233-14/+53
| | |
| * | vk_update_descriptor: Properly initialize payload on the update descriptor queueReinUsesLisp2021-07-231-1/+3
| | |
| * | vk_pipeline_cache: Enable int8 and int16 types on VulkanReinUsesLisp2021-07-231-0/+2
| | |
| * | gl_rasterizer: Flush L2 caches before glFlush on GLASMReinUsesLisp2021-07-231-0/+8
| | |
| * | glasm: Initial GLASM compute implementation for testingReinUsesLisp2021-07-233-14/+47
| | |
| * | vk_scheduler: Use locks instead of SPSC a queueReinUsesLisp2021-07-232-32/+42
| | | | | | | | | | | | This tries to fix a data race where we'd wait forever for the GPU.
| * | vk_query_cache: Wait before reading queriesReinUsesLisp2021-07-231-9/+2
| | |
| * | vk_master_semaphore: Use fetch_add to increase master semaphore tickReinUsesLisp2021-07-232-6/+4
| | |
| * | gl_shader_cache: Remove code unintentionally committedReinUsesLisp2021-07-231-3/+0
| | |
| * | Move SPIR-V emission functions to their own headerReinUsesLisp2021-07-232-7/+6
| | |
| * | shader: Initial OpenGL implementationReinUsesLisp2021-07-2335-705/+1415
| | |
| * | spirv: Support OpenGL uniform buffers and change bindingsReinUsesLisp2021-07-231-2/+5
| | |
| * | shader: Address feedbackFernandoS272021-07-231-9/+9
| | |
| * | shader: Implement VertexA stageFernandoS272021-07-231-3/+14
| | |
| * | vk_graphics_pipeline: Fix texture buffer descriptorsReinUsesLisp2021-07-231-7/+8
| | |
| * | vk_scheduler: Allow command submission on worker threadReinUsesLisp2021-07-238-182/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes how Scheduler::Flush works. It queues the current command buffer to be sent to the GPU but does not do it immediately. The Vulkan worker thread takes care of that. Users will have to use Scheduler::Flush + Scheduler::WaitWorker to get the previous behavior. Scheduler::Finish is unchanged. To avoid waiting on work never queued, Scheduler::Wait sends the current command buffer if that's what the caller wants to wait.
| * | vk_compute_pass: Fix -Wshadow warningReinUsesLisp2021-07-231-3/+3
| | |
| * | shader: Move pipeline cache logic to separate filesReinUsesLisp2021-07-2312-824/+1095
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move code to separate files to be able to reuse it from OpenGL. This greatly simplifies the pipeline cache logic on Vulkan. Transform feedback state is not yet abstracted and it's still intrusively stored inside vk_pipeline_cache. It will be moved when needed on OpenGL.
| * | vulkan: Defer descriptor set work to the Vulkan threadReinUsesLisp2021-07-238-79/+69
| | | | | | | | | | | | | | | | | | | | | Move descriptor lookup and update code to a separate thread. Delaying this removes work from the main GPU thread and allows creating descriptor layouts on another thread. This reduces a bit the workload of the main thread when new pipelines are encountered.
| * | vulkan: Rework descriptor allocation algorithmReinUsesLisp2021-07-2315-197/+314
| | | | | | | | | | | | | | | | | | Create multiple descriptor pools on demand. There are some degrees of freedom what is considered a compatible pool to avoid wasting large pools on small descriptors.
| * | vk_graphics_pipeline: Generate specialized pipeline config functions and improve codeReinUsesLisp2021-07-232-31/+230
| | |
| * | shader: Accelerate pipeline transitions and use dirty flags for shadersReinUsesLisp2021-07-239-64/+114
| | |
| * | vk_compute_pipeline: Fix index comparison oversight on compute texture buffersReinUsesLisp2021-07-231-1/+1
| | |
| * | vulkan_device: Require shaderClipDistance and shaderCullDistance featuresReinUsesLisp2021-07-231-2/+4
| | |
| * | vk_graphics_pipeline: Guard against non-tessellation pipelines using patchesReinUsesLisp2021-07-231-2/+8
| | |
| * | shader: Fix bugs and build issues on GCCRodrigo Locatti2021-07-233-4/+4
| | |
| * | shader: Fix render targets with null attachmentsReinUsesLisp2021-07-232-26/+34
| | |
| * | shader: Require dual source blendingReinUsesLisp2021-07-231-1/+2
| | |
| * | shader: Implement indexed texturesReinUsesLisp2021-07-233-64/+95
| | |
| * | shader: Move microinstruction header to the value headerReinUsesLisp2021-07-231-1/+1
| | |
| * | shader: Implement D3D samplersReinUsesLisp2021-07-233-37/+51
| | |
| * | shader: Implement SR_Y_DIRECTIONFernandoS272021-07-233-0/+4
| | |
| * | shader: Implement PIXLD.MY_INDEXReinUsesLisp2021-07-231-1/+2
| | |
| * | spirv: Implement ViewportMask with NV_viewport_array2ReinUsesLisp2021-07-233-0/+12
| | |
| * | shader: Implement tessellation shaders, polygon mode and invocation idReinUsesLisp2021-07-236-3/+50
| | |
| * | vk_pipeline_cache: Silence GCC warningslat9nq2021-07-231-0/+2
| | | | | | | | | | | | | | | Silences `-Werror=missing-field-initializers` due to missing initializers.
| * | spirv: Implement image buffersReinUsesLisp2021-07-234-26/+56
| | |
| * | spirv: Implement alpha testameerj2021-07-231-0/+36
| | |
| * | shader: Implement transform feedbacks and define file formatReinUsesLisp2021-07-233-7/+156
| | |
| * | shader: Implement early Z testsReinUsesLisp2021-07-231-0/+1
| | |
| * | spirv: Rework storage buffers and shader memoryReinUsesLisp2021-07-231-1/+28
| | |
| * | shader: Implement geometry shadersReinUsesLisp2021-07-232-7/+56
| | |
| * | pipeline_helper: Simplify descriptor objects initializationReinUsesLisp2021-07-231-33/+25
| | |
| * | shader: Implement ATOM/S and REDameerj2021-07-233-0/+21
| | |
| * | nsight_aftermath_tracker: Report used shaders to Nsight AftermathReinUsesLisp2021-07-236-16/+20
| | |
| * | spirv: Guard against typeless image reads on unsupported devicesReinUsesLisp2021-07-231-0/+1
| | |
| * | vk_rasterizer: Request outside render pass execution context for computeReinUsesLisp2021-07-231-0/+1
| | |
| * | pipeline_helper: Add missing [[maybe_unused]]ReinUsesLisp2021-07-231-1/+1
| | |
| * | shader: Implement SULD and SUSTReinUsesLisp2021-07-238-65/+135
| | |
| * | shader: Address feedback + clang formatlat9nq2021-07-231-2/+2
| | |
| * | shader_recompiler,video_core: Cleanup some GCC and Clang errorslat9nq2021-07-235-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly fixing unused *, implicit conversion, braced scalar init, fpermissive, and some others. Some Clang errors likely remain in video_core, and std::ranges is still a pertinent issue in shader_recompiler shader_recompiler: cmake: Force bracket depth to 1024 on Clang Increases the maximum fold expression depth thread_worker: Include condition_variable Don't use list initializers in control flow Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
| * | shader: Interact texture buffers with buffer cacheReinUsesLisp2021-07-2314-119/+304
| | |
| * | shader: Implement texture buffersReinUsesLisp2021-07-234-12/+29
| | |
| * | vk_pipeline_cache: Fix num of pipeline workers on weird platformsReinUsesLisp2021-07-231-1/+1
| | |
| * | shader: Fix ShadowCube declaration type, set number of pipeline threads based on hardwareFernandoS272021-07-231-1/+3
| | |
| * | vk_compute_pass: Fix compute passesReinUsesLisp2021-07-233-23/+19
| | |
| * | shader: Remove atomic flags and use mutex + cond variable for pipelinesReinUsesLisp2021-07-234-11/+32
| | |
| * | vk_pipeline_cache: Remove unnecesary scope in pipeline cache lockingReinUsesLisp2021-07-231-15/+12
| | |
| * | vk_pipeline_cache: Small fixes to the pipeline cacheFernandoS272021-07-231-10/+14
| | |
| * | shader: Mark SSBOs as written when they areFernandoS272021-07-232-2/+2
| | |
| * | shader: Implement ViewportIndexFernandoS272021-07-231-0/+1
| | |
| * | vulkan: Serialize pipelines on a separate threadReinUsesLisp2021-07-232-67/+64
| | |
| * | vulkan: Create pipeline layouts in separate threadsReinUsesLisp2021-07-237-63/+65
| | |
| * | vulkan: Build pipelines in parallel at runtimeReinUsesLisp2021-07-239-165/+197
| | | | | | | | | | | | | | | Wait from the worker thread for a pipeline to build before binding it to the command buffer. This allows queueing pipelines to multiple threads.
| * | vk_pipeline_cache: Name SPIR-V modulesReinUsesLisp2021-07-231-1/+11
| | |
| * | shader: Address feedbackFernandoS272021-07-231-1/+1
| | |
| * | shader: Implement TLDFernandoS272021-07-231-2/+1
| | |
| * | spirv: Add fixed pipeline point sizeReinUsesLisp2021-07-231-0/+3
| | |
| * | shader: Implement BRXFernandoS272021-07-231-1/+49
| | |
| * | vk_pipeline_cache: Fix size hashing of shadersReinUsesLisp2021-07-231-8/+7
| | |
| * | shader: Implement LDS, STS, LDL, and STS and use SPIR-V 1.4 when availableReinUsesLisp2021-07-233-19/+104
| | |
| * | shader: Better interpolation and disabled attributes supportReinUsesLisp2021-07-232-2/+5
| | |
| * | spirv: Remove dependencies on Environment when generating SPIR-VReinUsesLisp2021-07-231-7/+3
| | |
| * | vk_pipeline_cache: Fix pipeline and shader cachesReinUsesLisp2021-07-232-6/+21
| | |
| * | shader: Fix rasterizer integration order issuesReinUsesLisp2021-07-233-7/+6
| | |
| * | shader: Implement TXQ and fix FragDepthReinUsesLisp2021-07-231-0/+92
| | |
| * | shader: Implement NDC [-1, 1], attribute types and default varying initializationReinUsesLisp2021-07-233-3/+37
| | |
| * | shader: Implement VOTEameerj2021-07-234-1/+15
| | |
| * | vk_pipeline_cache: Fix ReleaseContents orderReinUsesLisp2021-07-231-2/+2
| | |
| * | vk_pipeline_cache: Add pipeline cacheReinUsesLisp2021-07-232-0/+7
| | |
| * | vk_pipeline_cache: Add pipeline cacheReinUsesLisp2021-07-234-98/+332
| | |
| * | shader: Implement DMNMX, DSET, DSETPameerj2021-07-231-0/+2
| | |
| * | spirv: Implement VertexId and InstanceId, refactor codeReinUsesLisp2021-07-231-0/+1
| | |
| * | shader: Implement I2FReinUsesLisp2021-07-231-1/+2
| | |
| * | shader: Add partial rasterizer integrationReinUsesLisp2021-07-2320-410/+1298
| | |
| * | spirv: Add SignedZeroInfNanPreserve logicameerj2021-07-231-0/+4
| | |
| * | shader: Initial support for textures and TEXReinUsesLisp2021-07-234-1/+111
| | |
| * | spirv: Fixes and Intel specific workaroundsReinUsesLisp2021-07-231-0/+1
| | |
| * | shader: Rename, implement FADD.SAT and P2R (imm)ReinUsesLisp2021-07-231-2/+2
| | |
| * | shader: Add denorm flush supportReinUsesLisp2021-07-235-33/+50
| | |
| * | spirv: Add lower fp16 to fp32 passReinUsesLisp2021-07-234-9/+14
| | |
| * | shader: Primitive Vulkan integrationReinUsesLisp2021-07-2315-2538/+430
| | |
| * | shader: Remove old shader managementReinUsesLisp2021-07-2379-19513/+53
| | |
| * | spirv: Initial SPIR-V supportReinUsesLisp2021-07-232-3265/+0
| |/
* | Merge pull request #6690 from ReinUsesLisp/dma-clear-fixupsbunnei2021-07-242-7/+3
|\ \ | |/ |/| buffer_cache: Misc fixups related to buffer clears
| * gl_buffer_cache: Use glClearNamedBufferSubData:GL_RED instead of GL_RGBAReinUsesLisp2021-07-201-1/+1
| | | | | | | | Avoids reading out of bounds from the stack.
| * buffer_cache: Simplify clear logicReinUsesLisp2021-07-201-6/+2
| | | | | | | | | | Use existing helper functions and avoid looping when only one buffer has to be active.
* | Merge pull request #6686 from ReinUsesLisp/vk-optimal-copybunnei2021-07-221-21/+35
|\ \ | |/ |/| vk_texture_cache: Use VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL when possible
| * vk_texture_cache: Use VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL when possibleReinUsesLisp2021-07-201-21/+35
| | | | | | | | Silences performance warnings generated from validation layers on each frame.
* | Merge pull request #6629 from FernandoS27/accel-dma-2bunnei2021-07-2011-12/+136
|\ \ | | | | | | DMAEngine: Accelerate BufferClear [accelerateDMA Part 2]
| * | Buffer cache: Fixes, Clang and Feedback.Fernando Sahmkow2021-07-153-11/+10
| | |
| * | GPUMemoryManager: Force inmediate invalidation when writting block.Fernando Sahmkow2021-07-141-1/+1
| | |
| * | Buffer Cache: Fixes to DMA Copy.Fernando Sahmkow2021-07-141-6/+7
| | |
| * | DMAEngine: Revert flushing from Pitch to BlpockLinear.Fernando Sahmkow2021-07-141-2/+7
| | |
| * | BufferCache: fix clearing on forced download.Fernando Sahmkow2021-07-141-10/+20
| | |
| * | DMAEngine: Accelerate BufferClearFernando Sahmkow2021-07-1311-6/+115
| | |
* | | Merge pull request #6685 from ReinUsesLisp/radeonsi-clientFernando S2021-07-201-1/+1
|\ \ \ | |_|/ |/| | gl_texture_cache: Workaround slow PBO downloads on radeonsi
| * | gl_texture_cache: Workaround slow PBO downloads on radeonsiReinUsesLisp2021-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There's an optimization bug on non-git mesa versions where not specifying GL_CLIENT_STORAGE_BIT causes very slow reads on the CPU side. Add this bit for all vendors.
* | | vk_buffer_cache: Fix quad index array with 0 vertices (#6627)Fernando S2021-07-201-0/+7
|/ /
* | Merge pull request #6580 from ReinUsesLisp/xfb-radvRodrigo Locatti2021-07-202-11/+19
|\ \ | | | | | | vk_buffer_cache: Use emulated null buffers for transform feedback
| * | vk_buffer_cache: Use emulated null buffers for transform feedbackReinUsesLisp2021-07-092-11/+19
| | | | | | | | | | | | | | | | | | Vulkan does not support null buffers on transform feedback bindings. Emulate these using the same null buffer we were using for index buffers.
* | | Merge pull request #6679 from yzct12345/fix-lets-goFernando S2021-07-191-1/+4
|\ \ \ | | | | | | | | Fix Pokemon Let's Go on Vulkan
| * | | Update src/video_core/renderer_vulkan/vk_texture_cache.cppyzct123452021-07-191-1/+1
| | | | | | | | | | | | Co-authored-by: Vitor K <vitor-kiguchi@hotmail.com>
| * | | Update src/video_core/renderer_vulkan/vk_texture_cache.cppyzct123452021-07-191-1/+1
| | | | | | | | | | | | Co-authored-by: Vitor K <vitor-kiguchi@hotmail.com>
| * | | Ignore wrong blit formatyzct123452021-07-181-1/+4
| | | |
* | | | Merge pull request #6670 from ReinUsesLisp/prepare-rtFernando S2021-07-191-0/+6
|\ \ \ \ | | | | | | | | | | texture_cache: Always prepare image views on render targets
| * | | | texture_cache: Always prepare image views on render targetsReinUsesLisp2021-07-181-0/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Images used as render targets were not being "prepared", causing desynchronizations on the texture cache. Needs #6669 to avoid performance regressions on certain cooking titles. - Fixes black shadows on Age of Calamity.
* | | | Merge pull request #6669 from ReinUsesLisp/fix-samples-sizesFernando S2021-07-191-53/+33
|\ \ \ \ | | | | | | | | | | texture_cache/util: Fix size calculations of multisampled images
| * | | | texture_cache/util: Fix size calculations of multisampled imagesReinUsesLisp2021-07-181-53/+33
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the texture cache we handle multisampled images by keeping their real size in samples (e.g. 1920x1080 with 4 samples is 3840x2160). This works nicely with size matches and other comparisons, but the calculation for guest sizes was not having this in mind, and the size was being multiplied (again) by the number of samples per dimension. For example a 3840x2160 texture cache image had its width and height multiplied by 2, resulting in a much larger texture. Fix this issue. - Fixes performance regression on cooking related titles when an unrelated bug was fixed.
* | | | vk_texture_cache: Finalize renderpass when downloading imagesReinUsesLisp2021-07-181-0/+1
| | | |
* | | | vk_compute_pass: Fix pipeline barriers on non-initialized ASTC imagesReinUsesLisp2021-07-181-2/+3
| | | |
* | | | vk_compute_pass: Fix ASTC buffer setup synchronizationReinUsesLisp2021-07-181-14/+14
|/ / /
* | | Merge pull request #6579 from ameerj/float-settingsbunnei2021-07-162-6/+7
|\ \ \ | | | | | | | | settings: Eliminate usage of float-point setting values
| * | | configure_graphics: Use u8 for bg_color valuesameerj2021-07-092-6/+7
| |/ /
* | | Merge pull request #6635 from ameerj/intel-vk-sm3dwFernando S2021-07-151-2/+4
|\ \ \ | | | | | | | | vk_rasterizer: Only clear valid color attachments
| * | | vk_rasterizer: Only clear valid color attachmentsameerj2021-07-131-2/+4
| | |/ | |/|
* | | Merge pull request #6525 from ameerj/nvdec-fixesFernando S2021-07-151-11/+10
|\ \ \ | |/ / |/| | nvdec: Fix Submit Ioctl data source, vic frame dimension computations
| * | vic: Fix dimension compuation of YUV framesameerj2021-07-151-11/+10
| | | | | | | | | | | | Fixes out of bound memory crashes in Mario Golf
* | | accelerateDMA: Fixes and feedback.Fernando Sahmkow2021-07-123-88/+62
| | |
* | | accelerateDMA: Accelerate Buffer Copies.Fernando Sahmkow2021-07-119-13/+176
| | |
* | | Buffer Cache: Address Feedback.Fernando Sahmkow2021-07-102-4/+9
| | |
* | | Buffer Cache: Fix GCC copmpile errorFernando Sahmkow2021-07-091-1/+0
| | |
* | | Fence Manager: remove reference fencing.Fernando Sahmkow2021-07-093-31/+6
| | |
* | | BufferCache: Additional download fixes.Fernando Sahmkow2021-07-092-23/+107
| | |
* | | Buffer Cache: Revert unnecessary range reduction.Fernando Sahmkow2021-07-091-29/+13
| | |
* | | Fence Manager: Force ordering on WFI.Fernando Sahmkow2021-07-094-38/+71
| | |
* | | Buffer Cache: Eliminate the AC Hack as the base game is fixed in Hades.Fernando Sahmkow2021-07-091-14/+4
| | |
* | | Fence Manager: Add fences on Reference Count.Fernando Sahmkow2021-07-098-6/+57
| | |
* | | Videocore: Address Feedback & CLANG Format.Fernando Sahmkow2021-07-092-78/+75
| | |
* | | Buffer Cache: Fix High Downloads and don't predownload on Extreme.Fernando Sahmkow2021-07-093-91/+122
| |/ |/|
* | Merge pull request #6539 from lat9nq/default-settingAmeer J2021-07-081-1/+1
|\ \ | | | | | | general: Move most settings' defaults and labels into their definition
| * | yuzu qt: Make most UISettings a BasicSettinglat9nq2021-06-291-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | For simple primitive settings, moves their defaults and labels to definition time. Also fixes typo and clang-format yuzu qt: config: Fix rng_seed
| * | general: Make most settings a BasicSettinglat9nq2021-06-281-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creates a new BasicSettings class in common/settings, and forces setting a default and label for each setting that uses it in common/settings. Moves defaults and labels from both frontends into common settings. Creates a helper function in each frontend to facillitate reading the settings now with the new default and label properties. Settings::Setting is also now a subclass of Settings::BasicSetting. Also adds documentation for both Setting and BasicSetting.
* | | Out of bound blit (#6531)Feng Chen2021-07-082-58/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix out of bound blit error * Fix code read * Fix ci error Co-authored-by: Feng Chen <chen.feng@gloritysolutions.com>
* | | util_shaders: Fix BindImageTexturelat9nq2021-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | According to https://gitlab.freedesktop.org/mesa/mesa/-/issues/3820#note_753371 we need to set these to true for use with 3D textures. Fixes BOTW teleporting on RadeonSI and iris.
* | | Merge pull request #6497 from FernandoS27/scotty-doesnt-knowbunnei2021-07-0713-59/+581
|\ \ \ | | | | | | | | GPU Memory Manager - Correct handling of non continuous backing memory.
| * | | Texture Cache: Fix collision with multiple overlaps of the same sparse texture.Fernando Sahmkow2021-07-041-1/+6
| | | |
| * | | Texture Cache: Fix GCC & Clang.Fernando Sahmkow2021-07-042-11/+11
| | | |
| * | | Texture Cache: Address feedback.Fernando Sahmkow2021-07-045-18/+37
| | | |
| * | | Texture Cache: Improve accuracy of sparse texture detection.Fernando Sahmkow2021-07-046-131/+342
| | | |
| * | | Texture Cache: Initial Implementation of Sparse Textures.Fernando Sahmkow2021-07-0412-23/+310
| | | |
* | | | Merge pull request #6537 from Morph1984/warningsbunnei2021-07-067-23/+8
|\ \ \ \ | | | | | | | | | | general: Enforce multiple warnings in MSVC
| * | | | video_core: Remove #pragma warning directives for external headersMorph2021-06-282-15/+0
| | | | |
| * | | | video_core: Enforce C4242Morph2021-06-281-3/+2
| | | | |
| * | | | video_core: Silence signed/unsigned mismatch warningsMorph2021-06-284-5/+6
| | | | |
* | | | | Merge pull request #6540 from Kelebek1/nvdecAmeer J2021-07-0510-356/+522
|\ \ \ \ \ | |_|/ / / |/| | | | Slightly refactor NVDEC and codecs for readability and safety
| * | | | Slightly refactor NVDEC and codecs for readability and safetyKelebek12021-07-0110-356/+522
| |/ / /
* | | | TextureCacheOGL: Implement Image Copies for 1D and 1D Array.Fernando Sahmkow2021-07-031-0/+26
| | | |
* | | | TextureCache: Fix 1D to 2D overlapps.Fernando Sahmkow2021-07-031-3/+0
| | | |
* | | | Merge pull request #6459 from lat9nq/ubuntu-fixesAmeer J2021-07-011-1/+4
|\ \ \ \ | | | | | | | | | | cmake: Improve Linux dependency checking for externals
| * | | | cmake: Fix find_program usage for 3.15lat9nq2021-06-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge pull request #6502 from ameerj/vendor-titleMorph2021-06-287-4/+91
|\ \ \ \ \ | |_|/ / / |/| | | | main: Add GPU Vendor name to running title bar
| * | | | gl_device: Expand on Mesa driver nameslat9nq2021-06-211-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes this list a bit more capable at identifying Mesa drivers. Tries to deal with two of the overloaded vendor strings in a more generic fashion.
| * | | | video_core: Add GPU vendor name to window title barameerj2021-06-217-4/+66
| | | | |
* | | | | buffer_cache: Only flush downloaded sizeReinUsesLisp2021-06-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression unintentionally introduced by the garbage collector. This makes regular memory downloads only flush the requested sizes. This negatively affected Koei Tecmo games.
* | | | | video_core: Enforce C4244ReinUsesLisp2021-06-261-0/+1
| | | | | | | | | | | | | | | | | | | | Enforce implicit integer casts to a smaller type as errors.
* | | | | codec,vic: Disable warnings in ffmpeg headersReinUsesLisp2021-06-262-4/+29
| | | | |
* | | | | vk_buffer_cache: Silence implicit cast warningsReinUsesLisp2021-06-261-2/+3
| | | | |
* | | | | buffer_cache/texture_cache: Make GC functions privateReinUsesLisp2021-06-262-5/+5
| | | | |
* | | | | buffer_cache: Silence implicit cast warningReinUsesLisp2021-06-261-1/+1
| |_|/ / |/| | |
* | | | vulkan_device: Make device memory match the rest of the fileReinUsesLisp2021-06-252-19/+18
| |_|/ |/| | | | | | | | Match the style in the file.
* | | Merge pull request #6496 from ameerj/astc-fixesbunnei2021-06-255-155/+50
|\ \ \ | | | | | | | | astc: Various robustness enhancements for the gpu decoder
| * | | util_shaders: Specify ASTC decoder memory barrier bitsameerj2021-06-191-1/+6
| | | |
| * | | astc_decoder.comp: Remove unnecessary LUT SSBOsameerj2021-06-195-113/+34
| | | | | | | | | | | | | | | | We can move them to instead be compile time constants within the shader.
| * | | astc: Various robustness enhancements for the gpu decoderameerj2021-06-195-47/+16
| |/ / | | | | | | | | | | | | | | | 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.
* | | Merge pull request #6519 from Wunkolo/mem-size-literalbunnei2021-06-255-14/+27
|\ \ \ | | | | | | | | common: Replace common_sizes into user-literals
| * | | common: Replace common_sizes into user-literalsWunkolo2021-06-245-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals.
* | | | Merge pull request #6517 from lioncash/fmtlibbunnei2021-06-242-2/+2
|\ \ \ \ | |/ / / |/| | | externals: Update fmt to 8.0.0
| * | | General: Resolve fmt specifiers to adhere to 8.0.0 API where applicableLioncash2021-06-232-2/+2
| | | | | | | | | | | | | | | | Also removes some deprecated API usages.
* | | | Merge pull request #6518 from lioncash/funcbunnei2021-06-231-0/+1
|\ \ \ \ | | | | | | | | | | maxwell3d: Add missing return in default SizeInBytes() case
| * | | | maxwell3d: Add missing return in default SizeInBytes() caseLioncash2021-06-231-0/+1
| |/ / / | | | | | | | | | | | | | | | | We were returning '1' in ComponentCount()'s default case but were neglecting to do the same with SizeInBytes().
* | | | Merge pull request #6465 from FernandoS27/sex-on-the-beachMai M2021-06-2317-63/+466
|\ \ \ \ | |/ / / |/| | | GPU: Implement a garbage collector for GPU Caches (project Reaper+)
| * | | Reaper: Set minimum cleaning limit on OGL.Fernando Sahmkow2021-06-221-1/+4
| | | |
| * | | Reaper: Guarantee correct deletion.Fernando Sahmkow2021-06-205-2/+23
| | | |
| * | | Reaper: Correct size calculation on Vulkan.Fernando Sahmkow2021-06-171-5/+3
| | | |
| * | | Reaper: Change memory restrictions on TC depending on host memory on VK.Fernando Sahmkow2021-06-178-39/+88
| | | |
| * | | Reaper: Address Feedback.Fernando Sahmkow2021-06-164-19/+41
| | | |
| * | | Reaper: Setup settings and final tuning.Fernando Sahmkow2021-06-163-32/+38
| | | |
| * | | Reaper: Tune it up to be an smart GC.Fernando Sahmkow2021-06-165-13/+130
| | | |
| * | | Initial Reaper SetupReinUsesLisp2021-06-166-56/+226
| | | | | | | | | | | | | | | | WIP
| * | | vulkan_memory_allocator: Release allocations with no commitsReinUsesLisp2021-06-162-5/+22
| | | |
* | | | Merge pull request #6508 from ReinUsesLisp/bootmanager-stop-tokenMai M2021-06-235-8/+8
|\ \ \ \ | | | | | | | | | | bootmanager: Use std::stop_source for stopping emulation
| * | | | bootmanager: Use std::stop_source for stopping emulationReinUsesLisp2021-06-225-8/+8
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Use its std::stop_token to abort shader cache loading. Using std::stop_token instead of std::atomic_bool allows the usage of other utilities like std::stop_callback.
* | | | common: fs: Remove [[nodiscard]] attribute on Remove* functionsMorph2021-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There are a lot of scenarios where we don't particularly care whether or not the removal operation and just simply attempt a removal. As such, removing the [[nodiscard]] attribute is best for these functions.
* | | | vk_master_semaphore: Use jthread for debug threadReinUsesLisp2021-06-222-19/+8
|/ / /
* | | vulkan_debug_callback: Skip logging known false-positive validation errorsameerj2021-06-181-0/+8
| | | | | | | | | | | | Avoids overwhelming the log with validation errors that are not applicable
* | | Merge pull request #6469 from ReinUsesLisp/blit-view-compatAmeer J2021-06-171-1/+9
|\ \ \ | |/ / |/| | texture_cache/util: Avoid relaxed image views on different bytes per block
| * | texture_cache/util: Avoid relaxed image views on different bytes per pixelReinUsesLisp2021-06-151-1/+9
| |/ | | | | | | Avoids API usage errors on UE4 titles leading to crashes.
* | astc_decoder: Fix LDR CEM1 endpoint calculationameerj2021-06-162-2/+2
| | | | | | | | | | | | | | | | 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>
* | configure_graphics: Add Accelerate ASTC decoding settingameerj2021-06-162-2/+11
| |
* | textures: Reintroduce CPU ASTC decoderameerj2021-06-164-2/+1592
|/ | | | | | | Users may want to fall back to the CPU ASTC texture decoder due to hangs and crashes that may be caused by keeping the GPU under compute heavy loads for extended periods of time. This is especially the case in games such as Astral Chain which make extensive use of ASTC textures.
* GPUTHread: Remove async reads from Normal Accuracy.Fernando Sahmkow2021-06-111-18/+6
|
* rasterizer: Update pages in batchesReinUsesLisp2021-06-111-15/+41
|
* Fix GCC undefined behavior sanitizer.Markus Wick2021-06-102-0/+6
| | | | | | | | | * Wrong alignment in u64 LOG_DEBUG -> memcpy. * Huge shift exponent in stride calculation for linear buffer, unused result -> skipped. * Large shift in buffer cache if word = 0, skip checking for set bits. Non of those were critical, so this should not change any behavior. At least with the assumption, that the last one used masking behavior, which always yield continuous_bits = 0.
* Merge pull request #6410 from lat9nq/avoid-oobbunnei2021-06-071-0/+8
|\ | | | | decoders: Avoid out-of-bounds access
| * decoders: Break instead of continuelat9nq2021-06-041-2/+2
| | | | | | | | continue causes a memory leak in A Hat in Time.
| * decoders: Avoid out-of-bounds accesslat9nq2021-06-041-0/+8
| | | | | | | | This is not a real fix, so assert here and continue before crashing.
* | buffer_cache: Simplify uniform disabling logicameerj2021-06-018-6/+29
|/
* Merge pull request #6367 from ReinUsesLisp/vma-hostbunnei2021-06-012-31/+43
|\ | | | | vulkan_memory_allocator: Allow textures to be allocated in host memory
| * vulkan_memory_allocator: Allow textures to be allocated in host memoryReinUsesLisp2021-05-272-31/+43
| | | | | | | | | | Allow Vulkan's allocator to use host memory when there's no more device local memory. This delays OOM, but it will eventually still happen.
* | video_core: gpu: WaitFence: Do not block threads during shutdown.bunnei2021-05-292-1/+13
| | | | | | | | | | - Fixes a hang on shutdown when NVFlinger thread is waiting on a syncpoint that will never occur. - Commonly observed when stopping emulation in Super Mario Odyssey.
* | Fix two GCC 11 warnings: Unneeded copies.Markus Wick2021-05-291-2/+2
| | | | | | | | | | std::move created an unneeded copy. iterating without reference also created copies.
* | video_core: rasterizer_cache: Use u16 for cached page count.bunnei2021-05-272-9/+9
|/ | | | - Greatly reduces the risk of overflow, at the cost of doubling the size of this array.
* common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph2021-05-265-106/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
* Merge pull request #6248 from A-w-x/intelmesabunnei2021-05-211-1/+1
|\ | | | | gl_device: Intel: Disable texture view formats workaround on mesa
| * gl_device: Intel: Disable texture view formats workaround on mesaA-w-x2021-04-261-1/+1
| |
* | Merge pull request #6317 from ameerj/fps-fixbunnei2021-05-194-0/+9
|\ \ | | | | | | perf_stats: Rework FPS counter to be more accurate
| * | perf_stats: Rework FPS counter to be more accurateameerj2021-05-164-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case. This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics. The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values. The status bar update frequency was also changed from 2 seconds to 500ms.
* | | Merge pull request #6322 from ameerj/fast-null-bufferbunnei2021-05-181-1/+4
|\ \ \ | | | | | | | | buffer_cache: Ensure null buffers cannot take the fast uniform bind path
| * | | buffer_cache: Ensure null buffers cannot take the fast uniform bind pathameerj2021-05-161-1/+4
| |/ / | | | | | | | | | Fixes a crash in New Pokemon Snap
* | | Merge pull request #6289 from ameerj/oob-blitbunnei2021-05-168-61/+99
|\ \ \ | |/ / |/| | texture_cache: Handle out of bound texture blits
| * | texture_cache: Handle out of bound texture blitsameerj2021-05-088-61/+99
| |/ | | | | | | Some games interleave a texture blit using regions which are out-of-bounds. This addresses the interleaving to avoid oob reads from the src texture.
* / hle: kernel: Rename Process to KProcess.bunnei2021-05-063-3/+3
|/
* Merge pull request #6237 from ameerj/nvdec-end-fixbunnei2021-04-262-5/+3
|\ | | | | nvhost_vic: Fix device closure
| * nvhost_vic: Fix device closureameerj2021-04-252-5/+3
| | | | | | | | | | | | Implements the OnClose method of the nvhost_vic device, and removes the remnants of an older implementation. Also cleans up some of the surrounding code.
* | vk_texture_cache: Swap R and B channels of color flipped formatameerj2021-04-251-1/+24
|/ | | | Swaps the Red and Blue channels of the A1B5G5R5_UNORM texture format, which was being incorrectly rendered.
* texture_cache/util: Fix src being used instead of dst within DeduceBlitImagesLioncash2021-04-191-1/+1
| | | | | | | This line can only ever be reached if src is null, so dereferencing it here is a logic bug that slipped through. Instead, we dereference dst instead which is guaranteed to be valid.
* Merge pull request #6125 from ogniK5377/nvdec-close-devbunnei2021-04-172-5/+10
|\ | | | | nvdrv: Cleanup CDMA Processor on device closure
| * Address issuesChloe Marcec2021-04-161-3/+2
| |
| * nvdrv: Cleanup CDMA Processor on device closureChloe Marcec2021-03-302-5/+11
| | | | | | | | Brings us a step closer to unifying all channels to share a common interface.
* | Merge pull request #6196 from bunnei/asserts-settingbunnei2021-04-1518-18/+18
|\ \ | | | | | | core: settings: Add setting for debug assertions and disable by default.
| * | common: Move settings to common from core.bunnei2021-04-1518-18/+18
| | | | | | | | | | | | - Removes a dependency on core and input_common from common.
* | | Merge pull request #6191 from lioncash/vdtorbunnei2021-04-144-4/+5
|\ \ \ | |/ / |/| | engine_interface: Add missing virtual destructor
| * | engine_interface: Add missing virtual destructorLioncash2021-04-124-4/+5
| | | | | | | | | | | | | | | | | | Eliminates a potential bug vector related to inheritance. Plus, we should generally be specifying the destructor as virtual within purely virtual interfaces to begin with.
* | | Merge pull request #6190 from lioncash/constfn2bunnei2021-04-141-2/+2
|\ \ \ | | | | | | | | vk_master_semaphore: Add missing const qualifier for IsFree()
| * | | vk_master_semaphore: Deduplicate atomic access within IsFree()Lioncash2021-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | We can just reuse the already existing KnownGpuTick() to deduplicate the access.
| * | | vk_master_semaphore: Add missing const qualifier for IsFree()Lioncash2021-04-121-1/+1
| |/ / | | | | | | | | | This member function doesn't modify class state.
* | | Merge pull request #6188 from lioncash/bitsbunnei2021-04-141-5/+6
|\ \ \ | | | | | | | | vk_texture_cache: Make use of bit_cast where applicable
| * | | vk_texture_cache: Make use of Common::BitCast where applicableLioncash2021-04-121-5/+6
| |/ / | | | | | | | | | | | | Also clarify the TODO comment a little more on the lacking implementations for std::bit_cast.
* | | Merge pull request #6187 from lioncash/sign-convbunnei2021-04-132-11/+15
|\ \ \ | | | | | | | | texure_cache/util: Resolve implicit sign conversions with std::reduce
| * | | texure_cache/util: Resolve implicit sign conversions with std::reduceLioncash2021-04-122-11/+15
| |/ / | | | | | | | | | | | | | | | Amends implicit sign conversions occurring with usages of std::reduce and also relocates it to its own utility function to reduce verbosity a little bit.
* / / query_cache: Make use of std::erase_ifLioncash2021-04-121-5/+4
|/ / | | | | | | Same behavior, but much more straightforward to read.
* | Merge pull request #6181 from Joshua-Ashton/robustness_featuresRodrigo Locatti2021-04-121-0/+9
|\ \ | | | | | | vulkan_device: Enable EXT_robustness2 features
| * | vulkan_device: Enable EXT_robustness2 featuresJoshua Ashton2021-04-111-0/+9
| | | | | | | | | | | | | | | | | | When this was being made mandatory, these enablement of these features was removed, but this is still needed. Fixes: 757fd1e91716 ("vulkan_device: Require VK_EXT_robustness2")
* | | vk_buffer_cache: Fix offset for NULL vertex buffersJoshua Ashton2021-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | The Vulkan spec states: If an element of pBuffers is VK_NULL_HANDLE, then the corresponding element of pOffsets must be zero. https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBindVertexBuffers2EXT.html#VUID-vkCmdBindVertexBuffers2EXT-pBuffers-04112
* | | renderer_vulkan: Check return value of AcquireNextImageJoshua Ashton2021-04-113-5/+10
|/ / | | | | | | | | We can get into a really bad state by ignoring this leading to device loss and using incorrect resources.
* | video_core: Use a CV for blocking commands.Markus Wick2021-04-072-23/+31
| | | | | | | | There is no need for a busy loop here. Let's just use a condition variable to save some power.
* | video_core/gpu_thread: Keep the write lock for allocating the fence.Markus Wick2021-04-072-1/+4
| | | | | | | | | | Else the fence might get submited out-of-order into the queue, which makes testing them pointless. Overhead should be tiny as the mutex is just moved from the queue to the writing code.
* | video_core/gpu_thread: Implement a ShutDown method.Markus Wick2021-04-074-14/+27
| | | | | | | | | | | | This was implicitly done by `is_powered_on = false`, however the explicit method allows us to block until the GPU is actually gone. This should fix a race condition while removing the other subsystems while the GPU is still active.
* | common/threadsafe_queue: Provide Wait() method.Markus Wick2021-04-071-2/+1
| | | | | | | | | | | | | | It shall block until there is something to consume in the queue. And use it for the GPU emulation instead of the spin loop. This is only in booting the emulator, however in BOTW this is the case for about 1 second.
* | vp9: Avoid memcpy with null pointerslat9nq2021-04-051-7/+9
| | | | | | | | | | | | | | | | Avoid sending null pointer to memcpy as reported by Undefined Behaviour Sanitizer. Replaces the std::memcpy calls in SpliceVectors with std::copy calls. Opting to replace all the memcpy's with copy's. Co-authored-by: LC <mathew1800@gmail.com>
* | Merge pull request #5927 from ameerj/astc-computeRodrigo Locatti2021-03-3122-1770/+2027
|\ \ | | | | | | video_core: Accelerate ASTC texture decoding using compute shaders
| * | astc_decoder: Refactor for style and more efficient memory useameerj2021-03-259-2256/+502
| | |
| * | astc_decoder: Reimplement LayersRodrigo Locatti2021-03-135-142/+161
| | | | | | | | | | | | Reimplements the approach to decoding layers in the compute shader. Fixes multilayer astc decoding when using Vulkan.
| * | astc_decoder: Fix out of bounds memory accessameerj2021-03-131-2/+10
| | | | | | | | | | | | resolves a crash with some anamolous textures found in Astral Chain.
| * | renderer_vulkan: Accelerate ASTC decodingameerj2021-03-1311-57/+426
| | | | | | | | | | | | Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
| * | host_shaders: Modify shader cmake integration to allow for larger shadersameerj2021-03-134-8/+27
| | | | | | | | | | | | using a raw string to encapsulate the entire shader code limits us to shaders of size less than 2KB. This change overcomes this limitation.
| * | renderer_opengl: Accelerate ASTC texture decoding with a compute shaderameerj2021-03-136-2/+1598
| | | | | | | | | | | | | | | | | | 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.
* | | vulkan_common: enable OpenGL interop on other UnicesJan Beich2021-03-302-5/+5
| |/ |/|
* | gl_device: unblock async shaders on other Unix systemsJan Beich2021-03-241-1/+1
| | | | | | | | | | Mesa is the primary OpenGL provider on all FreeDesktop systems. For example, iris is used on Intel GPU + FreeBSD by default.
* | gl_device: Block async shaders on AMD and Intellat9nq2021-03-211-1/+13
|/ | | | | | | | Currently, the Windows versions of the Intel OpenGL driver and the AMD proprietary OpenGL driver do not properly support (or in fact degrade) when asynchronous shader compilation is enabled. This blocks specifically those drivers from using this feature. This affects AMDGPU-PRO on Linux, and AMD's and Intel's OpenGL drivers on Windows.
* Merge pull request #6028 from bunnei/raster-cachebunnei2021-03-132-47/+40
|\ | | | | video_core: rasterizer_accelerated: Use a flat array instead of interval_map for cached pages.
| * video_core: rasterizer_accelerated: Fix un/signed mismatch.bunnei2021-03-131-1/+2
| |
| * video_core: rasterizer_accelerated: Fix delta check ordering.bunnei2021-03-031-3/+3
| |
| * video_core: rasterizer_accelerated: Improve error handling & fix implicit conversion.bunnei2021-03-031-4/+8
| |
| * video_core: rasterizer_accelerated: Use a flat array instead of interval_map for cached pages.bunnei2021-03-032-44/+32
| | | | | | | | | | | | - Uses a fixed 64MB for the cache instead of an ever growing map. - Slightly faster by using atomics instead of a single mutex for access. - Thanks for Rodrigo for the idea.
* | Merge pull request #5891 from ameerj/bgra-oglRodrigo Locatti2021-03-0914-30/+212
|\ \ | | | | | | renderer_opengl: Use compute shaders to swizzle BGR textures on copy
| * | texture_cache: Blacklist BGRA8 copies and views on OpenGLameerj2021-03-049-28/+80
| | | | | | | | | | | | | | | | | | In order to force the BGRA8 conversion on Nvidia using OpenGL, we need to forbid texture copies and views with other formats. This commit also adds a boolean relating to this, as this needs to be done only for the OpenGL api, Vulkan must remain unchanged.
| * | renderer_opengl: Swizzle BGR textures on copyameerj2021-03-045-2/+132
| |/ | | | | | | | | | | 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.
* | Merge pull request #6021 from ReinUsesLisp/skip-cache-heuristicbunnei2021-03-092-11/+37
|\ \ | | | | | | buffer_cache: Heuristically decide to skip cache on uniform buffers
| * | buffer_cache: Heuristically decide to skip cache on uniform buffersReinUsesLisp2021-03-022-11/+37
| |/ | | | | | | | | | | | | | | | | Some games benefit from skipping caches (Pokémon Sword), and others don't (Animal Crossing: New Horizons). Add an heuristic to decide this at runtime. The cache hit ratio has to be ~98% or better to not skip the cache. There are 16 frames of buffer.
* | Merge pull request #5989 from ReinUsesLisp/cmdpoolbunnei2021-03-041-1/+1
|\ \ | |/ |/| vk_command_pool: Reduce the command pool size from 4096 to 4
| * vk_command_pool: Reduce the command pool size from 4096 to 4ReinUsesLisp2021-02-231-1/+1
| | | | | | | | | | This allows drivers to reuse memory more easily and preallocate less. The optimal number has been measured booting Pokémon Sword.
* | gpu_thread: Remove Async NVDEC placeholdersameerj2021-03-013-26/+8
| | | | | | | | This commit removes early placeholders for an implementation of async nvdec. With recent changes to the source code, the placeholders are no longer accurate, and can cause a nullptr dereference due to the nature of the cdma_pusher lifetime.
* | Merge pull request #5984 from jbeich/gcc-freebsdbunnei2021-02-271-0/+1
|\ \ | | | | | | common,video-core: unbreak GCC 11 build on FreeBSD 13
| * | video_core: add missing header after 468bd9c1b0f9Jan Beich2021-02-231-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/video_core/shader_notify.cpp: In member function 'void VideoCore::ShaderNotify::MarkShaderComplete()': src/video_core/shader_notify.cpp:33:10: error: 'unique_lock' is not a member of 'std' 33 | std::unique_lock lock{mutex}; | ^~~~~~~~~~~ src/video_core/shader_notify.cpp:6:1: note: 'std::unique_lock' is defined in header '<mutex>'; did you forget to '#include <mutex>'? 5 | #include "video_core/shader_notify.h" +++ |+#include <mutex> 6 | src/video_core/shader_notify.cpp: In member function 'void VideoCore::ShaderNotify::MarkSharderBuilding()': src/video_core/shader_notify.cpp:38:10: error: 'unique_lock' is not a member of 'std' 38 | std::unique_lock lock{mutex}; | ^~~~~~~~~~~ src/video_core/shader_notify.cpp:38:10: note: 'std::unique_lock' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
* | Merge pull request #5953 from bunnei/memory-refactor-1bunnei2021-02-271-1/+1
|\ \ | | | | | | Kernel Rework: Memory updates and refactoring (Part 1)
| * | hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable.bunnei2021-02-191-1/+1
| | |
* | | Implement glDepthRangeIndexeddNVKelebek12021-02-243-1/+12
| |/ |/|
* | Merge pull request #5936 from Kelebek1/Offsetsbunnei2021-02-223-9/+34
|\ \ | | | | | | Offsets for TexelFetch and TextureGather in Vulkan
| * | Review 1Kelebek12021-02-152-3/+3
| | |
| * | Implement texture offset support for TexelFetch and TextureGather and add offsets for TldsKelebek12021-02-153-9/+34
| | | | | | | | | | | | Formatting
* | | gl_disk_shader_cache: Log total shader entries count on game loadMorph2021-02-201-0/+4
| | |
* | | Merge pull request #5924 from ReinUsesLisp/inline-bindingsbunnei2021-02-194-24/+24
|\ \ \ | |_|/ |/| | vk_update_descriptor: Inline and improve code for binding buffers
| * | vk_update_descriptor: Inline and improve code for binding buffersReinUsesLisp2021-02-134-24/+24
| | | | | | | | | | | | Allow compilers with our settings inline hot code.
* | | Merge pull request #4973 from ameerj/nvdec-optbunnei2021-02-199-146/+72
|\ \ \ | | | | | | | | nvdec: Reuse allocated buffers and general cleanup
| * | | rebase, fix name shadowing, more constameerj2021-02-134-11/+10
| | | |
| * | | Address PR feedbackameerj2021-02-132-8/+5
| | | | | | | | | | | | | | | | Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
| * | | streamline cdma_pusher/command_classesameerj2021-02-131-13/+5
| | | |
| * | | streamline cdma_pusher/command_classesameerj2021-02-135-85/+34
| | | |
| * | | nvdec cleanupameerj2021-02-137-42/+31
| | | |
* | | | vk_rasterizer: Fix loading shader addresses twiceReinUsesLisp2021-02-161-1/+0
| | | | | | | | | | | | | | | | This was recently introduced on a wrongly rebased commit.
* | | | Merge pull request #5923 from ReinUsesLisp/vk-dirty-pipelinebunnei2021-02-157-56/+103
|\ \ \ \ | |_|_|/ |/| | | fixed_pipeline_cache: Use dirty flags to lazily update key
| * | | fixed_pipeline_cache: Use dirty flags to lazily update keyReinUsesLisp2021-02-137-56/+103
| | |/ | |/| | | | | | | | | | Use dirty flags to avoid building pipeline key from scratch on each draw call. This saves a bit of unnecesary work on each draw call.
* | | yuzu: Various frontend improvements to avoid crashes and improve experience on Linux.bunnei2021-02-141-0/+1
| | |
* | | vk_resource_pool: Load GPU tick once and compare with itReinUsesLisp2021-02-132-8/+8
|/ / | | | | | | | | Other minor style improvements. Rename free_iterator to hint_iterator, to describe better what it does.
* / gl_texture_cache: Lazily create non-sRGB texture views for sRGB formatsameerj2021-02-133-7/+41
|/ | | | | | This creates non-sRGB texture views for sRGB texture formats to allow for interfacing with these views in compute shaders using imageLoad and imageStore. Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
* Merge pull request #5919 from ReinUsesLisp/stream-buffer-tragicMorph2021-02-133-6/+12
|\ | | | | gl_stream_buffer/vk_staging_buffer_pool: Fix size check
| * vk_master_semaphore: Mark gpu_tick atomic operations with relaxed orderReinUsesLisp2021-02-131-4/+4
| |
| * vk_staging_buffer_pool: Inline tick testsReinUsesLisp2021-02-132-1/+7
| | | | | | | | | | | | Load the current tick to a local variable, moving it out of an atomic and allowing us to compare the value without going through a pointer each time. This should make the loop more optimizable.
| * gl_stream_buffer/vk_staging_buffer_pool: Fix size checkReinUsesLisp2021-02-132-2/+2
| | | | | | | | | | | | Fix a tragic off-by-one condition that causes Vulkan's stream buffer to think it's always full, using fallback memory. The OpenGL was also affected by this bug to a lesser extent.
* | Merge pull request #5916 from ameerj/maxwell-gl-unusedLC2021-02-132-36/+3
|\ \ | | | | | | maxwell_to_gl: Remove unused code
| * | maxwell_to_gl: Remove unused codeameerj2021-02-132-36/+3
| | | | | | | | | | | | Removes unused declarations in maxwell_to_gl.h
* | | vulkan_device: Require VK_EXT_robustness2ReinUsesLisp2021-02-132-37/+14
| |/ |/| | | | | | | | | | | We are already using robustness2 features without requiring it explicitly, causing potential crashes on drivers without the extension. Requiring this at boot allows better diagnostics for it and formalizes our usage on the extension.
* | video_core: Fix clang build issuesReinUsesLisp2021-02-132-8/+5
| |
* | vk_staging_buffer_pool: Fix softlock when stream buffer overflowsReinUsesLisp2021-02-132-19/+20
| | | | | | | | | | | | | | There was still a code path that could wait on a timeline semaphore tick that would never be signalled. While we are at it, make use of more STL algorithms.
* | vk_buffer_cache: Add support for null index buffersReinUsesLisp2021-02-132-4/+40
| | | | | | | | | | | | | | | | | | | | | | Games can bind a null index buffer (size=0) where all indices are evaluated as zero. VK_EXT_robustness2 doesn't support this and all drivers segfault when a null index buffer is passed to vkCmdBindIndexBuffer. Workaround this by creating a 4 byte buffer and filling it with zeroes. If it's read out of bounds, robustness takes care of returning zeroes as indices.
* | buffer_cache: Add extra bytes to guest SSBOsReinUsesLisp2021-02-131-1/+7
| | | | | | | | | | | | | | Bind extra bytes beyond the guest API's bound range. This is due to some games like Astral Chain operating out of bounds. Binding the whole map range would be technically correct, but games have large maps that make this approach unaffordable for now.
* | Merge branch 'bytes-to-map-end' into new-bufcache-wipReinUsesLisp2021-02-131-0/+2
| |
* | vk_staging_buffer_pool: Get a staging buffer instead of waitingReinUsesLisp2021-02-132-9/+18
| | | | | | | | | | | | Avoids waiting idle while the GPU finishes to do work, and fixes an issue where we'd wait forever if a single command buffer (logic tick) all the data.
* | renderer_opengl: Remove interopReinUsesLisp2021-02-138-122/+10
| | | | | | | | Remove unused interop code from the OpenGL backend.
* | gl_buffer_cache: Drop interop based parameter buffer workaroundsReinUsesLisp2021-02-133-65/+45
| | | | | | | | | | Sacrify runtime performance to avoid generating kernel exceptions on Windows due to our abusive aliasing of interop buffer objects.
* | buffer_cache: Heuristically detect stream buffersReinUsesLisp2021-02-132-6/+33
| | | | | | | | | | | | | | Detect when a memory region has been joined several times and increase the size of the created buffer on those instances. The buffer is assumed to be a "stream buffer", increasing its size should stop us from constantly recreating it and fragmenting memory.
* | buffer_cache: Split CreateBuffer in separate functionsReinUsesLisp2021-02-131-29/+52
| | | | | | | | | | Allow adding functionality to each function without making CreateBuffer more complex.
* | buffer_cache: Skip cache on small uploads on VulkanReinUsesLisp2021-02-133-9/+18
| | | | | | | | | | | | | | | | Ports from OpenGL the optimization to skip small 3D uniform buffer uploads. This will take advantage of the previously introduced stream buffer. Fixes instances where the staging buffer offset was being ignored.
* | vk_staging_buffer_pool: Add stream buffer for small uploadsReinUsesLisp2021-02-1315-127/+298
| | | | | | | | | | | | | | | | This uses a ring buffer similar to OpenGL's stream buffer for small uploads. This stops us from allocating several small buffers, reducing memory fragmentation and cache locality. It uses dedicated allocations when possible.
* | vulkan_device: Enable robustBufferAccessReinUsesLisp2021-02-131-1/+2
| | | | | | | | | | Fix regression on Pascal on Animal Crossing: New Horizons, fixing a validation error.
* | video_core: Reimplement the buffer cacheReinUsesLisp2021-02-1367-2607/+2514
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | vulkan_common: Expose interop and headless devicesReinUsesLisp2021-02-134-21/+100
| |
* | vulkan_common: Make interop extensions mandatoryReinUsesLisp2021-02-131-0/+6
| |
* | vulkan_device: Enable robust buffersReinUsesLisp2021-02-131-2/+4
| |
* | vulkan_device: Use designated initializers for featuresReinUsesLisp2021-02-131-60/+59
| |
* | vulkan_wrapper: Add memory barrier pipeline barrier helperReinUsesLisp2021-02-131-0/+6
| |
* | vulkan_device: Fix formatting of constantsReinUsesLisp2021-02-131-10/+6
| |
* | vulkan_wrapper: Add interop functionsReinUsesLisp2021-02-132-1/+41
| |
* | vulkan_instance: Initialize Vulkan instance in a separate threadReinUsesLisp2021-02-131-1/+5
| | | | | | | | | | | | | | Workaround an issue on Nvidia where creating a Vulkan instance from an active OpenGL thread disables threaded optimization on the driver. This optimization is important to have good performance on Nvidia OpenGL.
* | vulkan_wrapper: Pull Windows symbolsReinUsesLisp2021-02-131-0/+11
| |
* | gpu: Report renderer errors with exceptionsReinUsesLisp2021-02-1324-227/+158
| | | | | | | | | | | | Instead of using a two step initialization to report errors, initialize the GPU renderer and rasterizer on the constructor and report errors through std::runtime_error.
* | buffer_base: Add support for cached CPU writesReinUsesLisp2021-02-131-61/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some games usually write memory pages currently used by the GPU, causing rendering issues (e.g. flashing geometry and shadows on Link's Awakening). To workaround this issue, Guest CPU writes are delayed until the command buffer finishes processing, but the pages are updated immediately. The overall behavior is: - CPU writes are cached until they are flushed, they update the page state, but don't change the modification state. Cached writes stop pages from being flushed, in case games have meaningful data in it. - Command processing writes (e.g. push constants) update the page state and are marked to the command processor as dirty. They don't remove the state of cached writes.
* | Merge pull request #5900 from lioncash/unused-funcbunnei2021-02-102-37/+0
|\ \ | |/ |/| video_core: Remove unused functions and variables
| * gl_rasterizer: Remove unused variablesLioncash2021-02-091-3/+0
| | | | | | | | Resolves warnings on clang 12
| * texture_cache/util: Remove unused functionsLioncash2021-02-091-34/+0
| | | | | | | | Silences a few warnings on clang 12.
* | Merge pull request #5880 from lat9nq/ffmpeg-externalAmeer J2021-02-091-6/+5
|\ \ | |/ |/| cmake: FFmpeg linking rework
| * Address reviewer commentslat9nq2021-02-051-1/+1
| |
| * CMake: Port citra-emu/citra FindFFmpeg.cmakelat9nq2021-02-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | Also renames related CMake variables to match both the Find*FFmpeg* and variables defined within the file. Fixes odd errors produced by the old FindFFmpeg. Citra's FindFFmpeg is slightly modified here: adds Citra's copyright at the beginning, renames FFmpeg_INCLUDES to FFmpeg_INCLUDE_DIR, disables a few components in _FFmpeg_ALL_COMPONENTS, and adds the missing avutil component to the comment above.
| * CMake: Implement YUZU_USE_BUNDLED_FFMPEGlat9nq2021-02-052-7/+6
| | | | | | | | | | | | | | | | For Linux, instructs CMake to use the FFmpeg submodule in externals. This is HEAVILY based on our usage of the late Unicorn. Minimal change to MSVC as it uses the yuzu-emu/ext-windows-bin. MinGW now targets the same ext-windows-bin libraries as MSVC for FFmpeg. Adds FFMPEG_LIBRARIES to WIN32 and simplifies video_core/CMakeLists.txt a bit.
* | Merge pull request #5888 from Morph1984/ogl-4.6Rodrigo Locatti2021-02-081-1/+1
|\ \ | | | | | | renderer_opengl: Update OpenGL backend version requirement to 4.6
| * | renderer_opengl: Update OpenGL backend version requirement to 4.6Morph2021-02-071-1/+1
| |/
* / video_core: Delete mortonChloe Marcec2021-02-083-2/+0
|/ | | | moron.h & morton.cpp are not used anywhere and are just empty files
* video_core: host_shaders: Don't pass --quiet to glslangValidator if unavailablelat9nq2021-02-021-1/+19
| | | | | Prevents CMake from calling `glslangValidator` with `--quiet` when it is not available, i.e. on older downstream versions from Ubuntu.
* Merge pull request #5795 from ReinUsesLisp/bytes-to-map-endbunnei2021-01-302-2/+27
|\ | | | | video_core/memory_manager: Add BytesToMapEnd
| * video_core/memory_manager: Add BytesToMapEndReinUsesLisp2021-01-222-2/+27
| | | | | | | | | | Track map address sizes in a flat ordered map and add a method to query the number of bytes until the end of a map in a given address.
* | Merge pull request #5836 from ReinUsesLisp/unaligned-constr-schedLC2021-01-281-6/+6
|\ \ | | | | | | vk_scheduler: Fix unaligned placement new expressions
| * | vk_scheduler: Fix unaligned placement new expressionsReinUsesLisp2021-01-281-6/+6
| | | | | | | | | | | | | | | We were accidentaly creating an object in an unaligned memory address. Fix this by manually aligning the offset.
* | | Merge pull request #5786 from ReinUsesLisp/glsl-cbufbunnei2021-01-281-1/+2
|\ \ \ | | | | | | | | gl_shader_decompiler: Fix constant buffer size calculation
| * | | gl_shader_decompiler: Fix constant buffer size calculationReinUsesLisp2021-01-211-1/+2
| | | | | | | | | | | | | | | | | | | | The divide logic was wrong and can cause an uniform buffer size overflow.
* | | | vulkan_device: Blacklist Intel from float16 math (#5798)Rodrigo Locatti2021-01-271-0/+5
| |/ / |/| | | | | | | | Astral Chain crashes Intel's SPIR-V compiler when using fp16. Disable this while the vendor works on a fix.
* | | Merge pull request #5778 from ReinUsesLisp/shader-dirbunnei2021-01-273-5/+14
|\ \ \ | | | | | | | | renderer_opengl: Avoid precompiled cache and force NV GL cache directory
| * | | renderer_opengl: Avoid precompiled cache and force NV GL cache directoryReinUsesLisp2021-01-213-5/+14
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting __GL_SHADER_DISK_CACHE_PATH we can force the cache directory to be in yuzu's user directory to stop commonly distributed malware from deleting our driver shader cache. And by setting __GL_SHADER_DISK_CACHE_SKIP_CLEANUP we can have an unbounded shader cache size. This has only been implemented on Windows, mostly because previous tests didn't seem to work on Linux. Disable the precompiled cache on Nvidia's driver. There's no need to hide information the driver already has in its own cache.
* | | Merge pull request #5785 from ReinUsesLisp/buffer-dmabunnei2021-01-252-8/+21
|\ \ \ | | | | | | | | video_core/memory_manager: Flush destination buffer on CopyBlock
| * | | video_core/memory_manager: Remove unused CopyBlockUnsafeReinUsesLisp2021-01-212-8/+0
| | | | | | | | | | | | | | | | This function was not being used.
| * | | video_core/memory_manager: Flush destination buffer on CopyBlockReinUsesLisp2021-01-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we copy into a buffer, it might contain data modified from the GPU on the same pages. Because of this, we have to flush the contents before writing new data. An alternative approach would be to write the data in place, but games can also write data in other ways, invalidating our contents. Fixes geometry in Zombie Panic in Wonderland DX.
| * | | video_core/memory_manager: Add GPU address based flush methodReinUsesLisp2021-01-212-0/+17
| |/ / | | | | | | | | | Allow flushing rasterizer contents based on a GPU address.
* | | Revert "Start of Integer flags implementation"ReinUsesLisp2021-01-253-59/+3
| | | | | | | | | | | | | | | This reverts #4713. The implementation in that PR is not accurate. It does not reflect the behavior seen in hardware.
* | | vk_graphics_pipeline: Fix narrowing conversion on MSVCReinUsesLisp2021-01-251-2/+2
| | |
* | | Merge pull request #5807 from ReinUsesLisp/vc-warningsLC2021-01-249-62/+93
|\ \ \ | | | | | | | | video_core: Silence the remaining gcc warnings and enforce them
| * | | cmake: Enforce -Warray-bounds and -Wmissing-field-initializers globallyReinUsesLisp2021-01-241-2/+0
| | | |
| * | | video_core/cmake: Enforce -Warray-bounds and -Wmissing-field-initializersReinUsesLisp2021-01-241-0/+2
| | | |
| * | | video_core: Silence -Wmissing-field-initializers warningsReinUsesLisp2021-01-245-25/+56
| | | |
| * | | maxwell_3d: Silence array bounds warningsReinUsesLisp2021-01-242-35/+35
| | | |
| * | | maxwell_to_vk: Silence -Wextra warnings about using different enum typesReinUsesLisp2021-01-242-2/+2
| | | |
* | | | Merge pull request #5363 from ReinUsesLisp/vk-image-usageRodrigo Locatti2021-01-243-38/+72
|\ \ \ \ | | | | | | | | | | vk_texture_cache: Support image store on sRGB images with VkImageViewUsageCreateInfo
| * | | | vk_texture_cache: Support image store on sRGB images with VkImageViewUsageCreateInfoReinUsesLisp2021-01-243-38/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vulkan 1.0 didn't support creating sRGB image views on an ABGR8 VkImage with storage usage bits. VK_KHR_maintenance2 addressed this allowing to reduce the usage bits on a VkImageView. To allow image store on non-sRGB image views when the VkImage is created with sRGB, always create VkImages without sRGB and add the sRGB format on the view.
* | | | | vulkan_device: Lift VK_EXT_extended_dynamic_state blacklist on RDNAReinUsesLisp2021-01-251-23/+0
| | | | | | | | | | | | | | | | | | | | It seems to be safe to use this on new drivers.
* | | | | Merge pull request #5796 from ReinUsesLisp/vertex-a-bypass-vkbunnei2021-01-241-9/+3
|\ \ \ \ \ | | | | | | | | | | | | vk_pipeline_cache: Properly bypass VertexA shaders
| * | | | | vk_pipeline_cache: Properly bypass VertexA shadersReinUsesLisp2021-01-231-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VertexA stage is not yet implemented, but Vulkan is adding its descriptors, causing a discrepancy in the pushed descriptors and the template. This generally ends up in a driver side crash. Bypass the VertexA stage for now.
* | | | | | host_shaders/cmake: Pass --quiet to glslang to keep it quietReinUsesLisp2021-01-241-1/+1
| |_|/ / / |/| | | | | | | | | | | | | | Silences noisy builds on toolchains.
* | | | | shader_ir: Fix comment typoLevi Behunin2021-01-231-1/+1
| | | | |
* | | | | video_core/cmake: Properly generate fatal errors on AftermathReinUsesLisp2021-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Fix "message(ERROR ..." to "message(FATAL_ERROR ..." to properly stop cmake when Nsight Aftermath can't be configured.
* | | | | nsight_aftermath_tracker: Fix build issues when enabledReinUsesLisp2021-01-232-16/+5
|/ / / / | | | | | | | | | | | | Fixes a bunch of build errors when Nsight Aftermath is properly enabled.
* | | | Merge pull request #4713 from behunin/int-flagsbunnei2021-01-233-3/+59
|\ \ \ \ | |_|_|/ |/| | | Start of Integer flags implementation
| * | | Merge remote-tracking branch 'upstream/master' into int-flagsLevi2021-01-11262-10235/+16506
| |\ \ \
| * | | | More forgetting... duhLevi Behunin2020-09-251-2/+2
| | | | |
| * | | | Forgot to apply suggestion here as wellLevi Behunin2020-09-251-1/+1
| | | | |
| * | | | Address CommentsLevi Behunin2020-09-253-25/+34
| | | | |
| * | | | Start of Integer flags implementationLevi Behunin2020-09-253-3/+50
| | | | |
* | | | | Merge pull request #5361 from ReinUsesLisp/vk-shader-commentbunnei2021-01-211-1/+4
|\ \ \ \ \ | |_|_|_|/ |/| | | | vk_shader_decompiler: Show comments as OpUndef with a type
| * | | | vk_shader_decompiler: Show comments as OpUndef with a typeReinUsesLisp2021-01-161-1/+4
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silence the new validation layer error about SPIR-V not allowing OpUndef on a OpTypeVoid, even when the SPIR-V spec doesn't say anything against it. They will be inserted as an undefined int to avoid SPIRV-Cross and validation errors, but only when a debugging tool is attached.
* | | | Merge pull request #5746 from lioncash/sign-compareRodrigo Locatti2021-01-181-1/+1
|\ \ \ \ | | | | | | | | | | texture_cache/util: Resolve -Wsign-compare warning
| * | | | texture_cache/util: Resolve -Wsign-compare warningLioncash2021-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | Resolves a -Wsign-compare warning on Clang.
* | | | | Merge pull request #5745 from lioncash/documentationRodrigo Locatti2021-01-172-4/+3
|\ \ \ \ \ | | | | | | | | | | | | video_core: Resolve -Wdocumentation warnings
| * | | | | video_core: Resolve -Wdocumentation warningsLioncash2021-01-172-4/+3
| |/ / / / | | | | | | | | | | | | | | | Silences some -Wdocumentation warnings on Clang.
* / / / / vulkan_debug_callback: Add missing header guardLioncash2021-01-171-0/+2
|/ / / / | | | | | | | | | | | | Prevents inclusion issues from occurring.
* | | | Merge pull request #5262 from ReinUsesLisp/buffer-baseRodrigo Locatti2021-01-162-0/+496
|\ \ \ \ | | | | | | | | | | buffer_cache/buffer_base: Add a range tracking buffer container and tests
| * | | | buffer_cache/buffer_base: Add a range tracking buffer containerReinUsesLisp2021-01-132-0/+496
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It keeps track of the modified CPU and GPU ranges on a CPU page granularity, notifying the given rasterizer about state changes in the tracking behavior of the buffer. Use a small vector optimization to store buffers smaller than 256 KiB locally instead of using free store memory allocations.
* | | | Merge pull request #5297 from ReinUsesLisp/vulkan-allocator-commonRodrigo Locatti2021-01-1619-554/+609
|\ \ \ \ | |_|/ / |/| | | vulkan_memory_allocator: Improvements to the memory allocator
| * | | vulkan_memory_allocator: Remove unnecesary 'device' memory from commitsReinUsesLisp2021-01-152-15/+15
| | | |
| * | | vk_texture_cache: Use Download memory types for texture flushesReinUsesLisp2021-01-152-5/+10
| | | | | | | | | | | | | | | | Use the Download memory type where it matters.
| * | | vulkan_memory_allocator: Add allocation support for download typesReinUsesLisp2021-01-152-55/+91
| | | | | | | | | | | | | | | | | | | | Implements the allocator logic to handle download memory types. This will try to use HOST_CACHED_BIT when available.
| * | | vulkan_memory_allocator: Add "download" memory usage hintReinUsesLisp2021-01-159-45/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow users of the allocator to hint memory usage for downloads. This removes the non-descriptive boolean passed for "host visible" or not host visible memory commits, and uses an enum to hint device local, upload and download usages.
| * | | vulkan_common: Move allocator to the common directoryReinUsesLisp2021-01-1511-11/+11
| | | | | | | | | | | | | | | | Allow using the abstraction from the OpenGL backend.
| * | | renderer_vulkan: Rename Vulkan memory manager to memory allocatorReinUsesLisp2021-01-1515-54/+52
| | | | | | | | | | | | | | | | | | | | "Memory manager" collides with the guest GPU memory manager, and a memory allocator sounds closer to what the abstraction aims to be.
| * | | vk_memory_manager: Improve memory manager and its APIReinUsesLisp2021-01-1513-343/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug where the memory allocator could leave gaps between commits. To fix this the allocation algorithm was reworked, although it's still short in number of lines of code. Rework the allocation API to self-contained movable objects instead of naively using an unique_ptr to do the job for us. Remove the VK prefix.
* | | | Merge pull request #5358 from ReinUsesLisp/rename-insert-paddingLC2021-01-156-123/+123
|\ \ \ \ | |/ / / |/| | | common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT
| * | | common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINITReinUsesLisp2021-01-156-123/+123
| | | | | | | | | | | | | | | | INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
* | | | Merge pull request #5357 from ReinUsesLisp/alignment-log2LC2021-01-153-11/+11
|\ \ \ \ | | | | | | | | | | common/alignment: Rename AlignBits to AlignUpLog2 and use constraints
| * | | | common/alignment: Rename AlignBits to AlignUpLog2ReinUsesLisp2021-01-153-11/+11
| |/ / / | | | | | | | | | | | | AlignUpLog2 describes what the function does better than AlignBits.
* / / / common/bit_util: Replace CLZ/CTZ operations with standardized onesLioncash2021-01-153-5/+5
|/ / / | | | | | | | | | Makes for less code that we need to maintain.
* | | video_core/cmake: Remove Werror flags already defined code-base wideReinUsesLisp2021-01-151-2/+0
| | | | | | | | | | | | These flags are already defined in src/cmake.
* | | Merge pull request #5351 from ReinUsesLisp/vc-unused-functionsLC2021-01-151-4/+0
|\ \ \ | | | | | | | | cmake: Enforce -Wunused-function code-base wise
| * | | cmake: Enforce -Wunused-function code-base wideReinUsesLisp2021-01-151-1/+0
| | | |
| * | | video_core: Enforce -Wunused-functionReinUsesLisp2021-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stops us from merging code with unused functions in the future. If something is invoked behind conditionally evaluated code in a way that the language can't see it (e.g. preprocessor macros), the potentially unused function should use [[maybe_unused]].
| * | | vk_buffer_cache: Remove unused functionReinUsesLisp2021-01-151-4/+0
| | | |
* | | | Merge pull request #5350 from ReinUsesLisp/vk-init-warnsRodrigo Locatti2021-01-152-145/+146
|\ \ \ \ | | | | | | | | | | vulkan_common: Silence missing initializer warnings
| * | | | vulkan_common: Silence missing initializer warningsReinUsesLisp2021-01-152-145/+146
| |/ / / | | | | | | | | | | | | Silence warnings explicitly initializing all members on construction.
* | | | Merge pull request #5349 from ReinUsesLisp/anv-fixLC2021-01-152-18/+20
|\ \ \ \ | | | | | | | | | | vulkan_device: Enable shaderStorageImageMultisample conditionally
| * | | | vulkan_device: Enable shaderStorageImageMultisample conditionallyReinUsesLisp2021-01-152-18/+20
| |/ / / | | | | | | | | | | | | Fix Vulkan initialization on ANV.
* | | | astc: Increase integer encoded vector sizeReinUsesLisp2021-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | Invalid ASTC textures seem to write more bytes here, increase the size to something that can't make us push out of bounds.
* | | | astc: Return zero on out of bound bitsReinUsesLisp2021-01-151-17/+22
|/ / / | | | | | | | | | | | | Avoid out of bound reads on invalid ASTC textures. Games can bind invalid textures that make us read or write out of bounds.
* | | vulkan_device: Remove requirement on shaderStorageImageMultisampleReinUsesLisp2021-01-131-1/+0
| | | | | | | | | | | | | | | yuzu doesn't currently emulate MS image stores. Requiring this makes no sense for now. Fixes ANV not booting any games on Vulkan.
* | | Merge pull request #5311 from ReinUsesLisp/fence-waitbunnei2021-01-133-54/+18
|\ \ \ | |/ / |/| | vk_fence_manager: Use timeline semaphores instead of spin waits
| * | vk_fence_manager: Use timeline semaphores instead of spin waitsReinUsesLisp2021-01-083-54/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With timeline semaphores we can avoid creating objects. Instead of creating an event, grab the current tick from the scheduler and flush the current command buffer. When the fence has to be queried/waited, we can do so against the master semaphore instead of spinning on an event. If Vulkan supported NVN like events or fences, we could signal from the command buffer and wait for that without splitting things in two separate command buffers.
* | | Merge pull request #5231 from ReinUsesLisp/dyn-bindingsbunnei2021-01-083-26/+12
|\ \ \ | |/ / |/| | renderer_vulkan/fixed_pipeline_state: Move enabled bindings to static state
| * | renderer_vulkan/fixed_pipeline_state: Move enabled bindings to static stateReinUsesLisp2020-12-263-26/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without using VK_EXT_robustness2, we can't consider the 'enabled' (not null) vertex buffers as dynamic state, as this leads to invalid Vulkan state. Move this to static state that is always hashed and compared in the pipeline key. The bits for enabled vertex buffers are moved into the attribute state bitfield. This is not 'correct' as it's not an attribute state, but that struct has bits to spare, and it's used in an array of 32 elements (the exact same number of vertex buffer bindings).
* | | remove inaccurate referenceAmeer J2021-01-071-1/+1
| | | | | | | | | Co-authored-by: LC <mathew1800@gmail.com>
* | | fix for nvdec disabled, cleanup host1xameerj2021-01-072-61/+9
| | |
* | | nvdec syncpt incorporationameerj2021-01-074-17/+16
| | | | | | | | | | | | laying the groundwork for async gpu, although this does not fully implement async nvdec operations
* | | vulkan_library: Common::DynamicLibrary::Open is [[nodiscard]]MerryMage2021-01-071-1/+1
| | | | | | | | | | | | Ignore the return value on __APPLE__ systems as well
* | | texture_cache: Replace PAGE_SHIFT with PAGE_BITSMerryMage2021-01-071-6/+6
| | | | | | | | | | | | PAGE_SHIFT is a #define in system headers that leaks into user code on some systems
* | | Merge pull request #5288 from ReinUsesLisp/workaround-garbageMorph2021-01-0612-120/+148
|\ \ \ | | | | | | | | gl_texture_cache: Avoid format views on Intel and AMD
| * | | gl_texture_cache: Avoid format views on Intel and AMDReinUsesLisp2021-01-0411-21/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel and AMD proprietary drivers are incapable of rendering to texture views of different formats than the original texture. Avoid creating these at a cache level. This will consume more memory, emulating them with copies.
| * | | gl_texture_cache: Create base images with sRGBReinUsesLisp2021-01-042-99/+100
| | | | | | | | | | | | | | | | | | | | | | | | This breaks accelerated decoders trying to imageStore into images with sRGB. The decoders are currently disabled so this won't cause issues at runtime.
* | | | Merge pull request #5289 from ReinUsesLisp/vulkan-devicebunnei2021-01-0631-62/+55
|\ \ \ \ | | | | | | | | | | vulkan_common: Move device abstraction to the common directory and allow surfaceless devices
| * | | | vulkan_device: Allow creating a device without surfaceReinUsesLisp2021-01-041-3/+3
| | | | |
| * | | | renderer_vulkan/nsight_aftermath_tracker: Move to vulkan_commonReinUsesLisp2021-01-045-30/+21
| | | | |
| * | | | renderer_vulkan: Move device abstraction to vulkan_commonReinUsesLisp2021-01-0429-29/+31
| | | | |
* | | | | Merge pull request #5292 from ReinUsesLisp/empty-setLC2021-01-051-2/+4
|\ \ \ \ \ | |/ / / / |/| | | | vk_rasterizer: Skip binding empty descriptor sets on compute
| * | | | vk_rasterizer: Skip binding empty descriptor sets on computeReinUsesLisp2021-01-041-2/+4
| |/ / / | | | | | | | | | | | | | | | | Fixes unit tests where compute shaders had no descriptors in the set, making Vulkan drivers crash when binding an empty set.
* / / / renderer_vulkan: Rename VKDevice to DeviceReinUsesLisp2021-01-0352-169/+166
|/ / / | | | | | | | | | | | | | | | | | | The "VK" prefix predates the "Vulkan" namespace. It was carried around the codebase for consistency. "VKDevice" currently is a bad alias with "VkDevice" (only an upcase character of difference) that can cause confusion. Rename all instances of it.
* | | Merge pull request #5230 from ReinUsesLisp/vulkan-commonRodrigo Locatti2021-01-0360-486/+574
|\ \ \ | | | | | | | | vulkan_common: Move reusable Vulkan abstractions to a separate directory
| * | | vulkan_instance: Allow different Vulkan versions and enforce 1.1ReinUsesLisp2020-12-317-41/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For listing the available physical devices we can use Vulkan 1.0. Now that MoltenVK supports 1.1 we can require it for running games. Add missing documentation.
| * | | vk_device: Use an array to report lacking device limitsReinUsesLisp2020-12-311-13/+17
| | | | | | | | | | | | | | | | This makes easier to add and tune the required device limits.
| * | | vk_device: Stop initialization when device is not suitableReinUsesLisp2020-12-312-61/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VKDevice::IsSuitable was not being called. To address this issue, check suitability before initialization and throw an exception if it fails. By doing this, we can deduplicate some code on queue searches. Previosuly we would first search if a present and graphics queue existed, then on initialization we would search again to find the index.
| * | | renderer_vulkan: Remove two step initialization on VKDeviceReinUsesLisp2020-12-316-31/+10
| | | | | | | | | | | | | | | | | | | | The Vulkan device abstraction either initializes successfully on the constructor or throws a Vulkan exception.
| * | | renderer_vulkan: Throw when enumerating devices failsReinUsesLisp2020-12-315-33/+21
| | | | | | | | | | | | | | | | | | | | | | | | Report device enumeration errors with exceptions to be consistent with other initialization related function calls. Reduces the amount of code to maintain.
| * | | renderer_vulkan: Initialize surface in separate fileReinUsesLisp2020-12-316-73/+109
| | | | | | | | | | | | | | | | | | | | | | | | Move surface initialization code to a separate file. It's unlikely to use this code outside of Vulkan, but keeping platform-specific code (Win32, Xlib, Wayland) in its own translation unit keeps things cleaner.
| * | | renderer_vulkan: Catch and report exceptionsReinUsesLisp2020-12-311-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move more Vulkan code to report errors with exceptions and report them through a log before notifying it with an error boolean for backwards compatibility. In the future we can replace the rasterizer two-step initialization to always use exceptions.
| * | | renderer_vulkan: Create debug callback on separate file and throwReinUsesLisp2020-12-318-79/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize debug callbacks (messenger) from a separate file. This allows sharing code with different backends. Change our Vulkan error handling to use exceptions instead of error codes, simplifying the initialization process.
| * | | renderer_vulkan: Move instance initialization to a separate fileReinUsesLisp2020-12-314-111/+176
| | | | | | | | | | | | | | | | | | | | | | | | Simplify Vulkan's backend initialization code by moving it to a separate file, allowing us to initialize a Vulkan instance from different backends.
| * | | vulkan_common: Rename renderer_vulkan/wrapper.h to vulkan_common/vulkan_wrapper.hReinUsesLisp2020-12-3151-51/+51
| | | | | | | | | | | | | | | | Allows sharing Vulkan wrapper code between different rendering backends.
| * | | vulkan_common: Move dynamic library load to a separate fileReinUsesLisp2020-12-314-31/+59
| | | | | | | | | | | | | | | | | | | | Allows us to initialize a Vulkan dynamic library from different backends without duplicating code.
* | | | general: Fix various spelling errorsMorph2021-01-022-2/+2
| | | |
* | | | Merge pull request #5208 from bunnei/service-threadsbunnei2020-12-3111-297/+164
|\ \ \ \ | |/ / / |/| | | Service threads
| * | | gpu: gpu_thread: Ensure MicroProfile is shutdown on exit.bunnei2020-12-291-0/+3
| | | |
| * | | video_core: gpu_thread: Do not wait when system is powered down.bunnei2020-12-291-1/+2
| | | |
| * | | video_core: gpu: Implement synchronous mode using threaded GPU.bunnei2020-12-294-12/+34
| | | |
| * | | video_core: gpu: Refactor out synchronous/asynchronous GPU implementations.bunnei2020-12-2910-289/+130
| |/ / | | | | | | | | | - We must always use a GPU thread now, even with synchronous GPU.
* | | half_set: Resolve -Wmaybe-uninitialized warningsLioncash2020-12-301-7/+7
| | |
* | | maxwell_to_vk: Initialize usage variable in SurfaceFormat()Lioncash2020-12-301-1/+1
| | | | | | | | | | | | Silences a -Wmaybe-uninitialized warning
* | | video_core: Rewrite the texture cacheReinUsesLisp2020-12-30152-8101/+10359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
* | | video_core: Add a delayed destruction ring abstractionReinUsesLisp2020-12-302-0/+33
| | |
* | | host_shaders: Add Vulkan assembler compute shadersReinUsesLisp2020-12-304-0/+96
| | |
* | | host_shaders: Add helper to blit depth stencil fragment shaderReinUsesLisp2020-12-302-0/+17
| | |
* | | host_shaders: Add texture color blit fragment shaderReinUsesLisp2020-12-302-0/+15
| | |
* | | host_shaders: Add shaders to present to the swapchainReinUsesLisp2020-12-303-0/+36
| | |
* | | host_shaders: Add shaders to convert between depth and color imagesReinUsesLisp2020-12-303-0/+28
| | |
* | | host_shaders: Add compute shader to copy BC4 as RG32UI to RGBA8ReinUsesLisp2020-12-302-0/+71
| | |
* | | host_shaders: Add shader to render a full screen triangleReinUsesLisp2020-12-302-0/+30
| | |
* | | host_shaders: Add pitch linear upload compute shaderReinUsesLisp2020-12-302-0/+87
| | |
* | | host_shaders: Add block linear upload compute shadersReinUsesLisp2020-12-303-0/+249
| | |
* | | host_shaders: Add copyright headers to OpenGL present shadersReinUsesLisp2020-12-302-0/+8
| | |
* | | video_core/host_shaders: Add support for prebuilt SPIR-V shadersReinUsesLisp2020-12-301-16/+37
|/ / | | | | | | | | Add support for building SPIR-V shaders from GLSL and generating headers to include the text of those same GLSL shaders to consume from OpenGL.
* | Merge pull request #5226 from ReinUsesLisp/c4715-vcRodrigo Locatti2020-12-252-0/+2
|\ \ | | | | | | video_core: Enforce C4715 (not all control paths return a value)
| * | video_core: Enforce C4715 (not all control paths return a value)ReinUsesLisp2020-12-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the time people write code that always returns a value, terminates execution, throws an exception, or uses an unconventional jump primitive. This is not always true when we build without asserts on mainline builds. To avoid introducing undefined behavior on our most used builds, enforce this warning signalling an error and stopping the build from shipping.
| * | vk_shader_decompiler: Silence warning when compiling without assertsReinUsesLisp2020-12-251-0/+1
| | |
* | | cmake: Always enable VulkanReinUsesLisp2020-12-252-79/+66
|/ / | | | | | | | | Removes the unnecesary burden of maintaining separate #ifdef paths and allows us sharing generic Vulkan code across APIs.
* | Merge pull request #5157 from lioncash/array-dirtybunnei2020-12-151-34/+33
|\ \ | | | | | | maxwell_3d: Remove unused dirty_pointer array
| * | maxwell_3d: Move member variables to end of classLioncash2020-12-071-31/+32
| | | | | | | | | | | | Follows our established coding style.
| * | maxwell_3d: Resolve -Wdocumentation warningLioncash2020-12-071-1/+1
| | | | | | | | | | | | Removes a documentation comment for a non-existent member.
| * | maxwell_3d: Remove unused dirty_pointer arrayLioncash2020-12-071-2/+0
| | | | | | | | | | | | This is unused and removing it shrinks the structure by 3584 bytes.
* | | Merge pull request #5162 from lioncash/copy-shaderbunnei2020-12-101-1/+1
|\ \ \ | | | | | | | | gl_shader_decompiler: Elide unnecessary copies within DeclareConstantBuffers()
| * | | gl_shader_decompiler: Elide unnecessary copies within DeclareConstantBuffers()Lioncash2020-12-071-1/+1
| | | | | | | | | | | | | | | | Resolves a -Wrange-loop-analysis warning.
* | | | Merge pull request #5164 from lioncash/containsRodrigo Locatti2020-12-088-16/+13
|\ \ \ \ | | | | | | | | | | video_core: Make use of ordered container contains() where applicable
| * | | | video_core: Make use of ordered container contains() where applicableLioncash2020-12-078-16/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | With C++20, we can use the more concise contains() member function instead of comparing the result of the find() call with the end iterator.
* / / / ast: Improve string concat readability in operator()Lioncash2020-12-071-5/+4
|/ / / | | | | | | | | | Provides an in-place format string to make it more pleasant to read.
* | | Merge pull request #5149 from comex/xx-map-intervalbunnei2020-12-071-1/+2
|\ \ \ | | | | | | | | map_interval: Change field order to address uninitialized field warning
| * | | map_interval: Change field order to address uninitialized field warningcomex2020-12-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Clang complains about `new_chunk`'s constructor using the then-uninitialized `first_chunk` (even though it's just to get a pointer into it).
* | | | Merge pull request #5159 from lioncash/move-amendRodrigo Locatti2020-12-071-2/+2
|\ \ \ \ | | | | | | | | | | shader_ir: std::move node within DeclareAmend()
| * | | | shader_ir: std::move node within DeclareAmend()Lioncash2020-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Same behavior, but elides an unnecessary atomic reference count increment and decrement.
* | | | | buffer_block: Mark interface as nodiscard where applicableLioncash2020-12-071-7/+7
| | | | | | | | | | | | | | | | | | | | Prevents logic errors from occurring from unused values.
* | | | | buffer_block: Remove unnecessary includesLioncash2020-12-071-5/+0
| | | | | | | | | | | | | | | | | | | | Reduces the amount of dependencies the header pulls in.
* | | | | video_core: Remove unnecessary enum class casting in logging messagesLioncash2020-12-0733-148/+125
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | fmt now automatically prints the numeric value of an enum class member by default, so we don't need to use casts any more. Reduces the line noise a bit.
* | | | Merge pull request #5152 from comex/xx-overrideLC2020-12-071-1/+1
|\ \ \ \ | | | | | | | | | | renderer_vulkan: Add missing `override` specifier
| * | | | renderer_vulkan: Add missing `override` specifiercomex2020-12-071-1/+1
| |/ / /
* | | | Merge pull request #5136 from lioncash/video-shadow3LC2020-12-0745-280/+293
|\ \ \ \ | | | | | | | | | | video_core: Resolve more variable shadowing scenarios pt.3
| * | | | video_core: Resolve more variable shadowing scenarios pt.3Lioncash2020-12-0545-280/+293
| | |/ / | |/| | | | | | | | | | | | | | Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
* | | | video_core: Adjust `NUM` macro to avoid Clang warningcomex2020-12-073-3/+3
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous definition was: #define NUM(field_name) (sizeof(Maxwell3D::Regs::field_name) / sizeof(u32)) In cases where `field_name` happens to refer to an array, Clang thinks `sizeof(an array value) / sizeof(a type)` is an instance of the idiom where `sizeof` is used to compute an array length. So it thinks the type in the denominator ought to be the array element type, and warns if it isn't, assuming this is a mistake. In reality, `NUM` is not used to get array lengths at all, so there is no mistake. Silence the warning by applying Clang's suggested workaround of parenthesizing the denominator.
* | | maxwell_dma: Rename RenderEnable::Mode::FALSE and TRUE to avoid name conflictcomex2020-12-051-5/+7
|/ / | | | | | | | | | | | | On Apple platforms, FALSE and TRUE are defined as macros by <mach/boolean.h>, which is included by various system headers. Note that there appear to be no actual users of the names to fix up.
* | video_core: Resolve more variable shadowing scenarios pt.2Lioncash2020-12-0539-296/+305
| | | | | | | | | | | | | | Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
* | Merge pull request #5124 from lioncash/video-shadowbunnei2020-12-0542-206/+219
|\ \ | | | | | | video_core: Resolve more variable shadowing scenarios
| * | video_core: Resolve more variable shadowing scenariosLioncash2020-12-0442-206/+219
| | | | | | | | | | | | | | | | | | Resolves variable shadowing scenarios up to the end of the OpenGL code to make it nicer to review. The rest will be resolved in a following commit.
* | | Merge pull request #5127 from FearlessTobi/port-5617bunnei2020-12-051-3/+3
|\ \ \ | | | | | | | | Port citra-emu/citra#5617: "Fix telemetry-related exit crash from use-after-free"
| * | | Fix telemetry-related exit crash from use-after-freeFearlessTobi2020-12-051-3/+3
| |/ / | | | | | | | | | Co-Authored-By: xperia64 <xperia64@users.noreply.github.com>
* / / codec: Remove deprecated usage of AVCodecContext::refcounted_framesLioncash2020-12-041-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was only necessary for use with the avcodec_decode_video2/avcoded_decode_audio4 APIs which are also deprecated. Given we use avcodec_send_packet/avcodec_receive_frame, this isn't necessary, this is even indicated directly within the FFmpeg API changes document here on 2017-09-26: https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges#L410 This prevents our code from breaking whenever we update to a newer version of FFmpeg in the future if they ever decide to fully remove this API member.
* | Merge pull request #5064 from lioncash/node-shadowbunnei2020-12-041-75/+77
|\ \ | | | | | | node: Eliminate variable shadowing
| * | node: Mark member functions as [[nodiscard]] where applicableLioncash2020-12-031-29/+29
| | | | | | | | | | | | Prevents logic bugs from accidentally ignoring the return value.
| * | node: Eliminate variable shadowingLioncash2020-12-031-47/+49
| | |
* | | vp9/vic: Resolve pessimizing movesLioncash2020-12-032-11/+11
|/ / | | | | | | | | Removes the usage of moves that don't result in behavior different from a copy, or otherwise would prevent copy elision from occurring.
* | Merge pull request #5002 from ameerj/nvdec-frameskipbunnei2020-12-0310-340/+234
|\ \ | | | | | | nvdec: Queue and display all decoded frames, cleanup decoders
| * | Limit queue size to 10 framesameerj2020-11-261-0/+4
| | | | | | | | | | | | Workaround for ZLA, which seems to decode and queue twice as many frames as it displays.
| * | Address PR feedbackameerj2020-11-264-32/+33
| | | | | | | | | | | | | | | | | | remove some redundant moves, make deleter match naming guidelines. Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
| * | Queue decoded frames, cleanup decodersameerj2020-11-2510-338/+227
| | |
* | | Merge pull request #5013 from ReinUsesLisp/vk-early-zbunnei2020-11-306-11/+19
|\ \ \ | | | | | | | | vk_shader_decompiler: Implement force early fragment tests
| * | | vk_shader_decompiler: Implement force early fragment testsReinUsesLisp2020-11-266-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Force early fragment tests when the 3D method is enabled. The established pipeline cache takes care of recompiling if needed. This is implemented only on Vulkan to avoid invalidating the shader cache on OpenGL.
* | | | codec: Fix `pragma GCC diagnostic pop` missing corresponding pushcomex2020-11-261-0/+1
|/ / /
* | | Merge pull request #4975 from comex/invalid-syncpoint-idbunnei2020-11-261-11/+18
|\ \ \ | | | | | | | | nvdrv, video_core: Don't index out of bounds when given invalid syncpoint ID
| * | | nvdrv, video_core: Don't index out of bounds when given invalid syncpoint IDcomex2020-11-241-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use .at() instead of raw indexing when dealing with untrusted indices. - For the special case of WaitFence with syncpoint id UINT32_MAX, instead of crashing, log an error and ignore. This is what I get when running Super Mario Maker 2.
* | | | Merge pull request #4976 from comex/poll-eventsRodrigo Locatti2020-11-262-4/+2
|\ \ \ \ | |_|/ / |/| | | Overhaul EmuWindow::PollEvents to fix yuzu-cmd calling SDL_PollEvents off main thread
| * | | Overhaul EmuWindow::PollEvents to fix yuzu-cmd calling SDL_PollEvents off main threadcomex2020-11-232-4/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EmuWindow::PollEvents was called from the GPU thread (or the CPU thread in sync-GPU mode) when swapping buffers. It had three implementations: - In GRenderWindow, it didn't actually poll events, just set a flag and emit a signal to indicate that a frame was displayed. - In EmuWindow_SDL2_Hide, it did nothing. - In EmuWindow_SDL2, it did call SDL_PollEvents, but this is wrong because SDL_PollEvents is supposed to be called on the thread that set up video - in this case, the main thread, which was sleeping in a busyloop (regardless of whether sync-GPU was enabled). On macOS this causes a crash. To fix this: - Rename EmuWindow::PollEvents to OnFrameDisplayed, and give it a default implementation that does nothing. - In EmuWindow_SDL2, do not override OnFrameDisplayed, but instead have the main thread call SDL_WaitEvent in a loop.
* | | cleanup unneeded comments and newlinesameerj2020-11-251-6/+0
| | |
* | | Refactor MaxwellToSpirvComparison. Use Common::BitCastameerj2020-11-253-31/+34
| | | | | | | | | | | | Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
* | | Address PR feedback from Reinameerj2020-11-255-40/+31
| | |
* | | vulkan_renderer: Alpha Test Culling Implementationameerj2020-11-255-2/+76
| | | | | | | | | | | | Used by various textures in many titles, e.g. SSBU menu.
* | | Merge pull request #3681 from lioncash/componentRodrigo Locatti2020-11-241-2/+2
|\ \ \ | |/ / |/| | decoder/image: Fix incorrect G24R8 component sizes in GetComponentSize()
| * | decode/image: Fix typo in assert in GetComponentSize()Lioncash2020-04-161-3/+3
| | |
| * | decoder/image: Fix incorrect G24R8 component sizes in GetComponentSize()Lioncash2020-04-161-2/+2
| | | | | | | | | | | | The components' sizes were mismatched. This corrects that.
* | | Merge pull request #4954 from lioncash/compareMorph2020-11-221-1/+1
|\ \ \ | | | | | | | | gl_rasterizer: Make floating-point literal a float
| * | | gl_rasterizer: Make floating-point literal a floatLioncash2020-11-201-1/+1
| | | | | | | | | | | | | | | | Gets rid of an unnecessary expansion from float to double.
* | | | Merge pull request #4955 from lioncash/move3bunnei2020-11-211-19/+13
|\ \ \ \ | | | | | | | | | | async_shaders: std::move data within QueueVulkanShader()
| * | | | async_shaders: emplace threads into the worker thread vectorLioncash2020-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Same behavior, but constructs the threads in place instead of moving them.
| * | | | async_shaders: Simplify implementation of GetCompletedWork()Lioncash2020-11-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This is equivalent to moving all the contents and then clearing the vector. This avoids a redundant allocation.
| * | | | async_shaders: Simplify moving data into the pending queueLioncash2020-11-201-13/+8
| | | | |
| * | | | async_shaders: std::move data within QueueVulkanShader()Lioncash2020-11-201-2/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Same behavior, but avoids redundant copies. While we're at it, we can simplify the pushing of the parameters into the pending queue.
* | | | Merge pull request #4957 from ReinUsesLisp/alpha-test-rtLC2020-11-211-4/+0
|\ \ \ \ | | | | | | | | | | gl_rasterizer: Remove warning of untested alpha test
| * | | | gl_rasterizer: Remove warning of untested alpha testReinUsesLisp2020-11-211-4/+0
| | | | | | | | | | | | | | | | | | | | Alpha test has been proven to only affect the first render target.
* | | | | Merge pull request #4953 from lioncash/shader-shadowbunnei2020-11-211-88/+96
|\ \ \ \ \ | |/ / / / |/| | | | shader_bytecode: Eliminate variable shadowing
| * | | | shader_bytecode: Make use of [[nodiscard]] where applicableLioncash2020-11-201-73/+79
| | | | | | | | | | | | | | | | | | | | Ensures that all queried values are made use of.
| * | | | shader_bytecode: Eliminate variable shadowingLioncash2020-11-201-15/+17
| |/ / /
* | | | Merge pull request #4308 from ReinUsesLisp/maxwell-3d-funcsRodrigo Locatti2020-11-202-151/+122
|\ \ \ \ | |/ / / |/| | | maxwell_3d: Move code to separate functions and insert instead of push_back
| * | | maxwell_3d: Use insert instead of loop push_backReinUsesLisp2020-11-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reduces the overhead of bounds checking on each element. It won't reduce the cost of allocation because usually this vector's capacity is usually large enough to hold whatever we push to it.
| * | | maxwell_3d: Move code to separate functionsReinUsesLisp2020-11-112-151/+124
| | | | | | | | | | | | | | | | | | | | Deduplicate some code and put it in separate functions so it's easier to understand and profile.
* | | | rasterizer_interface: Make use of [[nodiscard]] where applicableLioncash2020-11-171-8/+9
| | | |
* | | | render_base: Make use of [[nodiscard]] where applicableLioncash2020-11-171-11/+11
| | | |
* | | | gpu: Make use of [[nodiscard]] where applicableLioncash2020-11-171-31/+35
|/ / /
* | | video_core: dma_pusher: Remove integrity check on command lists.bunnei2020-11-072-28/+1
| | | | | | | | | | | | - This seems to cause softlocks in Breath of the Wild.
* | | Merge pull request #4891 from lioncash/clang2bunnei2020-11-062-5/+4
|\ \ \ | | | | | | | | General: Fix clang build
| * | | General: Fix clang buildLioncash2020-11-052-5/+4
| | | | | | | | | | | | | | | | Allows building on clang to work again
* | | | Merge pull request #4854 from ReinUsesLisp/cube-array-shadowbunnei2020-11-063-25/+37
|\ \ \ \ | |/ / / |/| | | shader: Partially implement texture cube array shadow
| * | | shader: Partially implement texture cube array shadowReinUsesLisp2020-10-283-25/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements texture cube arrays with shadow comparisons but doesn't fix the asserts related to it. Fixes out of bounds reads on swizzle constructors and makes them use bounds checked ::at instead of the unsafe operator[].
* | | | Merge pull request #4858 from lioncash/initializerbunnei2020-11-043-2/+10
|\ \ \ \ | | | | | | | | | | General: Resolve a few missing initializer warnings
| * | | | General: Resolve a few missing initializer warningsLioncash2020-10-303-2/+10
| | | | | | | | | | | | | | | | | | | | Resolves a few -Wmissing-initializer warnings.
* | | | | Merge pull request #4869 from bunnei/improve-gpu-syncChloe2020-11-044-53/+149
|\ \ \ \ \ | | | | | | | | | | | | Improvements to GPU synchronization & various refactoring
| * | | | | video_core: dma_pusher: Add support for integrity checks.bunnei2020-11-012-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | - Log corrupted command lists, rather than crash.
| * | | | | video_core: dma_pusher: Add support for prefetched command lists.bunnei2020-11-012-25/+52
| | | | | |
| * | | | | video_core: gpu: Implement WaitFence and IncrementSyncPoint.bunnei2020-11-013-28/+70
| | | | | |
* | | | | | Merge pull request #4874 from lioncash/nodiscard2bunnei2020-11-047-16/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | nvdec: Make use of [[nodiscard]] where applicable
| * | | | | | nvdec: Make use of [[nodiscard]] where applicableLioncash2020-11-027-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents bugs from occurring where the results of a function are accidentally discarded
* | | | | | | Merge pull request #4865 from ameerj/async-threadcountbunnei2020-11-011-8/+9
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | async_shaders: Increase Async worker thread count for >8 thread cpus
| * | | | | | async_shaders: Increase Async worker thread count for 8+ thread cpusameerj2020-10-291-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds 1 async worker thread for every 2 available threads above 8
* | | | | | | Merge pull request #4853 from ReinUsesLisp/fcmp-immbunnei2020-10-312-1/+4
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | shader/arithmetic: Implement FCMP immediate + register variant
| * | | | | | shader/arithmetic: Implement FCMP immediate + register variantReinUsesLisp2020-10-282-1/+4
| | |_|/ / / | |/| | | | | | | | | | | | | | | | Trivially add the encoding for this.
* | | | | | vp9: Be explicit with copy and move operatorsLioncash2020-10-301-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's deprecated in the language to autogenerate these if the destructor for a type is specified, so we can explicitly specify how we want these to be generated.
* | | | | | vp9: Mark functions with [[nodiscard]] where applicableLioncash2020-10-302-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents values from mistakenly being discarded in cases where it's a bug to do so.
* | | | | | vp9: Provide a default initializer for "hidden" memberLioncash2020-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API of VP9 exposes a WasFrameHidden() function which accesses this member. Given the constructor previously didn't initialize this member, it's a potential vector for an uninitialized read. Instead, we can initialize this to a deterministic value to prevent that from occurring.
* | | | | | vp9: Make some member functions internally linkedLioncash2020-10-302-58/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These helper functions don't directly modify any member state and can be hidden from view.
* | | | | | Merge pull request #4837 from lioncash/nvdec-2bunnei2020-10-2913-88/+81
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | nvdec: Minor tidying up
| * | | | | h264: Make WriteUe take a u32Lioncash2020-10-272-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | Enforces the type of the desired value in calling code.
| * | | | | vp9: std::move buffer within ComposeFrameHeader()Lioncash2020-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We can move the buffer here to avoid a heap reallocation
| * | | | | vp9: Remove dead codeLioncash2020-10-271-6/+0
| | | | | |
| * | | | | vp9: Join declarations with assignmentsLioncash2020-10-271-7/+8
| | | | | |
| * | | | | vp9: Remove pessimizing movesLioncash2020-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The move will already occur without std::move.
| * | | | | vp9: Resolve variable shadowingLioncash2020-10-271-4/+4
| | | | | |
| * | | | | nvdec: Tidy up header includesLioncash2020-10-2713-62/+59
| | | | | | | | | | | | | | | | | | | | | | | | Prevents a few unnecessary inclusions.
* | | | | | Merge pull request #4838 from lioncash/syncmgrbunnei2020-10-292-9/+9
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | sync_manager: Amend parameter order of calls to SyncptIncr constructor
| * | | | | sync_manager: Amend parameter order of calls to SyncptIncr constructorLioncash2020-10-272-9/+9
| |/ / / / | | | | | | | | | | | | | | | Corrects some cases where the arguments would be incorrectly swapped.
* | / / / video_core: cdma_pusher: Add missing LOG_DEBUG field in ExecuteCommand.bunnei2020-10-291-1/+1
| |/ / / |/| | |
* | | | Merge pull request #4848 from ReinUsesLisp/type-limitsLC2020-10-282-1/+2
|\ \ \ \ | | | | | | | | | | video_core: Enforce -Werror=type-limits
| * | | | video_core: Enforce -Werror=type-limitsReinUsesLisp2020-10-282-1/+2
| |/ / / | | | | | | | | | | | | Silences one warning and avoids introducing more in the future.
* / / / video_core: Enforce -Wredundant-move and -Wpessimizing-moveReinUsesLisp2020-10-284-4/+5
|/ / / | | | | | | | | | Silence three warnings and make them errors to avoid introducing more in the future.
* | | video_core: NVDEC Implementationameerj2020-10-2730-22/+3311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit aims to implement the NVDEC (Nvidia Decoder) functionality, with video frame decoding being handled by the FFmpeg library. The process begins with Ioctl commands being sent to the NVDEC and VIC (Video Image Composer) emulated devices. These allocate the necessary GPU buffers for the frame data, along with providing information on the incoming video data. A Submit command then signals the GPU to process and decode the frame data. To decode the frame, the respective codec's header must be manually composed from the information provided by NVDEC, then sent with the raw frame data to the ffmpeg library. Currently, H264 and VP9 are supported, with VP9 having some minor artifacting issues related mainly to the reference frame composition in its uncompressed header. Async GPU is not properly implemented at the moment. Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com>
* | | Merge pull request #4706 from ReinUsesLisp/cmake-host-shadersbunnei2020-10-232-12/+7
|\ \ \ | | | | | | | | video_core: Fix instances where msbuild always regenerated host shaders
| * | | video_core: Fix instances where msbuild always regenerated host shadersReinUsesLisp2020-09-242-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | When HEADER_GENERATOR was included in the DEPENDS section of custom commands, msbuild assumed this was always modified. Changing this file is not common so we can remove it from there.
* | | | video_core: Conditially activate relevant compiler warningsLioncash2020-10-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These compiler flags aren't shared with clang, so specifying these flags unconditionally can lead to a bit of warning spam. While we're in the area, we can also enable -Wunused-but-set-parameter given this is almost always a bug.
* | | | gl_arb_decompiler: Implement robust buffer operationsReinUsesLisp2020-10-203-33/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This emulates the behavior we get on GLSL with regular SSBOs with a pointer + length pair. It aims to be consistent with the crashes we might get. Out of bounds stores are ignored. Atomics are ignored and return zero. Reads return zero.
* | | | Merge pull request #4204 from ReinUsesLisp/vulkan-1.0bunnei2020-10-197-58/+92
|\ \ \ \ | | | | | | | | | | renderer_vulkan: Create and properly use Vulkan 1.0 instances when 1.1 is not available
| * | | | vk_device: Use Vulkan 1.0 properlyReinUsesLisp2020-08-205-52/+66
| | | | | | | | | | | | | | | | | | | | | | | | | Enable the required capabilities to use Vulkan 1.0 without validation errors and disable those that are not compatible with it.
| * | | | renderer_vulkan: Create a Vulkan 1.0 instance when 1.1 is not availableReinUsesLisp2020-08-203-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | This commit doesn't make yuzu compatible with Vulkan 1.0 yet, it only creates an 1.0 instance.
* | | | | Merge pull request #4782 from ReinUsesLisp/remove-dyn-primitivebunnei2020-10-186-26/+7
|\ \ \ \ \ | | | | | | | | | | | | vk_graphics_pipeline: Manage primitive topology as fixed state
| * | | | | vk_graphics_pipeline: Manage primitive topology as fixed stateReinUsesLisp2020-10-136-26/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vulkan has requirements for primitive topologies that don't play nicely with yuzu's. Since it's only 4 bits, we can move it to fixed state without changing the size of the pipeline key. - Fixes a regression on recent Nvidia drivers on Fire Emblem: Three Houses.
* | | | | | Merge pull request #4772 from goldenx86/block-rdnabunnei2020-10-151-0/+24
|\ \ \ \ \ \ | |/ / / / / |/| | | | | vk_device: Block VK_EXT_extended_dynamic_state for RDNA devices
| * | | | | vk_device: Block VK_EXT_extended_dynamic_state for RDNA devicesgoldenx862020-10-091-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RDNA devices seem to crash when using VK_EXT_extended_dynamic_state in the latest 20.9.2 proprietary Windows drivers. As a workaround, for now we block device names corresponding to current RDNA released products.
* | | | | | Merge pull request #4766 from ReinUsesLisp/tmml-cubebunnei2020-10-121-19/+22
|\ \ \ \ \ \ | | | | | | | | | | | | | | shader/texture: Implement CUBE texture type for TMML and fix arrays
| * | | | | | shader/texture: Implement CUBE texture type for TMML and fix arraysReinUsesLisp2020-10-081-19/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TMML takes an array argument that has no known meaning, this one appears as the first component in gpr8 followed by s, t and r. Skip this component when arrays are being used. Also implement CUBE texture types. - Used by Pikmin 3: Deluxe Demo.
* | | | | | | video_core: Enforce -Wclass-memaccessReinUsesLisp2020-10-092-7/+7
| | | | | | |
* | | | | | | Merge pull request #4771 from ReinUsesLisp/warn-unused-varLC2020-10-093-4/+7
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | video_core: Enforce -Wunused-variable and -Wunused-but-set-variable
| * | | | | | video_core: Enforce -Wunused-variable and -Wunused-but-set-variableReinUsesLisp2020-10-033-4/+7
| |/ / / / /
* / / / / / renderer_vulkan/wrapper: Fix physical device sortingReinUsesLisp2020-10-071-13/+35
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code had a sort function that was invalid and it didn't work as expected when the base vector had a different order (e.g. renderdoc was attached). This sorts devices as expected and fixes a debug assert on MSVC.
* | | | | Remove ext_extended_dynamic_state blacklistMatías Locatti2020-09-301-8/+0
| | | | | | | | | | | | | | | Latest AMD 20.9.2 driver fixed this, there's no reason to keep it blocked, as the previous stable signed driver release doesn't include the extension.
* | | | | Merge pull request #4724 from lat9nq/fix-vulkan-nvidia-allocate-2Rodrigo Locatti2020-09-271-1/+2
|\ \ \ \ \ | | | | | | | | | | | | vk_stream_buffer: Fix initializing Vulkan with NVIDIA on Linux
| * | | | | vk_stream_buffer: Fix initializing Vulkan with NVIDIA on Linuxlat9nq2020-09-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The previous fix only partially solved the issue, as only certain GPUs that needed 9 or less MiB subtracted would work (i.e. GTX 980 Ti, GT 730). This takes from DXVK's example to divide `heap_size` by 2 to determine `allocable_size`. Additionally tested on my Quadro K4200, which previously required setting it to 12 to boot.
* | | | | | Merge pull request #4703 from lioncash/desig7bunnei2020-09-272-26/+26
|\ \ \ \ \ \ | | | | | | | | | | | | | | shader/registry: Make use of designated initializers where applicable
| * | | | | | shader/registry: Silence a -Wshadow warningLioncash2020-09-232-5/+5
| | | | | | |
| * | | | | | shader/registry: Remove unnecessary namespace qualifiersLioncash2020-09-231-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Using statements already make these unnecessary.
| * | | | | | shader/registry: Make use of designated initializers where applicableLioncash2020-09-231-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Same behavior, less repetition.
* | | | | | | vk_command_pool: Move definition of Pool into the cpp fileLioncash2020-09-252-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows the implementation details to be changed without recompiling any files that include this header.
* | | | | | | vk_command_pool: Make use of override on destructorLioncash2020-09-251-1/+1
| | | | | | |
* | | | | | | vk_command_pool: Add missing header guardLioncash2020-09-251-0/+2
| |/ / / / / |/| | | | |
* | | | | | Merge pull request #4711 from lioncash/move5bunnei2020-09-251-16/+19
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | arithmetic_integer_immediate: Make use of std::move where applicable
| * | | | | arithmetic_integer_immediate: Make use of std::move where applicableLioncash2020-09-241-16/+19
| |/ / / / | | | | | | | | | | | | | | | | | | | | Same behavior, minus any redundant atomic reference count increments and decrements.
* | | | | Merge pull request #4674 from ReinUsesLisp/timeline-semaphoresbunnei2020-09-2442-814/+647
|\ \ \ \ \ | |_|_|/ / |/| | | | renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore
| * | | | vk_query_cache: Hack counter destructor to avoid reserving queriesReinUsesLisp2020-09-191-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a hack to destroy all HostCounter instances before the base class destructor is called. The query cache should be redesigned to have a proper ownership model instead of using shared pointers. For now, destroy the host counter hierarchy from the derived class destructor.
| * | | | renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp2020-09-1942-814/+638
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reworks how host<->device synchronization works on the Vulkan backend. Instead of "protecting" resources with a fence and signalling these as free when the fence is known to be signalled by the host GPU, use timeline semaphores. Vulkan timeline semaphores allow use to work on a subset of D3D12 fences. As far as we are concerned, timeline semaphores are a value set by the host or the device that can be waited by either of them. Taking advantange of this, we can have a monolithically increasing atomic value for each submission to the graphics queue. Instead of protecting resources with a fence, we simply store the current logical tick (the atomic value stored in CPU memory). When we want to know if a resource is free, it can be compared to the current GPU tick. This greatly simplifies resource management code and the free status of resources should have less false negatives. To workaround bugs in validation layers, when these are attached there's a thread waiting for timeline semaphores.
* | | | | control_flow: emplace elements in place within TryQuery()Lioncash2020-09-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Places data structures where they'll eventually be moved to to avoid needing to even move them in the first place.
* | | | | control_flow: Make use of std::move in InsertBranch()Lioncash2020-09-231-7/+8
| |/ / / |/| | | | | | | | | | | Avoids unnecessary atomic increments and decrements.
* | | | General: Make use of std::nullopt where applicableLioncash2020-09-227-32/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals.
* | | | renderer_opengl: Remove emulated mailbox presentationReinUsesLisp2020-09-205-293/+22
| | | | | | | | | | | | | | | | | | | | Emulated mailbox presentation was causing performance issues on Nvidia's OpenGL driver. Remove it.
* | | | fermi_2d: Make use of designated initializersLioncash2020-09-182-8/+8
| | | | | | | | | | | | | | | | | | | | Same behavior, less repetition. We can also ensure all members of Config are initialized.
* | | | Merge pull request #4672 from lioncash/narrowingRodrigo Locatti2020-09-171-1/+1
|\ \ \ \ | | | | | | | | | | decoder/texture: Eliminate narrowing conversion in GetTldCode()
| * | | | decoder/texture: Eliminate narrowing conversion in GetTldCode()Lioncash2020-09-171-1/+1
| |/ / / | | | | | | | | | | | | The assignment was previously truncating a u64 value to a bool.
* / / / decode/image: Eliminate switch fallthrough in DecodeImage()Lioncash2020-09-171-0/+1
|/ / / | | | | | | | | | | | | Fortunately this didn't result in any issues, given the block that code was falling through to would immediately break.
* | | video_core: Enforce -Werror=switchReinUsesLisp2020-09-167-10/+59
| | | | | | | | | | | | This forces us to fix all -Wswitch warnings in video_core.
* | | video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-0649-629/+566
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
* | | Merge pull request #4611 from lioncash/xbyak2bunnei2020-09-041-5/+5
|\ \ \ | | | | | | | | externals: Update Xbyak to 5.96
| * | | externals: Update Xbyak to 5.96Lioncash2020-08-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I made a request on the Xbyak issue tracker to allow some constructors to be constexpr in order to avoid static constructors from needing to execute for some of our register constants. This request was implemented, so this updates Xbyak so that we can make use of it.
* | | | Merge pull request #4575 from lioncash/asyncbunnei2020-09-032-17/+15
|\ \ \ \ | | | | | | | | | | async_shaders: Mark getters as const member functions
| * | | | async_shaders: Mark getters as const member functionsLioncash2020-08-242-17/+15
| | | | | | | | | | | | | | | | | | | | While we're at it, we can also mark them as nodiscard.
* | | | | vk_device: Fix driver id check on AMD for VK_EXT_extended_dynamic_stateReinUsesLisp2020-08-311-6/+9
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'driver_id' can only be known on Vulkan 1.1 after creating a logical device. Move the driver id check to disable VK_EXT_extended_dynamic_state after the logical device is successfully initialized. The Vulkan device will have the extension enabled but it will not be used.
* | | | vk_device: Blacklist AMD proprietary from VK_EXT_extended_dynamic_stateReinUsesLisp2020-08-291-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Vertex binding's <stride> is bugged on AMD's proprietary drivers when using VK_EXT_extended_dynamic_state. Blacklist it for now while we investigate how to report this issue to AMD.
* | | | Merge pull request #4524 from lioncash/memory-logbunnei2020-08-271-1/+2
|\ \ \ \ | | | | | | | | | | shader/memory: Amend UNIMPLEMENTED_IF_MSG without a message
| * | | | shader/memory: Amend UNIMPLEMENTED_IF_MSG without a messageLioncash2020-08-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | We need to provide a message for this variant of the macro, so we can simply log out the type being used.
* | | | | Merge pull request #4569 from ReinUsesLisp/glsl-cmakebunnei2020-08-2712-51/+127
|\ \ \ \ \ | | | | | | | | | | | | video_core/host_shaders: Add CMake integration for string shaders
| * | | | | video_core/host_shaders: Add CMake integration for string shadersReinUsesLisp2020-08-247-42/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the necessary CMake code to copy the contents in a string source shader (GLSL or GLASM) to a header file then consumed by video_core files. This allows editting GLSL in its own files without having to maintain them in source files. For now, only OpenGL presentation shaders are moved, but we can add GLASM presentation shaders and static SPIR-V generation through glslangValidator in the future.
| * | | | | gl_shader_util: Use std::string_view instead of star pointerReinUsesLisp2020-08-245-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us passing any type of string and hinting the length of the string to the OpenGL driver.
* | | | | | Merge pull request #4555 from ReinUsesLisp/fix-primitive-topologybunnei2020-08-273-13/+14
|\ \ \ \ \ \ | | | | | | | | | | | | | | vk_state_tracker: Fix primitive topology
| * | | | | | vk_state_tracker: Fix primitive topologyReinUsesLisp2020-08-213-13/+14
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | State track the current primitive topology with a regular comparison instead of using dirty flags. This fixes a bug in dirty flags for this particular state and it also avoids unnecessary state changes as this property is stored in a frequently changed bit field.
* | | | | | memory_manager: Make use of [[nodiscard]] in the interfaceLioncash2020-08-271-17/+17
| | | | | |
* | | | | | memory_manager: Make operator+ const qualifiedLioncash2020-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This doesn't modify member state, so it can be marked as const.
* | | | | | Merge pull request #4574 from lioncash/const-fnbunnei2020-08-252-3/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | memory_manager: Mark IsGranularRange() as a const member function
| * | | | | | memory_manager: Mark IsGranularRange() as a const member functionLioncash2020-08-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't modify internal member state, so it can be marked as const.
* | | | | | | Merge pull request #4542 from ReinUsesLisp/gpu-init-basebunnei2020-08-2522-119/+172
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | video_core: Initialize renderer with a GPU
| * | | | | | video_core: Initialize renderer with a GPUReinUsesLisp2020-08-2222-119/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an extra step in GPU initialization to be able to initialize render backends with a valid GPU instance.
* | | | | | | gl_texture_cache: Take std::string by reference in DecorateViewName()Lioncash2020-08-242-2/+2
| |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | LabelGLObject takes a string_view, so we don't need to make copies of the std::string.
* | | | | | video_core/fence_manager: Remove unnecessary includesLioncash2020-08-243-9/+4
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | Avoids pulling in unnecessary things that can cause rebuilds when they aren't required.
* | | | | Merge pull request #4521 from lioncash/optionalcachebunnei2020-08-221-11/+12
|\ \ \ \ \ | | | | | | | | | | | | gl_shader_disk_cache: Make use of std::nullopt where applicable
| * | | | | gl_shader_disk_cache: Make use of std::nullopt where applicableLioncash2020-08-141-11/+12
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | Allows the compiler to avoid unnecessarily zeroing out the internal buffer of std::optional on some implementations.
* | | | | Merge pull request #4523 from lioncash/self-assignbunnei2020-08-221-1/+0
|\ \ \ \ \ | |_|_|/ / |/| | | | macro-interpreter: Resolve -Wself-assign-field warning
| * | | | macro-interpreter: Resolve -Wself-assign-field warningLioncash2020-08-141-1/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | This was assigning the field to itself, which is a no-op. The size doesn't change between its initial assignment and this one, so this is a safe change to make.
* | | | Merge pull request #4546 from lioncash/telemetrybunnei2020-08-202-4/+5
|\ \ \ \ | | | | | | | | | | common/telemetry: Migrate namespace into the Common namespace
| * | | | common/telemetry: Migrate namespace into the Common namespaceLioncash2020-08-182-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Migrates the Telemetry namespace into the Common namespace to make the code consistent with the rest of our common code.
* | | | | Merge pull request #4522 from lioncash/vulk-copybunnei2020-08-191-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | vulkan/wrapper: Avoid unnecessary copy in EnumerateInstanceExtensionProperties()
| * | | | vulkan/wrapper: Avoid unnecessary copy in EnumerateInstanceExtensionProperties()Lioncash2020-08-141-1/+1
| |/ / / | | | | | | | | | | | | | | | | Given this is implicitly creating a std::optional, we can move the vector into it.
* | | | Merge pull request #4535 from lioncash/fileutilbunnei2020-08-184-30/+30
|\ \ \ \ | | | | | | | | | | common/fileutil: Convert namespace to Common::FS
| * | | | common/fileutil: Convert namespace to Common::FSLioncash2020-08-164-30/+30
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
* | | | Merge pull request #4443 from ameerj/vk-async-shadersDavid2020-08-1714-87/+209
|\ \ \ \ | | | | | | | | | | vulkan_renderer: Async shader/graphics pipeline compilation
| * | | | Remove unneeded newlines, optional Registry in shader paramsameerj2020-08-165-14/+9
| | | | | | | | | | | | | | | | | | | | Addressing feedback from Rodrigo
| * | | | Morph: Update worker allocation commentAmeer J2020-08-161-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
| * | | | move thread 1/4 count computation into allocate workers methodameerj2020-08-164-23/+14
| | | | |
| * | | | Address feedback, add shader compile notifier, update setting textameerj2020-08-168-161/+116
| | | | |
| * | | | Vk Async Worker directly emplace in cacheameerj2020-08-163-58/+41
| | | | |
| * | | | Address feedback. Bruteforce delete duplicatesameerj2020-08-167-80/+116
| | | | |
| * | | | Vk Async pipeline compilationameerj2020-08-1613-20/+182
| |/ / /
* | | | Merge pull request #4520 from lioncash/pessimizeDavid2020-08-171-2/+2
|\ \ \ \ | |/ / / |/| | | async_shaders: Resolve -Wpessimizing-move warning
| * | | async_shaders: Resolve -Wpessimizing-move warningLioncash2020-08-141-2/+2
| |/ / | | | | | | | | | | | | Prevents pessimization of the move constructor (which thankfully didn't actually happen in practice here, given std::thread isn't copyable).
* | | Merge pull request #4528 from lioncash/discardbunnei2020-08-161-1/+2
|\ \ \ | | | | | | | | common: Make use of [[nodiscard]] where applicable
| * | | common/compression: Roll back std::span changesLioncash2020-08-151-1/+2
| | | | | | | | | | | | | | | | Seems like all compilers don't support std::span yet.
* | | | Merge pull request #4519 from lioncash/semibunnei2020-08-161-1/+1
|\ \ \ \ | |/ / / |/| | | maxwell_3d: Resolve -Wextra-semi warning
| * | | maxwell_3d: Resolve -Wextra-semi warningLioncash2020-08-141-1/+1
| |/ / | | | | | | | | | Semicolons after a function definition aren't necessary.
* | | Merge pull request #4416 from lioncash/spanbunnei2020-08-151-2/+1
|\ \ \ | | | | | | | | lz4_compression/zstd_compression: Make use of std::span in interfaces
| * | | zstd_compression: Make use of std::span in interfacesLioncash2020-07-251-2/+1
| | | | | | | | | | | | | | | | Allows condensing the data and size parameters into a single argument.
* | | | Merge pull request #4453 from ReinUsesLisp/block-to-linearbunnei2020-08-153-34/+34
|\ \ \ \ | |_|/ / |/| | | textures/decoders: Fix block linear to pitch copies
| * | | textures/decoders: Fix block linear to pitch copiesReinUsesLisp2020-08-113-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two issues with block linear copies. First the swizzling was wrong and this commit reimplements them. The other issue was that these copies are generally used to download render targets from the GPU and yuzu was not downloading them from host GPU memory unless the extreme GPU accuracy setting was selected. This commit enables cached memory reads for all accuracy levels. - Fixes level thumbnails in Super Mario Maker 2.
* | | | Merge pull request #4514 from Morph1984/worker-allocbunnei2020-08-131-1/+1
|\ \ \ \ | | | | | | | | | | gl_shader_cache: Use std::max() for determining num_workers
| * | | | gl_shader_cache: Use std::max() for determining num_workersMorph2020-08-121-1/+1
| |/ / / | | | | | | | | | | | | Does not allocate more threads than available in the host system for boot-time shader compilation and always allocates at least 1 thread if hardware_concurrency() returns 0.
* / / / General: Tidy up clang-format warnings part 2Lioncash2020-08-133-31/+33
|/ / /
* | | Merge pull request #4389 from ogniK5377/redundant-format-typebunnei2020-08-071-1/+0
|\ \ \ | | | | | | | | video_core: Remove redundant pixel format type
| * | | video_core: Remove redundant pixel format typeDavid Marcec2020-07-211-1/+0
| | | | | | | | | | | | | | | | We already get the format type before converting shadow formats and during shadow formats.
* | | | Merge pull request #4430 from bunnei/new-gpu-vmmbunnei2020-08-052-500/+204
|\ \ \ \ | | | | | | | | | | hle: nvdrv: Rewrite of GPU memory management.
| * | | | hle: nvdrv: Rewrite of GPU memory management.bunnei2020-07-262-500/+204
| | |/ / | |/| |
* | | | Merge pull request #4445 from Morph1984/async-threadsbunnei2020-08-051-9/+4
|\ \ \ \ | | | | | | | | | | renderer_opengl: Use 1/4 of all threads for async shader compilation
| * | | | renderer_opengl: Use 1/4 of all threads for async shader compilationMorph2020-07-281-9/+4
| | | | |
* | | | | Merge pull request #4469 from lioncash/missingbunnei2020-08-046-3/+18
|\ \ \ \ \ | | | | | | | | | | | | vk_texture_cache: Silence -Wmissing-field-initializer warnings
| * | | | | vulkan: Silence more -Wmissing-field-initializer warningsLioncash2020-08-036-3/+18
| |/ / / /
* | | | | yuzu: Resolve C++20 deprecation warnings related to lambda capturesLioncash2020-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | C++20 deprecates capturing the this pointer via the '=' capture. Instead, we replace it or extend the capture specification.
* | | | | Merge pull request #4392 from lioncash/guardDavid2020-07-301-0/+2
|\ \ \ \ \ | | | | | | | | | | | | compatible_formats: Add missing header guard
| * | | | | compatible_formats: Add missing header guardLioncash2020-07-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Prevents potential inclusion issues from occurring.
* | | | | | Merge pull request #4396 from lioncash/commabunnei2020-07-301-45/+52
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | surface_params: Replace questionable usages of the comma operator with semicolons
| * | | | | surface_params: Make use of designated initializers where applicableLioncash2020-07-211-38/+46
| | | | | | | | | | | | | | | | | | | | | | | | Provides a convenient way to avoid unnecessary zero initializing.
| * | | | | surface_params: Remove redundant assignmentLioncash2020-07-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | This is a redundant assignment that can be removed.
| * | | | | surface_params: Replace questionable usages of the comma operator with semicolonsLioncash2020-07-211-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | These are bugs waiting to happen.
* | | | | | Merge pull request #4419 from lioncash/initializerbunnei2020-07-282-0/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | vulkan: Resolve -Wmissing-field-initializer warnings
| * | | | | | vulkan: Resolve -Wmissing-field-initializer warningsLioncash2020-07-252-0/+4
| | |_|/ / / | |/| | | |
* / | | | | video_core/gpu: Correct the size of the puller registersBilly Laws2020-07-261-2/+2
|/ / / / / | | | | | | | | | | The puller register array is made up of u32s however the `NUM_REGS` value is the size in bytes, so switch it to avoid making the struct unnecessary large. Also fix a small typo in a comment.
* | | | | Merge pull request #4393 from lioncash/unused5bunnei2020-07-251-4/+0
|\ \ \ \ \ | | | | | | | | | | | | vk_rasterizer: Remove unused variable in Clear()
| * | | | | vk_rasterizer: Remove unused variable in Clear()Lioncash2020-07-211-4/+0
| | |/ / / | |/| | | | | | | | | | | | | | | | | | The relevant values are already assigned further down in the lambda, so this can be removed entirely.
* | | | | Merge pull request #4388 from lioncash/writtenbunnei2020-07-241-6/+3
|\ \ \ \ \ | | | | | | | | | | | | buffer_cache: Eliminate redundant map lookup in MarkRegionAsWritten()
| * | | | | buffer_cache: Eliminate redundant map lookup in MarkRegionAsWritten()Lioncash2020-07-201-6/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can make use of emplace()'s return value to determine whether or not we need to perform an increment. emplace() performs no insertion if an element already exist, so this can eliminate a find() call.
* | | | | Merge pull request #4391 from lioncash/nrvobunnei2020-07-247-26/+26
|\ \ \ \ \ | | | | | | | | | | | | video_core: Allow copy elision to take place where applicable
| * | | | | video_core: Allow copy elision to take place where applicableLioncash2020-07-217-26/+26
| |/ / / / | | | | | | | | | | | | | | | | | | | | Removes const from some variables that are returned from functions, as this allows the move assignment/constructors to execute for them.
* | | | | Merge pull request #4394 from lioncash/unused6bunnei2020-07-248-33/+5
|\ \ \ \ \ | | | | | | | | | | | | video_core: Remove unused variables
| * | | | | video_core: Remove unused variablesLioncash2020-07-218-33/+5
| |/ / / / | | | | | | | | | | | | | | | Silences several compiler warnings about unused variables.
* | | | | Merge pull request #4359 from ReinUsesLisp/clamp-sharedRodrigo Locatti2020-07-216-9/+42
|\ \ \ \ \ | | | | | | | | | | | | renderer_{opengl,vulkan}: Clamp shared memory to host's limit
| * | | | | renderer_{opengl,vulkan}: Clamp shared memory to host's limitReinUsesLisp2020-07-166-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This stops shaders from failing to build when the exceed host's shared memory size limit. An error is logged.
* | | | | | Merge pull request #4360 from ReinUsesLisp/glasm-barRodrigo Locatti2020-07-211-4/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_arb_decompiler: Execute BAR even when inside control flow
| * | | | | | gl_arb_decompiler: Execute BAR even when inside control flowReinUsesLisp2020-07-161-4/+0
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike GLSL, GLASM allows us to call BAR inside control flow. - Fixes graphical artifacts in Paper Mario.
* | | | | | Merge pull request #4361 from ReinUsesLisp/lane-idRodrigo Locatti2020-07-211-2/+1
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | decode/other: Implement S2R.LaneId
| * | | | | decode/other: Implement S2R.LaneIdReinUsesLisp2020-07-161-2/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | This maps to host's thread id. - Fixes graphical issues on Paper Mario.
* | | | | Merge pull request #4324 from ReinUsesLisp/formatsbunnei2020-07-2120-1100/+1111
|\ \ \ \ \ | |_|_|/ / |/| | | | video_core: Fix, add and rename pixel formats
| * | | | video_core: Rearrange pixel format namesReinUsesLisp2020-07-1319-1179/+1077
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normalizes pixel format names to match Vulkan names. Previous to this commit pixel formats had no convention, leading to confusion and potential bugs.
| * | | | video_core: Fix DXT4 and RGB565ReinUsesLisp2020-07-137-37/+31
| | | | |
| * | | | video_core/format_lookup_table: Add formats with existing PixelFormatReinUsesLisp2020-07-131-1/+9
| | | | |
| * | | | video_core: Fix B5G6R5_UNORM render target formatReinUsesLisp2020-07-135-1/+10
| | | | |
| * | | | video_core: Fix B5G6R5UReinUsesLisp2020-07-132-2/+2
| | | | |
| * | | | video_core: Implement RGBA32_SINT render targetReinUsesLisp2020-07-137-58/+71
| | | | |
| * | | | video_core: Implement RGBA32_SINT render targetReinUsesLisp2020-07-137-0/+13
| | | | |
| * | | | video_core: Implement RGBA16_SINT render targetReinUsesLisp2020-07-137-0/+13
| | | | |
| * | | | video_core: Implement RGBA8_SINT render targetReinUsesLisp2020-07-137-0/+13
| | | | |
| * | | | video_core: Implement RG32_SINT render targetReinUsesLisp2020-07-137-0/+13
| | | | |
| * | | | video_core: Implement RG8_SINT render target and fix RG8_UINTReinUsesLisp2020-07-137-1/+14
| | | | |
| * | | | video_core: Implement R8_SINT render targetReinUsesLisp2020-07-137-0/+13
| | | | |
| * | | | video_core: Implement R8_SNORM render targetReinUsesLisp2020-07-137-0/+13
| | | | |
| * | | | video_core/surface: Remove explicit values on PixelFormat's definitionReinUsesLisp2020-07-131-80/+80
| | | | |
| * | | | video_core/surface: Reorder render target to pixel format switchReinUsesLisp2020-07-131-53/+51
| | | | |
* | | | | gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shadersReinUsesLisp2020-07-187-110/+173
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NV_shader_buffer_{load,store} is a 2010 extension that allows GL applications to use what in Vulkan is known as physical pointers, this is basically C pointers. On GLASM these is exposed through the LOAD/STORE/ATOM instructions. Up until now, assembly shaders were using NV_shader_storage_buffer_object. These work fine, but have a (probably unintended) limitation that forces us to have the limit of a single stage for all shader stages. In contrast, with NV_shader_buffer_{load,store} we can pass GPU addresses to the shader through local parameters (GLASM equivalent uniform constants, or push constants on Vulkan). Local parameters have the advantage of being per stage, allowing us to generate code without worrying about binding overlaps.
* | | | Merge pull request #4273 from ogniK5377/async-shaders-prodbunnei2020-07-1814-58/+584
|\ \ \ \ | | | | | | | | | | video_core: Add asynchronous shader decompilation and compilation
| * | | | Fix style issuesDavid Marcec2020-07-182-7/+13
| | | | |
| * | | | Remove duplicate configDavid Marcec2020-07-171-0/+1
| | | | |
| * | | | Use conditional varDavid Marcec2020-07-172-9/+15
| | | | |
| * | | | Drop max workers from 8->2 for testingDavid Marcec2020-07-171-1/+1
| | | | |
| * | | | Rebase for per game settingsDavid Marcec2020-07-171-1/+1
| | | | |
| * | | | async shadersDavid Marcec2020-07-1714-58/+571
| | | | |
* | | | | Merge pull request #4364 from lioncash/desig5bunnei2020-07-1819-664/+763
|\ \ \ \ \ | | | | | | | | | | | | vulkan: Make use of designated initializers where applicable
| * | | | | wrapper: Make use of designated initializers where applicableLioncash2020-07-171-56/+64
| | | | | |
| * | | | | vk_texture_cache: Make use of designated initializers where applicableLioncash2020-07-171-96/+135
| | | | | |
| * | | | | vk_swapchain: Make use of designated initializers where applicableLioncash2020-07-171-43/+51
| | | | | |
| * | | | | vk_stream_buffer: Make use of designated initializers where applicableLioncash2020-07-171-19/+16
| | | | | |
| * | | | | vk_staging_buffer_pool: Make use of designated initializers where applicableLioncash2020-07-171-13/+12
| | | | | |
| * | | | | vk_shader_util: Make use of designated initializers where applicableLioncash2020-07-171-7/+7
| | | | | |
| * | | | | vk_scheduler: Make use of designated initializers where applicableLioncash2020-07-171-27/+30
| | | | | |
| * | | | | vk_sampler_cache: Make use of designated initializers where applicableLioncash2020-07-171-24/+27
| | | | | |
| * | | | | vk_resource_manager: Make use of designated initializers where applicableLioncash2020-07-171-15/+14
| | | | | |
| * | | | | vk_renderpass_cache: Make use of designated initializers where applicableLioncash2020-07-171-59/+70
| | | | | |
| * | | | | vk_rasterizer: Make use of designated initializers where applicableLioncash2020-07-171-41/+47
| | | | | |
| * | | | | vk_query_cache: Make use of designated initializers where applicableLioncash2020-07-171-8/+8
| | | | | |
| * | | | | vk_pipeline_cache: Make use of designated initializers where applicableLioncash2020-07-171-31/+35
| | | | | |
| * | | | | vk_memory_manager: Make use of designated initializers where applicableLioncash2020-07-171-7/+6
| | | | | |
| * | | | | vk_image: Make use of designated initializers where applicableLioncash2020-07-171-15/+23
| | | | | |
| * | | | | vk_descriptor_pool: Make use of designated initializers where applicableLioncash2020-07-171-15/+18
| | | | | |
| * | | | | vk_compute_pipeline: Make use of designated initializers where applicableLioncash2020-07-161-63/+68
| | | | | |
| * | | | | vk_compute_pass: Make use of designated initializers where applicableLioncash2020-07-161-95/+99
| | | | | | | | | | | | | | | | | | | | | | | | Note: Some barriers can't be converted over yet, as they ICE MSVC.
| * | | | | vk_buffer_cache: Make use of designated initializers where applicableLioncash2020-07-161-30/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: An array within CopyFrom() cannot be converted over yet, as it ICEs MSVC when converted over.
* | | | | | vk_device: Fix build error on old MSVC versionsReinUsesLisp2020-07-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Designated initializers on old MSVC versions fail to build when they take the address of a constant.
* | | | | | Merge pull request #4322 from ReinUsesLisp/fix-dynstatebunnei2020-07-171-0/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | vk_state_tracker: Fix dirty flags for stencil_enable on VK_EXT_extended_dynamic_state
| * | | | | | vk_state_tracker: Fix dirty flags for stencil_enable on VK_EXT_extended_dynamic_stateReinUsesLisp2020-07-131-0/+1
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | Fixes a regression on any game using stencil on devices with VK_EXT_extended_dynamic_state.
* | | | | | Merge pull request #4369 from lioncash/hle-macroLC2020-07-171-10/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | macro_hle: Remove unnecessary std::make_pair calls
| * | | | | | macro_hle: Remove unnecessary static keywordsLioncash2020-07-171-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions are already in an anonymous namespace which makes the functions internally linked.
| * | | | | | macro_hle: Remove unnecessary std::make_pair callsLioncash2020-07-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of make_pair is generally to deduce the types within the pair without explicitly specifying the types, so these usages were generally unnecessary, particularly when the type is enforced by the array declaration.
* | | | | | | Merge pull request #4340 from lioncash/removeLC2020-07-171-2/+2
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | shader_cache: Make use of std::erase_if
| * | | | | | shader_cache: Make use of std::erase_ifLioncash2020-07-141-2/+2
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | Now that we use C++20, we can also make use of std::erase_if instead of needing to do the erase-remove idiom.
* | | | | | Merge pull request #4368 from lioncash/macroDavid2020-07-171-1/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | macro: Resolve missing parameter in doxygen comment
| * | | | | | macro: Resolve missing parameter in doxygen commentLioncash2020-07-171-1/+2
| | |/ / / / | |/| | | | | | | | | | | | | | | | Resolves a -Wdocumentation warning.
* | | | | | Merge pull request #4370 from lioncash/simplifyDavid2020-07-171-2/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | macro_hle: Simplify shift expression in HLE_771BB18C62444DA0()
| * | | | | | macro_hle: Simplify shift expression in HLE_771BB18C62444DA0()Lioncash2020-07-171-2/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the expression involves a 32-bit value, this simplifies down to just: 0x3ffffff. This is likely a remnant from testing that was never cleaned up. Resolves a -Wshift-overflow warning.
* / / / / / vk_texture_cache: Amend mismatched access masks and indices in UploadBufferLioncash2020-07-171-6/+4
|/ / / / / | | | | | | | | | | | | | | | | | | | | Discovered while converting relevant parts of the codebase over to designated initializers.
* | / / / vk_graphics_pipeline: Resolve narrowing warningsLioncash2020-07-171-2/+4
| |/ / / |/| | | | | | | | | | | | | | | For whatever reason, VK_TRUE and VK_FALSE aren't defined as having a VkBool32 type, so we need to cast to it explicitly.
* | | | Merge pull request #4333 from lioncash/desig3Rodrigo Locatti2020-07-161-198/+223
|\ \ \ \ | | | | | | | | | | vk_graphics_pipeline: Make use of designated initializers where applicable
| * | | | vk_graphics_pipeline: Make use of designated initializers where applicableLioncash2020-07-141-198/+223
| |/ / / | | | | | | | | | | | | Avoids redundant variable name repetitions.
* | | | Merge pull request #4332 from lioncash/vkdevRodrigo Locatti2020-07-161-124/+152
|\ \ \ \ | | | | | | | | | | vk_device: Make use of designated initializers where applicable
| * | | | vk_device: Make use of designated initializers where applicableLioncash2020-07-141-124/+152
| |/ / / | | | | | | | | | | | | | | | | Avoids redundant repetitions of variable names, and allows assignment all in one statement.
* | | | Merge pull request #4321 from lioncash/desigbunnei2020-07-161-334/+384
|\ \ \ \ | |_|/ / |/| | | vk_blit_screen: Make use of designated initializers where applicable
| * | | vk_blit_screen: Make use of designated initializers where applicableLioncash2020-07-131-334/+384
| |/ / | | | | | | | | | | | | Now that we make use of C++20, we can use designated initializers to make things a little nicer to read.
* | | Merge pull request #4242 from ReinUsesLisp/maxwell-dmabunnei2020-07-146-359/+468
|\ \ \ | |/ / |/| | maxwell_dma: Match official doc and support pitch->voxel copies
| * | video_core/textures: Add and use SwizzleSliceToVoxel, and minor style changesReinUsesLisp2020-07-105-84/+125
| | | | | | | | | | | | | | | | | | | | | Change GOB sizes from free-functions to constexpr constants. Add SwizzleSliceToVoxel, a function that swizzles a 2D array of pixels into a 3D texture and use it for 3D copies.
| * | maxwell_dma: Rename registers to match official docs and reorderReinUsesLisp2020-07-082-287/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename registers in the MaxwellDMA class to match Nvidia's official documentation. This one can be found here: https://github.com/NVIDIA/open-gpu-doc/blob/master/classes/dma-copy/clb0b5.h While we are at it, reorganize the code in MaxwellDMA to be separated in different functions.
* | | vk_rasterizer: Pass <pSizes> to CmdBindVertexBuffers2EXTReinUsesLisp2020-07-101-6/+6
| | | | | | | | | | | | | | | This has been fixed in Nvidia's public beta driver 451.74. The previous beta driver will be broken, people using these will have to update.
* | | Merge pull request #4283 from lat9nq/fix-linux-nvidia-vulkanRodrigo Locatti2020-07-101-1/+1
|\ \ \ | | | | | | | | vk_stream_buffer: Prevent Vulkan crash in Linux on recent NVIDIA driver
| * | | vk_stream_buffer: set allocable_size to 9 MiBlat9nq2020-07-101-1/+1
| |/ / | | | | | | | | | This solves the crash on Linux systems running the current Linux Long Lived branch nVidia driver.
* / / configuration: implement per-game configurations (#4098)lat9nq2020-07-1011-21/+23
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Switch game settings to use a pointer In order to add full per-game settings, we need to be able to tell yuzu to switch to using either the global or game configuration. Using a pointer makes it easier to switch. * configuration: add new UI without changing existing funcitonality The new UI also adds General, System, Graphics, Advanced Graphics, and Audio tabs, but as yet they do nothing. This commit keeps yuzu to the same functionality as originally branched. * configuration: Rename files These weren't included in the last commit. Now they are. * configuration: setup global configuration checkbox Global config checkbox now enables/disables the appropriate tabs in the game properties dialog. The use global configuration setting is now saved to the config, defaulting to true. This also addresses some changes requested in the PR. * configuration: swap to per-game config memory for properties dialog Does not set memory going in-game. Swaps to game values when opening the properties dialog, then swaps back when closing it. Uses a `memcpy` to swap. Also implements saving config files, limited to certain groups of configurations so as to not risk setting unsafe configurations. * configuration: change config interfaces to use config-specific pointers When a game is booted, we need to be able to open the configuration dialogs without changing the settings pointer in the game's emualtion. A new pointer specific to just the configuration dialogs can be used to separate changes to just those config dialogs without affecting the emulation. * configuration: boot a game using per-game settings Swaps values where needed to boot a game. * configuration: user correct config during emulation Creates a new pointer specifically for modifying the configuration while emulation is in progress. Both the regular configuration dialog and the game properties dialog now use the pointer Settings::config_values to focus edits to the correct struct. * settings: split Settings::values into two different structs By splitting the settings into two mutually exclusive structs, it becomes easier, as a developer, to determine how to use the Settings structs after per-game configurations is merged. Other benefits include only duplicating the required settings in memory. * settings: move use_docked_mode to Controls group `use_docked_mode` is set in the input settings and cannot be accessed from the system settings. Grouping it with system settings causes it to be saved with per-game settings, which may make transferring configs more difficult later on, especially since docked mode cannot be set from within the game properties dialog. * configuration: Fix the other yuzu executables and a regression In main.cpp, we have to get the title ID before the ROM is loaded, else the renderer will reflect only the global settings and now the user's game specific settings. * settings: use a template to duplicate memory for each setting Replaces the type of each variable in the Settings::Values struct with a new class that allows basic data reading and writing. The new struct Settings::Setting duplicates the data in memory and can manage global overrides per each setting. * configuration: correct add-ons config and swap settings when apropriate Any add-ons interaction happens directly through the global values struct. Swapping bewteen structs now also includes copying the necessary global configs that cannot be changed nor saved in per-game settings. General and System config menus now update based on whether it is viewing the global or per-game settings. * settings: restore old values struct No longer needed with the Settings::Setting class template. * configuration: implement hierarchical game properties dialog This sets the apropriate global or local data in each setting. * clang format * clang format take 2 can the docker container save this? * address comments and style issues * config: read and write settings with global awareness Adds new functions to read and write settings while keeping the global state in focus. Files now generated per-game are much smaller since often they only need address the global state. * settings: restore global state when necessary Upon closing a game or the game properties dialog, we need to restore all global settings to the original global state so that we can properly open the configuration dialog or boot a different game. * configuration: guard setting values incorrectly This disables setting values while a game is running if the setting is overwritten by a per game setting. * config: don't write local settings in the global config Simple guards to prevent writing the wrong settings in the wrong files. * configuration: add comments, assume less, and clang format No longer assumes that a disabled UI element means the global state is turned off, instead opting to directly answer that question. Still however assumes a game is running if it is in that state. * configuration: fix a logic error Should not be negated * restore settings' global state regardless of accept/cancel Fixes loading a properties dialog and causing the global config dialog to show local settings. * fix more logic errors Fixed the frame limit would set the global setting from the game properties dialog. Also strengthened the Settings::Setting member variables and simplified the logic in config reading (ReadSettingGlobal). * fix another logic error In my efforts to guard RestoreGlobalState, I accidentally negated the IsPowered condition. * configure_audio: set toggle_stretched_audio to tristate * fixed custom rtc and rng seed overwriting the global value * clang format * rebased * clang format take 4 * address my own review Basically revert unintended changes * settings: literal instead of casting "No need to cast, use 1U instead" Thanks, Morph! Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> * Revert "settings: literal instead of casting " This reverts commit 95e992a87c898f3e882ffdb415bb0ef9f80f613f. * main: fix status buttons reporting wrong settings after stop emulation * settings: Log UseDockedMode in the Controls group This should have happened when use_docked_mode was moved over to the controls group internally. This just reflects this in the log. * main: load settings if the file has a title id In other words, don't exit if the loader has trouble getting a title id. * use a zero * settings: initalize resolution factor with constructor instead of casting * Revert "settings: initalize resolution factor with constructor instead of casting" This reverts commit 54c35ecb46a29953842614620f9b7de1aa9d5dc8. * configure_graphics: guard device selector when Vulkan is global Prevents the user from editing the device selector if Vulkan is the global renderer backend. Also resets the vulkan_device variable when the users switches back-and-forth between global and Vulkan. * address reviewer concerns Changes function variables to const wherever they don't need to be changed. Sets Settings::Setting to final as it should not be inherited from. Sets ConfigurationShared::use_global_text to static. Co-Authored-By: VolcaEM <volcaem@users.noreply.github.com> * main: load per-game settings after LoadROM This prevents `Restart Emulation` from restoring the global settings *after* the per-game settings were applied. Thanks to BSoDGamingYT for finding this bug. * Revert "main: load per-game settings after LoadROM" This reverts commit 9d0d48c52d2dcf3bfb1806cc8fa7d5a271a8a804. * main: only restore global settings when necessary Loading the per-game settings cannot happen after the ROM is loaded, so we have to specify when to restore the global state. Again thanks to BSoD for finding the bug. * configuration_shared: address reviewer concerns except operator overrides Dropping operator override usage in next commit. Co-Authored-By: LC <lioncash@users.noreply.github.com> * settings: Drop operator overrides from Setting template Requires using GetValue and SetValue explicitly. Also reverts a change that broke title ID formatting in the game properties dialog. * complete rebase * configuration_shared: translate "Use global configuration" Uses ConfigurePerGame to do so, since its usage, at least as of now, corresponds with ConfigurationShared. * configure_per_game: address reviewer concern As far as I understand, it prevents the program from unnecessarily copying strings. Co-Authored-By: LC <lioncash@users.noreply.github.com> Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> Co-authored-by: VolcaEM <volcaem@users.noreply.github.com> Co-authored-by: LC <lioncash@users.noreply.github.com>
* | Merge pull request #4150 from ReinUsesLisp/dynamic-state-implbunnei2020-07-0713-275/+660
|\ \ | | | | | | vulkan: Use VK_EXT_extended_dynamic_state when available
| * | vk_rasterizer: Use nullptr for <pSizes> in CmdBindVertexBuffers2EXTReinUsesLisp2020-06-271-6/+6
| | | | | | | | | | | | Disable this temporarily.
| * | vk_pipeline_cache: Avoid hashing and comparing dynamic state when possibleReinUsesLisp2020-06-276-23/+51
| | | | | | | | | | | | | | | | | | With extended dynamic states, some bytes don't have to be collected from the pipeline key, hence we can avoid hashing and comparing them on lookups.
| * | vulkan/fixed_pipeline_state: Move state out of individual structuresReinUsesLisp2020-06-274-121/+84
| | |
| * | vk_rasterizer: Use VK_EXT_extended_dynamic_stateReinUsesLisp2020-06-275-46/+356
| | |
| * | renderer_vulkan/wrapper: Add VK_EXT_extended_dynamic_state functionsReinUsesLisp2020-06-272-0/+64
| | |
| * | fixed_pipeline_state: Add requirements for VK_EXT_extended_dynamic_stateReinUsesLisp2020-06-277-155/+143
| | | | | | | | | | | | | | | | | | | | | This moves dynamic state present in VK_EXT_extended_dynamic_state to a separate structure in FixedPipelineState. This is structure is at the bottom allowing us to hash and memcmp only when the extension is not supported.
| * | vk_device: Enable VK_EXT_extended_dynamic_state when availableReinUsesLisp2020-06-272-0/+32
| | |
* | | Merge pull request #4194 from ReinUsesLisp/fix-shader-cacheFernando Sahmkow2020-07-051-29/+41
|\ \ \ | | | | | | | | shader_cache: Fix use-after-free and orphan invalidation cache entries
| * | | shader_cache: Fix use-after-free and orphan invalidation cache entriesReinUsesLisp2020-07-011-29/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes some cases where entries could have been removed multiple times reading freed memory. To address this issue this commit removes duplicates from entries marked for removal and sorts out the removal process to fix another use-after-free situation. Another issue fixed in this commit is orphan invalidation cache entries. Previously only the entries that were invalidated in the current operations had its entries removed. This led to more use-after-free situations when these entries were actually invalidated but referenced an object that didn't exist.
* | | | Merge pull request #4175 from ReinUsesLisp/read-bufferbunnei2020-07-035-18/+24
|\ \ \ \ | | | | | | | | | | gl_buffer_cache: Copy to buffers created as STREAM_READ before downloading
| * | | | gl_buffer_cache: Copy to buffers created as STREAM_READ before downloadingReinUsesLisp2020-06-265-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After marking buffers as resident, Nvidia's driver seems to take a slow path. To workaround this issue, copy to a STREAM_READ buffer and then call GetNamedBufferSubData on it. This is a temporary solution until we have asynchronous flushing.
* | | | | Merge pull request #4082 from Morph1984/mirror-once-clampRodrigo Locatti2020-07-021-0/+6
|\ \ \ \ \ | |_|/ / / |/| | | | maxwell_to_gl: Implement MirrorOnceClampOGL wrap mode using GL_MIRROR_CLAMP_EXT
| * | | | maxwell_to_gl: Implement MirrorOnceClampOGL using GL_MIRROR_CLAMP_EXTMorph2020-06-301-0/+6
| | | | | | | | | | | | | | | | | | | | Like MirrorOnceBorder, this requires the GL_EXT_texture_mirror_clamp extension. This extension is unfortunately not available on Intel's drivers (both Windows proprietary and Linux Mesa). Use GL_MIRROR_CLAMP_TO_EDGE as a fallback if the extension is unavailable.
* | | | | Merge pull request #4176 from ReinUsesLisp/compatible-formatsFernando Sahmkow2020-06-304-5/+216
|\ \ \ \ \ | | | | | | | | | | | | texture_cache: Check format compatibility before copying
| * | | | | texture_cache: Test format compatibility before copyingReinUsesLisp2020-06-272-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid illegal copies. This intercepts the last step of a copy to avoid generating validation errors or corrupting the driver on some instances. We can create views and emit copies accordingly in future commits and remove this last-step validation.
| * | | | | video_core/compatible_formats: Table to test if two formats are legal to view or copyReinUsesLisp2020-06-273-0/+196
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a flat table to test if it's legal to create a texture view between two formats or copy betweem them. This table is based on ARB_copy_image and ARB_texture_view. Copies are more permissive than views.
* | | | | Merge pull request #4157 from ReinUsesLisp/unified-turingFernando Sahmkow2020-06-301-19/+1
|\ \ \ \ \ | |_|/ / / |/| | | | gl_device: Enable NV_vertex_buffer_unified_memory on Turing devices
| * | | | gl_device: Enable NV_vertex_buffer_unified_memory on Turing devicesReinUsesLisp2020-06-251-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once we make sure not to corrupt Nvidia's driver, we can safely use resident buffers on Turing devices. See GitHub pull request #4156
* | | | | Merge pull request #4191 from Morph1984/vertex-formatsRodrigo Locatti2020-06-303-109/+78
|\ \ \ \ \ | | | | | | | | | | | | maxwell_to_gl/vk: Reorder vertex formats
| * | | | | maxwell_to_gl: Rename VertexType() to VertexFormat()Morph2020-06-292-4/+5
| | | | | |
| * | | | | maxwell_to_vk: Reorder vertex formats and add A2B10G10R10 for all types except floatMorph2020-06-281-75/+69
| | | | | |
| * | | | | maxwell_to_gl: Add 32 bit component sizes to (un)signed scaled formatsMorph2020-06-281-30/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add 32 bit component sizes to (un)signed scaled formats and group (un)signed normalized, scaled, and integer formats together.
* | | | | | macro: Add support for "middle methods" on the code cache (#4112)David2020-06-301-8/+27
| | | | | | | | | | | | | | | | | | Macro code is just uploaded sequentially from a starting address, however that does not mean the entry point for the macro is at that address. This PR adds preliminary support for executing macros in the middle of our cached code.
* | | | | | Merge pull request #4140 from ReinUsesLisp/validation-layersRodrigo Locatti2020-06-293-5/+43
|\ \ \ \ \ \ | | | | | | | | | | | | | | renderer_vulkan: Update validation layer name and test before enabling
| * | | | | | renderer_vulkan: Update validation layer name and test before enablingReinUsesLisp2020-06-223-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update validation layer string to VK_LAYER_KHRONOS_validation. While we are at it, properly check for available validation layers before enabling them.
* | | | | | | General: Tune the priority of main emulation threads so they have higher priority than less important helper threads.Fernando Sahmkow2020-06-272-0/+3
| | | | | | |
* | | | | | | General: Correct rebase, sync gpu and context management.Fernando Sahmkow2020-06-275-2/+25
| | | | | | |
* | | | | | | General: Setup yuzu threads' microprofile, naming and registry.Fernando Sahmkow2020-06-271-1/+5
| | | | | | |
* | | | | | | General: Recover Prometheus project from harddrive failure Fernando Sahmkow2020-06-271-2/+3
| |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host Timing, Reworks the Kernel's Scheduler, Introduce Idle State and Suspended State, Recreates the bootmanager, Initializes Multicore system.
* | | | | | Merge pull request #4147 from ReinUsesLisp/hset2-immbunnei2020-06-272-21/+75
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | shader/half_set: Implement HSET2_IMM
| * | | | | shader/half_set: Implement HSET2_IMMReinUsesLisp2020-06-232-21/+75
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Add HSET2_IMM. Due to the complexity of the encoding avoid using BitField unions and read the relevant bits from the code itself. This is less error prone.
* | | | | Merge pull request #4144 from FernandoS27/tt-fixbunnei2020-06-271-0/+3
|\ \ \ \ \ | | | | | | | | | | | | TextureCache: Fix case where layer goes off bound.
| * | | | | TextureCache: Fix case where layer goes off bound.Fernando Sahmkow2020-06-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The returned layer is expected to be between 0 and the depth of the surface, anything larger is off bounds.
* | | | | | Merge pull request #4111 from ReinUsesLisp/preserve-contents-vkbunnei2020-06-272-7/+58
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | vk_rasterizer: Don't preserve contents on full screen clears
| * | | | | vk_rasterizer: Don't preserve contents on full screen clearsReinUsesLisp2020-06-182-7/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to load contents from the CPU when a clear resets all the contents of the underlying memory. This is already implemented on OpenGL and the texture cache.
* | | | | | Merge pull request #4151 from ReinUsesLisp/gl-invalidationsRodrigo Locatti2020-06-262-6/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_shader_cache: Avoid use after move for program size
| * | | | | | gl_shader_cache: Avoid use after move for program sizeReinUsesLisp2020-06-242-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All programs had a size of zero due to this bug, skipping invalidations. While we are at it, remove some unused forward declarations.
* | | | | | | gl_device: Fix IsASTCSupportedDavid Marcec2020-06-251-1/+1
| |_|_|_|/ / |/| | | | | | | | | | | | | | | | | Other targets were never actually checked
* | | | | | Merge pull request #4105 from ReinUsesLisp/resident-buffersbunnei2020-06-2414-213/+277
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustness
| * | | | | | buffer_cache: Use buffer methods instead of cache virtual methodsReinUsesLisp2020-06-245-99/+90
| | | | | | |
| * | | | | | gl_stream_buffer: Use InvalidateBufferData instead unmap and mapReinUsesLisp2020-06-242-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making the stream buffer resident increases GPU usage significantly on some games. This seems to be addressed invalidating the stream buffer with InvalidateBufferData instead of using a Unmap + Map (with invalidation flags).
| * | | | | | gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustnessReinUsesLisp2020-06-243-9/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch games are allowed to bind less data than what they use in a vertex buffer, the expected behavior here is that these values are read as zero. At the moment of writing this only D3D12, OpenGL and NVN through NV_vertex_buffer_unified_memory support vertex buffer with a size limit. In theory this could be emulated on Vulkan creating a new VkBuffer for each (handle, offset, length) tuple and binding the expected data to it. This is likely going to be slow and memory expensive when used on the vertex buffer and we have to do it on all draws because we can't know without analyzing indices when a game is going to read vertex data out of bounds. This is not a problem on OpenGL's BufferAddressRangeNV because it takes a length parameter, unlike Vulkan's CmdBindVertexBuffers that only takes buffers and offsets (the length is implicit in VkBuffer). It isn't a problem on D3D12 either, because D3D12_VERTEX_BUFFER_VIEW on IASetVertexBuffers takes SizeInBytes as a parameter (although I am not familiar with robustness on D3D12). Currently this only implements buffer ranges for vertex buffers, although indices can also be affected. A KHR_robustness profile is not created, but Nvidia's driver reads out of bound vertex data as zero anyway, this might have to be changed in the future. - Fixes SMO random triangles when capturing an enemy, getting hit, or looking at the environment on certain maps.
| * | | | | | gl_buffer_cache: Mark buffers as residentReinUsesLisp2020-06-2410-67/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make stream buffer and cached buffers as resident and query their address. This allows us to use GPU addresses for several proprietary Nvidia extensions.
| * | | | | | gl_device: Expose NV_vertex_buffer_unified_memory except on TuringReinUsesLisp2020-06-242-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose NV_vertex_buffer_unified_memory when the driver supports it. This commit adds a function the determine if a GL_RENDERER is a Turing GPU. This is required because on Turing GPUs Nvidia's driver crashes when the buffer is marked as resident or on DeleteBuffers. Without a synchronous debug output (single threaded driver), it's likely that the driver will crash in the first blocking call.
| * | | | | | gl_stream_buffer: Always use a non-coherent bufferReinUsesLisp2020-06-242-14/+10
| | | | | | |
| * | | | | | gl_stream_buffer: Always use persistent memory mapsReinUsesLisp2020-06-242-30/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | yuzu no longer supports platforms without persistent maps.
* | | | | | | Merge pull request #4083 from Morph1984/B10G11R11Fbunnei2020-06-241-9/+17
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | decode/image: Implement B10G11R11F
| * | | | | | | decode/image: Implement B10G11R11FMorph2020-06-201-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Used by Kirby Star Allies
* | | | | | | | Merge pull request #4046 from ogniK5377/macro-hle-prodFernando Sahmkow2020-06-249-10/+219
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Add support for HLEing Macros
| * | | | | | | addressed issuesDavid Marcec2020-06-242-4/+7
| | | | | | | |
| * | | | | | | clear mme draw modeDavid Marcec2020-06-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already draw, so we can clear it
| * | | | | | | Addressed issuesDavid Marcec2020-06-245-13/+17
| | | | | | | |
| * | | | | | | Fix constbuffer for 0217920100488FF7David Marcec2020-06-241-6/+6
| | | | | | | |
| * | | | | | | Macro HLE supportDavid Marcec2020-06-249-10/+209
| | |/ / / / / | |/| | | | |
* | | | | | | Merge pull request #4129 from Morph1984/texture-shadow-lod-workaroundRodrigo Locatti2020-06-243-7/+50
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | gl_shader_decompiler: Workaround textureLod when GL_EXT_texture_shadow_lod is not available
| * | | | | | gl_shader_decompiler: Enable GL_EXT_texture_shadow_lod if availableMorph2020-06-211-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable GL_EXT_texture_shadow_lod if available. If this extension is not available, such as on Intel/AMD proprietary drivers, use textureGrad as a workaround.
| * | | | | | gl_device: Check for GL_EXT_texture_shadow_lodMorph2020-06-212-0/+7
| | | | | | |
* | | | | | | Merge pull request #4127 from lioncash/dst-typobunnei2020-06-231-1/+1
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | texture_cache: Fix incorrect address used in a DeduceSurface() call
| * | | | | | texture_cache: Fix incorrect address used in a DeduceSurface() callLioncash2020-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the source was being deduced twice in a row.
* | | | | | | Merge pull request #4110 from ReinUsesLisp/direct-upload-setsRodrigo Locatti2020-06-223-42/+30
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | vk_update_descriptor: Upload descriptor sets data directly
| * | | | | | vk_update_descriptor: Upload descriptor sets data directlyReinUsesLisp2020-06-183-42/+30
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | Instead of copying to a temporary payload before sending the update task to the worker thread, insert elements to the payload directly.
* | | | | | Merge pull request #4122 from lioncash/hidebunnei2020-06-224-28/+31
|\ \ \ \ \ \ | | | | | | | | | | | | | | video_core: Eliminate some variable shadowing
| * | | | | | memory_manager: Eliminate variable shadowingLioncash2020-06-202-24/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renames some variables to prevent ones in inner scopes from shadowing outer-scoped variables. The Copy* functions have no shadowing, but we rename them anyways to remain consistent with the other functions.
| * | | | | | macro_jit_x64: Eliminate variable shadowing in Compile_ProcessResult()Lioncash2020-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can reduce the capture scope so that it's not possible for both "reg" variables to clash with one another. While we're at it, we can prevent unnecessary copies while we're at it.
| * | | | | | buffer_cache: Eliminate local variable shadowingLioncash2020-06-201-2/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | We can just make use of the instance in the scope above this one.
* | | | | | Merge pull request #4126 from lioncash/noexceptbunnei2020-06-222-3/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()
| * | | | | | vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()Lioncash2020-06-202-3/+2
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check() can throw an exception if the Vulkan result isn't successful. We remove the check so that std::terminate isn't outright called and allows for better debugging (should it ever actually fail).
* | | | | | Merge pull request #4120 from lioncash/arbbunnei2020-06-211-32/+31
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_arb_decompiler: Avoid several string copies
| * | | | | | gl_arb_decompiler: Avoid several string copiesLioncash2020-06-201-32/+31
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variables that are marked as const cannot have the move constructor invoked when returning from a function (the move constructor requires a non-const variable so it can "steal" the resources from it.
* | | | | | macro_jit_x64: Use ecx for shift registerMerryMage2020-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | shl/shr only accept cl as their second argument
* | | | | | Merge pull request #4125 from lioncash/macro-shiftmerry2020-06-201-6/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | macro_jit_x64: Amend readability of Compile_ExtractShiftLeftRegister()
| * | | | | | macro_jit_x64: Correct readability of Compile_ExtractShiftLeftImmediate()Lioncash2020-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously dst wasn't being used.
| * | | | | | macro_jit_x64: Correct readability of Compile_ExtractShiftLeftRegister()Lioncash2020-06-201-3/+4
| |/ / / / / | | | | | | | | | | | | | | | | | | Previously dst wasn't being used.
* | | | | | Merge pull request #4123 from lioncash/unused-varmerry2020-06-201-2/+1
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | macro_jit_x64: Remove unused variable
| * | | | | macro_jit_x64: Remove unused variableLioncash2020-06-201-2/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | Removes a completely unused label and marks another variable as unused, given it seems like it has potential uses in the future.
* | | | | Merge pull request #4099 from MerryMage/macOS-buildbunnei2020-06-205-14/+16
|\ \ \ \ \ | | | | | | | | | | | | Fix compilation on macOS
| * | | | | vk_rasterizer: BindTransformFeedbackBuffersEXT accepts a size of type VkDeviceSizeMerryMage2020-06-181-1/+1
| | | | | |
| * | | | | renderer_vulkan: Fix macOS GetBundleDirectory referenceMerryMage2020-06-181-1/+3
| | | | | |
| * | | | | memory_util: boost hashes are size_tMerryMage2020-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * boost::hash_value returns a size_t * boost::hash_combine takes a size_t& argument
| * | | | | Rename PAGE_SHIFT to PAGE_BITSMerryMage2020-06-182-10/+10
| | |/ / / | |/| | | | | | | | | | | | | macOS header files #define PAGE_SHIFT
* | | | | Merge pull request #4087 from MerryMage/macrojit-inline-Readbunnei2020-06-202-14/+22
|\ \ \ \ \ | |_|/ / / |/| | | | macro_jit_x64: Inline Engines::Maxwell3D::GetRegisterValue
| * | | | macro_jit_x64: Remove unused function ReadMerryMage2020-06-191-8/+4
| | | | |
| * | | | macro_jit_x64: Inline Engines::Maxwell3D::GetRegisterValueMerryMage2020-06-172-6/+18
| | | | |
* | | | | Merge pull request #4090 from MerryMage/macrojit-bugsbunnei2020-06-191-2/+5
|\ \ \ \ \ | |_|_|/ / |/| | | | macro_jit_x64: Optimization correctness
| * | | | macro_jit_x64: Optimization implicitly assumes same destinationMerryMage2020-06-171-1/+2
| | | | |
| * | | | macro_jit_x64: Should not skip zero registers for certain ALU opsMerryMage2020-06-171-1/+3
| | | | | | | | | | | | | | | | | | | | The code generated for these ALU ops assume src_a and src_b are always valid.
* | | | | vk_sampler_cache: Emulate GL_LINEAR/NEAREST minification filtersMorph2020-06-181-2/+4
| | | | | | | | | | | | | | | | | | | | Emulate GL_LINEAR/NEAREST minification filters using minLod = 0 and maxLod = 0.25 during sampler creation
* | | | | maxwell_to_vk: Reorder filter cases and correct mipmap_filter=NoneMorph2020-06-181-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | maxwell_to_vk: Reorder filtering modes to start with None, then Nearest, then Linear. maxwell_to_vk: Logs filter modes under UNREACHABLE_MSG instead of UNIMPLEMENTED_MSG, since any unknown filter modes are invalid and not unimplemented. maxwell_to_vk: Return VK_SAMPLER_MIPMAP_MODE_NEAREST instead of VK_SAMPLER_MIPMAP_MODE_LINEAR when mipmap_filter is None with the description from the VkSamplerCreateInfo(3) man page.
* | | | | maxwell_to_gl: Miscellaneous changesMorph2020-06-181-48/+34
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | maxwell_to_gl: Log unimplemented features under UNIMPLEMENTED_MSG instead of LOG_ERROR to bring into parity with maxwell_to_vk maxwell_to_gl: Deduplicate logging in VertexType(), merging them into one. maxwell_to_gl: Return GL_NEAREST instead of GL_LINEAR if an unknown texture filter mode is encountered. maxwell_to_gl: Log the mipmap filter mode if an unknown value is passed in. maxwell_to_gl: Reorder filtering modes to start with None, then Nearest, then Linear.
* | | | Merge pull request #4092 from Morph1984/image-bindingsRodrigo Locatti2020-06-181-6/+14
|\ \ \ \ | |_|/ / |/| | | gl_device: Reserve 4 image bindings for fragment stage
| * | | gl_device: Reserve at least 4 image bindings for fragment stageMorph2020-06-161-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | Due to the limitation of GL_MAX_IMAGE_UNITS being low (8) on Intel's and Nvidia's proprietary drivers, we have to reserve an appropriate amount of image bindings for each of the stages. So far games have been observed to use 4 image bindings on the fragment stage (Kirby Star Allies) and 1 on the vertex stage (TWD series). No games thus far in my limited testing used more than 4 images concurrently and across all currently active programs. This fixes shader compilation errors on Kirby Star Allies on OpenGL (GLSL/GLASM)
* | | | Merge pull request #4086 from MerryMage/abibunnei2020-06-171-6/+6
|\ \ \ \ | |_|/ / |/| | | xbyak_abi: Cleanup
| * | | xbyak_abi: Remove *GPS variants of stack manipulation functionsMerryMage2020-06-151-6/+6
| | | |
* | | | Merge pull request #4089 from MerryMage/macrojit-cleanup-1bunnei2020-06-172-51/+18
|\ \ \ \ | | | | | | | | | | macro_jit_x64: Cleanup
| * | | | macro_jit_x64: Remove NEXT_PARAMETERMerryMage2020-06-151-5/+2
| | | | | | | | | | | | | | | | | | | | Not required, as PARAMETERS can just be incremented directly.
| * | | | macro_jit_x64: Remove unused function Compile_WriteCarryMerryMage2020-06-152-9/+0
| | | | |
| * | | | macro_jit_x64: Select better registersMerryMage2020-06-151-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All registers are now callee-save registers. RBX and RBP selected for STATE and RESULT because these are most commonly accessed; this is to avoid the REX prefix. RBP not used for STATE because there are some SIB restrictions, RBX emits smaller code.
| * | | | macro_jit_x64: Remove REGISTERSMerryMage2020-06-151-7/+3
| | | | | | | | | | | | | | | | | | | | Unnecessary since this is just an offset from STATE.
| * | | | macro_jit_x64: Remove JITState::parametersMerryMage2020-06-152-6/+3
| | | | | | | | | | | | | | | | | | | | This can be passed in as an argument instead.
| * | | | macro_jit_x64: Remove METHOD_ADDRESS_64MerryMage2020-06-151-2/+1
| | | | | | | | | | | | | | | | | | | | Unnecessary variable.
| * | | | macro_jit_x64: Remove RESULT_64MerryMage2020-06-152-16/+3
| |/ / / | | | | | | | | | | | | This Reg64 codepath has the exact same behaviour as the Reg32 one.
* | | | Merge pull request #4041 from ReinUsesLisp/arb-decompbunnei2020-06-166-1/+2114
|\ \ \ \ | |_|/ / |/| | | gl_arb_decompiler: Implement an assembly shader decompiler
| * | | gl_arb_decompiler: Implement FSwizzleAddReinUsesLisp2020-06-121-4/+27
| | | |
| * | | gl_arb_decompiler: Implement an assembly shader decompilerReinUsesLisp2020-06-126-1/+2091
| | | | | | | | | | | | | | | | | | | | | | | | Emit code compatible with NV_gpu_program5. This should emit code compatible with Fermi, but it wasn't tested on that architecture. Pascal has some issues not present on Turing GPUs.
* | | | Merge pull request #4066 from ReinUsesLisp/shared-ptr-bufRodrigo Locatti2020-06-169-174/+150
|\ \ \ \ | | | | | | | | | | buffer_cache: Avoid passing references of shared pointers and misc style changes
| * | | | buffer_cache: Avoid passing references of shared pointers and misc style changesReinUsesLisp2020-06-099-174/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using as template argument a shared pointer, use the underlying type and manage shared pointers explicitly. This can make removing shared pointers from the cache more easy. While we are at it, make some misc style changes and general improvements (like insert_or_assign instead of operator[] + operator=).
* | | | | video_core/macro_jit_x64: Remove initializer in member variableReinUsesLisp2020-06-151-2/+2
| |_|/ / |/| | | | | | | | | | | | | | | Fix build time issues on gcc. Confirmed through asan that avoiding this initialization is safe.
* | | | Merge pull request #4064 from ReinUsesLisp/invalidate-buffersbunnei2020-06-142-8/+19
|\ \ \ \ | | | | | | | | | | gl_rasterizer: Mark vertex buffers as dirty after buffer cache invalidation
| * | | | gl_rasterizer: Mark vertex buffers as dirty after buffer cache invalidationReinUsesLisp2020-06-091-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vertex buffers bindings become invalid after the stream buffer is invalidated. We were originally doing this, but it got lost at some point. - Fixes Animal Crossing: New Horizons, but it affects everything.
| * | | | buffer_cache: Return stream buffer invalidation in Map instead of UnmapReinUsesLisp2020-06-091-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | We have to invalidate whatever cache is being used before uploading the data, hence it makes more sense to return this on Map instead of Unmap.
* | | | | Merge pull request #4049 from ReinUsesLisp/separate-samplersbunnei2020-06-1316-113/+273
|\ \ \ \ \ | | | | | | | | | | | | shader/texture: Join separate image and sampler pairs offline
| * | | | | shader/texture: Join separate image and sampler pairs offlineReinUsesLisp2020-06-0516-88/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Games using D3D idioms can join images and samplers when a shader executes, instead of baking them into a combined sampler image. This is also possible on Vulkan. One approach to this solution would be to use separate samplers on Vulkan and leave this unimplemented on OpenGL, but we can't do this because there's no consistent way of determining which constant buffer holds a sampler and which one an image. We could in theory find the first bit and if it's in the TIC area, it's an image; but this falls apart when an image or sampler handle use an index of zero. The used approach is to track for a LOP.OR operation (this is done at an IR level, not at an ISA level), track again the constant buffers used as source and store this pair. Then, outside of shader execution, join the sample and image pair with a bitwise or operation. This approach won't work on games that truly use separate samplers in a meaningful way. For example, pooling textures in a 2D array and determining at runtime what sampler to use. This invalidates OpenGL's disk shader cache :) - Used mostly by D3D ports to Switch
| * | | | | shader/track: Move bindless tracking to a separate functionReinUsesLisp2020-06-052-25/+39
| | | | | |
* | | | | | Merge pull request #3986 from ReinUsesLisp/shader-cachebunnei2020-06-1314-417/+364
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | shader_cache: Implement a generic runtime shader cache
| * | | | | rasterizer_cache: Remove files and includesReinUsesLisp2020-06-077-269/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rasterizer cache is no longer used. Each cache has its own generic implementation optimized for the cached data.
| * | | | | vk_pipeline_cache: Use generic shader cacheReinUsesLisp2020-06-075-58/+55
| | | | | | | | | | | | | | | | | | | | | | | | Trivial port the generic shader cache to Vulkan.
| * | | | | gl_shader_cache: Use generic shader cacheReinUsesLisp2020-06-074-93/+80
| | | | | | | | | | | | | | | | | | | | | | | | Trivially port the generic shader cache to OpenGL.
| * | | | | shader_cache: Implement a generic shader cacheReinUsesLisp2020-06-072-0/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a generic shader cache for fast lookups and invalidations. Invalidations are cheap but expensive when a shader is invalidated. Use two mutexes instead of one to avoid locking invalidations for lookups and vice versa. When a shader has to be removed, lookups are locked as expected.
* | | | | | Merge pull request #4027 from ReinUsesLisp/3d-slicesbunnei2020-06-1010-131/+205
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | texture_cache: Implement rendering to 3D textures
| * | | | | texture_cache: Port original code management for 2D vs 3D texturesReinUsesLisp2020-06-082-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle blits to images as 2D, even when they have block depth. - Fixes rendering issues on Luigi's Mansion 3
| * | | | | texture_cache: Simplify blit codeReinUsesLisp2020-06-081-9/+7
| | | | | |
| * | | | | texture_cache: Handle 3D texture blits with one layerReinUsesLisp2020-06-083-5/+10
| | | | | |
| * | | | | texture_cache: Implement rendering to 3D texturesReinUsesLisp2020-06-0810-139/+191
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows rendering to 3D textures with more than one slice. Applications are allowed to render to more than one slice of a texture using gl_Layer from a VTG shader. This also requires reworking how 3D texture collisions are handled, for now, this commit allows rendering to slices but not to miplevels. When a render target attempts to write to a mipmap, we fallback to the previous implementation (copying or flushing as needed). - Fixes color correction 3D textures on UE4 games (rainbow effects). - Allows Xenoblade games to render to 3D textures directly.
* | | | | Merge pull request #4040 from ReinUsesLisp/nv-transform-feedbackbunnei2020-06-083-1/+96
|\ \ \ \ \ | | | | | | | | | | | | gl_rasterizer: Use NV_transform_feedback for XFB on assembly shaders
| * | | | | gl_rasterizer: Use NV_transform_feedback for XFB on assembly shadersReinUsesLisp2020-06-043-1/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NV_transform_feedback, NV_transform_feedback2 and ARB_transform_feedback3 with NV_transform_feedback interactions allows implementing transform feedbacks as dynamic state. Maxwell implements transform feedbacks as dynamic state, so using these extensions with TransformFeedbackStreamAttribsNV allows us to properly emulate transform feedbacks without having to recompile shaders when the state changes.
* | | | | | Merge pull request #4052 from ReinUsesLisp/debug-outputbunnei2020-06-081-4/+2
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | renderer_opengl: Only enable DEBUG_OUTPUT when graphics debugging is enabled
| * | | | | renderer_opengl: Only enable DEBUG_OUTPUT when graphics debugging is enabledReinUsesLisp2020-06-061-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids logging when it's not relevant. This can potentially reduce driver's internal thread overhead.
* | | | | | Merge pull request #4034 from ReinUsesLisp/storage-texelsRodrigo Locatti2020-06-078-91/+143
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | vk_rasterizer: Implement storage texels and atomic image operations
| * | | | | vk_shader_decompiler: Implement atomic image operationsReinUsesLisp2020-06-021-40/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement atomic operations on images. On GLSL these are atomicImage* functions (e.g. atomicImageAdd).
| * | | | | vk_rasterizer: Implement storage texelsReinUsesLisp2020-06-028-52/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the equivalent of an image buffer on OpenGL. - Used by Octopath Traveler
* | | | | | gl_device: Black list NVIDIA 443.24 for fast buffer uploadsReinUsesLisp2020-06-061-2/+10
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skip fast buffer uploads on Nvidia 443.24 Vulkan beta driver on OpenGL. This driver throws the following error when calling BufferSubData or BufferData on buffers that are candidates for fast constant buffer uploads. This is the equivalens to push constants on Vulkan, except that they can access the full buffer. The error: Unknown internal debug message. The NVIDIA OpenGL driver has encountered an out of memory error. This application might behave inconsistently and fail. If this error persists on future drivers, we might have to look deeper into this issue. For now, we can black list it and log it as a temporary solution.
* | | | | Merge pull request #4013 from ReinUsesLisp/skip-no-xfbbunnei2020-06-051-0/+7
|\ \ \ \ \ | | | | | | | | | | | | vk_rasterizer: Skip transform feedbacks when extension is unavailable
| * | | | | vk_rasterizer: Skip transform feedbacks when extension is unavailableReinUsesLisp2020-05-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids calling transform feedback procedures when VK_EXT_transform_feedback is not available.
* | | | | | Merge pull request #4031 from Morph1984/fix-gs-outputsbunnei2020-06-041-1/+13
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_shader_decompiler: Fix geometry shader outputs on Intel drivers
| * | | | | | gl_shader_decompiler: Declare gl_Layer and gl_ViewportIndex within gl_PerVertex for vertex and tessellation shadersMorph2020-06-011-6/+16
| | | | | | |
| * | | | | | gl_shader_decompiler: Fix geometry shader outputs for Intel driversMorph2020-06-011-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On Intel's proprietary drivers, gl_Layer and gl_ViewportIndex are not allowed members of gl_PerVertex block, causing the shader to fail to compile. Fix this by declaring these variables outside of gl_PerVertex.
* | | | | | | Merge pull request #4009 from ogniK5377/macro-jit-prodbunnei2020-06-049-187/+1018
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | video_core: Implement Macro JIT
| * | | | | | | Default init labels and use initializer list for macro engineDavid Marcec2020-06-042-2/+2
| | | | | | | |
| * | | | | | | Mark parameters as constDavid Marcec2020-06-038-11/+11
| | | | | | | |
| * | | | | | | Pass by reference instead of copying parametersDavid Marcec2020-06-024-7/+9
| | | | | | | |
| * | | | | | | Favor switch case over jump tableDavid Marcec2020-05-302-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Easier to read and will emit a jump table automatically.
| * | | | | | | Implement macro JITDavid Marcec2020-05-309-189/+1010
| | | | | | | |
* | | | | | | | Merge pull request #4012 from ReinUsesLisp/mipmap-overlapsbunnei2020-06-031-28/+43
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | | texture_cache: Handle overlaps with multiple subresources
| * | | | | | | texture_cache: More relaxed reconstructionReinUsesLisp2020-05-301-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only reupload textures when they've not been modified from the GPU.
| * | | | | | | texture_cache: Only copy textures that were modified from hostReinUsesLisp2020-05-301-2/+6
| | | | | | | |
| * | | | | | | texture_cache: Reload textures when number of resources mismatchReinUsesLisp2020-05-301-0/+9
| | | | | | | |
| * | | | | | | texture_cache: Handle overlaps with multiple subresourcesReinUsesLisp2020-05-291-27/+33
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement more surface reconstruct cases. Allow overlaps with more than one layer and mipmap and copies all of them to the new texture. - Fixes textures moving around objects on Xenoblade games
* | | | | | | Merge pull request #4014 from ReinUsesLisp/astc-nvidiabunnei2020-06-022-8/+19
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | gl_device: Avoid devices with CAVEAT_SUPPORT on ASTC
| * | | | | | gl_device: Avoid devices with CAVEAT_SUPPORT on ASTCReinUsesLisp2020-06-012-8/+19
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids using Nvidia's ASTC decoder on OpenGL. The last time it was profiled, it was slower than yuzu's decoder. While we are at it, fix a bug in the texture cache when native ASTC is not supported.
* | | | | | Merge pull request #4006 from ReinUsesLisp/squash-ubosbunnei2020-06-027-79/+173
|\ \ \ \ \ \ | | | | | | | | | | | | | | glsl: Squash constant buffers into a single SSBO when we hit the limit
| * | | | | | glsl: Squash constant buffers into a single SSBO when we hit the limitReinUsesLisp2020-06-017-79/+173
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | Avoids compilation errors at the cost of shader build times and runtime performance when a game hits the limit of uniform buffers we can use.
* | | | | | Merge pull request #4016 from ReinUsesLisp/invocation-infoLC2020-06-021-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | shader/other: Fix hardcoded value in S2R INVOCATION_INFO
| * | | | | | shader/other: Fix hardcoded value in S2R INVOCATION_INFOReinUsesLisp2020-05-301-1/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Geometry shaders built from Nvidia's compiler check for bits[16:23] to be less than or equal to 0 with VSETP to default to a "safe" value of 0x8000'0000 (safe from hardware's perspective). To avoid hitting this path in the shader, return 0x00ff'0000 from S2R INVOCATION_INFO. This seems to be the maximum number of vertices a geometry shader can emit in a primitive.
* | | | | | Merge pull request #4033 from ReinUsesLisp/vk-r16uiLC2020-06-022-71/+74
|\ \ \ \ \ \ | | | | | | | | | | | | | | maxwell_to_vk: Add R16UI image format
| * | | | | | maxwell_to_vk: Add R16UI image formatReinUsesLisp2020-06-022-71/+74
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | - Used by Octopath Traveler
* | | | | | Merge pull request #4001 from ReinUsesLisp/avoid-copiesbunnei2020-06-011-17/+23
|\ \ \ \ \ \ | | | | | | | | | | | | | | buffer_cache: Avoid copying twice on certain cases
| * | | | | | buffer_cache: Avoid copying twice on certain casesReinUsesLisp2020-05-281-17/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid copying to a staging buffer on non-granular memory addresses. Add a callable argument to StreamBufferUpload to be able to copy to the staging buffer directly from ReadBlockUnsafe.
* | | | | | | Merge pull request #3998 from ReinUsesLisp/init-3dbunnei2020-06-011-0/+4
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | maxwell_3d: Initialize more registers to their expected value
| * | | | | | maxwell_3d: Initialize line widthsReinUsesLisp2020-05-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize line widths to avoid setting a line width of zero.
| * | | | | | maxwell_3d: Initialize polygon modesReinUsesLisp2020-05-271-0/+2
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | NVN expects this to be initialized as Fill, otherwise games that never bind a rasterizer state will log an invalid polygon mode.
* | | | | | Merge pull request #4005 from ReinUsesLisp/g24r8Rodrigo Locatti2020-06-011-1/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | format_lookup_table: Implement G24S8 format as S8Z24
| * | | | | | format_lookup_table: Implement G24S8 format as S8Z24ReinUsesLisp2020-05-281-1/+2
| | | | | | |
* | | | | | | Merge pull request #3996 from ReinUsesLisp/front-facesbunnei2020-06-012-7/+21
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | fixed_pipeline_state,gl_rasterizer: Swap negative viewport checks for front faces
| * | | | | | gl_rasterizer: Port front face flip check from VulkanReinUsesLisp2020-05-261-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While Vulkan was assuming we had no negative viewports, OpenGL code was assuming we had them. Port the old code from Vulkan to OpenGL, checking if the first viewport is negative before flipping faces. This is not a complete implementation since we only check for the first viewport to be negative. That said, unless a game is using Vulkan, OpenGL and NVN games should be fine here, and we can always compare with our Vulkan backend to see if there's a difference.
| * | | | | | fixed_pipeline_state: Remove unnecessary check for front faces flipReinUsesLisp2020-05-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The check to flip faces when viewports are negative were a left over from the old OpenGL code. This is not required on Vulkan where we have negative viewports.
* | | | | | | Merge pull request #3930 from ReinUsesLisp/animal-bordersbunnei2020-06-014-17/+26
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | vk_rasterizer: Implement constant attributes
| * | | | | | | vk_rasterizer: Implement constant attributesReinUsesLisp2020-05-134-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Constant attributes (in OpenGL known disabled attributes) are not supported on Vulkan, even with extensions. To emulate this behavior we return zero on reads from disabled vertex attributes in shader code. This has no caching cost because attribute formats are not dynamic state on Vulkan and we have to store it in the pipeline cache anyway. - Fixes Animal Crossing: New Horizons terrain borders
| * | | | | | | vk_rasterizer: Remove buffer check in attribute selectionReinUsesLisp2020-05-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a left over from OpenGL when disabled buffers where not properly emulated. We no longer have to assert this as it is checked in vertex buffer initialization.
* | | | | | | | Merge pull request #3958 from FernandoS27/gl-debugbunnei2020-05-311-0/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled
| * | | | | | | | OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled.Fernando Sahmkow2020-05-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit aims to help easing debugging of driver crashes without having to modify existing code.
* | | | | | | | | Merge pull request #3999 from ReinUsesLisp/opt-tex-cachebunnei2020-05-311-24/+29
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | texture_cache: Optimize GetSurfacesInRegion
| * | | | | | | | | texture_cache: Use unordered_map::find instead of operator[] on hot codeReinUsesLisp2020-05-271-15/+19
| | | | | | | | | |
| * | | | | | | | | texture_cache: Use small vector for surface vectorsReinUsesLisp2020-05-271-9/+10
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids most heap allocations when collecting surfaces into a vector.
* | | | | | | | | gl_device: Enable compute shaders for Intel proprietary driversMorph2020-05-313-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were disabling compute shaders on Intel's proprietary driver due to broken compute. This has been fixed in the latest Intel drivers. Re-enable compute for Intel proprietary drivers and remove the check for broken compute.
* | | | | | | | | Merge pull request #3982 from ReinUsesLisp/membar-ctsbunnei2020-05-304-9/+27
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / |/| | | | | | | | shader/other: Implement MEMBAR.CTS
| * | | | | | | | shader/other: Implement MEMBAR.CTSReinUsesLisp2020-05-274-9/+27
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This silences an assertion we were hitting and uses workgroup memory barriers when the game requests it.
* | | | | | | | Add xbyak externalDavid Marcec2020-05-301-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #4007 from ReinUsesLisp/reduce-logsbunnei2020-05-291-6/+7
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | maxwell_3d: Reduce severity of logs that can be spammed
| * | | | | | | maxwell_3d: Reduce severity of logs that can be spammedReinUsesLisp2020-05-281-6/+7
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | These logs were killing performance on some games when they were spammed. Reduce them to Debug severity.
* | | | | | | Merge pull request #3991 from ReinUsesLisp/depth-samplingbunnei2020-05-295-68/+83
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | texture_cache: Implement depth stencil texture swizzles
| * | | | | | texture_cache: Fix layered null surfacesReinUsesLisp2020-05-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Null texture cubes were not considered arrays, causing issues on Vulkan and OpenGL when creating views.
| * | | | | | gl_texture_cache: Implement small texture view cache for swizzlesReinUsesLisp2020-05-263-37/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes cases where the texture swizzle was applied twice on the same draw to a texture bound to two different slots.
| * | | | | | texture_cache: Implement depth stencil texture swizzlesReinUsesLisp2020-05-263-36/+42
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop ignoring image swizzles on depth and stencil images. This doesn't fix a known issue on Xenoblade Chronicles 2 where an OpenGL texture changes swizzles twice before being used. A proper fix would be having a small texture view cache for this like we do on Vulkan.
* | | | | | Merge pull request #3993 from ReinUsesLisp/fix-zlabunnei2020-05-281-0/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_shader_manager: Unbind GLSL program when binding a host pipeline
| * | | | | | gl_shader_manager: Unbind GLSL program when binding a host pipelineReinUsesLisp2020-05-261-0/+4
| |/ / / / / | | | | | | | | | | | | | | | | | | Fixes regression in Link's Awakening caused by 420cc13248350ef5c2d19e0b961cb4185cd16a8a
* | | | | | Merge pull request #3961 from Morph1984/bgra8_srgbbunnei2020-05-272-2/+3
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | maxwell_to_vk: Add format B8G8R8A8_SRGB and add Attachable capability for B8G8R8A8_UNORM
| * | | | | maxwell_to_vk: Add format B8G8R8A8_SRGBMorph2020-05-182-2/+3
| | |/ / / | |/| | | | | | | | | | | | | | | | | | Add format B8G8R8A8_SRGB and add Attachable capability for B8G8R8A8_UNORM Used by Bravely Default II
* | | | | Merge pull request #3981 from ReinUsesLisp/barbunnei2020-05-264-0/+33
|\ \ \ \ \ | | | | | | | | | | | | shader/other: Implement BAR.SYNC 0x0
| * | | | | shader/other: Implement BAR.SYNC 0x0ReinUsesLisp2020-05-224-0/+33
| |/ / / / | | | | | | | | | | | | | | | | | | | | Trivially implement this particular case of BAR. Unless games use OpenCL or CUDA barriers, we shouldn't hit any other case here.
* | | | | Merge pull request #3980 from ReinUsesLisp/red-opbunnei2020-05-261-2/+1
|\ \ \ \ \ | |_|/ / / |/| | | | shader/memory: Implement non-addition operations in RED
| * | | | shader/memory: Implement non-addition operations in REDReinUsesLisp2020-05-221-2/+1
| |/ / / | | | | | | | | | | | | Trivially implement these instructions. They are used in Astral Chain.
* | | | Merge pull request #3978 from ReinUsesLisp/write-rzbunnei2020-05-262-4/+7
|\ \ \ \ | | | | | | | | | | shader_decompiler: Visit source nodes even when they assign to RZ
| * | | | shader_decompiler: Visit source nodes even when they assign to RZReinUsesLisp2020-05-222-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some operations like atomicMin were ignored because they returned were being stored to RZ. This operations have a side effect and it was being ignored.
| * | | | vk_shader_decompiler: Don't assert for void returnsReinUsesLisp2020-05-221-2/+1
| |/ / / | | | | | | | | | | | | | | | | Atomic instructions can be used without returning anything and this is valid code. Remove the assert.
* | | | Merge pull request #3905 from FernandoS27/vulkan-fixbunnei2020-05-244-7/+62
|\ \ \ \ | | | | | | | | | | Correct a series of crashes and intructions on Async GPU and Vulkan Pipeline
| * | | | RasterizerCache: Correct documentation.Fernando Sahmkow2020-05-101-2/+2
| | | | |
| * | | | VkPipelineCache: Use a null shader on invalid address.Fernando Sahmkow2020-05-101-2/+1
| | | | |
| * | | | VideoCore: Use SyncGuestMemory mechanism for Shader/Pipeline Cache invalidation.Fernando Sahmkow2020-05-103-5/+61
| | | | |
* | | | | Merge pull request #3964 from ReinUsesLisp/arb-integrationbunnei2020-05-2412-109/+339
|\ \ \ \ \ | | | | | | | | | | | | renderer_opengl: Add assembly program code paths
| * | | | | renderer_opengl: Add assembly program code pathsReinUsesLisp2020-05-1912-109/+339
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add code required to use OpenGL assembly programs based on NV_gpu_program5. Decompilation for ARB programs is intended to be added in a follow up commit. This does **not** include ARB decompilation and it's not in an usable state. The intention behind assembly programs is to reduce shader stutter significantly on drivers supporting NV_gpu_program5 (and other required extensions). Currently only Nvidia's proprietary driver supports these extensions. Add a UI option hidden for now to avoid people enabling this option accidentally. This code path has some limitations that OpenGL compatibility doesn't have: - NV_shader_storage_buffer_object is limited to 16 entries for a single OpenGL context state (I don't know if this is an intended limitation, an specification issue or I am missing something). Currently causes issues on The Legend of Zelda: Link's Awakening. - NV_parameter_buffer_object can't bind buffers using an offset different to zero. The used workaround is to copy to a temporary buffer (this doesn't happen often so it's not an issue). On the other hand, it has the following advantages: - Shaders build a lot faster. - We have control over how floating point rounding is done over individual instructions (SPIR-V on Vulkan can't do this). - Operations on shared memory can be unsigned and signed. - Transform feedbacks are dynamic state (not yet implemented). - Parameter buffers (uniform buffers) are per stage, matching NVN and hardware's behavior. - The API to bind and create assembly programs makes sense, unlike ARB_separate_shader_objects.
* | | | | Merge pull request #3979 from ReinUsesLisp/thread-groupbunnei2020-05-244-0/+72
|\ \ \ \ \ | | | | | | | | | | | | shader/other: Implement thread comparisons (NV_shader_thread_group)
| * | | | | shader/other: Implement thread comparisons (NV_shader_thread_group)ReinUsesLisp2020-05-224-0/+72
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware S2R special registers match gl_Thread*MaskNV. We can trivially implement these using Nvidia's extension on OpenGL or naively stubbing them with the ARB instructions to match. This might cause issues if the host device warp size doesn't match Nvidia's. That said, this is unlikely on proper shaders. Refer to the attached url for more documentation about these flags. https://www.khronos.org/registry/OpenGL/extensions/NV/NV_shader_thread_group.txt
* | | | | buffer_cache: Remove unused boost headersReinUsesLisp2020-05-211-2/+0
| | | | |
* | | | | map_interval: Add interval allocator and drop hackReinUsesLisp2020-05-214-3/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the std::list hack to allocate memory indefinitely. Instead use a custom allocator that keeps references valid until destruction. This allocates fixed chunks of memory and puts pointers in a free list. When an allocation is no longer used put it back to the free list, this doesn't heap allocate because std::vector doesn't change the capacity. If the free list is empty, allocate a new chunk.
* | | | | buffer_cache: Use boost::container::small_vector for maps in rangeReinUsesLisp2020-05-211-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most overlaps in the buffer cache only contain one mapped address. We can avoid close to all heap allocations once the buffer cache is warmed up by using a small_vector with a stack size of one.
* | | | | buffer_cache: Use boost::intrusive::set for cachingReinUsesLisp2020-05-216-30/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using boost::icl::interval_map for caching, use boost::intrusive::set. interval_map is intended as a container where the keys can overlap with one another; we don't need this for caching buffers and a std::set-like data structure that allows us to search with lower_bound is enough.
* | | | | buffer_cache: Remove shared pointersReinUsesLisp2020-05-212-70/+72
| | | | | | | | | | | | | | | | | | | | | | | | | Removing shared pointers is a first step to be able to use intrusive objects and keep allocations close to one another in memory.
* | | | | buffer_cache: Minor style changesReinUsesLisp2020-05-212-129/+65
|/ / / / | | | | | | | | | | | | | | | | Minor style changes. Mostly done so I avoid editing it while doing other changes.
* | | | DmaPusher: Remove dead code in stepDavid Marcec2020-05-162-9/+1
| | | |
* | | | vk_rasterizer: Match OpenGL's FlushAndInvalidate behaviorReinUsesLisp2020-05-161-1/+3
| | | | | | | | | | | | | | | | | | | | Match OpenGL's behavior. This can fix or simplify bisecting issues on Vulkan.
* | | | Merge pull request #3899 from ReinUsesLisp/float-comparisonsbunnei2020-05-137-136/+173
|\ \ \ \ | |_|/ / |/| | | shader_ir: Add separate instructions for ordered and unordered comparisons and fix NE on GLSL
| * | | gl_shader_decompiler: Properly emulate NaN behaviour on NEReinUsesLisp2020-05-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | "Not equal" operators on GLSL seem to behave as unordered when we expect an ordered comparison. Manually emulate this checking for LGE values (numbers, not-NaNs).
| * | | shader_ir: Separate float-point comparisons in ordered and unorderedReinUsesLisp2020-05-097-135/+163
| | | | | | | | | | | | | | | | | | | | This allows us to use native SPIR-V instructions without having to manually check for NAN.
* | | | Merge pull request #3816 from ReinUsesLisp/vk-rasterizer-enablebunnei2020-05-123-1/+3
|\ \ \ \ | |_|/ / |/| | | vk_graphics_pipeline: Implement rasterizer_enable on Vulkan
| * | | vk_graphics_pipeline: Implement rasterizer_enable on VulkanReinUsesLisp2020-05-023-1/+3
| | | | | | | | | | | | | | | | | | | | We can simply enable rasterizer discard matching the current pipeline key.
* | | | Merge pull request #3839 from Morph1984/r8g8uiRodrigo Locatti2020-05-098-38/+52
|\ \ \ \ | | | | | | | | | | texture: Implement R8G8UI
| * | | | texture: Implement R8G8UIMorph2020-04-308-38/+52
| | | | | | | | | | | | | | | | | | | | - Used by The Walking Dead: The Final Season
* | | | | Merge pull request #3842 from makigumo/maxwell_to_vk_vertexattribute_signed_intbunnei2020-05-091-2/+14
|\ \ \ \ \ | | | | | | | | | | | | maxwell_to_vk: implement missing signed int formats
| * | | | | maxwell_to_vk: implement missing signed int formatsDan2020-04-301-2/+14
| | | | | |
* | | | | | Merge pull request #3885 from ReinUsesLisp/viewport-swizzlesbunnei2020-05-0811-1/+121
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | video_core: Implement viewport swizzles with NV_viewport_swizzle
| * | | | | vk_graphics_pipeline: Implement viewport swizzles with NV_viewport_swizzleReinUsesLisp2020-05-048-0/+84
| | | | | |
| * | | | | gl_rasterizer: Implement viewport swizzles with NV_viewport_swizzleReinUsesLisp2020-05-042-0/+13
| | | | | |
| * | | | | maxwell_3d: Add viewport swizzlesReinUsesLisp2020-05-042-1/+24
| | | | | |
* | | | | | Merge pull request #3884 from ReinUsesLisp/border-colorsbunnei2020-05-073-2/+44
|\ \ \ \ \ \ | | | | | | | | | | | | | | vk_sampler_cache: Use VK_EXT_custom_border_color when available
| * | | | | | vk_sampler_cache: Use VK_EXT_custom_border_color when availableReinUsesLisp2020-05-053-2/+44
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should fix grass interactions on Breath of the Wild on Vulkan. It is currently untested against validation layers. Nvidia's Windows 443.09 beta driver or Linux 440.66.12 is required for now.
* | | | | | Merge pull request #3815 from FernandoS27/command-list-2bunnei2020-05-0518-66/+198
|\ \ \ \ \ \ | |/ / / / / |/| | | | | GPU: More optimizations to GPU Command List Processing and DMA Copy Optimizations
| * | | | | Update src/video_core/gpu.cppbunnei2020-05-051-1/+1
| | | | | | | | | | | | | | | | | | Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
| * | | | | Update src/video_core/gpu.cppbunnei2020-05-051-1/+1
| | | | | | | | | | | | | | | | | | Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
| * | | | | Clang Format and Documentation.Fernando Sahmkow2020-04-2810-10/+20
| | | | | |
| * | | | | MaxwellDMA: Optimize micro copies.Fernando Sahmkow2020-04-283-0/+57
| | | | | |
| * | | | | VideoCore/GPU: Delegate subchannel engines to the dma pusher.Fernando Sahmkow2020-04-283-4/+49
| | | | | |
| * | | | | VideoCore/Engines: Refactor Engines CallMethod.Fernando Sahmkow2020-04-2813-62/+82
| | | | | |
* | | | | | Merge pull request #3808 from ReinUsesLisp/wait-for-idlebunnei2020-05-0313-16/+57
|\ \ \ \ \ \ | | | | | | | | | | | | | | {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
| * | | | | | {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registersReinUsesLisp2020-04-2813-16/+57
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop MemoryBarrier from the buffer cache and use Maxwell3D's register WaitForIdle. To implement this on OpenGL we just call glMemoryBarrier with the necessary bits. Vulkan lacks this synchronization primitive, so we set an event and immediately wait for it. This is not a pretty solution, but it's what Vulkan can do without submitting the current command buffer to the queue (which ends up being more expensive on the CPU).
* | | | | | Merge pull request #3732 from lioncash/headerbunnei2020-05-0231-59/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | vulkan: Remove unnecessary includes
| * | | | | | vulkan: Remove unnecessary includesLioncash2020-04-2931-59/+3
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduces some header churn and reduces rebuilds when some header internals change. While we're at it we can also resolve a missing include in buffer_cache.
* | | | | | Merge pull request #3809 from ReinUsesLisp/empty-indexbunnei2020-05-021-0/+3
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | vk_rasterizer: Skip index buffer setup when vertices are zero
| * | | | | vk_rasterizer: Skip index buffer setup when vertices are zeroReinUsesLisp2020-04-281-0/+3
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xenoblade 2 invokes a draw call with zero vertices. This is likely due to indirect drawing (glDrawArraysIndirect). This causes a crash in the staging buffer pool when trying to create a buffer with a size of zero. To workaround this, skip index buffer setup entirely when the number of indices is zero.
* | | | | Merge pull request #3693 from ReinUsesLisp/clean-samplersbunnei2020-05-0213-340/+263
|\ \ \ \ \ | | | | | | | | | | | | shader/texture: Support multiple unknown sampler properties
| * | | | | shader/texture: Support multiple unknown sampler propertiesReinUsesLisp2020-04-232-62/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows deducing some properties from the texture instruction before asking the runtime. By doing this we can handle type mismatches in some instructions from the renderer instead of the shader decoder. Fixes texelFetch issues with games using 2D texture instructions on a 1D sampler.
| * | | | | shader_ir: Turn classes into data structuresReinUsesLisp2020-04-2313-299/+197
| | | | | |
* | | | | | fixed_pipeline_state: explicitly use template keyword after 1f345ebe3a55Jan Beich2020-05-021-2/+4
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file included from src/video_core/renderer_opengl/renderer_opengl.cpp:25: In file included from src/./video_core/renderer_opengl/gl_rasterizer.h:26: In file included from src/./video_core/renderer_opengl/gl_fence_manager.h:11: src/./video_core/fence_manager.h:91:32: error: use 'template' keyword to treat 'Write' as a dependent template name memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload()); ^ template src/./video_core/fence_manager.h:137:32: error: use 'template' keyword to treat 'Write' as a dependent template name memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload()); ^ template
* | | | | Merge pull request #3807 from ReinUsesLisp/fix-depth-clampbunnei2020-04-305-8/+5
|\ \ \ \ \ | | | | | | | | | | | | maxwell_3d: Fix depth clamping register
| * | | | | maxwell_3d: Fix depth clamping registerReinUsesLisp2020-04-285-8/+5
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using deko3d as reference: https://github.com/devkitPro/deko3d/blob/4e47ba0013552e592a86ab7a2510d1e7dadf236a/source/maxwell/gpu_3d_state.cpp#L42 We were using bits 3 and 4 to determine depth clamping, but these are the same both enabled and disabled: state->depthClampEnable ? 0x101A : 0x181D The same happens on Nvidia's OpenGL driver, where they do something like this (default capabilities, GL 4.5 compatibility): (state & DEPTH_CLAMP) != 0 ? 0x201a : 0x281c There's always a difference between the first bits in this register, but bit 11 is consistently disabled on both deko3d/NVN and OpenGL. This commit changes yuzu's behaviour to use bit 11 to determine depth clamping. - Fixes depth issues on Super Mario Odyssey's intro.
* | | | | Merge pull request #3799 from ReinUsesLisp/iadd-ccbunnei2020-04-306-27/+83
|\ \ \ \ \ | | | | | | | | | | | | shader: Implement P2R CC, IADD Rd.CC and IADD.X
| * | | | | shader/arithmetic_integer: Fix tracking issue in temporaryReinUsesLisp2020-04-281-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This temporary is not needed as we mark Rd.CC + IADD.X as unimplemented. It caused issues when tracking global buffers.
| * | | | | shader/arithmetic_integer: Fix edge case and mark IADD.X Rd.CC as unimplementedReinUsesLisp2020-04-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IADD.X Rd.CC requires some extra logic that is not currently implemented. Abort when this is hit.
| * | | | | shader/arithmetic_integer: Change IAdd to UAdd to avoid signed overflowReinUsesLisp2020-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed integer addition overflow might be undefined behavior. It's free to change operations to UAdd and use unsigned integers to avoid potential bugs.
| * | | | | shader/arithmetic_integer: Implement IADD.XReinUsesLisp2020-04-262-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IADD.X takes the carry flag and adds it to the result. This is generally used to emulate 64-bit operations with 32-bit registers.
| * | | | | shader/arithmetic_integer: Implement CC for IADDReinUsesLisp2020-04-264-3/+42
| | | | | |
| * | | | | decode/register_set_predicate: Implement CCReinUsesLisp2020-04-261-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | P2R CC takes the state of condition codes and puts them into a register. We already have this implemented for PR (predicates). This commit implements CC over that.
| * | | | | decode/register_set_predicate: Use move for shared pointersReinUsesLisp2020-04-261-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | Avoid atomic counters used by shared pointers.
* | | | | | Merge pull request #3805 from ReinUsesLisp/preserve-contentsbunnei2020-04-304-41/+81
|\ \ \ \ \ \ | | | | | | | | | | | | | | texture_cache: Reintroduce preserve_contents accurately
| * | | | | | texture_cache: Reintroduce preserve_contents accuratelyReinUsesLisp2020-04-274-41/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94b0e2e5dae4e0bd0021ac2d8fe1ff904a93ee69. preserve_contents proved to be a meaningful optimization. This commit reintroduces it but properly implemented on OpenGL. We have to make sure the clear removes all the previous contents of the image. It's not currently implemented on Vulkan because we can do smart things there that's preferred to be introduced in a separate commit.
* | | | | | | Merge pull request #3788 from FernandoS27/revertbunnei2020-04-301-14/+6
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | Revert: shader_decode: Fix LD, LDG when track constant buffer.
| * | | | | | Revert: shader_decode: Fix LD, LDG when track constant buffer.Fernando Sahmkow2020-04-241-14/+6
| | |_|_|/ / | |/| | | |
* | | | | | Merge pull request #3784 from ReinUsesLisp/shader-memory-utilbunnei2020-04-289-159/+153
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | shader/memory_util: Deduplicate code
| * | | | | shader/memory_util: Deduplicate codeReinUsesLisp2020-04-269-159/+153
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deduplicate code shared between vk_pipeline_cache and gl_shader_cache as well as shader decoder code. While we are at it, fix a bug in gl_shader_cache where compute shaders had an start offset of a stage shader.
* | | | | Merge pull request #3766 from ReinUsesLisp/renderpass-cache-keyFernando Sahmkow2020-04-278-126/+129
|\ \ \ \ \ | | | | | | | | | | | | vk_renderpass_cache: Pack renderpass cache key and unify keys
| * | | | | vk_rasterizer: Pack texceptions and color formats on invalid formatsReinUsesLisp2020-04-252-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes for unknown reasons NVN games can bind a render target format of 0. This may be a yuzu bug. With the commits before this the formats were specified without being "packed", assuming all formats and texceptions will be written like in the color_attachments vector. To address this issue, iterate all render targets and pack them as they are valid. This way they will match color_attachments. - Fixes validation errors and graphical issues on Breath of the Wild.
| * | | | | vk_rasterizer: Fix framebuffer creation validation errorsReinUsesLisp2020-04-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Framebuffer creation was ignoring the number of color attachments.
| * | | | | vk_pipeline_cache: Unify pipeline cache keys into a single operationReinUsesLisp2020-04-235-47/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to call Common::CityHash and std::memcmp only once for GraphicsPipelineCacheKey. While we are at it, do the same for compute.
| * | | | | vk_renderpass_cache: Pack renderpass cache key to 12 bytesReinUsesLisp2020-04-234-84/+59
| |/ / / /
* | | | | Merge pull request #3756 from ReinUsesLisp/integrated-devicesFernando Sahmkow2020-04-275-35/+6
|\ \ \ \ \ | | | | | | | | | | | | vk_memory_manager: Remove unified memory model flag
| * | | | | vk_memory_manager: Remove unified memory model flagReinUsesLisp2020-04-225-35/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All drivers (even Intel) seem to have a device local memory type that is not host visible. Remove this flag so all devices follow the same path. This fixes a crash when trying to map to host device local memory on integrated devices.
* | | | | | Merge pull request #3742 from FernandoS27/command-listbunnei2020-04-2714-15/+198
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Optimize GPU Command Lists and Introduce Fast GPU Time Option
| * | | | | Clang Format.Fernando Sahmkow2020-04-235-10/+17
| | | | | |
| * | | | | GPU: Add Fast GPU Time Option.Fernando Sahmkow2020-04-231-1/+5
| | | | | |
| * | | | | Maxwell3D: Process Macros on MultiMethod.Fernando Sahmkow2020-04-231-25/+47
| | | | | |
| * | | | | DMAPusher: Propagate multimethod writes into the engines.Fernando Sahmkow2020-04-2314-14/+164
| | | | | |
* | | | | | Merge pull request #3753 from ReinUsesLisp/ac-vulkanRodrigo Locatti2020-04-265-12/+53
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | {gl,vk}_rasterizer: Add lazy default buffer maker and use it for empty buffers
| * | | | | vk_rasterizer: Add lazy default buffer maker and use it for empty buffersReinUsesLisp2020-04-223-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a default buffer getter that lazily constructs an empty buffer. This is intended to match OpenGL's buffer 0. Use this for disabled vertex and uniform buffers. While we are at it, include vertex buffer usages for staging buffers to silence validation errors.
| * | | | | gl_rasterizer: Fix buffers without sizeReinUsesLisp2020-04-223-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On NVN buffers can be enabled but have no size. According to deko3d and the behavior we see in Animal Crossing: New Horizons these buffers get the special address of 0x1000 and limit themselves to 0xfff. Implement buffers without a size by binding a null buffer to OpenGL without a side. https://github.com/devkitPro/deko3d/blob/1d1930beea093b5a663419e93b0649719a3ca5da/source/maxwell/gpu_3d_vbo.cpp#L62-L63
* | | | | | Merge pull request #3721 from ReinUsesLisp/sort-devicesbunnei2020-04-251-1/+20
|\ \ \ \ \ \ | | | | | | | | | | | | | | vulkan/wrapper: Sort physical devices
| * | | | | | vulkan/wrapper: Sort physical devicesReinUsesLisp2020-04-191-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort discrete GPUs over the rest, Nvidia over AMD, AMD over Intel, Intel over the rest. This gives us a somewhat consistent order when Optimus is removed (renderdoc does this when it's attached). This can break the configuration of users with an Intel GPU that manually remove Optimus on yuzu. That said, it's a very unlikely to happen.
* | | | | | | Merge pull request #3734 from ReinUsesLisp/half-float-modsbunnei2020-04-252-16/+37
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bits
| * | | | | | | decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bitsReinUsesLisp2020-04-232-16/+37
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The encoding for negation and absolute value was wrong. Extracting is now done manually. Similar instructions having different encodings is the rule, not the exception. To keep sanity and readability I preferred to extract the desired bit manually. This is implemented against nxas: https://github.com/ReinUsesLisp/nxas/blob/8dbc38995711cc12206aa370145a3a02665fd989/table.h#L68 That is itself tested against nvdisasm (Nvidia's official disassembler).
* | | | | | | Merge pull request #3749 from ReinUsesLisp/lea-immbunnei2020-04-241-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | shader/arithmetic_integer: Fix LEA_IMM encoding
| * | | | | | | shader/arithmetic_integer: Fix LEA_IMM encodingReinUsesLisp2020-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The operand order in LEA_IMM was flipped compared to nvdisasm. Fix that using nxas as reference: https://github.com/ReinUsesLisp/nxas/blob/8dbc38995711cc12206aa370145a3a02665fd989/table.h#L122
* | | | | | | | Fix -Wdeprecated-copy warning.Markus Wick2020-04-241-0/+1
| | | | | | | |
* | | | | | | | Fix -Werror=conversion error.Markus Wick2020-04-241-1/+1
| |_|_|_|_|/ / |/| | | | | |
* | | | | | | kernel: memory: Improve implementation of device shared memory. (#3707)bunnei2020-04-231-13/+5
| |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kernel: memory: Improve implementation of device shared memory. * fixup! kernel: memory: Improve implementation of device shared memory. * fixup! kernel: memory: Improve implementation of device shared memory.
* | | | | | Merge pull request #3697 from lioncash/declarationsbunnei2020-04-234-6/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | CMakeLists: Enable -Wmissing-declarations on Linux builds
| * | | | | | General: Resolve warnings related to missing declarationsLioncash2020-04-174-6/+8
| | | | | | |
* | | | | | | Merge pull request #3677 from FernandoS27/better-syncbunnei2020-04-2332-41/+1118
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Introduce Predictive Flushing and Improve ASYNC GPU
| * | | | | | | GL_Fence_Manager: use GL_TIMEOUT_IGNORED instead of a loop,Fernando Sahmkow2020-04-231-2/+1
| | | | | | | |
| * | | | | | | Address Feedback.Fernando Sahmkow2020-04-223-24/+18
| | | | | | | |
| * | | | | | | Async GPU: Correct flushing behavior to be similar to old async GPU behavior.Fernando Sahmkow2020-04-223-0/+11
| | | | | | | |
| * | | | | | | MaxwellDMA: Correct copying on accuracy level.Fernando Sahmkow2020-04-221-2/+7
| | | | | | | |
| * | | | | | | ShaderCache/PipelineCache: Cache null shaders.Fernando Sahmkow2020-04-224-8/+31
| | | | | | | |
| * | | | | | | Address Feedback.Fernando Sahmkow2020-04-2213-132/+117
| | | | | | | |
| * | | | | | | Fix GCC error.Fernando Sahmkow2020-04-222-6/+5
| | | | | | | |
| * | | | | | | QueryCache: Only do async flushes on async gpu.Fernando Sahmkow2020-04-221-1/+4
| | | | | | | |
| * | | | | | | Async GPU: Only do reactive flushing on Extreme Level.Fernando Sahmkow2020-04-221-1/+1
| | | | | | | |
| * | | | | | | vk_fence_manager: Initial implementationReinUsesLisp2020-04-228-12/+222
| | | | | | | |
| * | | | | | | QueryCache: Implement Async Flushes.Fernando Sahmkow2020-04-225-12/+77
| | | | | | | |
| * | | | | | | OpenGL: Guarantee writes to Buffers.Fernando Sahmkow2020-04-223-4/+2
| | | | | | | |
| * | | | | | | GPU: Implement Flush Requests for Async mode.Fernando Sahmkow2020-04-226-8/+70
| | | | | | | |
| * | | | | | | FenceManager: Manage syncpoints and rename fences to semaphores.Fernando Sahmkow2020-04-2211-25/+123
| | | | | | | |
| * | | | | | | BufferCache: Refactor async managing.Fernando Sahmkow2020-04-222-10/+27
| | | | | | | |
| * | | | | | | FenceManager: Implement async buffer cache flushes on High settingsFernando Sahmkow2020-04-226-10/+69
| | | | | | | |
| * | | | | | | Rasterizer: Document SignalFence & ReleaseFences and setup skeletons on Vulkan.Fernando Sahmkow2020-04-225-4/+35
| | | | | | | |
| * | | | | | | GPU: Fix rebase errors.Fernando Sahmkow2020-04-222-4/+4
| | | | | | | |
| * | | | | | | Rasterizer: Disable fence managing in synchronous gpu.Fernando Sahmkow2020-04-222-1/+11
| | | | | | | |
| * | | | | | | ThreadManager: Sync async reads on accurate gpu.Fernando Sahmkow2020-04-229-8/+48
| | | | | | | |
| * | | | | | | FenceManager: Implement should wait.Fernando Sahmkow2020-04-222-2/+17
| | | | | | | |
| * | | | | | | GPU: Implement a Fence Manager.Fernando Sahmkow2020-04-226-23/+208
| | | | | | | |
| * | | | | | | OpenGL: Implement Fencing backend.Fernando Sahmkow2020-04-2212-19/+94
| | | | | | | |
| * | | | | | | TextureCache: Flush linear textures after finishing rendering.Fernando Sahmkow2020-04-221-2/+8
| | | | | | | |
| * | | | | | | GPU: Delay Fences.Fernando Sahmkow2020-04-226-2/+20
| | | | | | | |
| * | | | | | | BufferCache: Implement OnCPUWrite and SyncGuestHostFernando Sahmkow2020-04-226-7/+67
| | | | | | | |
| * | | | | | | GPU: Refactor synchronization on Async GPUFernando Sahmkow2020-04-2211-7/+56
| | | | | | | |
| * | | | | | | Texture Cache: Implement OnCPUWrite and SyncGuestHostFernando Sahmkow2020-04-222-3/+63
| | | | | | | |
| * | | | | | | UI: Replasce accurate GPU option for GPU Accuracy LevelFernando Sahmkow2020-04-223-6/+6
| | |_|_|_|/ / | |/| | | | |
* | | | | | | vk_pipeline_cache: Fix unintentional memcpy into optionalReinUsesLisp2020-04-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intention behind this was to assign a float to from an uint32_t, but it was unintentionally being copied directly into the std::optional. Copy to a temporary and assign that temporary to std::optional. This can be replaced with std::bit_cast<float> once we are in C++20.
* | | | | | | Merge pull request #3653 from ReinUsesLisp/nsight-aftermathFernando Sahmkow2020-04-2212-77/+389
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | renderer_vulkan: Integrate Nvidia Nsight Aftermath on Windows
| * | | | | | renderer_vulkan: Integrate Nvidia Nsight Aftermath on WindowsReinUsesLisp2020-04-149-22/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds optional support for Nsight Aftermath. It is enabled through ENABLE_NSIGHT_AFTERMATH in cmake. A path to the SDK has to be provided by the environment variable NSIGHT_AFTERMATH_SDK. Nsight Aftermath allows an application to generate "minidumps" of the GPU state when a device loss happens. By analysing these on Nsight we can know what a game was doing and why it triggered a device loss. The dump is generated inside %APPDATA%\yuzu\log\gpucrash and this directory is deleted every time a new instance is initialized with Nsight enabled. To enable it on yuzu there has a to be a driver and device capable of running Nsight Aftermath on Vulkan. That means only Turing based GPUs on the latest stable driver, beta drivers won't work for now. It is manually enabled in Configuration>Debug>Enable Graphics Debugging because when using all debugging capabilities there is a runtime cost.
| * | | | | | renderer_vulkan: Remove Nvidia checkpointsReinUsesLisp2020-04-134-34/+0
| | | | | | |
| * | | | | | renderer_vulkan: Catch device losses in more placesReinUsesLisp2020-04-133-21/+29
| | | | | | |
* | | | | | | Merge pull request #3714 from lioncash/copiesbunnei2020-04-221-3/+3
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | gl_shader_decompiler: Avoid copies where applicable
| * | | | | | gl_shader_decompiler: Avoid copies where applicableLioncash2020-04-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids unnecessary reference count increments where applicable and also avoids reallocating a vector. Unlikely to make a huge difference, but given how trivial of an amendment it is, why not?
* | | | | | | Merge pull request #3718 from ReinUsesLisp/better-pipeline-stateRodrigo Locatti2020-04-216-479/+531
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | fixed_pipeline_state: Pack structure, use memcmp and CityHash on it
| * | | | | | | fixed_pipeline_state: Hash and compare the whole structureReinUsesLisp2020-04-192-105/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pad FixedPipelineState's size to 384 bytes to be a multiple of 16. Compare the whole struct with std::memcmp and hash with CityHash. Using CityHash instead of a naive hash should reduce the number of collisions. Improve used type traits to ensure this operation is safe. With these changes the improvements to the hashable pipeline state are: Optimized structure Hash: 89 ns Comparison: 103 ns Construction*: 164 ns Struct size: 384 bytes Original structure Hash: 148 ns Equal: 174 ns Construction*: 281 ns Size: 1384 bytes * Attribute state initialization is not measured These measures are averages taken with std::chrono::high_accuracy_clock on MSVC shipped on Visual Studio 16.6.0 Preview 2.1.
| * | | | | | | fixed_pipeline_state: Pack blending stateReinUsesLisp2020-04-193-98/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce FixedPipelineState's size to 364 bytes.
| * | | | | | | fixed_pipeline_state: Pack rasterizer stateReinUsesLisp2020-04-194-163/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce FixedPipelineState's size to 600 bytes.
| * | | | | | | fixed_pipeline_state: Pack depth stencil stateReinUsesLisp2020-04-193-97/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce FixedPipelineState's size to 632 bytes.
| * | | | | | | fixed_pipeline_state: Pack attribute stateReinUsesLisp2020-04-196-101/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce FixedPipelineState's size from 1384 to 664 bytes
* | | | | | | | Merge pull request #3698 from lioncash/warningbunnei2020-04-212-12/+13
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | General: Resolve minor assorted warnings
| * | | | | | | | decode/memory: Resolve unused variable warningLioncash2020-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only the first element of the returned pair is ever used.
| * | | | | | | | decode/texture: Resolve unused variable warnings.Lioncash2020-04-171-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some variables aren't used, so we can remove these. Unfortunately, diagnostics are still reported on structured bindings even when annotated with [[maybe_unused]], so we need to unpack the elements that we want to use manually.
| * | | | | | | | decode/texture: Collapse loop down into std::generateLioncash2020-04-171-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same behavior, less code.
| * | | | | | | | decode/texture: Eliminate trivial missing field initializer warningsLioncash2020-04-171-3/+4
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | We can just specify the initializers.
* | | | | | | | Merge pull request #3695 from ReinUsesLisp/default-attributesbunnei2020-04-211-0/+4
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | maxwell_3d: Initialize format attributes constant as one
| * | | | | | | | maxwell_3d: Initialize format attributes constant as oneReinUsesLisp2020-04-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nouveau expects this to be true but it doesn't set it.
* | | | | | | | | Merge pull request #3733 from ambasta/patch-2Mat M2020-04-211-1/+1
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / |/| | | | | | | | Initialize quad_indexed_pass before uint8_pass
| * | | | | | | | Initialize quad_indexed_pass before uint8_passAmit Prakash Ambasta2020-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Werror=reorder in gcc
* | | | | | | | | Merge pull request #3700 from ReinUsesLisp/stream-buffer-sizesFernando Sahmkow2020-04-202-33/+48
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | vk_stream_buffer: Fix out of memory on boot on recent Nvidia drivers
| * | | | | | | | vk_stream_buffer: Fix out of memory on boot on recent Nvidia driversReinUsesLisp2020-04-172-33/+48
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nvidia recently introduced a new memory type for data streaming (awesome!), but yuzu was assuming that all heaps had enough memory for the assumed stream buffer size (256 MiB). This worked fine on AMD but Nvidia's new memory heap was smaller than 256 MiB. This commit changes this assumption and allocates a bit less than the size of the preferred heap, with a maximum of 256 MiB (to avoid allocating all system memory on integrated devices). - Fixes a crash on NVIDIA 450.82.0.0
* | | | | | | | Merge pull request #3729 from lioncash/globalsRodrigo Locatti2020-04-203-6/+11
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | dma_pusher: Remove reliance on the global system instance
| * | | | | | | | dma_pusher: Remove reliance on the global system instanceLioncash2020-04-193-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this, the video core is now has no calls to the global system instance at all.
* | | | | | | | | Merge pull request #3694 from ReinUsesLisp/indexed-quadsbunnei2020-04-195-12/+280
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | vk_compute_pass: Implement indexed quads
| * | | | | | | | vk_compute_pass: Implement indexed quadsReinUsesLisp2020-04-175-12/+280
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement indexed quads (GL_QUADS used with glDrawElements*) with a compute pass conversion. The compute shader converts from uint8/uint16/uint32 indices to uint32. The format is passed through push constants to avoid having different variants of the same shader. - Used by Fast RMX - Used by Xenoblade Chronicles 2 (it still has graphical due to synchronization issues on Vulkan)
* | | | | | | | Merge pull request #3686 from lioncash/tablebunnei2020-04-191-3/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indices
| * | | | | | | | texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indicesLioncash2020-04-161-3/+3
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously these were all using the red component to derive the indices, which is definitely not intentional.
* | | | | | | | Merge pull request #3679 from lioncash/trackbunnei2020-04-191-5/+6
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | track: Eliminate redundant copies
| * | | | | | | | track: Eliminate redundant copiesLioncash2020-04-161-5/+6
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two variables can be references, while two others can be std::moved. Makes for 4 less atomic reference count increments and decrements.
* | | | | | | / renderer_vulkan: assume X11 if not Windows/macOS after bf1d66b7c074Jan Beich2020-04-191-3/+3
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateInstance:131: Presentation not supported on this platform Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateSurface:378: Presentation not supported on this platform Core <Critical> core/core.cpp:Load:199: Failed to initialize system (Error 5)!
* | | | | | | Merge pull request #3716 from bunnei/fix-another-impl-fallthroughMat M2020-04-181-0/+1
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | video_core: gl_shader_decompiler: Fix implicit fallthrough errors.
| * | | | | | video_core: gl_shader_decompiler: Fix implicit fallthrough errors.bunnei2020-04-181-0/+1
| | | | | | |
* | | | | | | video_code: Fix implicit switch fallthrough.Markus Wick2020-04-171-0/+2
| |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | Since yesterday, this breaks the build on linux. So let's fix it.
* | | | | | Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL"Rodrigo Locatti2020-04-171-3/+1
|/ / / / /
* | | | | Merge pull request #3666 from bunnei/new-vmmbunnei2020-04-174-75/+42
|\ \ \ \ \ | | | | | | | | | | | | Implement a new virtual memory manager
| * | | | | video_core: memory_manager: Updates for Common::PageTable changes.bunnei2020-04-172-67/+34
| | | | | |
| * | | | | core: memory: Move to Core::Memory namespace.bunnei2020-04-172-8/+8
| | |_|/ / | |/| | | | | | | | | | | | | - helpful to disambiguate Kernel::Memory namespace.
* | | | | Merge pull request #3682 from lioncash/uambunnei2020-04-171-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator
| * | | | gl_query_cache: Resolve use-after-move in CachedQuery move assignment operatorLioncash2020-04-161-1/+1
| |/ / / | | | | | | | | | | | | Avoids potential invalid junk data from being read.
* | | | Merge pull request #3673 from lioncash/extrabunnei2020-04-177-14/+20
|\ \ \ \ | |_|/ / |/| | | CMakeLists: Specify -Wextra on linux builds
| * | | CMakeLists: Specify -Wextra on linux buildsLioncash2020-04-167-14/+20
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
* | | Merge pull request #3600 from ReinUsesLisp/no-pointer-buf-cacheFernando Sahmkow2020-04-1714-228/+90
|\ \ \ | | | | | | | | buffer_cache: Return handles instead of pointer to handles
| * | | buffer_cache: Return handles instead of pointer to handlesReinUsesLisp2020-04-1614-228/+90
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | The original idea of returning pointers is that handles can be moved. The problem is that the implementation didn't take that in mind and made everything harder to work with. This commit drops pointer to handles and returns the handles themselves. While it is still true that handles can be invalidated, this way we get an old handle instead of a dangling pointer. This problem can be solved in the future with sparse buffers.
* | | Merge pull request #3689 from lioncash/unused-varRodrigo Locatti2020-04-161-1/+0
|\ \ \ | | | | | | | | decode/shift: Remove unused variable within Shift()
| * | | decode/shift: Remove unused variable within Shift()Lioncash2020-04-161-1/+0
| | |/ | |/| | | | | | | | | | Removes a redundant variable that is already satisfied by the IsFull() utility function.
* | | Merge pull request #3688 from lioncash/nequalRodrigo Locatti2020-04-162-0/+5
|\ \ \ | | | | | | | | surface_view: Add missing operator!= to ViewParams
| * | | surface_view: Add missing operator!= to ViewParamsLioncash2020-04-162-0/+5
| |/ / | | | | | | | | | Provides logical symmetry to the interface.
* | | Merge pull request #3680 from lioncash/staticRodrigo Locatti2020-04-161-1/+1
|\ \ \ | | | | | | | | gl_device: Mark stage_swizzle as constexpr
| * | | gl_device: Mark stage_swizzle as constexprLioncash2020-04-161-1/+1
| |/ / | | | | | | | | | Previously this was mutable even though it shouldn't be.
* | | Merge pull request #3687 from lioncash/constnessRodrigo Locatti2020-04-161-2/+2
|\ \ \ | | | | | | | | surface_base: Make IsInside() a const member function
| * | | surface_base: Make IsInside() a const member functionLioncash2020-04-161-2/+2
| |/ / | | | | | | | | | This doesn't modify internal state, so this can be made const.
* | | Merge pull request #3685 from lioncash/copiesRodrigo Locatti2020-04-161-3/+3
|\ \ \ | | | | | | | | control_flow: Make use of std::move in TryInspectAddress()
| * | | control_flow: Make use of std::move in TryInspectAddress()Lioncash2020-04-161-3/+3
| |/ / | | | | | | | | | Eliminates redundant atomic reference count increments and decrements.
* | | Merge pull request #3683 from lioncash/docsbunnei2020-04-162-5/+5
|\ \ \ | | | | | | | | video_core: Amend doxygen comment references
| * | | video_core: Amend doxygen comment referencesLioncash2020-04-162-5/+5
| |/ / | | | | | | | | | Fixes broken documentation references.
* | | Merge pull request #3649 from FernandoS27/3d-fixRodrigo Locatti2020-04-151-0/+6
|\ \ \ | |/ / |/| | Texture Cache: Read current data when flushing a 3D segment.
| * | Texture Cache: Read current data when flushing a 3D segment.Fernando Sahmkow2020-04-151-0/+6
| |/ | | | | | | | | This PR corrects flushing of 3D segments when data of other segments is mixed, this aims to preserve the data in place.
* | Merge pull request #3612 from ReinUsesLisp/redFernando Sahmkow2020-04-155-70/+141
|\ \ | | | | | | shader/memory: Implement RED.E.ADD and minor changes to ATOM
| * | shader/memory: Implement RED.E.ADDReinUsesLisp2020-04-065-28/+99
| | | | | | | | | | | | | | | | | | | | | | | | Implements a reduction operation. It's an atomic operation that doesn't return a value. This commit introduces another primitive because some shading languages might have a primitive for reduction operations.
| * | shader/memory: Add "using std::move"ReinUsesLisp2020-04-061-11/+13
| | |
| * | shader/memory: Minor fixes in ATOMReinUsesLisp2020-04-061-32/+30
| | |
* | | CMakeLists: Make -Wreorder a compile-time errorLioncash2020-04-152-4/+5
| | | | | | | | | | | | | | | | | | This can result in silent logic bugs within code, and given the amount of times these kind of warnings are caused, they should be flagged at compile-time so no new code is submitted with them.
* | | Merge pull request #3662 from ReinUsesLisp/constant-attrsMat M2020-04-152-2/+6
|\ \ \ | | | | | | | | gl_rasterizer: Implement constant vertex attributes
| * | | gl_rasterizer: Implement constant vertex attributesReinUsesLisp2020-04-142-2/+6
| | |/ | |/| | | | | | | | | | Credits go to gdkchan from Ryujinx for finding constant attributes are used in retail games.
* | | Merge pull request #3668 from ReinUsesLisp/vtx-format-16uiMat M2020-04-151-0/+10
|\ \ \ | | | | | | | | maxwell_to_vk: Add uint16 vertex formats
| * | | maxwell_to_vk: Add uint16 vertex formatsReinUsesLisp2020-04-151-0/+8
| | | |
| * | | maxwell_to_vk: Add missing breaksReinUsesLisp2020-04-151-0/+2
| | | | | | | | | | | | | | | | Avoid invalid fallbacks.
* | | | Merge pull request #3656 from ReinUsesLisp/glsl-full-decompileMat M2020-04-151-1/+3
|\ \ \ \ | | | | | | | | | | gl_shader_cache: Use CompileDepth::FullDecompile on GLSL
| * | | | gl_shader_cache: Use CompileDepth::FullDecompile on GLSLReinUsesLisp2020-04-141-1/+3
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | From my testing on a Splatoon 2 shader that takes 3800ms on average to compile changing to FullDecompile reduces it to 900ms on average. The shader decoder will automatically fallback to a more naive method if it can't use full decompile.
* | | | Merge pull request #3654 from ReinUsesLisp/fix-fb-attachMat M2020-04-151-1/+1
|\ \ \ \ | | | | | | | | | | gl_texture_cache: Fix layered texture attachment base level
| * | | | gl_texture_cache: Fix layered texture attachment base levelReinUsesLisp2020-04-131-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | The base level is already included in the texture view. If we specify the base level in the texture again, this will end up in the incorrect level and potentially out of bounds.
* | | | Merge pull request #3663 from ReinUsesLisp/fcmp-rcMat M2020-04-152-3/+6
|\ \ \ \ | | | | | | | | | | shader/arithmetic: Add FCMP_CR variant
| * | | | shader/arithmetic: Add FCMP_CR variantReinUsesLisp2020-04-152-3/+6
| |/ / / | | | | | | | | | | | | Adds another variant of FCMP.
* | | | Merge pull request #3664 from ReinUsesLisp/fe3h-black-squaresMat M2020-04-151-2/+4
|\ \ \ \ | | | | | | | | | | Revert "gl_shader_decompiler: Implement merges with bitfieldInsert"
| * | | | Revert "gl_shader_decompiler: Implement merges with bitfieldInsert"ReinUsesLisp2020-04-151-2/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 05cf27083608bebd3ee4c38f2f948c8f2030f881. Apparently the first approach using floats instead of bitfieldInert worked better for Fire Emblem: Three Houses. Reverting to get that behavior back.
* | / / vk_blit_screen: Initialize all members in VkPipelineViewportStateCreateInfoReinUsesLisp2020-04-151-0/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the dynamic state is specified, pViewports and pScissors are ignored, quoting the specification: pViewports is a pointer to an array of VkViewport structures, defining the viewport transforms. If the viewport state is dynamic, this member is ignored. That said, AMD's proprietary driver itself seem to read it regardless of what the specification says.
* | | Merge pull request #3657 from ReinUsesLisp/viewport-zeroRodrigo Locatti2020-04-151-3/+6
|\ \ \ | | | | | | | | vk_rasterizer: Default to 1 viewports with a size of 0
| * | | vk_rasterizer: Default to 1 viewports with a size of 0ReinUsesLisp2020-04-141-3/+6
| |/ / | | | | | | | | | Silence validation layer errors.
* / / Texture Cache: Only do buffer copies on accurate GPU. (#3634)Fernando Sahmkow2020-04-151-1/+3
|/ / | | | | This is a simple optimization as Buffer Copies are mostly used for texture recycling. They are, however, useful when games abuse undefined behavior but most 3D APIs forbid it.
* | Merge pull request #3636 from ReinUsesLisp/drop-vk-hppRodrigo Locatti2020-04-1351-2272/+2881
|\ \ | | | | | | renderer_vulkan: Drop Vulkan-Hpp
| * | renderer_vulkan: Drop Vulkan-HppReinUsesLisp2020-04-1151-2272/+2881
| | |
* | | Merge pull request #3651 from ReinUsesLisp/line-widthsMat M2020-04-135-2/+33
|\ \ \ | | | | | | | | gl_rasterizer: Implement line widths and smooth lines
| * | | gl_rasterizer: Implement line widths and smooth linesReinUsesLisp2020-04-135-2/+33
| | | | | | | | | | | | | | | | | | | | Implements "legacy" features from OpenGL present on hardware such as smooth lines and line width.
* | | | Merge pull request #3638 from ReinUsesLisp/remove-preserve-contentsMat M2020-04-133-47/+31
|\ \ \ \ | | | | | | | | | | texture_cache: Remove preserve_contents
| * | | | texture_cache: Remove preserve_contentsReinUsesLisp2020-04-113-47/+31
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | preserve_contents was always true. We can't assume we don't have to preserve clears because scissored and color masked clears exist. This removes preserve_contents and assumes it as true at all times.
* | | | Merge pull request #3631 from ReinUsesLisp/more-astcMat M2020-04-131-82/+159
|\ \ \ \ | | | | | | | | | | texture/astc: More small ASTC optimizations
| * | | | astc: Hard code bit depth changes to 8 and use fast replicateReinUsesLisp2020-04-091-21/+15
| | | | |
| * | | | astc: Use boost's static_vector to avoid heap allocationsReinUsesLisp2020-04-091-10/+14
| | | | |
| * | | | astc: Implement a fast precompiled alternative for ReplicateReinUsesLisp2020-04-091-2/+57
| | | | |
| * | | | astc: Move Replicate to a constexpr LUT when possibleReinUsesLisp2020-04-091-8/+38
| | | | |
| * | | | astc: Make InputBitStream constexprReinUsesLisp2020-04-091-11/+11
| | | | |
| * | | | astc: OutputBitStream style changes and make it constexprReinUsesLisp2020-04-091-32/+26
| | | | |
* | | | | Merge pull request #3619 from ReinUsesLisp/i2iMat M2020-04-131-13/+100
|\ \ \ \ \ | | | | | | | | | | | | shader/conversion: Implement I2I sign extension, saturation and selection
| * | | | | shader/conversion: Implement I2I sign extension, saturation and selectionReinUsesLisp2020-04-072-14/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reimplements I2I adding sign extension, saturation (clamp source value to the destination), selection and destination sizes that are not 32 bits wide. It doesn't implement CC yet.
* | | | | | Merge pull request #3627 from ReinUsesLisp/layered-viewMat M2020-04-131-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_texture_cache: Attach view instead of base texture for layered attchments
| * | | | | | gl_texture_cache: Attach view instead of base texture for layered attachmentsReinUsesLisp2020-04-091-2/+2
| | |/ / / / | |/| | | | | | | | | | | | | | | | This way we are not ignoring the base layer of the current texture.
* | | | | | Merge pull request #3646 from ReinUsesLisp/fix-glsl-turingMat M2020-04-131-6/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_shader_decompiler: Improve generated code in HMergeH*
| * | | | | | gl_shader_decompiler: Implement merges with bitfieldInsertReinUsesLisp2020-04-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes Turing issues but it avoids doing more bitcasts. This should improve the generated code while also avoiding more points where compilers can flush floats.
| * | | | | | gl_shader_decompiler: Improve generated code in HMergeH*ReinUsesLisp2020-04-121-6/+8
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | Avoiding bitwise expressions, this fixes Turing issues in shaders using half float merges that affected several games.
* | | | | | Merge pull request #3633 from ReinUsesLisp/clean-texdecMat M2020-04-131-14/+0
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | shader/texture: Remove type mismatches management from shader decoder
| * | | | | shader/texture: Remove type mismatches management from shader decoderReinUsesLisp2020-04-101-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit e22816a5bb we handle type mismatches from the CPU. We don't need to hack our shader decoder due to game bugs anymore. Removed in this commit.
* | | | | | Merge pull request #3578 from ReinUsesLisp/vmnmxFernando Sahmkow2020-04-123-1/+117
|\ \ \ \ \ \ | | | | | | | | | | | | | | shader/video: Partially implement VMNMX
| * | | | | | shader/video: Partially implement VMNMXReinUsesLisp2020-04-123-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements the common usages for VMNMX. Inputs with a different size than 32 bits are not supported and sign mismatches aren't supported either. VMNMX works as follows: It grabs Ra and Rb and applies a maximum/minimum on them (this is defined by .MX), having in mind the input sign. This result can then be saturated. After the intermediate result is calculated, it applies another operation on it using Rc. These operations are merges, accumulations or another min/max pass. This instruction allows to implement with a more flexible approach GCN's min3 and max3 instructions (for instance).
| * | | | | | shader_bytecode: Fix I2I_IMM encodingReinUsesLisp2020-03-281-1/+1
| | | | | | |
* | | | | | | video_core: Add MSAA registers in 3D engine and TICReinUsesLisp2020-04-122-6/+76
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | This adds the registers used for multisampling. It doesn't implement anything for now.
* | | | | | Merge pull request #3594 from ReinUsesLisp/vk-instancebunnei2020-04-115-96/+302
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | yuzu: Drop SDL2 and Qt frontend Vulkan requirements
| * | | | | yuzu: Drop SDL2 and Qt frontend Vulkan requirementsReinUsesLisp2020-04-075-105/+238
| | | | | | | | | | | | | | | | | | | | | | | | Create Vulkan instances and surfaces from the Vulkan backend.
| * | | | | renderer_vulkan: Query device names from the backendReinUsesLisp2020-04-073-0/+73
| | |_|/ / | |/| | |
* | | | | Merge pull request #3622 from ReinUsesLisp/srgb-texture-borderFernando Sahmkow2020-04-103-28/+84
|\ \ \ \ \ | | | | | | | | | | | | video_core/texture: Use a LUT to convert sRGB texture borders
| * | | | | video_core/textures: Move GetMaxAnisotropy to cpp fileReinUsesLisp2020-04-082-19/+23
| | | | | |
| * | | | | video_core/texture: Use a LUT to convert sRGB texture bordersReinUsesLisp2020-04-083-9/+61
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reversed look up table extracted from https://gist.github.com/rygorous/2203834#file-gistfile1-cpp-L41-L62 that is used in https://github.com/devkitPro/deko3d/blob/04d4e9e587fa3dc5447b43d273bc45f440226e41/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.
* | | | | Merge pull request #3610 from FernandoS27/gpu-cachesRodrigo Locatti2020-04-0930-424/+374
|\ \ \ \ \ | | | | | | | | | | | | Refactor all the GPU Caches to use VAddr for cache addressing
| * | | | | VkRasterizer: Eliminate Legacy code.Fernando Sahmkow2020-04-091-1/+0
| | | | | |
| * | | | | Memory: Correct GCC errors.Fernando Sahmkow2020-04-092-2/+3
| | | | | |
| * | | | | Memory: Address Feedback.Fernando Sahmkow2020-04-083-4/+7
| | | | | |
| * | | | | GPUMemoryManager: Improve safety of memory reads.Fernando Sahmkow2020-04-083-55/+47
| | | | | |
| * | | | | Clang Format.Fernando Sahmkow2020-04-061-6/+3
| | | | | |
| * | | | | Shader/Pipeline Cache: Use VAddr instead of physical memory for addressing.Fernando Sahmkow2020-04-067-87/+62
| | | | | |
| * | | | | Query Cache: Use VAddr instead of physical memory for adressing.Fernando Sahmkow2020-04-063-23/+22
| | | | | |
| * | | | | Buffer Cache: Use vAddr instead of physical memory.Fernando Sahmkow2020-04-0610-106/+129
| | | | | |
| * | | | | Texture Cache: Use vAddr instead of physical memory for caching.Fernando Sahmkow2020-04-065-130/+81
| | | | | |
| * | | | | GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddrFernando Sahmkow2020-04-0613-61/+71
| |/ / / /
* | | | | Merge pull request #3601 from ReinUsesLisp/some-shader-encodingsbunnei2020-04-093-5/+18
|\ \ \ \ \ | |_|_|/ / |/| | | | video_core/shader: Add some instruction and S2R encodings
| * | | | shader/other: Add error message for some S2R registersReinUsesLisp2020-04-041-0/+6
| | | | |
| * | | | shader_bytecode: Rename MOV_SYS to S2RReinUsesLisp2020-04-042-5/+5
| | | | |
| * | | | shader_bytecode: Add encoding for BARReinUsesLisp2020-04-041-0/+2
| | | | |
| * | | | shader_ir: Add error message for EXIT.FCSM_TRReinUsesLisp2020-04-041-0/+3
| | | | |
| * | | | shader_bytecode: Add encoding for VOTE.VTGReinUsesLisp2020-04-041-0/+2
| | |_|/ | |/| |
* | | | Merge pull request #3599 from ReinUsesLisp/revert-3499bunnei2020-04-071-4/+2
|\ \ \ \ | | | | | | | | | | Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"
| * | | | Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"ReinUsesLisp2020-04-041-4/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 41905ee467b24172ba93e3fcd665bb4e4806a45a, reversing changes made to 35145bd529c3517e2c366efc764a762092d96edf. It causes regressions in several games.
* | | | Merge pull request #3489 from namkazt/patch-2Rodrigo Locatti2020-04-072-11/+353
|\ \ \ \ | |_|/ / |/| | | shader: implement SULD.D bits32/64
| * | | address nit.Nguyen Dac Nam2020-04-071-1/+1
| | | |
| * | | Apply suggestions from code reviewNguyen Dac Nam2020-04-071-9/+9
| | | | | | | | | | | | Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
| * | | shader_decode: SULD.D using std::pair instead of out parameternamkazy2020-04-062-19/+15
| | | |
| * | | shader_decode: SULD.D avoid duplicate code block.namkazy2020-04-061-39/+2
| | | |
| * | | shader_decode: SULD.D fix conversion error.namkazy2020-04-061-3/+3
| | | |
| * | | shader_decode: SULD.D implement bits64 and reverse shader ir init method to removed shader stage.namkazy2020-04-065-46/+105
| | | |
| * | | silent warning (conversion error)namkazy2020-04-051-3/+2
| | | |
| * | | shader_decode: SULD.D -> SINT actually same as UNORM.namkazy2020-04-051-5/+4
| | | |
| * | | shader_decode: SULD.D fix decode SNORM componentnamkazy2020-04-051-10/+9
| | | |
| * | | clang-formatnamkazy2020-04-051-2/+2
| | | |
| * | | shader_decode: get sampler descriptor from registry.namkazy2020-04-051-77/+93
| | | |
| * | | tweaking.namkazy2020-04-051-3/+3
| | | |
| * | | clang-formatNguyen Dac Nam2020-04-051-2/+1
| | | |
| * | | cleanup unuse paramsnamkazy2020-04-051-8/+6
| | | |
| * | | cleanup debug code.namkazy2020-04-051-14/+3
| | | |
| * | | reimplement get component type, uncomment mistaken codenamkazy2020-04-051-18/+93
| | | |
| * | | remove disable optimizenamkazy2020-04-051-2/+0
| | | |
| * | | [wip] reimplement SULD.Dnamkazy2020-04-051-22/+229
| | | |
| * | | add shader stage when init shader irnamkazy2020-04-054-9/+12
| | | |
| * | | clang-fixNguyen Dac Nam2020-04-051-1/+1
| | | |
| * | | shader: image - import PredConditionNguyen Dac Nam2020-04-051-0/+1
| | | |
| * | | shader: SULD.D bits32 implement more complexer method.Nguyen Dac Nam2020-04-051-4/+28
| | | |
| * | | shader: SULD.D import StoreTypeNguyen Dac Nam2020-04-051-0/+1
| | | |
| * | | shader: implement SULD.D bits32Nguyen Dac Nam2020-04-051-11/+27
| |/ /
* | | Merge pull request #3513 from ReinUsesLisp/native-astcFernando Sahmkow2020-04-0612-301/+247
|\ \ \ | | | | | | | | video_core: Use native ASTC when available
| * | | gl_texture_cache: Fix software ASTC fallbackReinUsesLisp2020-04-011-7/+12
| | | |
| * | | vk_device: Add missing ASTC queriesReinUsesLisp2020-04-011-14/+29
| | | |
| * | | video_core: Use native ASTC when availableReinUsesLisp2020-04-0110-281/+176
| | | |
| * | | gl_device: Detect if ASTC is reported and expose itReinUsesLisp2020-04-012-0/+31
| | | |
* | | | Merge pull request #3592 from ReinUsesLisp/ipaFernando Sahmkow2020-04-064-68/+74
|\ \ \ \ | | | | | | | | | | shader_decompiler: Remove FragCoord.w hack and change IPA implementation
| * | | | shader_decompiler: Remove FragCoord.w hack and change IPA implementationReinUsesLisp2020-04-024-68/+74
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge pull request #3589 from ReinUsesLisp/fix-clearsFernando Sahmkow2020-04-061-2/+5
|\ \ \ \ | |_|/ / |/| | | gl_rasterizer: Mark cleared textures as dirty
| * | | gl_rasterizer: Mark cleared textures as dirtyReinUsesLisp2020-03-311-2/+5
| | | | | | | | | | | | | | | | | | | | Fixes a potential edge case where cleared textures read from the CPU were not flushed.
* | | | shader/memory: Silence no return value warningReinUsesLisp2020-04-021-0/+3
| | | | | | | | | | | | | | | | Silences a warning about control paths not all returning a value.
* | | | Merge pull request #3552 from jroweboy/single-contextRodrigo Locatti2020-04-0216-93/+127
|\ \ \ \ | |_|/ / |/| | | Refactor Context management (Fixes renderdoc on opengl issues)
| * | | Address review and fix broken yuzu-tester buildJames Rowe2020-03-263-5/+7
| | | |
| * | | Frontend/GPU: Refactor context managementJames Rowe2020-03-2516-97/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes the GraphicsContext to be managed by the GPU core. This eliminates the need for the frontends to fool around with tricky MakeCurrent/DoneCurrent calls that are dependent on the settings (such as async gpu option). This also refactors out the need to use QWidget::fromWindowContainer as that caused issues with focus and input handling. Now we use a regular QWidget and just access the native windowHandle() directly. Another change is removing the debug tool setting in FrameMailbox. Instead of trying to block the frontend until a new frame is ready, the core will now take over presentation and draw directly to the window if the renderer detects that its hooked by NSight or RenderDoc Lastly, since it was in the way, I removed ScopeAcquireWindowContext and replaced it with a simple subclass in GraphicsContext that achieves the same result
* | | | Merge pull request #3591 from ReinUsesLisp/vk-wrapper-part2Rodrigo Locatti2020-04-012-0/+850
|\ \ \ \ | | | | | | | | | | renderer_vulkan/wrapper: Add a Vulkan wrapper (part 2 of 2)
| * | | | renderer_vulkan/wrapper: Add vkEnumerateInstanceExtensionProperties wrapperReinUsesLisp2020-04-012-0/+17
| | | | |
| * | | | renderer_vulkan/wrapper: Add command buffer handleReinUsesLisp2020-04-011-0/+192
| | | | |
| * | | | renderer_vulkan/wrapper: Add physical device handleReinUsesLisp2020-04-012-0/+123
| | | | |
| * | | | renderer_vulkan/wrapper: Add device handleReinUsesLisp2020-04-012-0/+277
| | | | |
| * | | | renderer_vulkan/wrapper: Add swapchain handleReinUsesLisp2020-04-012-0/+15
| | | | |
| * | | | renderer_vulkan/wrapper: Add fence handleReinUsesLisp2020-04-011-0/+17
| | | | |
| * | | | renderer_vulkan/wrapper: Add device memory handleReinUsesLisp2020-04-011-0/+15
| | | | |
| * | | | renderer_vulkan/wrapper: Add pool handlesReinUsesLisp2020-04-012-0/+47
| | | | |
| * | | | renderer_vulkan/wrapper: Add buffer and image handlesReinUsesLisp2020-04-012-0/+24
| | | | |
| * | | | renderer_vulkan/wrapper: Add queue handleReinUsesLisp2020-04-012-0/+36
| | | | |
| * | | | renderer_vulkan/wrapper: Add instance handleReinUsesLisp2020-04-012-0/+87
| | |/ / | |/| |
* | | | Merge pull request #3561 from ReinUsesLisp/f2f-conversionFernando Sahmkow2020-03-311-5/+10
|\ \ \ \ | | | | | | | | | | shader/conversion: Fix F2F rounding operations with different sizes
| * | | | shader/conversion: Fix F2F rounding operations with different sizesReinUsesLisp2020-03-261-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rounding operations only matter when the conversion size of source and destination is the same, i.e. .F16.F16, .F32.F32 and .F64.F64. When there is a mismatch (.F16.F32), these bits are used for IEEE rounding, we don't emulate this because GLSL and SPIR-V don't support configuring it per operation.
* | | | | Merge pull request #3577 from ReinUsesLisp/leaFernando Sahmkow2020-03-311-11/+4
|\ \ \ \ \ | | | | | | | | | | | | shader/lea: Fix LEA implementation
| * | | | | shader/lea: Simplify generated LEA codeReinUsesLisp2020-03-281-3/+2
| | | | | |
| * | | | | shader/lea: Fix op_a and op_b usagesReinUsesLisp2020-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | They were swapped.
| * | | | | shader/lea: Remove const and use move when possibleReinUsesLisp2020-03-271-11/+5
| | |_|_|/ | |/| | |
* | | | | Merge pull request #3506 from namkazt/patch-9Rodrigo Locatti2020-03-316-36/+119
|\ \ \ \ \ | |_|_|/ / |/| | | | shader_decode: Implement partial ATOM/ATOMS instr
| * | | | clang-formatNguyen Dac Nam2020-03-311-2/+1
| | | | |
| * | | | shader_decode: fix by suggestionNguyen Dac Nam2020-03-311-27/+22
| | | | |
| * | | | clang-formatnamkazy2020-03-301-3/+3
| | | | |
| * | | | gl_decompiler: min/max op not implement yetnamkazy2020-03-301-0/+4
| | | | |
| * | | | shader_decode: ATOM/ATOMS: add function to avoid code repetitionnamkazy2020-03-302-70/+53
| | | | |
| * | | | shader_decode: merge GlobalAtomicOp to AtomicOpnamkazy2020-03-301-13/+1
| | | | |
| * | | | shader_decode: implement ATOM operation for S32 and U32Nguyen Dac Nam2020-03-301-6/+39
| | | | |
| * | | | clang-formatnamkazy2020-03-301-3/+3
| | | | |
| * | | | shader_decode: implement ATOMS instr partial.Nguyen Dac Nam2020-03-301-10/+42
| | | | |
| * | | | vk_decompiler: add atomic op and handler function.Nguyen Dac Nam2020-03-301-6/+25
| | | | |
| * | | | gl_decompiler: add atomic opNguyen Dac Nam2020-03-301-0/+16
| | | | |
| * | | | shader: node - update correct commentNguyen Dac Nam2020-03-301-15/+15
| | | | |
| * | | | shader_decode: add Atomic op for common usageNguyen Dac Nam2020-03-301-1/+15
| |/ / /
* | | | Merge pull request #3566 from ReinUsesLisp/vk-wrapper-part1Rodrigo Locatti2020-03-313-0/+889
|\ \ \ \ | | | | | | | | | | renderer_vulkan/wrapper: Add a Vulkan wrapper (part 1 of 2)
| * | | | renderer_vulkan/wrapper: Address feedbackReinUsesLisp2020-03-281-3/+24
| | | | |
| * | | | renderer_vulkan/wrapper: Add owning handlesReinUsesLisp2020-03-271-0/+18
| | | | |
| * | | | renderer_vulkan/wrapper: Add pool allocations owning templated classReinUsesLisp2020-03-271-0/+81
| | | | |
| * | | | renderer_vulkan/wrapper: Add owning handle templated classReinUsesLisp2020-03-271-0/+144
| | | | |
| * | | | renderer_vulkan/wrapper: Add destroy and free overload setReinUsesLisp2020-03-272-0/+133
| | | | |
| * | | | renderer_vulkan/wrapper: Add dispatch table and loadersReinUsesLisp2020-03-272-0/+283
| | | | |
| * | | | renderer_vulkan/wrapper: Add exception classReinUsesLisp2020-03-272-0/+34
| | | | |
| * | | | renderer_vulkan/wrapper: Add ToString function for VkResultReinUsesLisp2020-03-273-0/+91
| | | | |
| * | | | renderer_vulkan/wrapper: Add Vulakn wrapper and a span helperReinUsesLisp2020-03-272-0/+84
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intention behind a Vulkan wrapper is to drop Vulkan-Hpp. The issues with Vulkan-Hpp are: - Regular breaks of the API. - Copy constructors that do the same as the aggregates (fixed recently) - External dynamic dispatch that is hard to remove - Alias KHR handles with non-KHR handles making it impossible to use smart handles on Vulkan 1.0 instances with extensions that were included on Vulkan 1.1. - Dynamic dispatchers silently change size depending on preprocessor definitions. Different files will have different dispatch definitions, generating all kinds of hard to debug memory issues. In other words, Vulkan-Hpp is not "production ready" for our needs and this wrapper aims to replace it without losing RAII and exception safety.
* | | | Merge pull request #3560 from ReinUsesLisp/fix-stencilbunnei2020-03-301-5/+2
|\ \ \ \ | |_|/ / |/| | | gl_rasterizer: Synchronize stencil testing on clears
| * | | gl_rasterizer: Update stencil test regardless of it being disabledReinUsesLisp2020-03-261-5/+1
| | | |
| * | | gl_rasterizer: Synchronize stencil testing on clearsReinUsesLisp2020-03-261-0/+1
| |/ /
* | | Merge pull request #3565 from ReinUsesLisp/image-formatFernando Sahmkow2020-03-271-4/+10
|\ \ \ | | | | | | | | engines/const_buffer_engine_interface: Store image format and types
| * | | engines/const_buffer_engine_interface: Store image format typeReinUsesLisp2020-03-271-4/+10
| |/ / | | | | | | | | | | | | | | | | | | This information is required to properly implement SULD.B. It might also be handy for all image operations, since it would allow us to implement them on devices that require the image format to be specified (on desktop, this would be AMD on OpenGL and Intel on OpenGL and Vulkan).
* / / maxwell_to_vk: implement signedscaled vertex formatsDan2020-03-271-0/+20
|/ /
* | Merge pull request #3544 from makigumo/myfork/patch-2bunnei2020-03-261-4/+5
|\ \ | | | | | | xmad: fix clang build error
| * | xmad: fix clang build errormakigumo2020-03-231-4/+5
| | |
* | | Merge pull request #3520 from ReinUsesLisp/legacy-varyingsbunnei2020-03-264-47/+119
|\ \ \ | |_|/ |/| | gl_shader_decompiler: Implement legacy varyings
| * | gl_shader_decompiler: Don't redeclare gl_VertexID and gl_InstanceIDReinUsesLisp2020-03-181-8/+0
| | |
| * | gl_shader_decompiler: Implement legacy varyingsReinUsesLisp2020-03-161-6/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | Legacy varyings are special attributes carried over in hardware from the OpenGL 1 and OpenGL 2 days. These were generally used instead of the generic attributes we use today. They are deprecated or removed from most APIs, but Nvidia still ships them in hardware. To implement these, this commit maps them 1:1 to OpenGL compatibility.
| * | shader/shader_ir: Track usage in input attribute and of legacy varyingsReinUsesLisp2020-03-163-34/+64
| | |
| * | shader/shader_ir: Fix clip distance usage storesReinUsesLisp2020-03-161-2/+1
| | |
| * | shader/shader_ir: Change declare output attribute to a switchReinUsesLisp2020-03-161-9/+9
| | |
* | | Merge pull request #3543 from ReinUsesLisp/gl-depth-rangeFernando Sahmkow2020-03-231-4/+6
|\ \ \ | | | | | | | | gl_rasterizer: Use transformed viewport for depth ranges
| * | | gl_rasterizer: Use transformed viewport for depth rangesReinUsesLisp2020-03-221-4/+6
| | |/ | |/| | | | | | | | | | | | | Implement depth ranges using the transformed viewport instead of the generic one. This matches the current Vulkan implementation but doesn't support negative depth ranges. An update to glad is required for this.
* | | apply replay logic to all writes. remove replay from MacroInterpreter::Send (@fincs)namkazy2020-03-222-12/+9
| | |
* | | maxwell_3d: change declaration ordernamkazy2020-03-221-1/+3
| | |
* | | maxwell_3d: init shadow_statenamkazy2020-03-221-0/+2
| | |
* | | maxwell_3d: this seem more correct.namkazy2020-03-221-2/+2
| | |
* | | maxwell_3d: update comments for shadow ram usagenamkazy2020-03-223-2/+6
| | |
* | | marco_interpreter: write hw value when shadow ram requestedNguyen Dac Nam2020-03-221-0/+6
| | |
* | | maxwell_3d: track shadow ram ctrl and hw reg valueNguyen Dac Nam2020-03-221-0/+10
| | |
* | | maxwell_3d: implement MME shadow RAMNguyen Dac Nam2020-03-221-1/+14
|/ /
* | Merge pull request #3505 from namkazt/patch-8bunnei2020-03-191-15/+48
|\ \ | | | | | | shader_decode: implement XMAD mode CSfu
| * | nit & remove some optional paramNguyen Dac Nam2020-03-131-10/+11
| | |
| * | shader_decode: implement XMAD mode CSfuNguyen Dac Nam2020-03-131-9/+41
| | |
* | | vk_texture_cache: Silence misc warningsReinUsesLisp2020-03-191-3/+3
| | |
* | | vk_staging_buffer_pool: Silence unused constant warningReinUsesLisp2020-03-191-1/+1
| | |
* | | vk_rasterizer: Remove unused variableReinUsesLisp2020-03-191-2/+0
| | |
* | | vk_pipeline_cache: Remove unused variableReinUsesLisp2020-03-191-1/+0
| | |
* | | maxwell_to_vk: Sielence -Wswitch warningReinUsesLisp2020-03-191-0/+2
| | |
* | | gl_shader_decompiler: Remove deprecated function and its usagesReinUsesLisp2020-03-191-11/+8
| | |
* | | gl_rasterizer: Silence misc warningsReinUsesLisp2020-03-191-7/+2
| | |
* | | kepler_compute: Remove unused variablesReinUsesLisp2020-03-191-8/+0
| | |
* | | astc: Fix clang build issuesReinUsesLisp2020-03-181-12/+12
| | |
* | | Merge pull request #3510 from FernandoS27/dirty-writeMat M2020-03-174-13/+0
|\ \ \ | | | | | | | | DirtyFlags: relax need to set render_targets as dirty
| * | | DirtyFlags: relax need to set render_targets as dirty Fernando Sahmkow2020-03-144-13/+0
| | | | | | | | | | | | | | | | | | | | The texture cache already takes care of setting a render target to dirty when invalidated.
* | | | Merge pull request #3509 from ReinUsesLisp/astc-optsMat M2020-03-171-537/+519
|\ \ \ \ | | | | | | | | | | astc: General changes and optimizations
| * | | | astc: Fix typos from search and replaceReinUsesLisp2020-03-141-3/+3
| | | | |
| * | | | astc: Minor changes to InputBitStreamReinUsesLisp2020-03-141-28/+34
| | | | |
| * | | | astc: Pass val in Replicate by copyReinUsesLisp2020-03-141-1/+1
| | | | |
| * | | | astc: Call std::vector:reserve on decodedClolorValues to avoid reallocatingReinUsesLisp2020-03-141-0/+2
| | | | |
| * | | | astc: Call std::vector::reserve on texelWeightValues to avoid reallocatingReinUsesLisp2020-03-141-0/+2
| | | | |
| * | | | astc: Create a LUT at compile time for encoding valuesReinUsesLisp2020-03-141-7/+19
| | | | |
| * | | | astc: Make IntegerEncodedValue a trivial structureReinUsesLisp2020-03-141-212/+177
| | | | |
| * | | | astc: Make IntegerEncodedValue constructor constexprReinUsesLisp2020-03-141-5/+6
| | | | |
| * | | | astc: Make IntegerEncodedValue trivially copyableReinUsesLisp2020-03-141-9/+2
| | | | |
| * | | | astc: Rename C types to common_typesReinUsesLisp2020-03-141-79/+78
| | | | |
| * | | | astc: Move Popcnt to an anonymous namespace and make it constexprReinUsesLisp2020-03-141-9/+13
| | | | |
| * | | | astc: Use common types instead of stdint.h integer typesReinUsesLisp2020-03-141-284/+282
| | | | |
| * | | | astc: Use 'enum class' instead of 'enum' for EIntegerEncodingReinUsesLisp2020-03-141-25/+25
| | | | |
* | | | | Merge pull request #3518 from ReinUsesLisp/scissor-clearsMat M2020-03-174-45/+53
|\ \ \ \ \ | | | | | | | | | | | | vk_rasterizer: Implement scissor clears and layered clears
| * | | | | vk_rasterizer: Implement layered clearsReinUsesLisp2020-03-151-2/+2
| | | | | |
| * | | | | vk_rasterizer: Reimplement clears with vkCmdClearAttachmentsReinUsesLisp2020-03-154-45/+53
| | | | | |
* | | | | | Merge pull request #3519 from ReinUsesLisp/int-formatsMat M2020-03-171-0/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | maxwell_to_vk: Implement RG32 and RGB32 integer vertex formats
| * | | | | | maxwell_to_vk: Implement RG32 and RGB32 integer vertex formatsReinUsesLisp2020-03-151-0/+4
| | |_|_|_|/ | |/| | | |
* | | | | | Merge pull request #3498 from ReinUsesLisp/texel-fetch-glslbunnei2020-03-171-6/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_shader_decompiler: Add layer component to texelFetch
| * | | | | | gl_shader_decompiler: Add layer component to texelFetchReinUsesLisp2020-03-121-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | TexelFetch was not emitting the array component generating invalid GLSL.
* | | | | | | renderer_opengl: Move some logic to an anonymous namespaceReinUsesLisp2020-03-161-151/+151
| | | | | | |
* | | | | | | renderer_opengl: Detect Nvidia Nsight as a debugging toolReinUsesLisp2020-03-163-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use getenv to detect Nsight.
* | | | | | | Merge pull request #3515 from ReinUsesLisp/vertex-vk-assertRodrigo Locatti2020-03-161-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | vk_rasterizer: Fix vertex range assert
| * | | | | | | vk_rasterizer: Fix vertex range assertReinUsesLisp2020-03-151-1/+1
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | End can be equal to start in CalculateVertexArraysSize. This is quite common when the vertex size is zero.
* | | | | | | Merge pull request #3501 from ReinUsesLisp/rgba16-snormRodrigo Locatti2020-03-168-69/+84
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | video_core: Implement RGBA16_SNORM
| * | | | | | | video_core: Implement RGBA16_SNORMReinUsesLisp2020-03-138-69/+84
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | Implement RGBA16_SNORM with the current API. Nothing special here.
* | | | | | | Merge pull request #3502 from namkazt/patch-3Rodrigo Locatti2020-03-163-29/+53
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | shader_decode: Reimplement BFE instructions
| * | | | | | | clang-formatNguyen Dac Nam2020-03-141-2/+1
| | | | | | | |
| * | | | | | | nitNguyen Dac Nam2020-03-141-1/+1
| | | | | | | |
| * | | | | | | clang-formatNguyen Dac Nam2020-03-131-4/+8
| | | | | | | |
| * | | | | | | Apply suggestions from code reviewNguyen Dac Nam2020-03-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Co-Authored-By: Mat M. <mathew1800@gmail.com>
| * | | | | | | shader_decode: BFE add ref of reverse parallel method.Nguyen Dac Nam2020-03-131-0/+3
| | | | | | | |
| * | | | | | | shader_decode: implement BREV on BFENguyen Dac Nam2020-03-131-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | Implement reverse parallel follow: https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
| * | | | | | | shader_bytecode: update BFE instructions struct.Nguyen Dac Nam2020-03-131-8/+3
| | | | | | | |
| * | | | | | | node_helper: add IBitfieldExtract caseNguyen Dac Nam2020-03-131-0/+2
| | | | | | | |
| * | | | | | | shader_decode: Reimplement BFE instructionsNguyen Dac Nam2020-03-131-25/+27
| | |_|_|_|_|/ | |/| | | | |
* | | | | | | Merge pull request #3503 from makigumo/patch-2Rodrigo Locatti2020-03-161-0/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | maxwell_to_vk: add vertex format eA2B10G10R10UnormPack32
| * | | | | | | fix formattingmakigumo2020-03-131-1/+1
| | | | | | | |
| * | | | | | | maxwell_to_vk: add vertex format eA2B10G10R10UnormPack32makigumo2020-03-131-1/+3
| |/ / / / / /
* | | | | | | Merge pull request #3512 from bunnei/fix-renderdocRodrigo Locatti2020-03-153-1/+38
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | renderer_opengl: Keep frames synchronized when using a GPU debugger.
| * | | | | | | renderer_opengl: Keep presentation frames in lock-step when GPU debugging.bunnei2020-03-141-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fixes renderdoc with OpenGL renderer.
| * | | | | | | gl_device: Add option to check GL_EXT_debug_tool.bunnei2020-03-142-0/+6
| | |_|_|/ / / | |/| | | | |
* | | | | | | vk_shader_decompiler: fix linux buildmakigumo2020-03-151-1/+1
| |_|_|/ / / |/| | | | |
* | | | | | Merge pull request #3508 from FernandoS27/page-tablebunnei2020-03-141-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | PageTable: move backing addresses to a children class as the CPU page table does not need them.
| * | | | | PageTable: move backing addresses to a children class as the CPU page table does not need them.Fernando Sahmkow2020-03-141-1/+1
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | This PR aims to reduce the memory usage in the CPU page table by moving GPU specific parameters into a child class. This saves 1Gb of Memory for most games.
* | | | | Merge pull request #3500 from ReinUsesLisp/incompatible-typesFernando Sahmkow2020-03-141-2/+39
|\ \ \ \ \ | | | | | | | | | | | | texture_cache: Report incompatible textures as black
| * | | | | texture_cache: Report incompatible textures as blackReinUsesLisp2020-03-121-2/+39
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some games bind incompatible texture types to certain types. For example Astral Chain binds a 2D texture with 1 layer (non-array) to a cubemap slot (that's how it's used in the shader). After testing this in hardware, the expected "undefined behavior" is to report all pixels as black. We already have a path for reporting black textures in the texture cache. When textures types are incompatible, this commit binds these kind of textures. This is done on the API agnostic texture cache so no extra code has to be inserted on OpenGL or Vulkan. As a side effect, this fixes invalidations of ASTC textures on Astral Chain. This happened because yuzu detected a cube texture and forced 6 faces, generating a texture larger than what the TIC reported.
* | | | | Merge pull request #3499 from ReinUsesLisp/depth-2d-arrayFernando Sahmkow2020-03-141-2/+4
|\ \ \ \ \ | | | | | | | | | | | | texture_cache/surface_params: Force depth=1 on 2D textures
| * | | | | texture_cache/surface_params: Force depth=1 on 2D texturesReinUsesLisp2020-03-121-2/+4
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes games will sample a 2D array TIC with a 2D access in the shader. This causes bad interactions with the rest of the texture cache. To emulate what the game wants to do, force a depth=1 on 2D textures (not 2D arrays) and let the texture cache handle the rest.
* | | | | vk/gl_shader_decompiler: Silence assertion on computeReinUsesLisp2020-03-132-6/+12
| | | | |
* | | | | vk_shader_decompiler: Fix default varying regressionReinUsesLisp2020-03-131-2/+6
| | | | |
* | | | | maxwell_3d: Add padding words to XFB entriesReinUsesLisp2020-03-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Use INSERT_UNION_PADDING_WORDS instead of alignas to ensure a size requirement.
* | | | | gl_shader_decompiler: Fix implicit conversion errorsReinUsesLisp2020-03-131-3/+3
| | | | |
* | | | | vk_shader_decompiler: Fix implicit type conversionRodrigo Locatti2020-03-131-1/+1
| | | | | | | | | | | | | | | Co-Authored-By: Mat M. <mathew1800@gmail.com>
* | | | | vk_rasterizer: Implement transform feedback binding zeroReinUsesLisp2020-03-132-0/+46
| | | | |
* | | | | vk_shader_decompiler: Add XFB decorations to generic varyingsReinUsesLisp2020-03-131-16/+89
| | | | |
* | | | | vk_device: Enable VK_EXT_transform_feedback when availableReinUsesLisp2020-03-132-7/+40
| | | | |
* | | | | vk_device: Shrink formatless capability name sizeReinUsesLisp2020-03-133-26/+23
| | | | |
* | | | | shader/transform_feedback: Expose buffer strideReinUsesLisp2020-03-133-1/+4
| | | | |
* | | | | vk_shader_decompiler: Use registry for specializationReinUsesLisp2020-03-134-31/+37
| | | | |
* | | | | gl_rasterizer: Implement transform feedback bindingsReinUsesLisp2020-03-133-10/+83
| | | | |
* | | | | gl_shader_decompiler: Decorate output attributes with XFB layoutReinUsesLisp2020-03-131-29/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We sometimes have to slice attributes in different parts. This is needed for example in instances where the game feedbacks 3 components but writes 4 from the shader (something that is possible with GL_NV_transform_feedback).
* | | | | shader/transform_feedback: Add host API friendly TFB builderReinUsesLisp2020-03-133-0/+138
| |_|_|/ |/| | |
* | | | Merge branch 'master' into shader-purgeRodrigo Locatti2020-03-1311-32/+148
|\ \ \ \ | | |/ / | |/| |
| * | | Merge pull request #3491 from ReinUsesLisp/polygon-modesbunnei2020-03-137-2/+99
| |\ \ \ | | |_|/ | |/| | gl_rasterizer: Implement polygon modes and fill rectangles
| | * | gl_rasterizer: Implement polygon modes and fill rectanglesReinUsesLisp2020-03-107-2/+99
| | | |
| * | | Merge pull request #3483 from namkazt/patch-1Fernando Sahmkow2020-03-131-1/+1
| |\ \ \ | | | | | | | | | | vk_rasterizer: fix mistype on SetupGraphicsImages
| | * | | vk_reasterizer: fix mistype on SetupGraphicsImagesNguyen Dac Nam2020-03-081-1/+1
| | | | | | | | | | | | | | | This should use Maxwell3D engine. Fixed some GPU error on Kirby and maybe other games.
| * | | | Merge pull request #3480 from ReinUsesLisp/vk-disabled-uboFernando Sahmkow2020-03-132-1/+9
| |\ \ \ \ | | |_|_|/ | |/| | | vk_rasterizer: Support disabled uniform buffers
| | * | | vk_rasterizer: Support disabled uniform buffersReinUsesLisp2020-03-062-1/+9
| | | | |
| * | | | gl_shader_manager: Fix interaction between graphics and computeReinUsesLisp2020-03-114-29/+39
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | After a compute shader was set to the pipeline, no graphics shader was invoked again. To address this use glUseProgram to bind compute shaders (without state tracking) and call glUseProgram(0) when transitioning out of it back to the graphics pipeline.
* | | | gl_shader_decompiler: Initialize gl_Position on vertex shadersReinUsesLisp2020-03-131-0/+4
| | | |
* | | | gl_shader_decompiler: Add missing {} on smem GLSL emissionReinUsesLisp2020-03-131-1/+1
| | | |
* | | | gl_shader_decompiler: Fix regression in render target declarationsReinUsesLisp2020-03-121-12/+2
| | | | | | | | | | | | | | | | | | | | A previous commit introduced a way to declare as few render targets as possible. Turns out this introduced a regression in some games.
* | | | engines/maxwell_3d: Add TFB registers and store them in shader registryReinUsesLisp2020-03-094-6/+45
| | | |
* | | | shader/registry: Address feedbackReinUsesLisp2020-03-093-13/+18
| | | |
* | | | gl_shader_decompiler: Add identifier to decompiled codeReinUsesLisp2020-03-093-8/+16
| | | |
* | | | gl_shader_decompiler: Roll back to GLSL core 430ReinUsesLisp2020-03-091-1/+1
| | | | | | | | | | | | | | | | RenderDoc won't build shaders if we use GLSL compatibility.
* | | | const_buffer_engine_interface: Store component typesReinUsesLisp2020-03-094-46/+27
| | | | | | | | | | | | | | | | | | | | This is required for Vulkan. Sampling integer textures with float handles is illegal.
* | | | yuzu/loading_screen: Remove unused shader progress modeReinUsesLisp2020-03-091-1/+0
| | | |
* | | | gl_shader_cache: Reduce registry consistency to debug assertReinUsesLisp2020-03-091-3/+1
| | | | | | | | | | | | | | | | | | | | Registry consistency is something that practically can't happen and it has a measurable runtime cost. Reduce it to a DEBUG_ASSERT.
* | | | shader/registry: Cache tessellation stateReinUsesLisp2020-03-093-3/+10
| | | |
* | | | shader/registry: Store graphics and compute metadataReinUsesLisp2020-03-098-75/+176
| | | | | | | | | | | | | | | | | | | | Store information GLSL forces us to provide but it's dynamic state in hardware (workgroup sizes, primitive topology, shared memory size).
* | | | video_core: Rename "const buffer locker" to "registry"ReinUsesLisp2020-03-0915-93/+98
| | | |
* | | | gl_shader_cache: Rework shader cache and remove post-specializationsReinUsesLisp2020-03-0917-1092/+544
|/ / / | | | | | | | | | | | | Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it.
* | | Merge pull request #3301 from ReinUsesLisp/state-trackerRodrigo Locatti2020-03-0948-1889/+1563
|\ \ \ | | | | | | | | video_core: Remove gl_state and use a state tracker based on dirty flags
| * | | video_core/dirty_flags: Address feedbackReinUsesLisp2020-02-281-4/+4
| | | |
| * | | renderer_opengl: Fix edge-case where alpha testing might cull presentationReinUsesLisp2020-02-282-0/+7
| | | |
| * | | gl_texture_cache: Remove blending disable on blitsReinUsesLisp2020-02-281-5/+0
| | | | | | | | | | | | | | | | | | | | Blending doesn't affect blits. Rasterizer discard does, update the commentaries.
| * | | gl_rasterizer: Don't disable blending on clearsReinUsesLisp2020-02-281-4/+0
| | | | | | | | | | | | | | | | Blending doesn't affect clears.
| * | | dirty_flags: Deduplicate code between OpenGL and VulkanReinUsesLisp2020-02-285-77/+73
| | | |
| * | | vk_rasterizer: Pass Maxwell registers to dynamic updatesReinUsesLisp2020-02-282-26/+21
| | | |
| * | | state_tracker: Remove type traits with named structuresReinUsesLisp2020-02-284-18/+22
| | | |
| * | | vk_state_tracker: Implement dirty flags for stencil propertiesReinUsesLisp2020-02-283-0/+21
| | | |
| * | | vk_state_tracker: Implement dirty flags for depth boundsReinUsesLisp2020-02-283-0/+14
| | | |
| * | | vk_state_tracker: Implement dirty flags for blend constantsReinUsesLisp2020-02-283-0/+14
| | | |
| * | | vk_state_tracker: Implement dirty flags for depth biasReinUsesLisp2020-02-283-0/+17
| | | |
| * | | vk_state_tracker: Implement dirty flags for scissorsReinUsesLisp2020-02-283-0/+14
| | | |
| * | | vk_state_tracker: Initial implementationReinUsesLisp2020-02-2810-52/+198
| | | | | | | | | | | | | | | | Add support for render targets and viewports.
| * | | gl_rasterizer: Remove num vertex buffers magic numberReinUsesLisp2020-02-281-2/+4
| | | |
| * | | gl_rasterizer: Only apply polygon offset clamp if enabledReinUsesLisp2020-02-281-3/+6
| | | |
| * | | gl_state_tracker: Implement dirty flags for depth clamp enablingReinUsesLisp2020-02-283-3/+15
| | | |
| * | | gl_rasterizer: Disable scissor 0 when scissor is not used on clearReinUsesLisp2020-02-281-0/+3
| | | |
| * | | gl_rasterizer: Notify depth mask changes on clearReinUsesLisp2020-02-282-1/+6
| | | |
| * | | gl_rasterizer: Minor sort changes to clearingReinUsesLisp2020-02-281-11/+9
| | | |
| * | | maxwell_3d: Use two tables instead of three for dirty flagsReinUsesLisp2020-02-281-1/+1
| | | |
| * | | gl_state_tracker: Track state of index buffersReinUsesLisp2020-02-284-5/+23
| | | |
| * | | gl_state_tracker: Implement dirty flags for clip controlReinUsesLisp2020-02-285-15/+31
| | | |
| * | | gl_state_tracker: Implement dirty flags for point sizesReinUsesLisp2020-02-283-4/+25
| | | |
| * | | gl_state_tracker: Implement dirty flags for fragment color clampReinUsesLisp2020-02-283-2/+14
| | | |
| * | | gl_state_tracker: Implement dirty flags for logic opReinUsesLisp2020-02-284-2/+22
| | | |
| * | | gl_state_tracker: Implement dirty flags for sRGBReinUsesLisp2020-02-285-2/+21
| | | |
| * | | gl_state_tracker: Implement dirty flags for rasterize enableReinUsesLisp2020-02-285-2/+21
| | | |
| * | | gl_state_tracker: Implement dirty flags for multisampleReinUsesLisp2020-02-283-0/+13
| | | |
| * | | gl_state_tracker: Implement dirty flags for alpha testingReinUsesLisp2020-02-284-6/+24
| | | |
| * | | gl_state_tracker: Implement dirty flags for polygon offsetsReinUsesLisp2020-02-284-2/+24
| | | |
| * | | gl_state_tracker: Implement dirty flags for primitive restartReinUsesLisp2020-02-283-5/+19
| | | |
| * | | gl_state_tracker: Implement dirty flags for stencil testingReinUsesLisp2020-02-284-3/+29
| | | |
| * | | gl_state_tracker: Implement depth dirty flagsReinUsesLisp2020-02-284-6/+31
| | | |
| * | | gl_state_tracker: Implement dirty flags for front face and cullingReinUsesLisp2020-02-284-7/+38
| | | |
| * | | gl_state_tracker: Implement dirty flags for blendingReinUsesLisp2020-02-285-14/+67
| | | |
| * | | gl_state_tracker: Implement dirty flags for clip distances and shadersReinUsesLisp2020-02-287-14/+43
| | | |
| * | | gl_state_tracker: Add dirty flags for buffers and divisorsReinUsesLisp2020-02-284-22/+56
| | | |
| * | | maxwell_3d: Change write dirty flags to a bitsetReinUsesLisp2020-02-283-16/+16
| | | |
| * | | gl_state_tracker: Implement dirty flags for vertex formatsReinUsesLisp2020-02-284-9/+44
| | | |
| * | | gl_state_tracker: Implement dirty flags for color masksReinUsesLisp2020-02-284-9/+53
| | | |
| * | | gl_state_tracker: Implement dirty flags for scissorsReinUsesLisp2020-02-285-10/+58
| | | |
| * | | gl_state_tracker: Implement dirty flags for viewportsReinUsesLisp2020-02-284-9/+54
| | | |
| * | | renderer_opengl: Reintroduce dirty flags for render targetsReinUsesLisp2020-02-289-13/+195
| | | |
| * | | maxwell_3d: Flatten cull and front face registersReinUsesLisp2020-02-288-50/+47
| | | |
| * | | video_core: Reintroduce dirty flags infrastructureReinUsesLisp2020-02-289-1/+71
| | | |
| * | | gl_state: Remove completelyReinUsesLisp2020-02-2813-152/+4
| | | |
| * | | gl_state: Remove program trackingReinUsesLisp2020-02-289-94/+62
| | | |
| * | | gl_state: Remove framebuffer trackingReinUsesLisp2020-02-287-82/+23
| | | |
| * | | gl_state: Remove image trackingReinUsesLisp2020-02-285-24/+12
| | | |
| * | | gl_state: Remove texture and sampler trackingReinUsesLisp2020-02-285-60/+8
| | | |
| * | | gl_state: Remove blend state trackingReinUsesLisp2020-02-285-104/+28
| | | |
| * | | gl_state: Remove stencil test trackingReinUsesLisp2020-02-284-92/+18
| | | |
| * | | gl_state: Remove clip control trackingReinUsesLisp2020-02-285-19/+8
| | | |
| * | | gl_state: Remove clip distances trackingReinUsesLisp2020-02-284-29/+3
| | | |
| * | | gl_state: Remove rasterizer disable trackingReinUsesLisp2020-02-286-13/+8
| | | |
| * | | gl_state: Remove viewport and depth range trackingReinUsesLisp2020-02-287-101/+39
| | | |
| * | | gl_state: Remove scissor test trackingReinUsesLisp2020-02-286-69/+12
| | | |
| * | | gl_state: Remove color mask trackingReinUsesLisp2020-02-284-40/+12
| | | |
| * | | gl_state: Remove clamp framebuffer color trackingReinUsesLisp2020-02-283-17/+6
| | | | | | | | | | | | | | | | | | | | This commit doesn't reset it for screen draws because clamping doesn't change anything there.
| * | | gl_state: Remove multisample trackingReinUsesLisp2020-02-283-16/+2
| | | |
| * | | gl_state: Remove framebuffer sRGB trackingReinUsesLisp2020-02-286-21/+25
| | | |
| * | | gl_state: Remove VAO cache and trackingReinUsesLisp2020-02-2810-153/+53
| | | |
| * | | gl_state: Remove depth clamp trackingReinUsesLisp2020-02-284-25/+13
| | | |
| * | | gl_state: Remove depth trackingReinUsesLisp2020-02-284-34/+7
| | | |
| * | | gl_state: Remove primitive restart trackingReinUsesLisp2020-02-283-18/+2
| | | |
| * | | gl_state: Remove logic op trackerReinUsesLisp2020-02-284-24/+5
| | | |
| * | | gl_state: Remove blend color trackingReinUsesLisp2020-02-283-18/+1
| | | |
| * | | gl_state: Remove polygon offset trackingReinUsesLisp2020-02-284-39/+7
| | | |
| * | | gl_state: Remove alpha test trackingReinUsesLisp2020-02-284-21/+4
| | | |
| * | | gl_state: Remove cull mode trackingReinUsesLisp2020-02-284-19/+4
| | | |
| * | | gl_state: Remove front face trackingReinUsesLisp2020-02-284-6/+5
| | | |
| * | | gl_state: Remove point size trackingReinUsesLisp2020-02-283-22/+4
| | | |
| * | | gl_rasterizer: Add oglEnablei helperReinUsesLisp2020-02-281-0/+4
| | | |
| * | | gl_rasterizer: Add OpenGL enable/disable helperReinUsesLisp2020-02-281-0/+4
| | | |
| * | | gl_rasterizer: Remove dirty flagsReinUsesLisp2020-02-2818-457/+7
| | | |
* | | | textures: Fix anisotropy hackReinUsesLisp2020-03-081-14/+16
| | | | | | | | | | | | | | | | Previous code could generate an anisotropy value way higher than x16.
* | | | Merge pull request #3452 from Morph1984/anisotropic-filteringbunnei2020-03-082-2/+24
|\ \ \ \ | |_|_|/ |/| | | frontend/Graphics: Add "Advanced" graphics tab and experimental Anisotropic Filtering support
| * | | Create an "Advanced" tab in the graphics configuration tab and add anisotropic filtering levels.Morph2020-02-282-2/+24
| | | |
* | | | Merge pull request #3481 from ReinUsesLisp/abgr5-storagebunnei2020-03-081-1/+1
|\ \ \ \ | | | | | | | | | | maxwell_to_vk: Remove Storage capability for A1B5G5R5U
| * | | | maxwell_to_vk: Remove Storage capability for A1B5G5R5UReinUsesLisp2020-03-061-1/+1
| | |_|/ | |/| |
* | | | Merge pull request #3463 from ReinUsesLisp/vk-toctoubunnei2020-03-061-9/+12
|\ \ \ \ | |/ / / |/| | | vk_swapchain: Silence TOCTOU race condition
| * | | vk_swapchain: Silence TOCTOU race conditionReinUsesLisp2020-02-261-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible that the window is resized from the moment we ask for its size to the moment a swapchain is created, causing validation issues. To workaround this Vulkan issue request the capabilities again just before creating the swapchain, making the race condition less likely.
* | | | Merge pull request #3451 from ReinUsesLisp/indexed-texturesbunnei2020-03-058-74/+107
|\ \ \ \ | | | | | | | | | | vk_shader_decompiler: Implement indexed textures
| * | | | vk_shader_decompiler: Implement indexed texturesReinUsesLisp2020-02-246-54/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement accessing textures through an index. It uses the same interface as OpenGL, the main difference is that Vulkan bindings are forced to be arrayed (the binding index doesn't change for stacked textures in SPIR-V).
| * | | | shader: Simplify indexed sampler usagesReinUsesLisp2020-02-242-20/+8
| | | | |
* | | | | Merge pull request #3469 from namkazt/patch-1bunnei2020-03-051-6/+14
|\ \ \ \ \ | | | | | | | | | | | | shader_decode: Fix LD, LDG when track constant buffer
| * | | | | nit: move comment to right place.Nguyen Dac Nam2020-02-291-2/+2
| | | | | |
| * | | | | shader_decode: Fix LD, LDG when track constant bufferNguyen Dac Nam2020-02-281-4/+12
| | |_|/ / | |/| | |
* | | | | Merge pull request #3455 from ReinUsesLisp/attr-scaledbunnei2020-03-043-4/+40
|\ \ \ \ \ | |_|_|_|/ |/| | | | video_core: Implement more scaled attribute formats
| * | | | video_core: Implement more scaler attribute formatsReinUsesLisp2020-02-243-4/+40
| | |/ / | |/| | | | | | | | | | | | | | While changing this, fix assert in vk_shader_decompiler. We now know scaled formats are expected to be float in shaders attributes.
* | | | renderer_opengl: Fix SRGB presentation frame tracking.bunnei2020-02-282-5/+2
| |/ / |/| | | | | | | | - Fixes SRGB in Super Smash Bros. Ultimate.
* | | Merge pull request #3430 from bunnei/split-presenterbunnei2020-02-2810-47/+353
|\ \ \ | | | | | | | | Port citra-emu/citra#4940: "Split Presentation thread from Render thread"
| * | | renderer_opengl: Reduce swap chain size to 3.bunnei2020-02-281-3/+2
| | | |
| * | | renderer_opengl: Use more concise lock syntax.bunnei2020-02-271-4/+4
| | | |
| * | | renderer_opengl: Move Frame/FrameMailbox to OpenGL namespace.bunnei2020-02-272-36/+42
| | | |
| * | | renderer_opengl: Create gl_framebuffer_data if empty.bunnei2020-02-261-1/+2
| | | |
| * | | frontend: qt: bootmanager: Vulkan: Restore support for VK backend.bunnei2020-02-262-9/+14
| | | |
| * | | core: frontend: Refactor scope_acquire_window_context to scope_acquire_context.bunnei2020-02-261-2/+2
| | | |
| * | | renderer_opengl: Add texture mailbox support for presenter thread.bunnei2020-02-263-35/+268
| | | |
| * | | renderer_opengl: Add OGLRenderbuffer to resource/state management.bunnei2020-02-264-0/+62
| | |/ | |/|
* | | shader: FMUL switch to using LUT (#3441)Nguyen Dac Nam2020-02-271-19/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * shader: add FmulPostFactor LUT table * shader: FMUL apply LUT * Update src/video_core/engines/shader_bytecode.h Co-Authored-By: Mat M. <mathew1800@gmail.com> * nit: mistype * clang-format & add missing import * shader: remove post factor LUT. * shader: move post factor LUT to function and fix incorrect order. * clang-format * shader: FMUL: add static to post factor LUT * nit: typo Co-authored-by: Mat M. <mathew1800@gmail.com>
* | | Merge pull request #3440 from namkazt/patch-6bunnei2020-02-261-36/+58
|\ \ \ | |/ / |/| | shader: implement LOP3 fast replace for old function
| * | nit: add const to where it need.Nguyen Dac Nam2020-02-211-14/+14
| | |
| * | shader: implement LOP3 fast replace for old functionNguyen Dac Nam2020-02-211-36/+58
| | | | | | | | | ref: https://devtalk.nvidia.com/default/topic/1070081/cuda-programming-and-performance/reverse-lut-for-lop3-lut/
* | | Merge pull request #3461 from ReinUsesLisp/r32i-rtMat M2020-02-252-0/+3
|\ \ \ | | | | | | | | video_core/surface: Add R32_SINT render target format
| * | | video_core/surface: Add R32_SINT render target formatReinUsesLisp2020-02-252-0/+3
| | | |
* | | | Merge pull request #3460 from ReinUsesLisp/unused-format-getterMat M2020-02-252-71/+0
|\ \ \ \ | |/ / / |/| | | video_core/gpu: Remove unused functions
| * | | video_core/gpu: Remove unused functionsReinUsesLisp2020-02-252-71/+0
| | | |
* | | | Merge pull request #3417 from ReinUsesLisp/r32ibunnei2020-02-256-34/+46
|\ \ \ \ | |/ / / |/| | | texture: Implement R32I
| * | | texture: Implement R32IReinUsesLisp2020-02-156-34/+46
| | | |
* | | | Merge pull request #3425 from ReinUsesLisp/layered-framebufferbunnei2020-02-248-51/+74
|\ \ \ \ | |_|_|/ |/| | | texture_cache: Implement layered framebuffer attachments
| * | | texture_cache: Implement layered framebuffer attachmentsReinUsesLisp2020-02-168-51/+74
| |/ / | | | | | | | | | | | | | | | Layered framebuffer attachments is a feature that allows applications to write attach layered textures to a single attachment. What layer the fragments are written to is decided from the shader using gl_Layer.
* | | Merge pull request #3424 from ReinUsesLisp/spirv-layerbunnei2020-02-231-6/+30
|\ \ \ | | | | | | | | vk_shader_decompiler: Implement Layer output attribute
| * | | vk_shader_decompiler: Implement Layer output attributeReinUsesLisp2020-02-161-6/+30
| |/ / | | | | | | | | | | | | | | | SPIR-V's Layer is GLSL's gl_Layer. It lets the application choose from a shader stage (vertex, tessellation or geometry) which framebuffer layer write the output fragments to.
* | | Merge pull request #3422 from ReinUsesLisp/buffer-flushbunnei2020-02-232-0/+11
|\ \ \ | | | | | | | | surface_base: Implement texture buffer flushes
| * | | surface_base: Implement texture buffer flushesReinUsesLisp2020-02-162-0/+11
| |/ / | | | | | | | | | | | | Implement downloads to guest memory from texture buffers on the generic cache and OpenGL.
* | | shader/texture: Fix illegal 3D texture assertReinUsesLisp2020-02-211-1/+1
| | | | | | | | | | | | | | | Fix typo in the illegal 3D texture assert logic. We care about catching arrayed 3D textures or 3D shadow textures, not regular 3D textures.
* | | Merge pull request #3433 from namkazt/patch-1Rodrigo Locatti2020-02-211-3/+8
|\ \ \ | | | | | | | | renderer_vulkan: Add the rest of case for TryConvertBorderColor
| * | | fixups mistake auto commit.Nguyen Dac Nam2020-02-181-9/+0
| | | |
| * | | Update code structureNguyen Dac Nam2020-02-181-0/+7
| | | | | | | | | | | | Co-Authored-By: Mat M. <mathew1800@gmail.com>
| * | | renderer_vulkan: Add the rest of case for TryConvertBorderColorNguyen Dac Nam2020-02-181-3/+10
| | | |
* | | | Merge pull request #3434 from namkazt/patch-2Rodrigo Locatti2020-02-213-2/+25
|\ \ \ \ | | | | | | | | | | vk_shader: Implement ImageLoad
| * | | | vk_device: remove left over from other branchNguyen Dac Nam2020-02-211-1/+0
| | | | |
| * | | | clang-formatNguyen Dac Nam2020-02-201-1/+1
| | | | |
| * | | | shader_decompiler: only add StorageImageReadWithoutFormat when availableNguyen Dac Nam2020-02-201-1/+4
| | | | |
| * | | | shader_decompiler: add check in case of device not support ShaderStorageImageReadWithoutFormatNguyen Dac Nam2020-02-191-0/+4
| | | | |
| * | | | vk_device: setup shaderStorageImageReadWithoutFormatNguyen Dac Nam2020-02-191-0/+5
| | | | |
| * | | | vk_device: add check for shaderStorageImageReadWithoutFormatNguyen Dac Nam2020-02-191-0/+7
| | | | |
| * | | | vk_shader: add Capability StorageImageReadWithoutFormatNguyen Dac Nam2020-02-191-0/+1
| | | | |
| * | | | vk_shader: Implement function ImageLoad (Used by Kirby Start Allies)Nguyen Dac Nam2020-02-191-2/+6
| |/ / / | | | | | | | | | | | | Please enter the commit message for your changes. Lines starting
* | | | Merge pull request #3435 from namkazt/patch-3Rodrigo Locatti2020-02-212-1/+4
|\ \ \ \ | | | | | | | | | | vulkan: add DXT23_SRGB
| * | | | add vertex UnsignedInt size RGBANguyen Dac Nam2020-02-181-0/+2
| | | | |
| * | | | add eBc2SrgbBlock to formatsNguyen Dac Nam2020-02-181-0/+1
| | | | |
| * | | | vulkan: add DXT23_SRGBNguyen Dac Nam2020-02-181-1/+1
| |/ / /
* | | | Merge pull request #3423 from ReinUsesLisp/no-match-3dbunnei2020-02-211-8/+11
|\ \ \ \ | |_|_|/ |/| | | texture_cache: Avoid matches in 3D textures
| * | | texture_cache: Avoid matches in 3D texturesReinUsesLisp2020-02-161-8/+11
| | |/ | |/| | | | | | | | | | Code before this commit was trying to match 3D textures with another target. Fix that.
* | | Merge pull request #3438 from bunnei/gpu-mem-manager-fixbunnei2020-02-211-1/+10
|\ \ \ | | | | | | | | video_core: memory_manager: Flush/invalidate asynchronously when possible.
| * | | video_core: memory_manager: Flush/invalidate asynchronously on Unmap.bunnei2020-02-201-1/+10
| | | | | | | | | | | | | | | | - Minor perf improvement.
* | | | Merge pull request #3415 from ReinUsesLisp/texture-codebunnei2020-02-201-43/+28
|\ \ \ \ | | | | | | | | | | shader/texture: Allow 2D shadow arrays and simplify code
| * | | | shader/texture: Allow 2D shadow arrays and simplify codeReinUsesLisp2020-02-151-43/+28
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Shadow sampler 2D arrays are supported on OpenGL, so there's no reason to forbid these. Enable textureLod usage on these. Minor style changes.
* | | | Merge pull request #3414 from ReinUsesLisp/maxwell-3d-drawbunnei2020-02-196-36/+6
|\ \ \ \ | | | | | | | | | | maxwell_3d: Unify draw methods
| * | | | maxwell_3d: Unify draw methodsReinUsesLisp2020-02-146-36/+6
| |/ / / | | | | | | | | | | | | | | | | Pass instanced state of a draw invocation as an argument instead of having two separate virtual methods.
* | | | Merge pull request #3411 from ReinUsesLisp/specific-funcsbunnei2020-02-191-8/+28
|\ \ \ \ | | | | | | | | | | gl_rasterizer: Use the least generic OpenGL draw function possible
| * | | | gl_rasterizer: Use the least generic OpenGL draw function possibleReinUsesLisp2020-02-141-8/+28
| | | | | | | | | | | | | | | | | | | | This may help some implementations.
* | | | | shader_conversion: I2F : add Assert for case src_size is ShortNguyen Dac Nam2020-02-191-0/+3
| | | | |
* | | | | fix warningNguyen Dac Nam2020-02-191-1/+1
| | | | |
* | | | | clang-format fixNguyen Dac Nam2020-02-191-1/+1
| | | | |
* | | | | shader_conversion: add conversion I2F for ShortNguyen Dac Nam2020-02-191-9/+6
| |_|/ / |/| | |
* | | | Merge pull request #3410 from ReinUsesLisp/vk-draw-indexbunnei2020-02-191-4/+13
|\ \ \ \ | | | | | | | | | | vk_shader_decompiler: Fix vertex id and instance id
| * | | | vk_shader_decompiler: Fix vertex id and instance idReinUsesLisp2020-02-141-4/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vulkan's VertexIndex and InstanceIndex don't match with hardware. This is because Nvidia implements gl_VertexID and gl_InstanceID. The math that relates these is: gl_VertexIndex = gl_BaseVertex + gl_VertexID gl_InstanceIndex = gl_InstanceIndex + gl_InstanceID To emulate it using what Vulkan's SPIR-V offers (the *Index variants) this commit substracts gl_Base* from gl_*Index to obtain the OpenGL and hardware's equivalent.
* | | | Merge pull request #3409 from ReinUsesLisp/host-queriesFernando Sahmkow2020-02-1818-51/+1043
|\ \ \ \ | |_|_|/ |/| | | query_cache: Implement a query cache and query 21 (samples passed)
| * | | query_cache: Address feedbackReinUsesLisp2020-02-142-16/+18
| | | |
| * | | query_cache: Fix ambiguity in CacheAddr getterReinUsesLisp2020-02-141-4/+5
| | | |
| * | | query_cache: Add a recursive mutex for concurrent usageReinUsesLisp2020-02-141-0/+6
| | | |
| * | | vk_query_cache: Implement generic query cache on VulkanReinUsesLisp2020-02-1411-20/+327
| | | |
| * | | query_cache: Abstract OpenGL implementationReinUsesLisp2020-02-144-339/+394
| | | | | | | | | | | | | | | | | | | | | | | | Abstract the current OpenGL implementation into the VideoCommon namespace and reimplement it on top of that. Doing this avoids repeating code and logic in the Vulkan implementation.
| * | | gl_query_cache: Optimize query cacheReinUsesLisp2020-02-146-79/+217
| | | | | | | | | | | | | | | | Use a custom cache instead of relying on a ranged cache.
| * | | gl_query_cache: Implement host queries using a deferred cacheReinUsesLisp2020-02-147-86/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of waiting immediately for executed commands, defer the query until the guest CPU reads it. This way we get closer to what the guest program is doing. To archive this we have to build a dependency queue, because host APIs (like OpenGL and Vulkan) use ranged queries instead of counters like NVN. Waiting for queries implicitly uses fences and this requires a command being queued, otherwise the driver will lock waiting until a timeout. To fix this when there are no commands queued, we explicitly call glFlush.
| * | | gl_rasterizer: Sort method declarationsReinUsesLisp2020-02-141-16/+15
| | | |
| * | | gl_rasterizer: Add queued commands counterReinUsesLisp2020-02-142-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Keep track of the queued OpenGL commands that can signal a fence if waited on. As a side effect, we avoid calls to glFlush when no commands are queued.
| * | | maxwell_3d: Slow implementation of passed samples (query 21)ReinUsesLisp2020-02-148-17/+201
| | | | | | | | | | | | | | | | Implements GL_SAMPLES_PASSED by waiting immediately for queries.
| * | | gl_resource_manager: Add managed query classReinUsesLisp2020-02-142-0/+42
| | | |
* | | | Revert "video_core: memory_manager: Use GPU interface for cache functions."bunnei2020-02-153-9/+14
| |_|/ |/| |
* | | Merge pull request #3379 from ReinUsesLisp/cbuf-offsetbunnei2020-02-143-5/+5
|\ \ \ | |/ / |/| | shader/decode: Fix constant buffer offsets
| * | shader/decode: Fix constant buffer offsetsReinUsesLisp2020-02-053-5/+5
| | | | | | | | | | | | | | | | | | Some instances were using cbuf34.offset instead of cbuf34.GetOffset(). This returned the an invalid offset. Address those instances and rename offset to "shifted_offset" to avoid future bugs.
* | | Merge pull request #3395 from FernandoS27/queriesbunnei2020-02-144-52/+73
|\ \ \ | |_|/ |/| | GPU: Refactor queries implementation and correct GPU Clock.
| * | GPU: Address Feedback.Fernando Sahmkow2020-02-132-11/+10
| | |
| * | GPU: Implement GPU Clock correctly.Fernando Sahmkow2020-02-103-2/+17
| | |
| * | Maxwell3D: Correct query reporting.Fernando Sahmkow2020-02-102-51/+58
| | |
* | | Merge pull request #3376 from ReinUsesLisp/point-spritebunnei2020-02-114-1/+9
|\ \ \ | |/ / |/| | gl_rasterizer: Implement GL_POINT_SPRITE
| * | gl_rasterizer: Implement GL_POINT_SPRITEReinUsesLisp2020-02-044-1/+9
| | | | | | | | | | | | | | | | | | OpenGL core defaults to GL_POINT_SPRITE, meanwhile on OpenGL compatibility we have to explicitly enable it. This fixes gl_PointCoord's behaviour.
* | | Merge pull request #3372 from ReinUsesLisp/fix-back-stencilbunnei2020-02-101-3/+3
|\ \ \ | | | | | | | | maxwell_3d: Fix stencil back mask
| * | | maxwell_3d: Fix stencil back maskReinUsesLisp2020-02-021-3/+3
| | | |
* | | | Merge pull request #3387 from bunnei/gpu-mpscqueuebunnei2020-02-091-1/+1
|\ \ \ \ | | | | | | | | | | gpu_thread: Use MPSCQueue for GPU commands.
| * | | | gpu_thread: Use MPSCQueue for GPU commands.bunnei2020-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | - Necessary for multiple service threads.
* | | | | video_core: memory_manager: Use GPU interface for cache functions.bunnei2020-02-083-14/+9
|/ / / /
* | | | Merge pull request #3378 from ReinUsesLisp/uscaledbunnei2020-02-081-8/+12
|\ \ \ \ | | | | | | | | | | maxwell_to_gl: Implement R8G8_USCALED
| * | | | maxwell_to_gl: Implement R8G8_USCALEDReinUsesLisp2020-02-051-0/+8
| | | | |
| * | | | maxwell_to_gl: Reduce unimplemented formats to LOG_ERRORReinUsesLisp2020-02-051-8/+4
| | |_|/ | |/| |
* | | | Merge pull request #3369 from ReinUsesLisp/shfbunnei2020-02-082-11/+122
|\ \ \ \ | | | | | | | | | | shader/shift: Implement SHF
| * | | | shader/shift: Implement SHIFT_RIGHT_{IMM,R}ReinUsesLisp2020-02-021-26/+58
| | | | | | | | | | | | | | | | | | | | Shifts a pair of registers to the right and returns the low register.
| * | | | shader/shift: Implement SHF_LEFT_{IMM,R}ReinUsesLisp2020-02-022-10/+89
| | | | | | | | | | | | | | | | | | | | Shifts a pair of registers to the left and returns the high register.
* | | | | Merge pull request #3362 from ReinUsesLisp/fix-instancedbunnei2020-02-072-106/+28
|\ \ \ \ \ | |_|/ / / |/| | | | gl_rasterizer: Fix instanced draw arrays
| * | | | gl_rasterizer: Fix instanced draw arraysReinUsesLisp2020-01-302-106/+28
| |/ / / | | | | | | | | | | | | | | | | | | | | glDrawArrays was being used when the draw had a base instance specified. This commit removes the draw parameters abstraction and fixes the mentioned issue.
* | | | vk_rasterizer: Use noexcept variants of std::bitsetReinUsesLisp2020-02-041-4/+5
| | | | | | | | | | | | | | | | Removes bounds checking from "texceptions" instances.
* | | | Merge pull request #3357 from ReinUsesLisp/bfi-rcbunnei2020-02-042-2/+7
|\ \ \ \ | |_|_|/ |/| | | shader/bfi: Implement register-constant buffer variant
| * | | shader/bfi: Implement register-constant buffer variantReinUsesLisp2020-01-272-2/+7
| | | | | | | | | | | | | | | | | | | | It's the same as the variant that was implemented, but it takes the operands from another source.
* | | | Merge pull request #3356 from ReinUsesLisp/fcmpbunnei2020-02-042-1/+17
|\ \ \ \ | | | | | | | | | | shader/arithmetic: Implement FCMP
| * | | | shader/arithmetic: Implement FCMPReinUsesLisp2020-01-272-1/+17
| |/ / / | | | | | | | | | | | | | | | | Compares the third operand with zero, then selects between the first and second.
* | | | Merge pull request #3337 from ReinUsesLisp/vulkan-stagedbunnei2020-02-036-7/+294
|\ \ \ \ | | | | | | | | | | yuzu: Implement Vulkan frontend
| * | | | yuzu: Implement Vulkan frontendReinUsesLisp2020-01-293-1/+280
| | | | | | | | | | | | | | | | | | | | | | | | | Adds a Qt and SDL2 frontend for Vulkan. It also finishes the missing bits on Vulkan initialization.
| * | | | settings: Add settings for graphics backendReinUsesLisp2020-01-291-2/+4
| | | | |
| * | | | shader/other: Fix skips for SYNC and BRKReinUsesLisp2020-01-291-2/+2
| | | | |
| * | | | shader/other: Stub S2R LaneIdReinUsesLisp2020-01-291-1/+4
| | | | |
| * | | | buffer_cache: Delay buffer destructionsReinUsesLisp2020-01-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delay buffer destruction some extra frames to avoid destroying buffers that are still being used from older frames. This happens on Nvidia's driver with mailbox.
* | | | | shader: Remove curly braces initializers on shared pointersReinUsesLisp2020-02-025-12/+12
| |_|_|/ |/| | |
* | | | Merge pull request #3282 from FernandoS27/indexed-samplersbunnei2020-02-0224-58/+610
|\ \ \ \ | | | | | | | | | | Partially implement Indexed samplers in general and specific code in GLSL
| * | | | Shader_IR: Address feedback.Fernando Sahmkow2020-01-2510-36/+40
| | | | |
| * | | | Shader_IR: Change name of TrackSampler function so it does not confuse with the type.Fernando Sahmkow2020-01-243-7/+10
| | | | |
| * | | | Shader_IR: Corrections, styling and extras.Fernando Sahmkow2020-01-241-2/+4
| | | | |
| * | | | Shader_IR: Correct Custom Variable assignment.Fernando Sahmkow2020-01-242-0/+4
| | | | |
| * | | | Shader_IR: Propagate bindless index into the GL compiler.Fernando Sahmkow2020-01-245-24/+54
| | | | |
| * | | | Shader_IR: Implement Injectable Custom Variables to the IR.Fernando Sahmkow2020-01-245-1/+70
| | | | |
| * | | | GL Backend: Introduce indexed samplers into the GL backendFernando Sahmkow2020-01-242-10/+39
| | | | |
| * | | | Shader_IR: deduce size of indexed samplersFernando Sahmkow2020-01-244-8/+60
| | | | |
| * | | | Shader_IR: Setup Indexed Samplers on the IRFernando Sahmkow2020-01-241-20/+46
| | | | |
| * | | | Shader_IR: Implement initial code for tracking indexed samplers.Fernando Sahmkow2020-01-244-0/+139
| | | | |
| * | | | Shader_IR: Address FeedbackFernando Sahmkow2020-01-245-35/+37
| | | | |
| * | | | Shader_IR: Allow constant access of guest driver.Fernando Sahmkow2020-01-247-1/+18
| | | | |
| * | | | Shader_IR: Address FeedbackFernando Sahmkow2020-01-244-21/+29
| | | | |
| * | | | Guest_driver: Correct compiling errors in GCC.Fernando Sahmkow2020-01-242-1/+5
| | | | |
| * | | | Shader_IR: Store Bound buffer on Shader UsageFernando Sahmkow2020-01-245-5/+41
| | | | |
| * | | | GPU: Implement guest driver profile and deduce texture handler sizes.Fernando Sahmkow2020-01-2413-0/+127
| | | | |
* | | | | Merge pull request #3347 from ReinUsesLisp/local-membunnei2020-01-301-30/+55
|\ \ \ \ \ | |_|_|_|/ |/| | | | shader/memory: Implement LDL.S16, LDS.S16, STL.S16 and STS.S16
| * | | | shader/memory: Implement STL.S16 and STS.S16ReinUsesLisp2020-01-251-3/+10
| | | | |
| * | | | shader/memory: Implement unaligned LDL.S16 and LDS.S16ReinUsesLisp2020-01-251-5/+3
| | | | |
| * | | | shader/memory: Move unaligned load/store to functionsReinUsesLisp2020-01-251-18/+27
| | | | |
| * | | | shader/memory: Implement LDL.S16 and LDS.S16ReinUsesLisp2020-01-251-12/+23
| | |_|/ | |/| |
* | | | Merge pull request #3350 from ReinUsesLisp/atombunnei2020-01-295-39/+86
|\ \ \ \ | |_|_|/ |/| | | shader/memory: Implement ATOM.ADD
| * | | shader/memory: Implement ATOM.ADDReinUsesLisp2020-01-265-39/+86
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ATOM operates atomically on global memory. For now only add ATOM.ADD since that's what was found in commercial games. This asserts for ATOM.ADD.S32 (handling the others as unimplemented), although ATOM.ADD.U32 shouldn't be any different. This change forces us to change the default type on SPIR-V storage buffers from float to uint. We could also alias the buffers, but it's simpler for now to just use uint. While we are at it, abstract the code to avoid repetition.
* | | Merge pull request #3355 from ReinUsesLisp/break-downbunnei2020-01-291-1/+1
|\ \ \ | | | | | | | | texture_cache/surface_base: Fix layered break down
| * | | texture_cache/surface_base: Fix layered break downReinUsesLisp2020-01-271-1/+1
| |/ / | | | | | | | | | | | | Layered break downs was passing "layer" as a "depth" parameter. This commit addresses that.
* | | Merge pull request #3358 from ReinUsesLisp/implicit-texture-cachebunnei2020-01-291-3/+6
|\ \ \ | | | | | | | | gl_texture_cache: Silence implicit sign cast warnings
| * | | gl_texture_cache: Silence implicit sign cast warningsReinUsesLisp2020-01-281-3/+6
| |/ /
* | | Merge pull request #3359 from ReinUsesLisp/assert-point-sizebunnei2020-01-281-1/+0
|\ \ \ | | | | | | | | gl_shader_decompiler: Remove UNIMPLEMENTED for gl_PointSize
| * | | gl_shader_decompiler: Remove UNIMPLEMENTED for gl_PointSizeReinUsesLisp2020-01-281-1/+0
| |/ / | | | | | | | | | This was implemented by a previous commit and it's no longer required.
* / / gl_texture_cache: Properly implement depth/stencil samplingReinUsesLisp2020-01-271-4/+27
|/ / | | | | | | | | | | This addresses the long standing issue of compatibility vs. core profiles on OpenGL, properly implementing depth vs. stencil sampling depending on the texture swizzle.
* | Merge pull request #3344 from ReinUsesLisp/vk-botwbunnei2020-01-243-19/+16
|\ \ | |/ |/| vk_shader_decompiler: Disable default values on unwritten render targets
| * vk_shader_decompiler: Disable default values on unwritten render targetsReinUsesLisp2020-01-243-19/+16
| | | | | | | | | | | | | | | | | | Some games like The Legend of Zelda: Breath of the Wild assign render targets without writing them from the fragment shader. This generates Vulkan validation errors, so silence these I previously introduced a commit to set "vec4(0, 0, 0, 1)" for these attachments. The problem is that this is not what games expect. This commit reverts that change.
* | Merge pull request #3273 from FernandoS27/txd-arraybunnei2020-01-241-5/+12
|\ \ | | | | | | Shader_IR: Implement TXD Array.
| * | Shader_IR: Implement TXD Array.Fernando Sahmkow2020-01-041-5/+12
| | | | | | | | | | | | | | | This commit extends the compilation of TXD to support array samplers on TXD.
* | | gl_shader_cache: Disable fastmath on NvidiaReinUsesLisp2020-01-211-0/+4
| |/ |/|
* | Merge pull request #3330 from ReinUsesLisp/vk-blit-screenFernando Sahmkow2020-01-215-6/+754
|\ \ | | | | | | vk_blit_screen: Initial implementation
| * | vk_blit_screen: Address feedbackReinUsesLisp2020-01-204-22/+25
| | |
| * | vk_blit_screen: Initial implementationReinUsesLisp2020-01-203-0/+745
| | | | | | | | | | | | | | | This abstraction takes care of presenting accelerated and non-accelerated or "framebuffer" images to the Vulkan swapchain.
* | | Merge pull request #3328 from ReinUsesLisp/vulkan-atomsbunnei2020-01-201-3/+11
|\ \ \ | | | | | | | | vk_shader_decompiler: Implement UAtomicAdd (ATOMS) on SPIR-V
| * | | vk_shader_decompiler: Implement UAtomicAdd (ATOMS) on SPIR-VReinUsesLisp2020-01-191-3/+11
| | | | | | | | | | | | | | | | Also updates sirit to include atomic instructions.
* | | | Merge pull request #3322 from ReinUsesLisp/vk-front-facebunnei2020-01-202-2/+2
|\ \ \ \ | |_|/ / |/| | | vk_graphics_pipeline: Set front facing properly
| * | | vk_graphics_pipeline: Set front facing properlyReinUsesLisp2020-01-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Front face was being forced to a certain value when cull face is disabled. Set a default value on initialization and drop the forcefully set front facing value with culling disabled.
* | | | Merge pull request #3313 from ReinUsesLisp/vk-rasterizerbunnei2020-01-204-1/+1466
|\ \ \ \ | |_|/ / |/| | | vk_rasterizer: Implement Vulkan's rasterizer
| * | | vk_rasterizer: Address feedbackReinUsesLisp2020-01-182-25/+32
| | | |
| * | | vk_rasterizer: Implement Vulkan's rasterizerReinUsesLisp2020-01-173-1/+1386
| | | | | | | | | | | | | | | | | | | | | | | | This abstraction is Vulkan's equivalent to OpenGL's rasterizer. It takes care of joining all parts of the backend and rendering accordingly on demand.
| * | | renderer_vulkan: Add header as placeholderReinUsesLisp2020-01-172-0/+73
| | | |
* | | | Merge pull request #3317 from ReinUsesLisp/gl-decomp-cc-decompFernando Sahmkow2020-01-191-27/+5
|\ \ \ \ | | | | | | | | | | gl_shader_decompiler: Fix decompilation of condition codes
| * | | | gl_shader_decompiler: Fix decompilation of condition codesReinUsesLisp2020-01-181-27/+5
| | |/ / | |/| | | | | | | | | | | | | | Use Visit instead of reimplementing it. Fixes unimplemented negations for condition codes.
* | | | gl_state: Use bool instead of GLbooleanReinUsesLisp2020-01-182-3/+3
| | | | | | | | | | | | | | | | | | | | This fixes template resolution considering GLboolean an integer instead of a bool.
* | | | Merge pull request #3305 from ReinUsesLisp/point-size-programbunnei2020-01-184-2/+13
|\ \ \ \ | | | | | | | | | | gl_state: Implement PROGRAM_POINT_SIZE
| * | | | gl_state: Implement PROGRAM_POINT_SIZEReinUsesLisp2020-01-154-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | For gl_PointSize to have effect we have to activate GL_PROGRAM_POINT_SIZE.
* | | | | Merge pull request #3312 from ReinUsesLisp/atoms-u32bunnei2020-01-185-3/+74
|\ \ \ \ \ | | | | | | | | | | | | shader/memory: Implement ATOMS.ADD.U32
| * | | | | shader/memory: Implement ATOMS.ADD.U32ReinUsesLisp2020-01-165-3/+74
| | | | | |
* | | | | | Merge pull request #3306 from ReinUsesLisp/gl-texturebunnei2020-01-171-9/+7
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | gl_texture_cache: Minor fixes and style changes
| * | | | | gl_texture_cache: Use local variables to simplify DownloadTextureReinUsesLisp2020-01-141-6/+4
| | | | | |
| * | | | | gl_texture_cache: Fix format for RGBX16FReinUsesLisp2020-01-141-1/+1
| | | | | |
| * | | | | gl_texture_cache: Use Snorm internal format for RG8SReinUsesLisp2020-01-141-1/+1
| | | | | |
| * | | | | gl_texture_cache: Use Snorm internal format for ABGR8SReinUsesLisp2020-01-141-1/+1
| | |/ / / | |/| | |
* | | | | Merge pull request #3311 from ReinUsesLisp/z32fx24s8bunnei2020-01-171-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | format_lookup_table: Fix ZF32_X24S8 component types
| * | | | format_lookup_table: Fix ZF32_X24S8 component typesReinUsesLisp2020-01-161-1/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | Component types for ZF32_X24S8 were using UNORM. Drivers will set FLOAT, UINT, UNORM, UNORM; causing a format mismatch. This commit addresses that.
* | | | Merge pull request #3300 from ReinUsesLisp/vk-texture-cachebunnei2020-01-175-5/+724
|\ \ \ \ | |/ / / |/| | | vk_texture_cache: Implement generic texture cache on Vulkan
| * | | vk_texture_cache: Address feedbackReinUsesLisp2020-01-162-22/+8
| | | |
| * | | vk_texture_cache: Fix typo in commentaryRodrigo Locatti2020-01-161-1/+1
| | | | | | | | | | | | Co-Authored-By: MysticExile <30736337+MysticExile@users.noreply.github.com>
| * | | vk_texture_cache: Implement generic texture cache on VulkanReinUsesLisp2020-01-144-1/+733
| | | | | | | | | | | | | | | | | | | | It currently ignores PBO linearizations since these should be dropped as soon as possible on OpenGL.
| * | | texture_cache/surface_params: Make GetNumLayers publicReinUsesLisp2020-01-141-4/+5
| | | |
* | | | Merge pull request #3308 from lioncash/privatebunnei2020-01-161-2/+2
|\ \ \ \ | | | | | | | | | | maxwell_3d: Make dirty_pointers private
| * | | | maxwell_3d: Make dirty_pointers privateLioncash2020-01-161-2/+2
| | |/ / | |/| | | | | | | | | | | | | | This isn't used outside of the class itself, so we can make it private for the time being.
* | | | Merge pull request #3304 from lioncash/fwd-declbunnei2020-01-162-15/+16
|\ \ \ \ | |/ / / |/| | | renderer_opengl/utils: Forward declare private structs
| * | | renderer_opengl/utils: Remove unused header inclusionsLioncash2020-01-151-3/+0
| | | | | | | | | | | | | | | | Nothing from these headers are used, so they can be removed.
| * | | renderer_opengl/utils: Forward declare private structsLioncash2020-01-152-12/+16
| | | | | | | | | | | | | | | | | | | | Keeps the definitions hidden and allows changes to the structs without needing to recompile all users of classes containing said structs.
* | | | Merge pull request #3303 from lioncash/reorderRodrigo Locatti2020-01-141-1/+1
|\ \ \ \ | | | | | | | | | | control_flow: Silence -Wreorder warning for CFGRebuildState
| * | | | control_flow: Silence -Wreorder warning for CFGRebuildStateLioncash2020-01-141-1/+1
| |/ / / | | | | | | | | | | | | | | | | Organizes the initializer list in the same order that the variables would actually be initialized in.
* | | | gl_shader_cache: Remove unused STAGE_RESERVED_UBOS constantLioncash2020-01-141-3/+0
| | | | | | | | | | | | | | | | Given this isn't used, this can be removed entirely.
* | | | gl_shader_cache: std::move entries in CachedShader constructorLioncash2020-01-141-3/+4
| | | | | | | | | | | | | | | | Avoids several reallocations of std::vector instances where applicable.
* | | | gl_shader_cache: Remove unused entries variable in BuildShader()Lioncash2020-01-141-1/+0
|/ / / | | | | | | | | | Eliminates a few unnecessary constructions of std::vectors.
* | | Merge pull request #3287 from ReinUsesLisp/ldg-stg-16bunnei2020-01-142-34/+52
|\ \ \ | | | | | | | | shader_ir/memory: Implement u16 and u8 for STG and LDG
| * | | shader_ir/memory: Implement u16 and u8 for STG and LDGReinUsesLisp2020-01-092-34/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the same technique we used for u8 on LDG, implement u16. In the case of STG, load memory and insert the value we want to set into it with bitfieldInsert. Then set that value.
* | | | Merge pull request #3288 from ReinUsesLisp/uncurse-aoffibunnei2020-01-141-10/+6
|\ \ \ \ | | | | | | | | | | shader_ir/texture: Simplify AOFFI code
| * | | | shader_ir/texture: Simplify AOFFI codeReinUsesLisp2020-01-091-10/+6
| |/ / /
* | | | Merge pull request #3290 from ReinUsesLisp/gl-clampbunnei2020-01-143-6/+11
|\ \ \ \ | |_|/ / |/| | | maxwell_to_vk: Implement GL_CLAMP hacking Nvidia's driver
| * | | maxwell_to_vk: Implement GL_CLAMP hacking Nvidia's driverReinUsesLisp2020-01-103-6/+11
| |/ / | | | | | | | | | | | | | | | Nvidia's driver defaults invalid enumerations to GL_CLAMP. Vulkan doesn't expose GL_CLAMP through its API, but we can hack it on Nvidia's driver using the internal driver defaults.
* | | vk_compute_pass: Address feedbackRodrigo Locatti2020-01-111-0/+2
| | | | | | | | | Comment hardcoded SPIR-V modules.
* | | vk_compute_pass: Add compute passes to emulate missing Vulkan featuresReinUsesLisp2020-01-083-0/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This currently only supports quad arrays and u8 indices. In the future we can remove quad arrays with a table written from the CPU, but this was used to bootstrap the other passes helpers and it was left in the code. The blob code is generated from the "shaders/" directory. Read the instructions there to know how to generate the SPIR-V.
* | | vk_shader_util: Add helper to build SPIR-V shadersReinUsesLisp2020-01-083-0/+53
|/ /
* | vk_pipeline_cache: Initial implementationReinUsesLisp2020-01-072-1/+460
| | | | | | | | | | Given a pipeline key, this cache returns a pipeline abstraction (for graphics or compute).
* | vk_graphics_pipeline: Initial implementationReinUsesLisp2020-01-074-0/+395
| | | | | | | | | | | | | | | | | | This abstractio represents the state of the 3D engine at a given draw. Instead of changing individual bits of the pipeline how it's done in APIs like D3D11, OpenGL and NVN; on Vulkan we are forced to put everything together into a single, immutable object. It takes advantage of the few dynamic states Vulkan offers.
* | vk_compute_pipeline: Initial implementationReinUsesLisp2020-01-074-0/+219
| | | | | | | | This abstraction represents a Vulkan compute pipeline.
* | vk_pipeline_cache: Add file and define descriptor update template fillerReinUsesLisp2020-01-073-0/+67
| | | | | | | | | | This function allows us to share code between compute and graphics pipelines compilation.
* | fixed_pipeline_state: Add depth clampReinUsesLisp2020-01-072-10/+18
| |
* | vk_rasterizer: Add placeholderReinUsesLisp2020-01-072-0/+14
| |
* | Merge pull request #3276 from ReinUsesLisp/pipeline-reqsbunnei2020-01-065-1/+345
|\ \ | | | | | | vk_update_descriptor/vk_renderpass_cache: Add pipeline cache dependencies
| * | vk_renderpass_cache: Initial implementationReinUsesLisp2020-01-063-0/+199
| | | | | | | | | | | | | | | The renderpass cache is used to avoid creating renderpasses on each draw. The hashed structure is not currently optimized.
| * | vk_update_descriptor: Initial implementationReinUsesLisp2020-01-063-1/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | The update descriptor is used to store in flat memory a large chunk of staging data used to update descriptor sets through templates. It provides a push interface to easily insert descriptors following the current pipeline. The order used in the descriptor update template has to be implicitly followed. We can catch bugs here using validation layers.
* | | vk_stream_buffer/vk_buffer_cache: Avoid halting and use generic cacheReinUsesLisp2020-01-064-62/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stream buffer before this commit once it was full (no more bytes to write before looping) waiting for all previous operations to finish. This was a temporary solution and had a noticeable performance penalty in performance (from what a profiler showed). To avoid this mark with fences usages of the stream buffer and once it loops wait for them to be signaled. On average this will never wait. Each fence knows where its usage finishes, resulting in a non-paged stream buffer. On the other side, the buffer cache is reimplemented using the generic buffer cache. It makes use of the staging buffer pool and the new stream buffer.
* | | vk_memory_manager: Misc changesReinUsesLisp2020-01-062-88/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allocate memory in discrete exponentially increasing chunks until the 128 MiB threshold. Allocations larger thant that increase linearly by 256 MiB (depending on the required size). This allows to use small allocations for small resources. * Move memory maps to a RAII abstraction. To optimize for debugging tools (like RenderDoc) users will map/unmap on usage. If this ever becomes a noticeable overhead (from my profiling it doesn't) we can transparently move to persistent memory maps without harming the API, getting optimal performance for both gameplay and debugging. * Improve messages on exceptional situations. * Fix typos "requeriments" -> "requirements". * Small style changes.
* | | vk_buffer_cache: Temporarily remove buffer cacheReinUsesLisp2020-01-062-226/+0
|/ / | | | | | | This is intended for a follow up commit to avoid circular dependencies.
* | Merge pull request #3257 from degasus/no_busy_loopsbunnei2020-01-062-4/+8
|\ \ | | | | | | video_core: Block in WaitFence.
| * | video_core: Block in WaitFence.Markus Wick2019-12-302-4/+8
| | | | | | | | | | | | | | | | | | | | | This function is called rarely and blocks quite often for a long time. So don't waste power and let the CPU sleep. This might also increase the performance as the other cores might be allowed to clock higher.
* | | Merge pull request #3264 from ReinUsesLisp/vk-descriptor-poolFernando Sahmkow2020-01-053-0/+147
|\ \ \ | | | | | | | | vk_descriptor_pool: Initial implementation
| * | | Update src/video_core/renderer_vulkan/vk_descriptor_pool.cppRodrigo Locatti2020-01-031-1/+1
| | | | | | | | | | | | Co-Authored-By: Mat M. <mathew1800@gmail.com>
| * | | vk_descriptor_pool: Initial implementationReinUsesLisp2020-01-013-0/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a large descriptor pool where we allocate all our descriptors from. It has to be wide enough to support any pipeline, hence its large numbers. If the descritor pool is filled, we allocate more memory at that moment. This way we can take advantage of permissive drivers like Nvidia's that allocate more descriptors than what the spec requires.
* | | | Merge pull request #3258 from FernandoS27/shader-amendbunnei2020-01-045-2/+52
|\ \ \ \ | |_|_|/ |/| | | Shader_IR: add the ability to amend code in the shader ir.
| * | | Shader_IR: Address FeedbackFernando Sahmkow2020-01-045-38/+19
| | | |
| * | | Shader_IR: add the ability to amend code in the shader ir.Fernando Sahmkow2019-12-305-3/+72
| | |/ | |/| | | | | | | | | | | | | | | | This commit introduces a mechanism by which shader IR code can be amended and extended. This useful for track algorithms where certain information can derived from before the track such as indexes to array samplers.
* | | yuzu: Remove Maxwell debuggerReinUsesLisp2020-01-034-239/+0
| | | | | | | | | | | | | | | This was carried from Citra and wasn't really used on yuzu. It also adds some runtime overhead. This commit removes it from yuzu's codebase.
* | | Merge pull request #3243 from ReinUsesLisp/topologiesbunnei2020-01-021-4/+18
|\ \ \ | |_|/ |/| | maxwell_to_gl: Implement missing primitive topologies
| * | maxwell_to_gl: Implement missing primitive topologiesReinUsesLisp2019-12-231-4/+18
| | | | | | | | | | | | Many of these topologies are exclusively available in OpenGL.
* | | Merge pull request #3239 from ReinUsesLisp/p2rbunnei2020-01-012-17/+47
|\ \ \ | | | | | | | | shader/p2r: Implement P2R Pr
| * | | shader/p2r: Implement P2R PrReinUsesLisp2019-12-201-1/+15
| | | | | | | | | | | | | | | | | | | | P2R dumps predicate or condition codes state to a register. This is useful for unit testing.
| * | | shader/r2p: Refactor P2R to support P2RReinUsesLisp2019-12-202-17/+33
| | | |
* | | | Merge pull request #3248 from ReinUsesLisp/vk-imageFernando Sahmkow2019-12-303-0/+192
|\ \ \ \ | | | | | | | | | | vk_image: Add an image object abstraction
| * | | | vk_image: Avoid unnecesary equalsRodrigo Locatti2019-12-301-1/+1
| | | | |
| * | | | vk_image: Add an image object abstractionReinUsesLisp2019-12-253-0/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This object's job is to contain an image and manage its transitions. Since Nvidia hardware doesn't know what a transition is but Vulkan requires them anyway, we have to state track image subresources individually. To avoid the overhead of tracking each subresource in images with many subresources (think of cubemap arrays with several mipmaps), this commit tracks when subresources have diverged. As long as this doesn't happen we can check the state of the first subresource (that will be shared with all subresources) and update accordingly. Image transitions are deferred to the scheduler command buffer.
* | | | | Merge pull request #3249 from ReinUsesLisp/vk-staging-buffer-poolFernando Sahmkow2019-12-303-0/+212
|\ \ \ \ \ | |_|_|_|/ |/| | | | vk_staging_buffer_pool: Add a staging pool for temporary operations
| * | | | vk_staging_buffer_pool: Initialize last epoch to zeroRodrigo Locatti2019-12-291-1/+1
| | | | |
| * | | | vk_staging_buffer_pool: Add a staging pool for temporary operationsReinUsesLisp2019-12-253-0/+212
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | The job of this abstraction is to provide staging buffers for temporary operations. Think of image uploads or buffer uploads to device memory. It automatically deletes unused buffers.
* | | | Merge pull request #3250 from ReinUsesLisp/empty-fragmentFernando Sahmkow2019-12-282-0/+7
|\ \ \ \ | | | | | | | | | | gl_rasterizer: Allow rendering without fragment shader
| * | | | gl_rasterizer: Allow rendering without fragment shaderReinUsesLisp2019-12-262-0/+7
| |/ / / | | | | | | | | | | | | | | | | Rendering without a fragment shader is usually used in depth-only passes.
* | | | Merge pull request #3228 from ReinUsesLisp/ptpbunnei2019-12-275-74/+142
|\ \ \ \ | |/ / / |/| | | shader/texture: Implement AOFFI and PTP for TLD4 and TLD4S
| * | | shader/texture: Implement TLD4.PTPReinUsesLisp2019-12-165-56/+120
| | | |
| * | | shader/texture: Enable arrayed TLD4ReinUsesLisp2019-12-161-1/+0
| | | |
| * | | gl_shader_decompiler: Rename "sepparate" to "separate"ReinUsesLisp2019-12-161-3/+3
| | | |
| * | | shader/texture: Implement AOFFI for TLD4SReinUsesLisp2019-12-161-13/+18
| | | |
| * | | shader/texture: Remove unnecesary parenthesisReinUsesLisp2019-12-161-2/+2
| | | |
* | | | Merge pull request #3244 from ReinUsesLisp/vk-fpsFernando Sahmkow2019-12-254-6/+594
|\ \ \ \ | | | | | | | | | | fixed_pipeline_state: Define structure and loaders
| * | | | fixed_pipeline_state: Define symetric operator!= and mark as noexceptReinUsesLisp2019-12-242-40/+92
| | | | | | | | | | | | | | | | | | | | Marks as noexcept Hash, operator== and operator!= for consistency.
| * | | | fixed_pipeline_state: Define structure and loadersReinUsesLisp2019-12-233-0/+528
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intention behind this hasheable structure is to describe the state of fixed function pipeline state that gets compiled to a single graphics pipeline state object. This is all dynamic state in OpenGL but Vulkan wants it in an immutable state, even if hardware can edit it freely. In this commit the structure is defined in an optimized state (it uses booleans, has paddings and many data entries that can be packed to single integers). This is intentional as an initial implementation that is easier to debug, implement and review. It will be optimized in later stages, or it might change if Vulkan gets more dynamic states.
| * | | | maxwell_3d: Add depth bounds registersReinUsesLisp2019-12-231-6/+14
| | | | |
* | | | | Merge pull request #3236 from ReinUsesLisp/rasterize-enablebunnei2019-12-256-4/+28
|\ \ \ \ \ | |/ / / / |/| | | | gl_rasterizer: Implement RASTERIZE_ENABLE
| * | | | gl_rasterizer: Implement RASTERIZE_ENABLEReinUsesLisp2019-12-186-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RASTERIZE_ENABLE is the opposite of GL_RASTERIZER_DISCARD. Implement it naturally using this. NVN games expect rasterize to be enabled by default, reflect that in our initial GPU state.
* | | | | Merge pull request #3241 from ReinUsesLisp/gl-shader-cachebunnei2019-12-221-19/+14
|\ \ \ \ \ | |_|_|_|/ |/| | | | gl_shader_cache: Style changes
| * | | | gl_shader_cache: Update commentary for shared memoryReinUsesLisp2019-12-211-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove false commentary. Not dividing by 4 the size of shared memory is not a hack; it describes the number of integers, not bytes. While we are at it sort the generated code to put preprocessor lines on the top.
| * | | | gl_shader_cache: Remove unused entry in GetPrimitiveDescriptionReinUsesLisp2019-12-211-11/+9
| | |_|/ | |/| |
* | | | Merge pull request #3238 from ReinUsesLisp/vk-resource-managerbunnei2019-12-224-1/+82
|\ \ \ \ | | | | | | | | | | vk_resource_manager: Catch device losses and other changes
| * | | | vk_resource_manager: Add entry to VKFence to test its usageReinUsesLisp2019-12-191-0/+8
| | | | |
| * | | | vk_reosurce_manager: Add assert for releasing fencesReinUsesLisp2019-12-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Notify the programmer when a request to release a fence is invalid because the fence is already free.
| * | | | vk_resource_manager: Implement VKFenceWatch move constructorReinUsesLisp2019-12-192-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to put VKFenceWatch inside a std::vector without storing it in heap. On move we have to signal the fences where the new protected resource is, adding some overhead.
| * | | | vk_device: Add entry to catch device lossesReinUsesLisp2019-12-193-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VK_NV_device_diagnostic_checkpoints allows us to push data to a Vulkan queue and then query it even after a device loss. This allows us to push the current pipeline object and see what was the call that killed the device.
| * | | | vk_device: Add query for RGBA8UintReinUsesLisp2019-12-191-0/+1
| | | | |
* | | | | Merge pull request #3203 from FernandoS27/tex-cache-fixesbunnei2019-12-224-1/+144
|\ \ \ \ \ | | | | | | | | | | | | Texture Cache: Add HLE methods for building 3D textures
| * | | | | Texture Cache: Improve documentationFernando Sahmkow2019-12-222-4/+5
| | | | | |
| * | | | | Texture Cache: Address FeedbackFernando Sahmkow2019-12-222-11/+11
| | | | | |
| * | | | | Texture Cache: Add HLE methods for building 3D textures within the GPU in certain scenarios.Fernando Sahmkow2019-12-224-1/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a series of HLE methods for handling 3D textures in general. This helps games that generate 3D textures on every frame and may reduce loading times for certain games.
* | | | | | Merge pull request #3237 from ReinUsesLisp/vk-shader-decompilerFernando Sahmkow2019-12-222-38/+49
|\ \ \ \ \ \ | |/ / / / / |/| | | | | vk_shader_decompiler: Misc changes
| * | | | | vk_shader_decompiler: Fix full decompilationReinUsesLisp2019-12-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When full decompilation was enabled, labels were not being inserted and instructions were misused. Fix these bugs.
| * | | | | vk_shader_decompiler: Skip NDC correction when it is nativeReinUsesLisp2019-12-192-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid changing gl_Position when the NDC used by the game is [0, 1] (Vulkan's native).
| * | | | | vk_shader_decompiler: Normalize output fragment attachmentsReinUsesLisp2019-12-192-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some games write from fragment shaders to an unexistant framebuffer attachment or they don't write to one when it exists in the framebuffer. Fix this by skipping writes or adding zeroes.
| * | | | | vk_shader_decompiler: Update sirit and implement Texture AOFFIReinUsesLisp2019-12-191-22/+30
| |/ / / /
* | | | | Merge pull request #3230 from ReinUsesLisp/vk-emu-shadersFernando Sahmkow2019-12-224-0/+122
|\ \ \ \ \ | | | | | | | | | | | | renderer_vulkan/shader: Add helper GLSL shaders
| * | | | | renderer_vulkan/shader: Add helper GLSL shadersReinUsesLisp2019-12-164-0/+122
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These shaders are used to specify code that is not dynamically generated in the Vulkan backend. Instead of packing it inside the build system, it's manually built and copied to the C++ file to avoid adding unnecessary build time dependencies. quad_array should be dropped in the future since it can be emulated with a memory pool generated from the CPU.
* | | | | Merge pull request #3240 from ReinUsesLisp/decomp-cond-codeFernando Sahmkow2019-12-221-23/+1
|\ \ \ \ \ | | | | | | | | | | | | vk_shader_decompiler: Use Visit instead of reimplementing it
| * | | | | vk_shader_decompiler: Use Visit instead of reimplementing itReinUsesLisp2019-12-211-23/+1
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ExprCondCode visit implements the generic Visit. Use this instead of that one. As an intended side effect this fixes unwritten memory usages in cases when a negation of a condition code is used.
* | | | | Merge pull request #3235 from ReinUsesLisp/ldg-u8bunnei2019-12-221-6/+32
|\ \ \ \ \ | |/ / / / |/| | | | shader/memory: Implement LDG.U8 and unaligned U8 loads
| * | | | shader/memory: Implement LDG.U8 and unaligned U8 loadsReinUsesLisp2019-12-181-6/+32
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LDG can load single bytes instead of full integers or packs of integers. These have the advantage of loading bytes that are not aligned to 4 bytes. To emulate these this commit gets the byte being referenced (by doing "address & 3" and then using that to extract the byte from the loaded integer: result = bitfieldExtract(loaded_integer, (address % 4) * 8, 8)
* | | | Merge pull request #3234 from ReinUsesLisp/i2f-u8-selectorbunnei2019-12-201-2/+13
|\ \ \ \ | | | | | | | | | | shader/conversion: Implement byte selector in I2F
| * | | | shader/conversion: Implement byte selector in I2FReinUsesLisp2019-12-181-2/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | I2F's byte selector is used to choose what bytes to convert to float. e.g. if the input is 0xaabbccdd and the selector is ".B3" it will convert 0xaa. The default (when it's not shown in nvdisasm) is ".B0", in that example the default would convert 0xdd to float.
* | | | Merge pull request #3233 from ReinUsesLisp/mismatch-sizesbunnei2019-12-201-4/+9
|\ \ \ \ | | | | | | | | | | shader/texture: Properly shrink unused entries in size mismatches
| * | | | shader/texture: Properly shrink unused entries in size mismatchesReinUsesLisp2019-12-181-4/+9
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | When a image format mismatches we were inserting zeroes to the texture itself. This was not handling cases were the mismatch uses less coordinates than the guest shader code. Address that by resizing the vector.
* | | | Merge pull request #3232 from ReinUsesLisp/gl-decompiler-imagesbunnei2019-12-191-0/+1
|\ \ \ \ | | | | | | | | | | gl_shader_decompiler: Add missing DeclareImages
| * | | | gl_shader_decompiler: Add missing DeclareImagesReinUsesLisp2019-12-181-0/+1
| |/ / /
* | | | Merge pull request #3231 from ReinUsesLisp/tld4s-encodingbunnei2019-12-191-1/+1
|\ \ \ \ | |_|/ / |/| | | shader_bytecode: Fix TLD4S encoding
| * | | shader_bytecode: Fix TLD4S encodingReinUsesLisp2019-12-181-1/+1
| |/ /
* | | Merge pull request #3221 from ReinUsesLisp/vk-schedulerbunnei2019-12-192-37/+311
|\ \ \ | |/ / |/| | vk_scheduler: Delegate commands to a worker thread and state track
| * | vk_scheduler: Delegate commands to a worker thread and state trackReinUsesLisp2019-12-132-37/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a worker thread approach for delegating Vulkan work derived from dxvk's approach. https://github.com/doitsujin/dxvk Now that the scheduler is what handles all Vulkan work related to command streaming, store state tracking in itself. This way we can know when to reupload Vulkan dynamic state to the queue (since this one is invalidated between command buffers unlike NVN). We can also store the renderpass state and graphics pipeline bound to avoid redundant binds and renderpass begins/ends.
* | | Merge pull request #3182 from ReinUsesLisp/renderer-openglbunnei2019-12-162-131/+115
|\ \ \ | |_|/ |/| | renderer_opengl: Miscellaneous clean ups
| * | renderer_opengl: Make ScreenRectVertex's constructor constexprReinUsesLisp2019-11-291-12/+7
| | |
| * | renderer_opengl: Remove C castsReinUsesLisp2019-11-291-4/+5
| | |
| * | renderer_opengl: Use explicit binding for presentation shadersReinUsesLisp2019-11-292-34/+20
| | |
| * | renderer_opengl: Drop macros for message decorationsReinUsesLisp2019-11-291-21/+26
| | |
| * | renderer_opengl: Move static definitions to anonymous namespaceReinUsesLisp2019-11-291-62/+66
| | |
| * | renderer_opengl: Move commentaries to header fileReinUsesLisp2019-11-292-20/+13
| | |
* | | Merge pull request #3219 from FernandoS27/fix-bindlessRodrigo Locatti2019-12-164-47/+124
|\ \ \ | | | | | | | | Corrections and fixes to TLD4S & bindless samplers failing
| * | | Shader_IR: Correct TLD4S Depth Compare.Fernando Sahmkow2019-12-122-9/+16
| | | |
| * | | Shader_Ir: Correct TLD4S encoding and implement f16 flag.Fernando Sahmkow2019-12-123-11/+15
| | | |
| * | | Gl_Shader_compiler: Correct Depth Compare for Texture Gather operations.Fernando Sahmkow2019-12-121-8/+21
| | | |
| * | | Shader_Ir: default failed tracks on bindless samplers to null values.Fernando Sahmkow2019-12-122-24/+77
| | | |
* | | | Merge pull request #3222 from ReinUsesLisp/maxwell-to-vkbunnei2019-12-153-111/+243
|\ \ \ \ | | | | | | | | | | maxwell_to_vk: Use VK_EXT_index_type_uint8 and misc changes
| * | | | maxwell_to_vk: Improve image format table and add more formatsReinUsesLisp2019-12-132-89/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A1B5G5R5 uses A1R5G5B5. This is flipped with image view swizzles; flushing is still not properly implemented on Vulkan for this particular format.
| * | | | maxwell_to_vk: Implement more vertex formatsReinUsesLisp2019-12-131-7/+81
| | | | |
| * | | | maxwell_to_vk: Implement more primitive topologiesReinUsesLisp2019-12-132-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an extra argument to query device capabilities in the future. The intention behind this is to use native quads, quad strips, line loops and polygons if these are released for Vulkan.
| * | | | maxwell_to_vk: Approach GL_CLAMP closer to the GL specReinUsesLisp2019-12-133-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenGL spec defines GL_CLAMP's formula similarly to CLAMP_TO_EDGE and CLAMP_TO_BORDER depending on the filter mode used. It doesn't exactly behave like this, but it's the closest we can get with what Vulkan offers without emulating it by injecting shader code.
| * | | | maxwell_to_vk: Use VK_EXT_index_type_uint8 when availableReinUsesLisp2019-12-132-4/+7
| | |_|/ | |/| |
* | | | Merge pull request #3213 from ReinUsesLisp/intel-mesabunnei2019-12-141-1/+4
|\ \ \ \ | | | | | | | | | | gl_device: Enable compute shaders for Intel Mesa drivers
| * | | | gl_device: Enable compute shaders for Intel Mesa driversReinUsesLisp2019-12-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we naively checked for "Intel" in GL_VENDOR, but this includes both Intel's proprietary driver and the mesa driver. Re-enable compute shaders for mesa.
* | | | | Merge pull request #3212 from ReinUsesLisp/fix-smem-lmembunnei2019-12-141-2/+2
|\ \ \ \ \ | |_|/ / / |/| | | | gl_shader_cache: Add missing new-line on emitted GLSL
| * | | | gl_shader_cache: Add missing new-line on emitted GLSLReinUsesLisp2019-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing new-line. This caused shaders using local memory and shared memory to inject a preprocessor GLSL line after an expression (resulting in invalid code). It looked like this: shared uint smem[8];#define LOCAL_MEMORY_SIZE 16 It should look like this (addressed by this commit): shared uint smem[8]; \#define LOCAL_MEMORY_SIZE 16
* | | | | Merge pull request #3217 from jhol/fix-boost-includebunnei2019-12-121-0/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | Added missing include
| * | | | Added missing includeJoel Holdsworth2019-12-111-0/+1
| | |/ / | |/| |
* | | | Gl_Rasterizer: Skip Tesselation Control and Eval stages as they are un implemented.Fernando Sahmkow2019-12-111-0/+8
| | | | | | | | | | | | | | | | | | | | This commit ensures the OGL backend does not execute tesselation shader stages as they are currently unimplemented.
* | | | Merge pull request #3210 from ReinUsesLisp/memory-barrierbunnei2019-12-115-1/+46
|\ \ \ \ | |/ / / |/| | | shader: Implement MEMBAR.GL
| * | | shader: Implement MEMBAR.GLReinUsesLisp2019-12-105-1/+46
| |/ / | | | | | | | | | Implement using memoryBarrier in GLSL and OpMemoryBarrier on SPIR-V.
* / / Maxwell3D: Implement Depth Mode.Fernando Sahmkow2019-12-114-8/+15
|/ / | | | | | | | | This commit finishes adding depth mode that was reverted before due to other unresolved issues.
* | vk_shader_decompiler: Fix build issues on old gcc versionsReinUsesLisp2019-12-101-2/+3
| |
* | vk_shader_decompiler: Reduce YNegate's severityReinUsesLisp2019-12-101-1/+1
| |
* | shader_ir/other: Implement S2R InvocationIdReinUsesLisp2019-12-104-0/+9
| |
* | vk_shader_decompiler: Misc changesReinUsesLisp2019-12-102-697/+1648
| | | | | | | | | | | | | | | | Update Sirit and its usage in vk_shader_decompiler. Highlights: - Implement tessellation shaders - Implement geometry shaders - Implement some missing features - Use native half float instructions when available.
* | shader: Keep track of shaders using warp instructionsReinUsesLisp2019-12-102-0/+8
| |
* | shader_ir/memory: Implement patch storesReinUsesLisp2019-12-104-20/+38
| |
* | vk_device: Misc changesReinUsesLisp2019-12-092-117/+276
| | | | | | | | | | | | | | | | | | - Setup more features and requirements. - Improve logging for missing features. - Collect telemetry parameters. - Add queries for more image formats. - Query push constants limits. - Optionally enable some extensions.
* | Merge pull request #3198 from ReinUsesLisp/tessellation-maxwellbunnei2019-12-091-2/+37
|\ \ | | | | | | maxwell_3d: Add tessellation state entries
| * | maxwell_3d: Add tessellation tess level registersReinUsesLisp2019-12-071-1/+6
| | |
| * | maxwell_3d: Add tessellation mode registerReinUsesLisp2019-12-071-1/+28
| | |
| * | maxwell_3d: Add patch vertices registerReinUsesLisp2019-12-071-1/+4
| | |
* | | externals: Update Vulkan-HeadersReinUsesLisp2019-12-092-2/+14
| | |
* | | vk_swapchain: Add support for swapping sRGBReinUsesLisp2019-12-072-24/+31
|/ / | | | | | | | | We don't know until the game is running if it's using an sRGB color space or not. Add support for hot-swapping swapchain surface formats.
* | shader_bytecode: Remove corrupted characterReinUsesLisp2019-12-071-1/+1
| |
* | Merge pull request #3109 from FernandoS27/new-instrbunnei2019-12-076-8/+171
|\ \ | | | | | | Implement FLO & TXD Instructions on GPU Shaders
| * | Shader_IR: Address FeedbackFernando Sahmkow2019-11-183-11/+9
| | |
| * | Shader_IR: Implement TXD instruction.Fernando Sahmkow2019-11-145-8/+120
| | |
| * | Shader_IR: Implement FLO instruction.Fernando Sahmkow2019-11-145-0/+35
| | |
| * | Shader_Bytecode: Add encodings for FLO, SHF and TXDFernando Sahmkow2019-11-141-0/+18
| | |
* | | Merge pull request #2987 from FernandoS27/texture-invalidbunnei2019-12-023-32/+101
|\ \ \ | | | | | | | | Texture_Cache: Redo invalid Surfaces handling.
| * | | Texture_Cache: Redo invalid Surfaces handling.Fernando Sahmkow2019-11-203-32/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit aims to redo the full setup of invalid textures and guarantee correct behavior across backends in the case of finding one by using black dummy textures that match the target of the expected texture.
* | | | Merge pull request #3184 from ReinUsesLisp/framebuffer-cachebunnei2019-12-014-72/+69
|\ \ \ \ | | | | | | | | | | gl_framebuffer_cache: Optimize framebuffer cache management
| * | | | gl_framebuffer_cache: Optimize framebuffer keyReinUsesLisp2019-11-293-46/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pack color attachment enumerations into a single u32. To determine the number of buffers, the highest color attachment with a shared pointer that doesn't point to null is used.
| * | | | gl_rasterizer: Re-enable framebuffer cache for clear buffersReinUsesLisp2019-11-293-32/+15
| | |_|/ | |/| |
* / | | texture_cache/surface_base: Fix out of bounds texture viewsReinUsesLisp2019-11-291-7/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Some texture views were being created out of bounds (with more layers or mipmaps than what the original texture has). This is because of a miscalculation in mipmap bounding. end_layer and end_mipmap are out of bounds (e.g. layer 6 in a cubemap), there's no need to add one more there. Fixes OpenGL errors and Vulkan crashes on Splatoon 2.
* | | Merge pull request #3169 from lioncash/memorybunnei2019-11-287-16/+31
|\ \ \ | | | | | | | | core/memory: Deglobalize memory management code
| * | | core/memory: Migrate over RasterizerMarkRegionCached() to the Memory classLioncash2019-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | This is only used within the accelerated rasterizer in two places, so this is also a very trivial migration.
| * | | core/memory: Migrate over GetPointer()Lioncash2019-11-274-7/+8
| | | | | | | | | | | | | | | | | | | | With all of the interfaces ready for migration, it's trivial to migrate over GetPointer().
| * | | core: Prepare various classes for memory read/write migrationLioncash2019-11-275-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends a few interfaces to be able to handle the migration over to the new Memory class by passing the class by reference as a function parameter where necessary. Notably, within the filesystem services, this eliminates two ReadBlock() calls by using the helper functions of HLERequestContext to do that for us.
* | | | Merge pull request #3174 from lioncash/optionalRodrigo Locatti2019-11-281-2/+1
|\ \ \ \ | | | | | | | | | | video_core/gpu_thread: Tidy up SwapBuffers()
| * | | | video_core/gpu_thread: Tidy up SwapBuffers()Lioncash2019-11-271-2/+1
| |/ / / | | | | | | | | | | | | | | | | We can just use std::nullopt and std::make_optional to make this a little bit less noisy.
* | | | video_core/const_buffer_locker: Make use of std::tie in HasEqualKeys()Lioncash2019-11-271-2/+3
| | | | | | | | | | | | | | | | Tidies it up a little bit visually.
* | | | video_core/const_buffer_locker: Remove unused includesLioncash2019-11-272-2/+2
| | | |
* | | | video_core/const_buffer_locker: Remove #pragma once from cpp fileLioncash2019-11-271-2/+0
|/ / / | | | | | | | | | Silences a compiler warning.
* | | Merge pull request #3143 from ReinUsesLisp/indexing-bugbunnei2019-11-272-48/+2
|\ \ \ | | | | | | | | gl_device: Deduce indexing bug from device instead of heuristic
| * | | gl_device: Deduce indexing bug from device instead of heuristicReinUsesLisp2019-11-252-48/+2
| | | | | | | | | | | | | | | | | | | | | | | | The heuristic to detect AMD's driver was not working properly since it also included Intel. Instead of using heuristics to detect it, compare the GL_VENDOR string.
* | | | gl_shader_decompiler: Fix casts from fp32 to f16ReinUsesLisp2019-11-261-1/+2
|/ / / | | | | | | | | | Casts from f32 to f16 zeroes the higher half of the target register.
* | | Merge pull request #3158 from ReinUsesLisp/srgb-blitbunnei2019-11-251-0/+1
|\ \ \ | | | | | | | | gl_texture_cache: Apply sRGB on blits
| * | | gl_texture_cache: Apply sRGB on blitsReinUsesLisp2019-11-241-0/+1
| | | | | | | | | | | | | | | | | | | | glBlitFramebuffer keeps in mind GL_FRAMEBUFFER_SRGB's state. Enable this depending on the target surface pixel format.
* | | | Merge pull request #3155 from bunnei/fix-asynch-gpu-waitbunnei2019-11-251-17/+15
|\ \ \ \ | | | | | | | | | | gpu_thread: Don't spin wait if there are no GPU commands.
| * | | | gpu_thread: Don't spin wait if there are no GPU commands.bunnei2019-11-231-17/+15
| |/ / /
* | | | Merge pull request #3098 from ReinUsesLisp/shader-invalidationsbunnei2019-11-2531-744/+742
|\ \ \ \ | | | | | | | | | | gl_shader_cache: Miscellaneous changes to shaders
| * | | | gl_device: Reserve base bindings on limited devicesReinUsesLisp2019-11-231-36/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSBOs and other resources are limited per pipeline on Intel and AMD. Heuristically reserve resources per stage having in mind the reported OpenGL limits.
| * | | | gl_state: Skip null texture bindsReinUsesLisp2019-11-231-1/+5
| | | | | | | | | | | | | | | | | | | | glBindTextureUnit doesn't support null textures. Skip binding these.
| * | | | gl_rasterizer: Disable compute shaders on IntelReinUsesLisp2019-11-233-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Intel's proprietary driver enters in a corrupt state when compute shaders are executed. For now, disable these.
| * | | | gl_shader_cache: Hack shared memory sizeReinUsesLisp2019-11-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current shared memory size seems to be smaller than what the game actually uses. This makes Nvidia's driver consistently blow up; in the case of FE3H it made it explode on Qt's SwapBuffers while SDL2 worked just fine. For now keep this hack since it's still progress over the previous hardcoded shared memory size.
| * | | | gl_shader_decompiler: Normalize image bindingsReinUsesLisp2019-11-233-33/+19
| | | | |
| * | | | gl_shader_decompiler: Normalize cbuf bindingsReinUsesLisp2019-11-232-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Stage and compute shaders were using a different binding counter. Normalize these.
| * | | | gl_rasterizer: Add missing cbuf counter reset on computeReinUsesLisp2019-11-231-0/+2
| | | | |
| * | | | gl_shader_cache: Remove dynamic BaseBinding specializationReinUsesLisp2019-11-2316-192/+200
| | | | |
| * | | | video_core: Unify ProgramType and ShaderStage into ShaderTypeReinUsesLisp2019-11-2322-289/+262
| | | | |
| * | | | gl_rasterizer: Bind graphics images to draw commandsReinUsesLisp2019-11-234-33/+54
| | | | | | | | | | | | | | | | | | | | | | | | | Images were not being bound to draw invocations because these would require a cache invalidation.
| * | | | gl_shader_cache: Specialize local memory size for compute shadersReinUsesLisp2019-11-236-21/+32
| | | | | | | | | | | | | | | | | | | | | | | | | Local memory size in compute shaders was stubbed with an arbitary size. This commit specializes local memory size from guest GPU parameters.
| * | | | gl_shader_cache: Specialize shared memory sizeReinUsesLisp2019-11-235-29/+25
| | | | | | | | | | | | | | | | | | | | | | | | | Shared memory was being declared with an undefined size. Specialize from guest GPU parameters the compute shader's shared memory size.
| * | | | gl_shader_cache: Specialize shader workgroupReinUsesLisp2019-11-236-68/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the usage of ARB_compute_variable_group_size and specialize compute shaders instead. This permits compute to run on AMD and Intel proprietary drivers.
| * | | | shader/texture: Handle TLDS texture type mismatchesReinUsesLisp2019-11-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some games like "Fire Emblem: Three Houses" bind 2D textures to offsets used by instructions of 1D textures. To handle the discrepancy this commit uses the the texture type from the binding and modifies the emitted code IR to build a valid backend expression. E.g.: Bound texture is 2D and instruction is 1D, the emitted IR samples a 2D texture in the coordinate ivec2(X, 0).
| * | | | shader/texture: Deduce texture buffers from lockerReinUsesLisp2019-11-239-174/+107
| | |/ / | |/| | | | | | | | | | | | | | Instead of specializing shaders to separate texture buffers from 1D textures, use the locker to deduce them while they are being decoded.
* | | | Merge pull request #3105 from ReinUsesLisp/fix-stencil-regbunnei2019-11-241-3/+3
|\ \ \ \ | | | | | | | | | | maxwell_3d: Fix stencil_back_func_mask offset
| * | | | maxwell_3d: Fix stencil_back_func_mask offsetReinUsesLisp2019-11-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | stencil_back_func_mask and stencil_back_mask were misplaced. This commit addresses that issue.
* | | | | Merge pull request #3145 from ReinUsesLisp/buffer-cache-initbunnei2019-11-241-10/+10
|\ \ \ \ \ | |_|_|/ / |/| | | | buffer_cache: Remove brace initialized for objects with default constructor
| * | | | buffer_cache: Remove brace initialized for objects with default constructorReinUsesLisp2019-11-201-10/+10
| | |/ / | |/| |
* | | | Merge pull request #3141 from ReinUsesLisp/gl-positionbunnei2019-11-231-0/+1
|\ \ \ \ | |/ / / |/| | | gl_shader_gen: Apply default value to gl_Position
| * | | gl_shader_gen: Apply default value to gl_PositionReinUsesLisp2019-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Nvidia has sane default output values for varyings, but the other vendors don't apply these. To properly emulate this we would have to analyze the shader header. For the time being, apply the same default Nvidia applies so we get the same behaviour on non-Nvidia drivers.
* | | | shader/other: Reduce DEPBAR log severityReinUsesLisp2019-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | While DEPBAR is stubbed it doesn't change anything from our end. Shading languages handle what this instruction does implicitly. We are not getting anything out fo this log except noise.
* | | | Merge pull request #3086 from ReinUsesLisp/format-lookupsbunnei2019-11-2012-555/+442
|\ \ \ \ | |/ / / |/| | | texture_cache: Use a flat table instead of switch for texture format lookups
| * | | format_lookup_table: Address feedbackReinUsesLisp2019-11-152-30/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | format_lookup_table: Drop bitfields format_lookup_table: Use std::array for definition table format_lookup_table: Include <limits> instead of <numeric>
| * | | texture_cache: Use a table instead of switch for texture formatsReinUsesLisp2019-11-159-261/+290
| | | | | | | | | | | | | | | | | | | | | | | | Use a large flat array to look up texture formats. This allows us to properly implement formats with different component types. It should also be faster.
| * | | texture_cache: Drop abstracted ComponentTypeReinUsesLisp2019-11-148-294/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Abstracted ComponentType was not being used in a meaningful way. This commit drops its usage. There is one place where it was being used to test compatibility between two cached surfaces, but this one is implied in the pixel format. Removing the component type test doesn't change the behaviour.
* | | | Merge pull request #3047 from ReinUsesLisp/clip-controlbunnei2019-11-157-79/+42
|\ \ \ \ | |/ / / |/| | | gl_rasterizer: Emulate viewport flipping with ARB_clip_control
| * | | gl_rasterizer: Remove front facing hackReinUsesLisp2019-11-071-12/+0
| | | |
| * | | gl_shader_decompiler: Fix typo "y_negate"->"y_direction"ReinUsesLisp2019-11-071-1/+1
| | | |
| * | | gl_shader_manager: Remove unused variable in SetFromRegsReinUsesLisp2019-11-071-1/+0
| | | |
| * | | gl_rasterizer: Emulate viewport flipping with ARB_clip_controlReinUsesLisp2019-11-077-76/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Emulates negative y viewports with ARB_clip_control. This allows us to more easily emulated pipelines with tessellation and/or geometry shader stages. It also avoids corrupting games with transform feedbacks and negative viewports (gl_Position.y was being modified).
* | | | correct the implementation of RGBA16UIgreggameplayer2019-11-141-0/+2
| |_|/ |/| |
* | | Merge pull request #3081 from ReinUsesLisp/fswzadd-shufflesFernando Sahmkow2019-11-148-125/+127
|\ \ \ | |_|/ |/| | shader: Implement FSWZADD and reimplement SHFL
| * | gl_shader_cache: Enable extensions only when availableReinUsesLisp2019-11-081-6/+14
| | | | | | | | | | | | Silence GLSL compilation warnings.
| * | gl_shader_decompiler: Add safe fallbacks when ARB_shader_ballot is not availableReinUsesLisp2019-11-083-5/+28
| | |
| * | shader_ir/warp: Implement FSWZADDReinUsesLisp2019-11-085-0/+44
| | |
| * | gl_shader_decompiler: Reimplement shuffles with platform agnostic intrinsicsReinUsesLisp2019-11-085-122/+49
| | |
* | | Merge pull request #3084 from ReinUsesLisp/cast-warningsRodrigo Locatti2019-11-1310-53/+68
|\ \ \ | | | | | | | | video_core: Treat implicit conversions as errors
| * | | video_core: Enable sign conversion warningsRodrigo Locatti2019-11-111-1/+1
| | | | | | | | | | | | Enable sign conversion warnings but don't treat them as errors.
| * | | video_core: Treat implicit conversions as errorsReinUsesLisp2019-11-081-0/+6
| | | |
| * | | video_core: Silence implicit conversion warningsReinUsesLisp2019-11-089-53/+62
| | |/ | |/|
* | | Merge pull request #3082 from ReinUsesLisp/fix-lockersbunnei2019-11-091-2/+4
|\ \ \ | | | | | | | | gl_shader_cache: Fix locker constructors
| * | | gl_shader_cache: Fix locker constructorsReinUsesLisp2019-11-081-2/+4
| | |/ | |/| | | | | | | Properly pass engine when a shader is being constructed from memory.
* | | Merge pull request #3080 from FernandoS27/glsl-fixbunnei2019-11-081-1/+1
|\ \ \ | |/ / |/| | GLSLDecompiler: Correct Texture Gather Offset.
| * | GLSLDecompiler: Correct Texture Gather Offset.Fernando Sahmkow2019-11-071-1/+1
| | | | | | | | | | | | This commit corrects the argument ordering in textureGatherOffset.
* | | Merge pull request #3032 from ReinUsesLisp/simplify-control-flow-brxbunnei2019-11-071-103/+111
|\ \ \ | | | | | | | | shader/control_flow: Abstract repeated code chunks in BRX tracking
| * | | shader/control_flow: Specify constness on caller lambdasRodrigo Locatti2019-11-071-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update src/video_core/shader/control_flow.cpp Co-Authored-By: Mat M. <mathew1800@gmail.com> Update src/video_core/shader/control_flow.cpp Co-Authored-By: Mat M. <mathew1800@gmail.com> Update src/video_core/shader/control_flow.cpp Co-Authored-By: Mat M. <mathew1800@gmail.com> Update src/video_core/shader/control_flow.cpp Co-Authored-By: Mat M. <mathew1800@gmail.com> Update src/video_core/shader/control_flow.cpp Co-Authored-By: Mat M. <mathew1800@gmail.com> Update src/video_core/shader/control_flow.cpp Co-Authored-By: Mat M. <mathew1800@gmail.com>
| * | | shader/control_flow: Use callable template instead of std::functionReinUsesLisp2019-11-071-6/+5
| | | |
| * | | shader/control_flow: Abstract repeated code chunks in BRX trackingReinUsesLisp2019-11-071-93/+101
| | | | | | | | | | | | | | | | Remove copied and pasted for cycles into a common templated function.
| * | | shader/control_flow: Silence Intellisense cast warningsReinUsesLisp2019-11-071-1/+1
| | | |
| * | | shader/control_flow: Remove brace initializer in std containersReinUsesLisp2019-11-071-9/+9
| | | | | | | | | | | | | | | | These containers have a default constructor.
* | | | buffer_cache: Add missing includes (#3079)Morph2019-11-071-0/+4
| | | | | | | | | | | | | | | | `boost::make_iterator_range` is available when `boost/range/iterator_range.hpp` is included. Also include `boost/icl/interval_map.hpp` and `boost/icl/interval_set.hpp`.
* | | | Merge pull request #3070 from ReinUsesLisp/shader-warningsbunnei2019-11-077-51/+19
|\ \ \ \ | |_|_|/ |/| | | shader_ir: Reduce severity of warnings
| * | | shader/decode: Reduce severity of arithmetic rounding warningsReinUsesLisp2019-11-076-15/+17
| | | |
| * | | shader/arithmetic: Reduce RRO stub severityReinUsesLisp2019-11-071-1/+2
| | | |
| * | | shader/texture: Remove NODEP warningsReinUsesLisp2019-11-071-35/+0
| |/ / | | | | | | | | | | | | These warnings don't offer meaningful information while decoding shaders. Remove them.
* | | Merge pull request #3057 from ReinUsesLisp/buffer-sub-databunnei2019-11-066-11/+70
|\ \ \ | |/ / |/| | gl_rasterizer: Upload constant buffers with glNamedBufferSubData
| * | gl_rasterizer: Re-enable stream buffer memory due to global memoryReinUsesLisp2019-11-021-14/+8
| | | | | | | | | | | | | | | Global memory is still using the stream buffer when it shouldn't. As a temporary fix re-enable the stream buffer on compute.
| * | gl_rasterizer: Upload constant buffers with glNamedBufferSubDataReinUsesLisp2019-11-026-19/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nvidia's OpenGL driver maps gl(Named)BufferSubData with some requirements to a fast. This path has an extra memcpy but updates the buffer without orphaning or waiting for previous calls. It can be seen as a better model for "push constants" that can upload a whole UBO instead of 256 bytes. This path has some requirements established here: http://on-demand.gputechconf.com/gtc/2014/presentations/S4379-opengl-44-scene-rendering-techniques.pdf#page=24 Instead of using the stream buffer, this commits moves constant buffers uploads to calls of glNamedBufferSubData and from my testing it brings a performance improvement. This is disabled when the vendor is not Nvidia since it brings performance regressions.
* | | Merge pull request #3039 from ReinUsesLisp/cleanup-samplersRodrigo Locatti2019-11-068-142/+116
|\ \ \ | | | | | | | | shader/node: Unpack bindless texture encoding
| * | | shader/node: Unpack bindless texture encodingReinUsesLisp2019-10-308-142/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bindless textures were using u64 to pack the buffer and offset from where they come from. Drop this in favor of separated entries in the struct. Remove the usage of std::set in favor of std::list (it's not std::vector to avoid reference invalidations) for samplers and images.
* | | | Merge pull request #2914 from FernandoS27/fermi-fixbunnei2019-11-061-3/+27
|\ \ \ \ | | | | | | | | | | Fermi2D: limit blit area to only available area
| * | | | Fermi2D: Use a different formula for delimiting blit areas.Fernando Sahmkow2019-10-181-14/+28
| | | | |
| * | | | Fermi2D: limit blit area to only available areaFernando Sahmkow2019-10-171-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normaly OpenGL does not care if the areas exceed the texture regions but other backends such as Vulkan do care about the limits of this areas. This PR crops the areas of the blit in order that they don't surpass the limits of the textures. This should help Vulkan and faulty OpenGL drivers
* | | | | common_func: Use std::array for INSERT_PADDING_* macros.bunnei2019-11-047-108/+110
| |_|/ / |/| | | | | | | | | | | - Zero initialization here is useful for determinism.
* | | | Shader_IR: Fix regression on TLD4Fernando Sahmkow2019-10-312-5/+4
| |_|/ |/| | | | | | | | | | | | | | Originally on the last commit I thought TLD4 acted the same as TLD4S and didn't have a mask. It actually does have a component mask. This commit corrects that.
* | | Merge pull request #3050 from FernandoS27/fix-tld4Rodrigo Locatti2019-10-303-11/+55
|\ \ \ | | | | | | | | shader_ir: Fix TLD4 and add bindless variant
| * | | Shader_IR: Fix TLD4 and add Bindless Variant.Fernando Sahmkow2019-10-303-11/+55
| | | | | | | | | | | | | | | | | | | | | | | | This commit fixes an issue where not all 4 results of tld4 were being written, the color component was defaulted to red, among other things. It also implements the bindless variant.
* | | | Merge pull request #3046 from ReinUsesLisp/clean-gl-statebunnei2019-10-303-291/+156
|\ \ \ \ | | | | | | | | | | gl_state: Miscellaneous clean up
| * | | | gl_state: Use std::array::fill instead of std::fillRodrigo Locatti2019-10-301-1/+1
| | | | | | | | | | | | | | | Co-Authored-By: Mat M. <mathew1800@gmail.com>
| * | | | gl_state: Move dirty checks to individual apply calls instead of ApplyReinUsesLisp2019-10-302-66/+74
| | | | | | | | | | | | | | | | | | | | | | | | | This requires removing constness from some methods, but for consistency it's removed in all methods.
| * | | | gl_state: Remove ApplyDefaultStateReinUsesLisp2019-10-303-17/+1
| | | | | | | | | | | | | | | | | | | | OpenGL has defaults values we can trust. Remove these.
| * | | | gl_state: Change SetDefaultViewports to use default constructorReinUsesLisp2019-10-301-13/+2
| | | | |
| * | | | gl_state: Minor style changesReinUsesLisp2019-10-301-3/+5
| | | | |
| * | | | gl_state: Remove unused Citra TextureUnitsReinUsesLisp2019-10-301-23/+0
| | | | |
| * | | | gl_state: Move initializers from constructor to class declarationReinUsesLisp2019-10-302-170/+75
| | |_|/ | |/| |
* | | | Merge pull request #3035 from ReinUsesLisp/rasterizer-acceleratedbunnei2019-10-305-45/+98
|\ \ \ \ | |/ / / |/| | | rasterizer_accelerated: Add intermediary for GPU rasterizers
| * | | rasterizer_accelerated: Add intermediary for GPU rasterizersReinUsesLisp2019-10-275-45/+98
| | | | | | | | | | | | | | | | | | | | | | | | Add an intermediary class that implements common functions across GPU accelerated rasterizers. This avoids code repetition on different backends.
* | | | Merge pull request #3004 from ReinUsesLisp/maxwell3d-cleanupRodrigo Locatti2019-10-306-81/+20
|\ \ \ \ | |_|/ / |/| | | maxwell_3d: Remove unused entries
| * | | maxwell_3d/kepler_compute: Remove unused arguments in GetTextureReinUsesLisp2019-10-285-37/+20
| | | |
| * | | video_core/textures: Remove unused index entry in FullTextureInfoReinUsesLisp2019-10-282-2/+0
| | | |
| * | | maxwell_3d: Remove unused method GetStageTexturesReinUsesLisp2019-10-282-42/+0
| | | |
* | | | Merge pull request #3037 from FernandoS27/new-formatsRodrigo Locatti2019-10-284-5/+22
|\ \ \ \ | |/ / / |/| | | video_core: Implement texture format E5B9G9R9_SHAREDEXP.
| * | | Video_Core: Implement texture format E5B9G9R9_SHAREDEXP.Fernando Sahmkow2019-10-274-5/+22
| |/ / | | | | | | | | | | | | This commit implements the E5B9G9R9 Texture format into the general system and OpenGL backend.
* | | Merge pull request #3034 from ReinUsesLisp/w4244-maxwell3dbunnei2019-10-272-24/+25
|\ \ \ | | | | | | | | maxwell_3d: Silence implicit conversion warnings
| * | | maxwell_3d: Silence implicit conversion warningsReinUsesLisp2019-10-272-24/+25
| |/ / | | | | | | | | | While we are at it, unify types for dirty reg pointers.
* / / astc: Silence implicit conversion warningsReinUsesLisp2019-10-271-7/+8
|/ /
* | Merge pull request #2976 from FernandoS27/cache-fast-brx-rebasedRodrigo Locatti2019-10-2626-862/+1467
|\ \ | | | | | | Implement Fast BRX, fix TXQ and addapt the Shader Cache for it
| * | Shader_IR: Address Feedback.Fernando Sahmkow2019-10-268-55/+65
| | |
| * | Shader_IR: Clang formatFernando Sahmkow2019-10-251-2/+1
| | |
| * | gl_shader_cache: Implement locker variants invalidationReinUsesLisp2019-10-254-44/+104
| | |
| * | gl_shader_disk_cache: Store and load fast BRXReinUsesLisp2019-10-256-50/+210
| | |
| * | const_buffer_locker: Minor style changesReinUsesLisp2019-10-252-152/+76
| | |
| * | gl_shader_decompiler: Move entries to a separate functionReinUsesLisp2019-10-2515-722/+420
| | |
| * | Shader_IR: Implement Fast BRX and allow multi-branches in the CFG.Fernando Sahmkow2019-10-251-1/+1
| | |
| * | Shader_IR: Correct typo in Consistent method.Fernando Sahmkow2019-10-252-2/+2
| | |
| * | Shader_IR: allow lookup of texture samplers within the shader_ir for instructions that don't provide itFernando Sahmkow2019-10-259-46/+363
| | |
| * | Shader_IR: Implement Fast BRX and allow multi-branches in the CFG.Fernando Sahmkow2019-10-257-130/+258
| | |
| * | Shader_Cache: setup connection of ConstBufferLockerFernando Sahmkow2019-10-2510-43/+82
| | |
| * | VideoCore: Unify const buffer accessing along engines and provide ConstBufferLocker class to shaders.Fernando Sahmkow2019-10-2510-11/+168
| | |
| * | Shader_IR: Implement BRX tracking.Fernando Sahmkow2019-10-251-0/+113
| | |
* | | Merge pull request #3027 from lioncash/lookupRodrigo Locatti2019-10-261-53/+67
|\ \ \ | | | | | | | | shader_ir: Use std::array with std::pair instead of std::unordered_map
| * | | shader_ir: Use std::array with pair instead of unordered_mapLioncash2019-10-241-53/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the overall size of the maps are very small, we can use arrays of pairs here instead of always heap allocating a new map every time the functions are called. Given the small size of the maps, the difference in container lookups are negligible, especially given the entries are already sorted.
* | | | Merge pull request #3013 from FernandoS27/tld4s-fixRodrigo Locatti2019-10-262-5/+5
|\ \ \ \ | |_|/ / |/| | | Shader_Ir: Fix TLD4S from using a component mask.
| * | | Shader_Ir: Fix TLD4S from using a component mask.Fernando Sahmkow2019-10-222-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | TLD4S always outputs 4 values, the previous code checked a component mask and omitted those values that weren't part of it. This commit corrects that and makes sure all 4 values are set.
* | | | Merge pull request #3028 from lioncash/constexprRodrigo Locatti2019-10-241-13/+13
|\ \ \ \ | | | | | | | | | | shader_bytecode: Make Matcher constexpr capable
| * | | | shader_bytecode: Make Matcher constexpr capableLioncash2019-10-241-13/+13
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Greatly shrinks the amount of generated code for GetDecodeTable(). Collapses an assembly output of 9000+ lines down to ~3621 with Clang, and 6513 down to ~2616 with GCC, given it's now allowed to construct all the entries as a sequence of constant data.
* / | | video_core/shader: Resolve instances of variable shadowingLioncash2019-10-246-11/+12
|/ / / | | | | | | | | | Silences a few -Wshadow warnings.
* | | Merge pull request #2995 from ReinUsesLisp/ignore-gmemFernando Sahmkow2019-10-222-18/+26
|\ \ \ | | | | | | | | shader_ir/memory: Ignore global memory when tracking fails
| * | | shader_ir/memory: Ignore global memory when tracking failsReinUsesLisp2019-10-222-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore global memory operations instead of invoking undefined behaviour when constant buffer tracking fails and we are blasting through asserts, ignore the operation. In the case of LDG this means filling the destination registers with zeroes; for STG this means ignore the instruction as a whole. The default behaviour is still to abort execution on failure.
* | | | Merge pull request #2983 from lioncash/fallthroughFernando Sahmkow2019-10-222-0/+6
|\ \ \ \ | |_|/ / |/| | | gl_shader_decompiler/vk_shader_decompiler: Resolve implicit fallthrough cases
| * | | vk_shader_decompiler: Resolve fallthrough within ExprDecompiler's ExprCondCode operator()Lioncash2019-10-161-0/+3
| | | | | | | | | | | | | | | | | | | | This would previously result in NeverExecute and UnusedIndex being treated as regular predicates.
| * | | gl_shader_decompiler: Resolve fallthrough within ExprDecompiler's ExprCondCode operator()Lioncash2019-10-161-0/+3
| | | | | | | | | | | | | | | | | | | | This would previously result in NeverExecute and UnusedIndex being treated as regular predicates.
* | | | maxwell_3d: Reduce FlushMMEInlineDraw logging to TraceReinUsesLisp2019-10-201-1/+1
| |/ / |/| |
* | | Merge pull request #2994 from lioncash/fmtRodrigo Locatti2019-10-182-40/+51
|\ \ \ | | | | | | | | video_core/shader/ast: Minor changes to ASTPrinter
| * | | video_core/shader/ast: Make ShowCurrentState() and SanityCheck() const member functionsLioncash2019-10-182-5/+5
| | | | | | | | | | | | | | | | | | | | These can also trivially be made const member functions, with the addition of a few consts.
| * | | video_core/shader/ast: Make ASTManager::Print a const member functionLioncash2019-10-182-3/+3
| | | | | | | | | | | | | | | | | | | | Given all visiting functions never modify the nodes, we can trivially make this a const member function.
| * | | video_core/shader/ast: Make ExprPrinter members privateLioncash2019-10-181-1/+2
| | | | | | | | | | | | | | | | | | | | This member already has an accessor, so there's no need for it to be public.
| * | | video_core/shader/ast: Make Indent() return a string_viewLioncash2019-10-181-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The returned string is simply a substring of our constexpr tabs string_view, so we can just use a string_view here as well, since the original string_view is guaranteed to always exist. Now the function is fully non-allocating.
| * | | video_core/shader/ast: Make Indent() privateLioncash2019-10-181-9/+9
| | | | | | | | | | | | | | | | It's never used outside of this class, so we can narrow its scope down.
| * | | video_core/shader/ast: Rename Ident() to Indent()Lioncash2019-10-181-13/+13
| | | | | | | | | | | | | | | | | | | | This can be confusing, given "ident" is generally used as a shorthand for "identifier".
| * | | video_core/shader/ast: Make use of fmt where applicableLioncash2019-10-181-14/+14
| | | | | | | | | | | | | | | | | | | | Makes a few strings nicer to read and also eliminates a bit of string churn with operator+.
* | | | Merge pull request #2993 from lioncash/vulkan-exprRodrigo Locatti2019-10-181-21/+23
|\ \ \ \ | | | | | | | | | | vk_shader_decompiler: Mark operator() function parameters as const references
| * | | | vk_shader_decompiler: Mark operator() function parameters as const referencesLioncash2019-10-181-21/+23
| |/ / / | | | | | | | | | | | | | | | | These parameters aren't actually modified in any way, so they can be made const references.
* | | | Merge pull request #2966 from FernandoS27/astc-formatsRodrigo Locatti2019-10-184-79/+211
|\ \ \ \ | | | | | | | | | | Implement a series of ASTC formats and R4G4B4A4 format
| * | | | Surfaces: Implement R4G4B4A4U format.Fernando Sahmkow2019-10-094-24/+41
| | | | |
| * | | | Surfaces: Implement ASTC 6x6 10x10 12x12 8x6 6x5Fernando Sahmkow2019-10-094-70/+185
| | | | |
* | | | | Merge pull request #2979 from lioncash/macroRodrigo Locatti2019-10-182-72/+79
|\ \ \ \ \ | |_|/ / / |/| | | | video_core/macro_interpreter: Make definitions of most private enums/unions hidden
| * | | | video_core/macro_interpreter: Make definitions of most private enums/unions hiddenLioncash2019-10-172-72/+79
| | |/ / | |/| | | | | | | | | | | | | | | | | | This allows the implementation of these types to change without requiring a rebuild of everything that includes the macro interpreter header.
* | | | Merge pull request #2980 from lioncash/warnbunnei2019-10-173-5/+6
|\ \ \ \ | |_|_|/ |/| | | maxwell_3d: Silence truncation warnings
| * | | control_flow: Silence truncation warningsLioncash2019-10-162-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | This can be trivially fixed by making the input size a size_t. CFGRebuildState's constructor parameter is already a std::size_t, so this just makes the size type fully conform with it.
| * | | maxwell_3d: Silence truncation warningsLioncash2019-10-151-1/+2
| |/ / | | | | | | | | | | | | A trivial warning caused by not using size_t as the argument types instead of u32.
* | | Merge pull request #2978 from lioncash/doxygenRodrigo Locatti2019-10-171-57/+78
|\ \ \ | | | | | | | | video_core/texture_cache: Amend Doxygen references
| * | | video_core/texture_cache: Amend Doxygen referencesLioncash2019-10-151-57/+78
| | | | | | | | | | | | | | | | | | | | | | | | Amends the doxygen comments so that they properly resolve. While we're at it, we can correct some typos and fix up some of the comments' formatting in order to make them slightly nicer to read.
* | | | Merge pull request #2982 from lioncash/surfaceRodrigo Locatti2019-10-171-2/+2
|\ \ \ \ | | | | | | | | | | texture_cache: Avoid unnecessary surface copies within PickStrategy() and TryReconstructSurface()
| * | | | texture_cache: Avoid unnecessary surface copies within PickStrategy() and TryReconstructSurface()Lioncash2019-10-161-2/+2
| | |/ / | |/| | | | | | | | | | | | | | | | | | We can take these by const reference and avoid making unnecessary copies, preventing some atomic reference count increments and decrements.
* | | | Merge pull request #2912 from FernandoS27/async-fixesbunnei2019-10-1610-24/+38
|\ \ \ \ | | | | | | | | | | General fixes to Async GPU
| * | | | AsyncGpu: Address FeedbackFernando Sahmkow2019-10-112-2/+2
| | | | |
| * | | | GL_Renderer: Remove lefting snippet.Fernando Sahmkow2019-10-051-2/+0
| | | | |
| * | | | Gl_Rasterizer: Protect CPU Memory mapping from multiple threads.Fernando Sahmkow2019-10-052-0/+4
| | | | |
| * | | | Core: Wait for GPU to be idle before shutting down.Fernando Sahmkow2019-10-056-0/+17
| | | | |
| * | | | Nvdrv: Do framelimiting only in the CPU ThreadFernando Sahmkow2019-10-051-3/+0
| | | | |
| * | | | GPU_Async: Correct fences, display events and more.Fernando Sahmkow2019-10-054-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit uses guest fences on vSync event instead of an articial fake fence we had. It also corrects to keep signaling display events while loading the game as the OS is suppose to send buffers to vSync during that time.
* | | | | Merge pull request #2984 from lioncash/fallthrough2Rodrigo Locatti2019-10-161-0/+1
|\ \ \ \ \ | | | | | | | | | | | | video_core/surface: Add missing break in PixelFormatFromTextureFormat()
| * | | | | video_core/surface: Add missing break in PixelFormatFromTextureFormat()Lioncash2019-10-161-0/+1
| | |/ / / | |/| | | | | | | | | | | | | Prevents fallthrough into the following case.
* | | | | Merge pull request #2981 from lioncash/copyRodrigo Locatti2019-10-162-34/+32
|\ \ \ \ \ | | | | | | | | | | | | gl_shader_decompiler: Minor cleanup-related changes
| * | | | | gl_shader_decompiler: Make ExprDecompiler's GetResult() a const member functionLioncash2019-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is only ever used to read, but not write, the resulting string, so we can enforce this by making it a const member function.
| * | | | | gl_shader_decompiler: Use a std::string_view with GetDeclarationWithSuffix()Lioncash2019-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the function to be completely non-allocating for inputs of all sizes (i.e. there's no heap cost for an input to convert to a std::string_view).
| * | | | | gl_shader_decompiler: Fold flow_var constant into GetFlowVariable()Lioncash2019-10-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is only ever used within this function, so we can narrow it's scope down.
| * | | | | gl_shader_decompiler: Mark ASTDecompiler/ExprDecompiler parameters as const references where applicableLioncash2019-10-161-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These member functions don't actually modify the input parameter, so we can make this explicit with the use of const.
| * | | | | gl_shader_decompiler: Pass by reference to GenerateTextureArgument()Lioncash2019-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Avoids an unnecessary atomic reference count increment and decrement.
| * | | | | gl_shader_decompiler: Use std::holds_alternative within GenerateTexture()Lioncash2019-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only ever queries if the type exists within the variant, but doesn't actually do anything with the return value. We can just use std::holds_alternative for this use case.
| * | | | | shader/node: std::move Meta instance within OperationNode constructorLioncash2019-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Allows usages of the constructor to avoid an unnecessary copy.
| * | | | | gl_shader_decompiler: Avoid unnecessary copies of MetaImageLioncash2019-10-161-4/+4
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | MetaImage contains a std::vector, so copying here could result in unnecessary reallocations. Given the operation lives throughout the entire scope, this is safe to do.
* | | | | Merge pull request #2972 from lioncash/systembunnei2019-10-151-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | {bcat, gpu, nvflinger}: Remove trivial usages of the global system accessor
| * | | | video_core/gpu: Remove use of the global system accessorLioncash2019-10-151-1/+1
| | |/ / | |/| | | | | | | | | | | | | | We can just make use of the reference member variable instead of accessing the global system instance.
* / | | common: Rename binary_find.h to algorithm.hLioncash2019-10-152-3/+3
|/ / / | | | | | | | | | | | | | | | Makes the header more general for other potential algorithms in the future. While we're at it, include a missing <functional> include to satisfy the use of std::less.
* | | Merge pull request #2928 from ReinUsesLisp/dirty-depth-boundsbunnei2019-10-092-1/+10
|\ \ \ | | | | | | | | maxwell_3d: Add dirty flags for depth bounds values
| * | | maxwell_3d: Add dirty flags for depth bounds valuesReinUsesLisp2019-10-052-1/+10
| |/ / | | | | | | | | | | | | This is useful in Vulkan where we want to update depth bounds without caring if it's enabled or disabled through vkCmdSetDepthBounds.
* | | Merge pull request #2927 from ReinUsesLisp/polygon-offset-unitsbunnei2019-10-091-1/+3
|\ \ \ | |_|/ |/| | gl_rasterizer: Fix polygon offset units
| * | gl_rasterizer: Fix polygon offset unitsReinUsesLisp2019-10-011-1/+3
| |/ | | | | | | | | | | For some reason hardware divides polygon offset units by two. This is visible since drivers multiply the application requested polygon offset by two.
* | shader/half_set_predicate: Fix HSETP2 for constant buffersReinUsesLisp2019-10-071-0/+2
| | | | | | | | | | HSETP2 when used with a constant buffer parses the second operand type as F32. This is not configurable.
* | shader/half_set_predicate: Reduce DEBUG_ASSERT to LOG_DEBUGReinUsesLisp2019-10-071-1/+2
| |
* | gl_shader_disk_cache: Properly ignore existing cacheReinUsesLisp2019-10-062-16/+17
| | | | | | | | | | Previously old entries where appended to the file even if the shader cache was ignored at boot. Address that issue.
* | video_core/control_flow: Eliminate variable shadowing warningsLioncash2019-10-051-6/+6
| |
* | video_core/control_flow: Eliminate pessimizing movesLioncash2019-10-051-5/+8
| | | | | | | | These can inhibit the ability of a compiler to perform RVO.
* | video_core/ast: Unindent most of IsFullyDecompiled() by one levelLioncash2019-10-051-12/+12
| |
* | video_core/ast: Make ShowCurrentState() take a string_view instead of std::stringLioncash2019-10-052-2/+2
| | | | | | | | Allows the function to be non-allocating in terms of the output string.
* | video_core/ast: Eliminate variable shadowing warningsLioncash2019-10-051-3/+3
| |
* | video_core/ast: Replace std::string with a constexpr std::string_viewLioncash2019-10-051-3/+1
| | | | | | | | Same behavior, but without the need to heap allocate
* | video_core/ast: Default the move constructor and assignment operatorLioncash2019-10-052-26/+2
| | | | | | | | | | This is behaviorally equivalent and also fixes a bug where some members weren't being moved over.
* | video_core/{ast, expr}: Organize forward declarationLioncash2019-10-052-10/+10
| | | | | | | | Keeps them alphabetically sorted for readability.
* | video_core/expr: Supply operator!= along with operator==Lioncash2019-10-052-1/+32
| | | | | | | | Provides logical symmetry to the interface.
* | video_core/{ast, expr}: Use std::move where applicableLioncash2019-10-054-45/+47
| | | | | | | | Avoids unnecessary atomic reference count increments and decrements.
* | video_core/ast: Supply const accessors for data where applicableLioncash2019-10-052-37/+41
| | | | | | | | | | Provides const equivalents of data accessors for use within const contexts.
* | Merge pull request #2888 from FernandoS27/decompiler2David2019-10-0515-160/+2287
|\ \ | | | | | | Shader_IR: Implement a full control flow decompiler for the shader IR.
| * | Shader_ir: Address feedbackFernando Sahmkow2019-10-056-65/+24
| | |
| * | Shader_Ir: Address Feedback and clang format.Fernando Sahmkow2019-10-054-68/+68
| | |
| * | vk_shader_decompiler: Correct Branches inside conditionals.Fernando Sahmkow2019-10-051-1/+11
| | |
| * | vk_shader_decompiler: Clean code and be const correct.Fernando Sahmkow2019-10-052-8/+6
| | |
| * | Shader_IR: clean up AST handling and add documentation.Fernando Sahmkow2019-10-051-2/+6
| | |
| * | Shader_IR: Correct OutwardMoves for IfsFernando Sahmkow2019-10-051-22/+11
| | |
| * | vk_shader_compiler: Don't enclose branches with if(true) to avoid crashing AMDFernando Sahmkow2019-10-051-16/+33
| | |
| * | gl_shader_decompiler: Refactor and address feedback.Fernando Sahmkow2019-10-051-17/+18
| | |
| * | Shader_IR: corrections and clang-formatFernando Sahmkow2019-10-052-70/+64
| | |
| * | vk_shader_compiler: Correct SPIR-V AST DecompilingFernando Sahmkow2019-10-051-4/+11
| | |
| * | Shader_IR: allow else derivation to be optional.Fernando Sahmkow2019-10-057-10/+18
| | |
| * | vk_shader_compiler: Implement the decompiler in SPIR-VFernando Sahmkow2019-10-053-23/+301
| | |
| * | Shader_IR: mark labels as unused for partial decompile.Fernando Sahmkow2019-10-052-3/+9
| | |
| * | Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes.Fernando Sahmkow2019-10-0513-82/+334
| | |
| * | gl_shader_decompiler: Implement AST decompilingFernando Sahmkow2019-10-0511-63/+358
| | |
| * | shader_ir: Declare Manager and pass it to appropiate programs.Fernando Sahmkow2019-10-057-104/+214
| | |
| * | shader_ir: Corrections to outward movements and misc stuffsFernando Sahmkow2019-10-056-58/+306
| | |
| * | shader_ir: Add basic goto eliminationFernando Sahmkow2019-10-052-38/+484
| | |
| * | shader_ir: Initial Decompile SetupFernando Sahmkow2019-10-056-5/+510
| |/
* | Texture_Cache: Blit Deduction corrections and simplifications.Fernando Sahmkow2019-10-051-18/+20
| |
* | TextureCache: Add the ability to deduce if two textures are depth on blit.Fernando Sahmkow2019-10-051-2/+142
|/
* gl_shader_decompiler: Add tailing return for HUnpack2ReinUsesLisp2019-09-241-0/+2
|
* gl_shader_decompiler: Fix clang build issuesReinUsesLisp2019-09-241-26/+23
|
* Merge pull request #2869 from ReinUsesLisp/suldbunnei2019-09-2411-229/+199
|\ | | | | shader/image: Implement SULD and fix SUATOM
| * gl_shader_decompiler: Use uint for images and fix SUATOMReinUsesLisp2019-09-217-188/+93
| | | | | | | | | | | | In the process remove implementation of SUATOM.MIN and SUATOM.MAX as these require a distinction between U32 and S32. These have to be implemented with imageCompSwap loop.
| * shader/image: Implement SULD and remove irrelevant codeReinUsesLisp2019-09-2110-47/+110
| | | | | | | | | | * Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array.
| * shader_bytecode: Add SULD encodingReinUsesLisp2019-09-211-0/+2
| |
* | Merge pull request #2870 from FernandoS27/multi-drawDavid2019-09-229-91/+273
|\ \ | | | | | | Implement a MME Draw commands Inliner and correct host instance drawing
| * | Maxwell3D: Corrections and refactors to MME instance refactorFernando Sahmkow2019-09-224-44/+46
| | |
| * | Rasterizer: Correct introduced bug where a conditional render wouldn't stop a draw call from executingFernando Sahmkow2019-09-201-10/+16
| | |
| * | Rasterizer: Refactor and simplify DrawBatch Interface.Fernando Sahmkow2019-09-194-35/+16
| | |
| * | Rasterizer: Address Feedback and conscerns.Fernando Sahmkow2019-09-191-11/+11
| | |
| * | Rasterizer: Refactor draw calls, remove deadcode and clean up.Fernando Sahmkow2019-09-193-106/+68
| | |
| * | VideoCore: Corrections to the MME Inliner and removal of hacky instance management.Fernando Sahmkow2019-09-196-31/+81
| | |
| * | Video Core: initial Implementation of InstanceDraw PackagingFernando Sahmkow2019-09-197-11/+192
| | |
* | | Merge pull request #2891 from FearlessTobi/rod-texFernando Sahmkow2019-09-228-24/+39
|\ \ \ | | | | | | | | video_core: Implement RGBX16F and lower Surface Copy log severity
| * | | Fix clang-formatFearlessTobi2019-09-222-2/+2
| | | |
| * | | fermi_2d: Lower surface copy log severity to DEBUGFearlessTobi2019-09-221-1/+1
| | | |
| * | | video_core: Implement RGBX16F PixelFormatFearlessTobi2019-09-227-22/+37
| | | |
* | | | Merge pull request #2867 from ReinUsesLisp/configure-framebuffers-cleanDavid2019-09-224-121/+33
|\ \ \ \ | |/ / / |/| | | gl_rasterizer: Remove unused code paths from ConfigureFramebuffers
| * | | gl_rasterizer: Remove unused code paths from ConfigureFramebuffersReinUsesLisp2019-09-174-121/+33
| | | |
* | | | Merge pull request #2878 from FernandoS27/icmpRodrigo Locatti2019-09-212-0/+42
|\ \ \ \ | | | | | | | | | | shader_ir: Implement ICMP
| * | | | Shader_IR: ICMP corrections and fixesFernando Sahmkow2019-09-212-6/+11
| | | | |
| * | | | Shader_IR: Implement ICMP.Fernando Sahmkow2019-09-202-0/+37
| | |/ / | |/| |
* | | | Merge pull request #2868 from ReinUsesLisp/fix-mipmapsDavid2019-09-211-2/+2
|\ \ \ \ | | | | | | | | | | maxwell_to_gl: Fix mipmap filtering
| * | | | maxwell_to_gl: Fix mipmap filteringReinUsesLisp2019-09-171-2/+2
| | |/ / | |/| | | | | | | | | | | | | | OpenGL texture filters follow GL_<texture_filter>_MIPMAP_<mipmap_filter> but we were using them in the opposite way.
* | | | Mark DrawArrays as LOG_TRACEDavid Marcec2019-09-211-1/+1
| |_|/ |/| | | | | | | | There's no reason to clog logs with DrawArray.
* | | Merge pull request #2846 from ReinUsesLisp/fixup-viewport-indexbunnei2019-09-201-10/+14
|\ \ \ | | | | | | | | gl_shader_decompiler: Avoid writing output attribute when unimplemented
| * | | gl_shader_decompiler: Avoid writing output attribute when unimplementedReinUsesLisp2019-09-061-10/+14
| | | |
* | | | Merge pull request #2855 from ReinUsesLisp/shflbunnei2019-09-206-9/+182
|\ \ \ \ | |_|_|/ |/| | | shader_ir/warp: Implement SHFL for Nvidia devices
| * | | shader_ir/warp: Implement SHFLReinUsesLisp2019-09-176-9/+182
| | |/ | |/|
* | | Merge pull request #2784 from ReinUsesLisp/smembunnei2019-09-185-21/+81
|\ \ \ | |/ / |/| | shader_ir: Implement shared memory
| * | gl_shader_decompiler: Implement shared memoryReinUsesLisp2019-09-051-0/+23
| | |
| * | shader_ir: Implement LD_SReinUsesLisp2019-09-051-10/+13
| | | | | | | | | | | | Loads from shared memory.
| * | shader_ir: Implement ST_SReinUsesLisp2019-09-054-11/+45
| | | | | | | | | | | | | | | This instruction writes to a memory buffer shared with threads within the same work group. It is known as "shared" memory in GLSL.
* | | Merge pull request #2851 from ReinUsesLisp/srgbFernando Sahmkow2019-09-156-30/+9
|\ \ \ | | | | | | | | renderer_opengl: Fix sRGB blits
| * | | renderer_opengl: Fix rebase mistakeReinUsesLisp2019-09-111-1/+1
| | | |
| * | | gl_rasterizer: Correct sRGB Fix regressionFernando Sahmkow2019-09-111-0/+12
| | | |
| * | | renderer_opengl: Fix sRGB blitsReinUsesLisp2019-09-116-43/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the sRGB hack of tracking if a frame used an sRGB rendertarget to apply at least once to blit the final texture as sRGB. Instead of doing this apply sRGB if the presented image has sRGB. Also enable sRGB by default on Maxwell3D registers as some games seem to assume this.
* | | | Merge pull request #2824 from ReinUsesLisp/mmeFernando Sahmkow2019-09-153-4/+20
|\ \ \ \ | | | | | | | | | | Revert "Revert #2466" and stub FirmwareCall 4
| * | | | maxwell_3d: Update firmware 4 call stub commentaryRodrigo Locatti2019-09-151-1/+2
| | | | |
| * | | | Revert "Revert #2466" and stub FirmwareCall 4ReinUsesLisp2019-09-043-4/+19
| | | | |
* | | | | Merge pull request #2857 from ReinUsesLisp/surface-srgbFernando Sahmkow2019-09-142-0/+22
|\ \ \ \ \ | | | | | | | | | | | | video_core/surface: Add function to detect sRGB surfaces
| * | | | | video_core/surface: Add function to detect sRGB surfacesReinUsesLisp2019-09-132-0/+22
| | |/ / / | |/| | | | | | | | | | | | | | | | | | This is required for proper conversion to RGBA8_UNORM or RGBA8_SRGB surfaces when a backend can target both native and converted ASTC.
* | | | | Merge pull request #2858 from ReinUsesLisp/vk-deviceFernando Sahmkow2019-09-143-111/+258
|\ \ \ \ \ | | | | | | | | | | | | vk_device: Add miscellaneous features and minor style changes
| * | | | | vk_device: Add miscellaneous features and minor style changesReinUsesLisp2019-09-133-111/+258
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Increase minimum Vulkan requirements * Require VK_EXT_vertex_attribute_divisor * Require depthClamp, samplerAnisotropy and largePoints features * Search and expose VK_KHR_uniform_buffer_standard_layout * Search and expose VK_EXT_index_type_uint8 * Search and expose native float16 arithmetics * Track current driver with VK_KHR_driver_properties * Query and expose SSBO alignment * Query more image formats * Improve logging overall * Minor style changes * Minor rephrasing of commentaries
* / / / / shader/image: Implement SUATOM and fix SUSTReinUsesLisp2019-09-117-69/+329
|/ / / /
* | | | Merge pull request #2823 from ReinUsesLisp/shr-clampbunnei2019-09-102-6/+17
|\ \ \ \ | | | | | | | | | | shader/shift: Implement SHR wrapped and clamped variants
| * | | | shader/shift: Implement SHR wrapped and clamped variantsReinUsesLisp2019-09-042-6/+17
| |/ / / | | | | | | | | | | | | | | | | | | | | Nvidia defaults to wrapped shifts, but this is undefined behaviour on OpenGL's spec. Explicitly mask/clamp according to what the guest shader requires.
* | | | Merge pull request #2810 from ReinUsesLisp/mme-optbunnei2019-09-104-12/+24
|\ \ \ \ | | | | | | | | | | maxwell_3d: Avoid moving macro_params
| * | | | maxwell_3d: Avoid moving macro_paramsReinUsesLisp2019-09-044-12/+24
| |/ / /
* | | | gl_shader_decompiler: Keep track of written images and mark them as modifiedReinUsesLisp2019-09-067-62/+92
| | | |
* | | | texture_cache: Minor changesReinUsesLisp2019-09-064-19/+17
| | | |
* | | | gl_rasterizer: Apply textures and images stateReinUsesLisp2019-09-061-0/+2
| | | |
* | | | gl_rasterizer: Add samplers to compute dispatchesReinUsesLisp2019-09-062-3/+36
| | | |
* | | | gl_rasterizer: Minor code changesReinUsesLisp2019-09-062-20/+31
| | | |
* | | | gl_state: Split textures and samplers into two arraysReinUsesLisp2019-09-064-91/+39
| | | |
* | | | gl_rasterizer: Implement image bindingsReinUsesLisp2019-09-065-32/+106
| | | |
* | | | gl_state: Add support for glBindImageTexturesReinUsesLisp2019-09-062-0/+24
| | | |
* | | | texture_cache: Pass TIC to texture cacheReinUsesLisp2019-09-064-27/+25
| | | |
* | | | kepler_compute: Implement texture queriesReinUsesLisp2019-09-065-5/+99
| | | |
* | | | gl_rasterizer: Split SetupTexturesReinUsesLisp2019-09-062-22/+38
| |_|/ |/| |
* | | Merge pull request #2804 from ReinUsesLisp/remove-gs-specialFernando Sahmkow2019-09-052-80/+9
|\ \ \ | | | | | | | | gl_shader_cache: Remove special casing for geometry shaders
| * | | gl_shader_cache: Remove special casing for geometry shadersReinUsesLisp2019-09-042-80/+9
| |/ / | | | | | | | | | | | | Now that ProgramVariants holds the primitive topology we no longer need to keep track of individual geometry shaders topologies.
* | | Merge pull request #2833 from ReinUsesLisp/fix-stencilbunnei2019-09-051-11/+11
|\ \ \ | |_|/ |/| | gl_rasterizer: Fix stencil testing
| * | gl_rasterizer: Fix stencil testingReinUsesLisp2019-09-041-11/+11
| |/ | | | | | | | | | | * Fix stencil dirty flags tracking when stencil is disabled * Attach stencil on clears (previously it only attached depth) * Attach stencil on drawing regardless of stencil testing being enabled
* | Merge pull request #2802 from ReinUsesLisp/hsetp2-predDavid2019-09-051-10/+9
|\ \ | | | | | | half_set_predicate: Fix HSETP2 predicate assignments
| * | half_set_predicate: Fix predicate assignmentsReinUsesLisp2019-09-041-10/+9
| |/
* | gl_shader_decompiler: Fixup slow pathReinUsesLisp2019-09-041-1/+1
| |
* | gl_device: Disable precise in fragment shaders on bugged driversReinUsesLisp2019-09-043-15/+43
| |
* | gl_shader_decompiler: Fixup AMD's slow path typeReinUsesLisp2019-09-041-1/+1
| |
* | gl_shader_decompiler: Rework GLSL decompiler type systemReinUsesLisp2019-09-041-416/+505
|/ | | | | | | | | | | | | | | GLSL decompiler type system was broken. We converted all return values to float except for some cases where returning we couldn't and implicitly broke the rule of returning floats (e.g. for bools or bool pairs). Instead of doing this introduce class Expression that knows what type a return value has and when a consumer wants to use the string it asks for it with a required type, emitting a runtime error if types are incompatible. This has the disadvantage that there's more C++ code, but we can emit better GLSL code that's easier to read.
* Merge pull request #2793 from ReinUsesLisp/bgr565bunnei2019-09-0414-203/+70
|\ | | | | renderer_opengl: Implement RGB565 framebuffer format
| * renderer_opengl: Implement RGB565 framebuffer formatReinUsesLisp2019-08-213-3/+9
| |
| * renderer_opengl: Use block linear swizzling for CPU framebuffersReinUsesLisp2019-08-213-150/+33
| |
| * renderer_opengl: Use VideoCore pixel formatReinUsesLisp2019-08-213-23/+11
| |
| * gpu: Change optional<reference_wrapper<T>> to T* for FramebufferConfigReinUsesLisp2019-08-2110-31/+21
| |
* | Merge pull request #2812 from ReinUsesLisp/f2i-selectorbunnei2019-09-042-7/+23
|\ \ | | | | | | shader_ir/conversion: Implement F2I and F2F F16 selector
| * | shader_ir/conversion: Split int and float selector and implement F2F H1ReinUsesLisp2019-08-282-19/+24
| | |
| * | shader_ir/conversion: Implement F2I F16 Ra.H1ReinUsesLisp2019-08-282-6/+17
| | |
* | | Merge pull request #2811 from ReinUsesLisp/fsetp-fixbunnei2019-09-042-4/+6
|\ \ \ | | | | | | | | float_set_predicate: Add missing negation bit for the second operand
| * | | float_set_predicate: Add missing negation bit for the second operandReinUsesLisp2019-08-282-4/+6
| |/ /
* | | Merge pull request #2826 from ReinUsesLisp/macro-bindingbunnei2019-09-042-10/+4
|\ \ \ | | | | | | | | maxwell_3d: Fix macro binding cursor
| * | | maxwell_3d: Fix macro binding cursorReinUsesLisp2019-09-012-10/+4
| | | |
* | | | Merge pull request #2765 from FernandoS27/dma-fixbunnei2019-09-013-23/+36
|\ \ \ \ | |/ / / |/| | | MaxwellDMA: Fixes, corrections and relaxations.
| * | | MaxwellDMA: Fixes, corrections and relaxations.Fernando Sahmkow2019-07-263-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes offsets on Linear -> Tiled copies, corrects z pos fortiled->linear copies, corrects bytes_per_pixel calculation in tiled -> linear copies and relaxes some limitations set by latest dma fixes refactors.
* | | | video_core: Silent miscellaneous warnings (#2820)Rodrigo Locatti2019-08-3023-48/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * texture_cache/surface_params: Remove unused local variable * rasterizer_interface: Add missing documentation commentary * maxwell_dma: Remove unused rasterizer reference * video_core/gpu: Sort member declaration order to silent -Wreorder warning * fermi_2d: Remove unused MemoryManager reference * video_core: Silent unused variable warnings * buffer_cache: Silent -Wreorder warnings * kepler_memory: Remove unused MemoryManager reference * gl_texture_cache: Add missing override * buffer_cache: Add missing include * shader/decode: Remove unused variables
* | | | gl_buffer_cache: Add missing includeReinUsesLisp2019-08-301-0/+1
| | | | | | | | | | | | | | | | RasterizerInterface was considered an incomplete object by clang.
* | | | Merge pull request #2742 from ReinUsesLisp/fix-texture-buffersbunnei2019-08-294-4/+12
|\ \ \ \ | | | | | | | | | | gl_texture_cache: Miscellaneous texture buffer fixes
| * | | | gl_shader_decompiler: Rename bufferImage to imageBufferReinUsesLisp2019-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The online OpenGL documentation is wrong. The type definition is imageBuffer.
| * | | | gl_shader_cache: Fix newline on buffer preprocessor definitionsReinUsesLisp2019-07-181-2/+6
| | | | |
| * | | | textures: Fix texture buffer size calculationReinUsesLisp2019-07-181-1/+1
| | | | |
| * | | | gl_texture_cache: Do not set texture parameters to buffersReinUsesLisp2019-07-181-0/+3
| | | | |
| * | | | gl_texture_cache: Add missing break in CreateTextureReinUsesLisp2019-07-181-0/+1
| | | | |
* | | | | Merge pull request #2783 from FernandoS27/new-buffer-cachebunnei2019-08-299-330/+684
|\ \ \ \ \ | | | | | | | | | | | | Implement a New LLE Buffer Cache
| * | | | | Buffer Cache: Adress Feedback.Fernando Sahmkow2019-08-212-7/+6
| | | | | |
| * | | | | Buffer_Cache: Implement flushing.Fernando Sahmkow2019-08-212-1/+30
| | | | | |
| * | | | | Buffer_Cache: Implement barriers.Fernando Sahmkow2019-08-211-0/+4
| | | | | |
| * | | | | Buffer_Cache: Optimize and track written areas.Fernando Sahmkow2019-08-212-12/+104
| | | | | |
| * | | | | BufferCache: Rework mapping caching.Fernando Sahmkow2019-08-212-49/+76
| | | | | |
| * | | | | Buffer_Cache: Fixes and optimizations.Fernando Sahmkow2019-08-212-68/+38
| | | | | |
| * | | | | Video_Core: Implement a new Buffer CacheFernando Sahmkow2019-08-219-327/+560
| | |_|/ / | |/| | |
* | | | | Merge pull request #2758 from ReinUsesLisp/packed-tidbunnei2019-08-293-0/+15
|\ \ \ \ \ | | | | | | | | | | | | shader/decode: Implement S2R Tic
| * | | | | shader/decode: Implement S2R TicReinUsesLisp2019-07-223-0/+15
| | | | | |
* | | | | | shader_ir: Implement VOTEReinUsesLisp2019-08-2111-1/+162
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement VOTE using Nvidia's intrinsics. Documentation about these can be found here https://developer.nvidia.com/reading-between-threads-shader-intrinsics Instead of using portable ARB instructions I opted to use Nvidia intrinsics because these are the closest we have to how Tegra X1 hardware renders. To stub VOTE on non-Nvidia drivers (including nouveau) this commit simulates a GPU with a warp size of one, returning what is meaningful for the instruction being emulated: * anyThreadNV(value) -> value * allThreadsNV(value) -> value * allThreadsEqualNV(value) -> true ballotARB, also known as "uint64_t(activeThreadsNV())", emits VOTE.ANY Rd, PT, PT; on nouveau's compiler. This doesn't match exactly to Nvidia's code VOTE.ALL Rd, PT, PT; Which is emulated with activeThreadsNV() by this commit. In theory this shouldn't really matter since .ANY, .ALL and .EQ affect the predicates (set to PT on those cases) and not the registers.
* | | | | Merge pull request #2769 from FernandoS27/commands-flushbunnei2019-08-216-0/+15
|\ \ \ \ \ | | | | | | | | | | | | GPU: Flush commands on every dma pusher step.
| * | | | | GPU: Flush commands on every dma pusher step.Fernando Sahmkow2019-07-266-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit ensures that the host gpu is constantly fed with commands to work with, while the guest gpu keeps producing the rest of the commands. This reduces syncing time between host and guest gpu.
* | | | | | Merge pull request #2777 from ReinUsesLisp/hsetp2-fe3h-fixbunnei2019-08-211-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | half_set_predicate: Fix HSETP2_C constant buffer offset
| * | | | | | half_set_predicate: Fix HSETP2_C constant buffer offsetReinUsesLisp2019-08-041-1/+1
| |/ / / / /
* | | | | | Merge pull request #2753 from FernandoS27/float-convertbunnei2019-08-215-18/+75
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | Shader_Ir: Implement F16 Variants of F2F, F2I, I2F.
| * | | | | Shader_Ir: Implement F16 Variants of F2F, F2I, I2F.Fernando Sahmkow2019-07-205-18/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit takes care of implementing the F16 Variants of the conversion instructions and makes sure conversions are done.
* | | | | | Merge pull request #2778 from ReinUsesLisp/nopbunnei2019-08-182-0/+13
|\ \ \ \ \ \ | | | | | | | | | | | | | | shader_ir: Implement NOP
| * | | | | | shader_ir: Implement NOPReinUsesLisp2019-08-042-0/+13
| | |/ / / / | |/| | | |
* | | | | | Merge pull request #2768 from ReinUsesLisp/hsetp2-fixbunnei2019-08-181-3/+3
|\ \ \ \ \ \ | |/ / / / / |/| | | | | decode/half_set_predicate: Fix predicates
| * | | | | decode/half_set_predicate: Fix predicatesReinUsesLisp2019-07-261-3/+3
| | | | | |
* | | | | | Merge pull request #2592 from FernandoS27/sync1bunnei2019-07-269-59/+105
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Implement GPU Synchronization Mechanisms & Correct NVFlinger
| * | | | | NVServices: Styling, define constructors as explicit and correctionsFernando Sahmkow2019-07-054-24/+24
| | | | | |
| * | | | | NVFlinger: Correct GCC compile errorFernando Sahmkow2019-07-052-6/+6
| | | | | |
| * | | | | NVServices: Make NVEvents Automatic according to documentation.Fernando Sahmkow2019-07-052-3/+6
| | | | | |
| * | | | | GPU: Correct Interrupts to interrupt on syncpt/value instead of event, mirroring hardwareFernando Sahmkow2019-07-055-29/+23
| | | | | |
| * | | | | gpu_asynch: Simplify synchronization to a simpler consumer->producer scheme.Fernando Sahmkow2019-07-052-47/+3
| | | | | |
| * | | | | nv_host_ctrl: Make Sync GPU variant always return synced result.Fernando Sahmkow2019-07-054-5/+11
| | | | | |
| * | | | | Async GPU: do invalidate as synced operationFernando Sahmkow2019-07-051-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | Async GPU: Always invalidate synced.
| * | | | | Gpu: use an std mutex instead of a spin_lock to guard syncpointsFernando Sahmkow2019-07-052-6/+6
| | | | | |
| * | | | | Gpu: Mark areas as protected.Fernando Sahmkow2019-07-052-0/+13
| | | | | |
| * | | | | nv_services: Stub CtrlEventSignalFernando Sahmkow2019-07-052-1/+14
| | | | | |
| * | | | | Gpu: Implement Hardware Interrupt Manager and manage GPU interruptsFernando Sahmkow2019-07-055-4/+21
| | | | | |
| * | | | | video_core: Implement GPU side SyncpointsFernando Sahmkow2019-07-053-2/+51
| | | | | |
* | | | | | Merge pull request #2739 from lioncash/cflowbunnei2019-07-254-33/+53
|\ \ \ \ \ \ | | | | | | | | | | | | | | video_core/control_flow: Minor changes/warning cleanup
| * | | | | | video_core/control_flow: Provide operator!= for types with operator==Lioncash2019-07-191-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Provides operational symmetry for the respective structures.
| * | | | | | video_core/control_flow: Prevent sign conversion in TryGetBlock()Lioncash2019-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return value is a u32, not an s32, so this would result in an implicit signedness conversion.
| * | | | | | video_core/control_flow: Remove unnecessary BlockStack copy constructorLioncash2019-07-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the default behavior of the copy constructor, so it doesn't need to be specified. While we're at it we can make the other non-default constructor explicit.
| * | | | | | video_core/control_flow: Use std::move where applicableLioncash2019-07-191-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Results in less work being done where avoidable.
| * | | | | | video_core/control_flow: Use the prefix variant of operator++ for iteratorsLioncash2019-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same thing, but potentially allows a standard library implementation to pick a more efficient codepath.
| * | | | | | video_core/control_flow: Use empty() member function for checking emptinessLioncash2019-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's what it's there for.
| * | | | | | video_core: Resolve -Wreorder warningsLioncash2019-07-192-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensures that the constructor members are always initialized in the order that they're declared in.
| * | | | | | video_core/control_flow: Make program_size for ScanFlow() a std::size_tLioncash2019-07-192-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents a truncation warning from occurring with MSVC. Also the internal data structures already treat it as a size_t, so this is just a discrepancy in the interface.
| * | | | | | video_core/control_flow: Place all internally linked types/functions within an anonymous namespaceLioncash2019-07-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, quite a few functions were being linked with external linkage.
| * | | | | | video_core/shader/decode: Prevent sign-conversion warningsLioncash2019-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes it explicit that the conversions here are intentional.
* | | | | | | Merge pull request #2737 from FernandoS27/track-fixbunnei2019-07-251-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Shader_Ir: Correct tracking to track from right to left
| * | | | | | | Shader_Ir: Correct tracking to track from right to leftFernando Sahmkow2019-07-161-2/+2
| | | | | | | |
* | | | | | | | Merge pull request #2743 from FernandoS27/surpress-assertbunnei2019-07-259-29/+36
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | Downgrade and suppress a series of GPU asserts and debug messages.
| * | | | | | | Shader_Ir: Change Debug Asserts for Log WarningsFernando Sahmkow2019-07-203-10/+17
| | | | | | | |
| * | | | | | | Shader_Ir: correct clang formatFernando Sahmkow2019-07-181-2/+2
| | | | | | | |
| * | | | | | | GPU: Add missing puller methods.Fernando Sahmkow2019-07-182-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds some missing puller methods. We don't assert them as these are nop operations for us.
| * | | | | | | MaxwellDMA/KeplerCopy: Downgrade DMA log message to Trace.Fernando Sahmkow2019-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This log was just to know which games used DMA. It's no longer important.
| * | | | | | | Gl_Texture_Cache: Remove assert on component type in GetFormatTupleFernando Sahmkow2019-07-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Textures can have different components types in different orders. This assert was completely inprecise and the effectiveness of such is better handled by case and within the texture cache.
| * | | | | | | Shader_Ir: Downgrade precision and rounding asserts to debug asserts.Fernando Sahmkow2019-07-185-10/+10
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit reduces the sevirity of asserts for FP precision and rounding as this are well known and have little to no consequences in gpu's accuracy.
* | | | | | | Merge pull request #2704 from FernandoS27/conditionalbunnei2019-07-243-2/+100
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | maxwell3d: Implement Conditional Rendering
| * | | | | | maxwell3d: Implement Conditional RenderingFernando Sahmkow2019-07-173-2/+100
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conditional Rendering takes care of conditionaly clearing or drawing depending on a set of queries. This PR implements the query checks to stablish if things can be rendered or not.
* | | | | | Merge pull request #2734 from ReinUsesLisp/compute-shadersbunnei2019-07-2215-140/+357
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_rasterizer: Implement compute shaders
| * | | | | | gl_shader_cache: Fix clang-format issuesReinUsesLisp2019-07-162-4/+2
| | | | | | |
| * | | | | | gl_shader_decompiler: Stub local memory sizeReinUsesLisp2019-07-151-8/+14
| | | | | | |
| * | | | | | gl_shader_cache: Address review commentariesReinUsesLisp2019-07-154-13/+12
| | | | | | |
| * | | | | | gl_shader_cache: Address CI issuesReinUsesLisp2019-07-152-3/+3
| | | | | | |
| * | | | | | gl_rasterizer: Implement compute shadersReinUsesLisp2019-07-1515-136/+350
| | | | | | |
* | | | | | | Merge pull request #2735 from FernandoS27/pipeline-reworkbunnei2019-07-2114-116/+528
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | Rework Dirty Flags in GPU Pipeline, Optimize CBData and Redo Clearing mechanism
| * | | | | | Maxwell3D: Reorganize and address feedbackFernando Sahmkow2019-07-203-20/+33
| | | | | | |
| * | | | | | GL_State: Feedback and fixesFernando Sahmkow2019-07-174-14/+27
| | | | | | |
| * | | | | | Maxwell3D: Address FeedbackFernando Sahmkow2019-07-175-17/+13
| | | | | | |
| * | | | | | Texture_Cache: Rebase FixesFernando Sahmkow2019-07-171-6/+0
| | | | | | |
| * | | | | | GL_Rasterizer: Corrections to Clearing.Fernando Sahmkow2019-07-174-12/+28
| | | | | | |
| * | | | | | Maxwell3D: Correct marking dirtiness on CB uploadFernando Sahmkow2019-07-171-0/+1
| | | | | | |
| * | | | | | GL_Rasterizer: Rework RenderTarget/DepthBuffer clearingFernando Sahmkow2019-07-173-7/+63
| | | | | | |
| * | | | | | Maxwell3D: Implement State Dirty Flags.Fernando Sahmkow2019-07-176-44/+199
| | | | | | |
| * | | | | | Maxwell3D: Rework CBData UploadFernando Sahmkow2019-07-172-8/+45
| | | | | | |
| * | | | | | Maxwell3D: Rework the dirty system to be more consistant and scaleableFernando Sahmkow2019-07-1710-80/+211
| | |/ / / / | |/| | | |
* | | | | | shader/half_set_predicate: Fix HSETP2 implementationReinUsesLisp2019-07-204-44/+23
| | | | | |
* | | | | | shader/half_set_predicate: Implement missing HSETP2 variantsReinUsesLisp2019-07-202-19/+49
| |_|_|/ / |/| | | |
* | | | | Merge pull request #2738 from lioncash/shader-irbunnei2019-07-188-99/+103
|\ \ \ \ \ | |/ / / / |/| | | | shader-ir: Minor cleanup-related changes
| * | | | shader_ir: std::move Node instance where applicableLioncash2019-07-174-60/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are std::shared_ptr instances underneath the hood, which means copying them isn't as cheap as a regular pointer. Particularly so on weakly-ordered systems. This avoids atomic reference count increments and decrements where they aren't necessary for the core set of operations.
| * | | | shader_ir: Rename Get/SetTemporal to Get/SetTemporaryLioncash2019-07-175-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is more accurate in terms of describing what the functions are actually doing. Temporal relates to time, not the setting of a temporary itself.
| * | | | shader_ir: Remove unused includesLioncash2019-07-171-3/+0
| | |/ / | |/| | | | | | | | | | Removes unnecessary header dependencies.
* | | | Merge pull request #2740 from lioncash/braFernando Sahmkow2019-07-171-1/+1
|\ \ \ \ | |/ / / |/| | | shader/decode/other: Correct branch indirect argument within BRA handling
| * | | shader/decode/other: Correct branch indirect argument within BRA handlingLioncash2019-07-161-1/+1
| |/ / | | | | | | | | | | | | This appears to have been a copy/paste error introduced within 8a6fc529a968e007f01464abadd32f9b5eb0a26c
* | | Merge pull request #2565 from ReinUsesLisp/track-indirectFernando Sahmkow2019-07-166-35/+36
|\ \ \ | |/ / |/| | shader/track: Track indirect buffers
| * | shader: Allow tracking of indirect buffers without variable offsetReinUsesLisp2019-07-156-35/+36
| | | | | | | | | | | | | | | | | | While changing this code, simplify tracking code to allow returning the base address node, this way callers don't have to manually rebuild it on each invocation.
* | | Merge pull request #2695 from ReinUsesLisp/layer-viewportFernando Sahmkow2019-07-1510-40/+137
|\ \ \ | | | | | | | | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders
| * | | gl_shader_decompiler: Fix gl_PointSize redeclarationReinUsesLisp2019-07-111-1/+1
| | | |
| * | | gl_shader_decompiler: Fix conditional usage of GL_ARB_shader_viewport_layer_arrayReinUsesLisp2019-07-111-2/+3
| | | |
| * | | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shadersReinUsesLisp2019-07-0810-40/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements gl_ViewportIndex and gl_Layer in vertex and geometry shaders. In the case it's used in a vertex shader, it requires ARB_shader_viewport_layer_array. This extension is available on AMD and Nvidia devices (mesa and proprietary drivers), but not available on Intel on any platform. At the moment of writing this description I don't know if this is a hardware limitation or a driver limitation. In the case that ARB_shader_viewport_layer_array is not available, writes to these registers on a vertex shader are ignored, with the appropriate logging.
* | | | Merge pull request #2705 from FernandoS27/tex-cache-fixesbunnei2019-07-157-22/+58
|\ \ \ \ | |_|/ / |/| | | GPU: Fixes to Texture Cache and Include Microprofiles for GL State/BufferCopy/Macro Interpreter
| * | | Texture_Cache: Address FeedbackFernando Sahmkow2019-07-143-13/+17
| | | |
| * | | Texture_Cache: Remove some unprecise fallback case and clang formatFernando Sahmkow2019-07-142-13/+5
| | | |
| * | | Texture_Cache: Force Framebuffer reset if an active render target is unregistered.Fernando Sahmkow2019-07-143-10/+36
| | | |
| * | | GPU: Add a microprofile for macro interpreterFernando Sahmkow2019-07-142-1/+6
| | | |
| * | | GL_State: Add a microprofile timer to OpenGL state.Fernando Sahmkow2019-07-141-0/+4
| | | |
| * | | Gl_Texture_Cache: Measure Buffer Copy TimesFernando Sahmkow2019-07-141-0/+2
| | | |
| * | | Texture_Cache: Correct Linear Structural Match.Fernando Sahmkow2019-07-141-3/+6
| | | |
* | | | Merge pull request #2675 from ReinUsesLisp/opengl-buffer-cachebunnei2019-07-1516-407/+537
|\ \ \ \ | |/ / / |/| | | buffer_cache: Implement a generic buffer cache and its OpenGL backend
| * | | buffer_cache: Avoid [[nodiscard]] to make clang-format happyReinUsesLisp2019-07-061-5/+4
| | | |
| * | | buffer_cache: Try to fix MinGW buildReinUsesLisp2019-07-061-1/+1
| | | |
| * | | gl_rasterizer: Fix nullptr dereference on disabled buffersReinUsesLisp2019-07-063-5/+5
| | | |
| * | | gl_rasterizer: Minor style changesReinUsesLisp2019-07-064-32/+22
| | | |
| * | | gl_rasterizer: Fix vertex and index data invalidationsReinUsesLisp2019-07-064-8/+67
| | | |
| * | | gl_buffer_cache: Implement with generic buffer cacheReinUsesLisp2019-07-068-291/+92
| | | |
| * | | buffer_cache: Implement a generic buffer cacheReinUsesLisp2019-07-062-0/+301
| | | | | | | | | | | | | | | | | | | | | | | | Implements a templated class with a similar approach to our current generic texture cache. It is designed to be compatible with Vulkan and OpenGL,
| * | | gl_buffer_cache: Remove global system gettersReinUsesLisp2019-07-063-9/+14
| | | |
| * | | gl_device: Query SSBO alignmentReinUsesLisp2019-07-062-0/+6
| | | |
| * | | gl_buffer_cache: Implement flushingReinUsesLisp2019-07-062-2/+11
| | | |
| * | | gl_rasterizer: Drop gl_global_cache in favor of gl_buffer_cacheReinUsesLisp2019-07-067-206/+35
| | | |
| * | | gl_buffer_cache: Rework to support internalized buffersReinUsesLisp2019-07-063-65/+174
| | | |
| * | | gl_buffer_cache: Store in CachedBufferEntry the used buffer handleReinUsesLisp2019-07-062-23/+30
| | | |
| * | | gl_buffer_cache: Return used buffer from Upload functionReinUsesLisp2019-07-064-36/+35
| | | |
| * | | gl_rasterizer: Add some commentariesReinUsesLisp2019-07-061-0/+5
| | | |
| * | | gl_rasterizer: Make DrawParameters rasterizer instance constReinUsesLisp2019-07-061-1/+1
| | | |
| * | | gl_rasterizer: Move index buffer uploading to its own methodReinUsesLisp2019-07-062-7/+18
| | |/ | |/|
* | | Merge pull request #2690 from SciresM/physmem_fixesFernando Sahmkow2019-07-143-4/+30
|\ \ \ | | | | | | | | Implement MapPhysicalMemory/UnmapPhysicalMemory
| * | | prefer system reference over global accessorMichael Scire2019-07-093-9/+13
| | | |
| * | | Prevent merging of device mapped memory blocks.Michael Scire2019-07-091-1/+23
| |/ / | | | | | | | | | | | | | | | | | | This sets the DeviceMapped attribute for GPU-mapped memory blocks, and prevents merging device mapped blocks. This prevents memory mapped from the gpu from having its backing address changed by block coalesce.
* | | Merge pull request #2692 from ReinUsesLisp/tlds-f16Fernando Sahmkow2019-07-142-2/+9
|\ \ \ | | | | | | | | shader/texture: Add F16 support for TLDS
| * | | shader/texture: Add F16 support for TLDSReinUsesLisp2019-07-072-2/+9
| |/ /
* | | Merge pull request #2609 from FernandoS27/new-scanbunnei2019-07-1114-122/+772
|\ \ \ | | | | | | | | Implement a New Shader Scanner, Decompile Flow Stack and implement BRX BRA.CC
| * | | shader_ir: Add comments on missing instruction.Fernando Sahmkow2019-07-092-2/+9
| | | | | | | | | | | | | | | | Also shows Nvidia's address space on comments.
| * | | shader_ir: limit explorastion to best known program size.Fernando Sahmkow2019-07-091-1/+1
| | | |
| * | | control_flow: Correct block breaking algorithm.Fernando Sahmkow2019-07-091-17/+17
| | | |
| * | | control_flow: Assert shaders bigger than limit.Fernando Sahmkow2019-07-091-0/+2
| | | |
| * | | control_flow: Address feedback.Fernando Sahmkow2019-07-091-89/+37
| | | |
| * | | shader_ir: Correct parsing of scheduling instructions and correct sizingFernando Sahmkow2019-07-092-13/+30
| | | |
| * | | shader_ir: Correct max sizingFernando Sahmkow2019-07-092-2/+2
| | | |
| * | | shader_ir: Remove unnecessary constructors and use optional for ScanFlow resultFernando Sahmkow2019-07-093-28/+17
| | | |
| * | | shader_ir: Corrections, documenting and asserting control_flowFernando Sahmkow2019-07-093-52/+54
| | | |
| * | | shader_ir: Unify blocks in decompiled shaders.Fernando Sahmkow2019-07-097-58/+85
| | | |
| * | | shader_ir: Decompile Flow StackFernando Sahmkow2019-07-094-11/+206
| | | |
| * | | shader_ir: propagate shader size to the IRFernando Sahmkow2019-07-096-17/+28
| | | |
| * | | shader_ir: Implement BRX & BRA.CCFernando Sahmkow2019-07-096-4/+76
| | | |
| * | | shader_ir: Remove the old scanner.Fernando Sahmkow2019-07-092-77/+0
| | | |
| * | | shader_ir: Implement a new shader scannerFernando Sahmkow2019-07-094-16/+473
| | |/ | |/|
* | | Merge pull request #2697 from lioncash/docbunnei2019-07-101-7/+9
|\ \ \ | | | | | | | | gl_rasterizer: Amend documentation comment for ConfigureFramebuffers()
| * | | gl_rasterizer: Amend documentation comment for ConfigureFramebuffers()Lioncash2019-07-091-7/+9
| | |/ | |/| | | | | | | | | | | | | | | | | | | must_reconfigure isn't a parameter for this function any more, so it can be replaced with current_state. While we're at it, we can make the parameters of the declaration match the same name as the ones in the definition.
* | | Merge pull request #2686 from ReinUsesLisp/vk-schedulerbunnei2019-07-106-50/+60
|\ \ \ | | | | | | | | vk_scheduler: Drop execution context in favor of views
| * | | vk_scheduler: Drop execution context in favor of viewsReinUsesLisp2019-07-076-50/+60
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of passing by copy an execution context through out the whole Vulkan call hierarchy, use a command buffer view and fence view approach. This internally dereferences the command buffer or fence forcing the user to be unable to use an outdated version of it on normal usage. It is still possible to keep store an outdated if it is casted to VKFence& or vk::CommandBuffer. While changing this file, add an extra parameter for Flush and Finish to allow releasing the fence from this calls.
* | | Merge pull request #2691 from lioncash/overridebunnei2019-07-102-7/+4
|\ \ \ | |_|/ |/| | video_core: Add missing override specifiers
| * | vk_sampler_cache: Remove unused includesLioncash2019-07-071-3/+0
| | | | | | | | | | | | These are no longer used within this header, so they can be removed.
| * | video_core: Add missing override specifiersLioncash2019-07-072-4/+4
| |/
* / Delete decode_integer_set.cppTobias2019-07-071-0/+0
|/
* Merge pull request #2601 from FernandoS27/texture_cacheZach Hilman2019-07-0555-3269/+4114
|\ | | | | Implement a new Texture Cache
| * texture_cache: Address FeedbackFernando Sahmkow2019-07-054-12/+13
| |
| * texture_cache: Correct Texture Buffer UploadingFernando Sahmkow2019-07-053-2/+18
| |
| * texture_cache: Pack sibling queries inside a methodReinUsesLisp2019-06-301-6/+8
| |
| * texture_cache: Use std::vector reservation for sampled_texturesReinUsesLisp2019-06-301-17/+10
| |
| * texture_cache: Style changesReinUsesLisp2019-06-303-17/+13
| |
| * texture_cache: Use std::array for siblings_tableReinUsesLisp2019-06-291-10/+13
| |
| * texture_cache: Address feedbackReinUsesLisp2019-06-294-30/+13
| |
| * texture_cache: Correct variable naming.Fernando Sahmkow2019-06-261-3/+3
| |
| * gl_texture_cache: Correct assertsFernando Sahmkow2019-06-262-2/+2
| |
| * texture_cache: Corrections, documentation and assertsFernando Sahmkow2019-06-261-42/+42
| |
| * surface_params: Corrections, asserts and documentation.Fernando Sahmkow2019-06-262-43/+58
| |
| * copy_params: use constexpr for constructorFernando Sahmkow2019-06-251-3/+4
| |
| * gl_texture_cache: Corrections and fixesFernando Sahmkow2019-06-252-13/+9
| |
| * gl_resource_manager: Correct MakeStreamCopyFernando Sahmkow2019-06-252-3/+2
| |
| * texture_cache: Query MemoryManager from the systemFernando Sahmkow2019-06-255-20/+7
| |
| * texture_cache: Include "core/core.h"ReinUsesLisp2019-06-241-4/+1
| |
| * gl_texture_cache: Explicitly add indirect includeReinUsesLisp2019-06-241-0/+1
| |
| * texture_cache/surface_view: Address feedbackReinUsesLisp2019-06-241-1/+0
| |
| * texture_cache/surface_base: Address feedbackReinUsesLisp2019-06-242-2/+10
| |
| * video_core/surface: Address feedbackReinUsesLisp2019-06-241-2/+2
| |
| * decode/texture: Address feedbackReinUsesLisp2019-06-241-0/+1
| |
| * renderer_opengl/utils: Remove unused includes and unused forward declarationReinUsesLisp2019-06-241-4/+0
| |
| * gl_texture_cache: Address some feedbackReinUsesLisp2019-06-241-2/+4
| |
| * gl_shader_disk_cache: Address feedbackReinUsesLisp2019-06-242-4/+8
| |
| * gl_shader_decompiler: Address feedbackReinUsesLisp2019-06-241-11/+12
| |
| * shader_bytecode: Include missing <array>ReinUsesLisp2019-06-241-0/+1
| |
| * texture_cache: Style and CorrectionsFernando Sahmkow2019-06-217-71/+75
| |
| * shader_cache: Correct versioning and size calculation.Fernando Sahmkow2019-06-212-2/+7
| |
| * texture_cache: Eliminate linear textures fallthroughFernando Sahmkow2019-06-211-4/+0
| |
| * texture_cache: Correct format R16U as siblingFernando Sahmkow2019-06-212-1/+2
| |
| * texture_cache: Implement texception detection and texture barriers.Fernando Sahmkow2019-06-212-7/+40
| |
| * texture_cache: Corrections to buffers and shadow formats use.Fernando Sahmkow2019-06-211-10/+34
| |
| * texture_cache: Implement Irregular Views in surfacesFernando Sahmkow2019-06-212-4/+24
| |
| * surface: Correct format S8Z24Fernando Sahmkow2019-06-214-9/+5
| |
| * texture_cache: Initialize all siblings to invalid pixel format.Fernando Sahmkow2019-06-211-6/+15
| |
| * gl_texture_cache: Use Stream Buffers instead of Persistant for Buffer Copies.Fernando Sahmkow2019-06-213-5/+4
| |
| * gl_texture_cache: Correct Image BlitFernando Sahmkow2019-06-211-1/+1
| |
| * decoders: correct block calculationFernando Sahmkow2019-06-217-29/+41
| |
| * texture_cache: Use siblings textures on Rebuild and fix possible error on blittingFernando Sahmkow2019-06-212-11/+24
| |
| * texture_cache: Remove old rasterizer cacheFernando Sahmkow2019-06-212-1956/+0
| |
| * texture_cache: Implement siblings texture formats.Fernando Sahmkow2019-06-212-12/+31
| |
| * fermi2d: Correct Origin ModeFernando Sahmkow2019-06-211-5/+10
| |
| * texture_cache: correct texture buffer on surface paramsFernando Sahmkow2019-06-211-4/+11
| |
| * texture_cache: eliminate accelerated depth->color/color->depth copies due to driver instability.Fernando Sahmkow2019-06-214-22/+6
| |
| * texture_cache: correct mutex locksFernando Sahmkow2019-06-211-4/+4
| |
| * shader_ir: Fix image copy rebase issuesFernando Sahmkow2019-06-211-2/+7
| |
| * texture_cache: Don't Image Copy if component types differFernando Sahmkow2019-06-211-1/+2
| |
| * texture_cache: move some large methods to cpp filesFernando Sahmkow2019-06-214-139/+135
| |
| * texture_cache: Optimize GetSurface and use references on functions that don't change a surface.Fernando Sahmkow2019-06-213-12/+12
| |
| * texture_cache: Implement Buffer Copy and detect Turing GPUs Image CopiesFernando Sahmkow2019-06-218-12/+148
| |
| * texture_cache uncompress-compress is untopological.Fernando Sahmkow2019-06-215-19/+53
| | | | | | | | | | | | This makes conflicts between non compress and compress textures to be auto recycled. It also limits the amount of mipmaps a texture can have if it goes above it's limit.
| * texture_cache: Correct copying between compressed and uncompressed formatsFernando Sahmkow2019-06-213-10/+27
| |
| * texture_cache: Only load on recycle with accurate GPU.Fernando Sahmkow2019-06-211-2/+3
| | | | | | | | | | Testing so far has proven this to be quite safe as texture memory read added a 2-5ms load to the current cache.
| * Fix rebase errorsFernando Sahmkow2019-06-213-3/+13
| |
| * texture_cache: Handle uncontinuous surfaces.Fernando Sahmkow2019-06-214-21/+82
| |
| * texture_cache: return null surface on invalid addressFernando Sahmkow2019-06-211-0/+12
| |
| * texture_cache: Add checks for texture buffers.Fernando Sahmkow2019-06-211-2/+16
| |
| * texture_cache: Fermi2D reform and implement View MirageFernando Sahmkow2019-06-2111-77/+125
| | | | | | | | | | This also does some fixes on compressed textures reinterpret and on the Fermi2D engine in general.
| * gl_shader_decompiler: Implement image binding settingsReinUsesLisp2019-06-215-24/+52
| |
| * shader: Implement bindless imagesReinUsesLisp2019-06-213-2/+40
| |
| * shader: Decode SUST and implement backing image functionalityReinUsesLisp2019-06-218-3/+282
| |
| * gl_rasterizer: Track texture buffer usageReinUsesLisp2019-06-216-74/+119
| |
| * video_core: Make ARB_buffer_storage a required extensionReinUsesLisp2019-06-213-8/+5
| |
| * gl_rasterizer_cache: Use texture buffers to emulate texture buffersReinUsesLisp2019-06-215-11/+35
| |
| * maxwell_3d: Partially implement texture buffers as 1D texturesReinUsesLisp2019-06-214-10/+24
| |
| * gl_shader_decompiler: Allow 1D textures to be texture buffersReinUsesLisp2019-06-211-4/+38
| |
| * shader: Implement texture buffersReinUsesLisp2019-06-213-0/+62
| |
| * texture_cache: loose TryReconstructSurface when accurate GPU is not on.Fernando Sahmkow2019-06-213-4/+20
| | | | | | | | Also corrects some asserts.
| * texture_cache: Document the most important methods.Fernando Sahmkow2019-06-211-8/+87
| |
| * texture_cache: Try to Reconstruct Surface on bigger than overlap.Fernando Sahmkow2019-06-211-4/+11
| | | | | | | | | | This fixes clouds in SMO Cap Kingdom and lens on Cloud Kingdom. Also moved accurate_gpu setting check to Pick Strategy
| * texture_cache: Implement Guard mechanismFernando Sahmkow2019-06-212-1/+12
| |
| * texture_cache: General FixesFernando Sahmkow2019-06-218-47/+170
| | | | | | | | | | | | | | Fixed ASTC mipmaps loading Fixed alignment on openGL upload/download Fixed Block Height Calculation Removed unalign_height
| * surface_params: Ensure pitch is always written to avoid surface leaksReinUsesLisp2019-06-211-0/+2
| |
| * gl_framebuffer_cache: Use a hashed struct to cache framebuffersReinUsesLisp2019-06-216-62/+148
| |
| * texture_cache return invalid buffer on deactivated color_maskFernando Sahmkow2019-06-212-2/+9
| |
| * engine_upload: Addapt to new Texture CacheFernando Sahmkow2019-06-212-5/+5
| |
| * surface_params: Optimize CreateForTextureReinUsesLisp2019-06-212-72/+76
| | | | | | | | | | Instead of using Common::AlignUp, use Common::AlignBits to align the texture compression factor.
| * gl_texture_cache: Make main views be proxy textures instead of a full view.Fernando Sahmkow2019-06-212-11/+25
| |
| * texture_cache: Add ASync ProtectionsFernando Sahmkow2019-06-211-0/+10
| |
| * Remove Framebuffer reconfiguration and restrict rendertarget protectionFernando Sahmkow2019-06-214-39/+27
| |
| * texture_cache: Implement GPU Dirty FlagsFernando Sahmkow2019-06-211-15/+22
| |
| * texture_cache: Optimize GetMipBlockHeight and GetMipBlockDepthFernando Sahmkow2019-06-211-13/+6
| |
| * texture_cache: Implement L1_Inner_cacheFernando Sahmkow2019-06-211-13/+30
| |
| * video_core: Use un-shifted block sizes to avoid integer divisionsReinUsesLisp2019-06-219-60/+73
| | | | | | | | | | | | | | | | | | | | | | | | Instead of storing all block width, height and depths in their shifted form: block_width = 1U << block_shift; Store them like they are provided by the emulated hardware (their block_shift form). This way we can avoid doing the costly Common::AlignUp operation to align texture sizes and drop CPU integer divisions with bitwise logic (defined in Common::AlignBits).
| * texture_cache: Change internal cache from lists to vectorsReinUsesLisp2019-06-211-6/+7
| |
| * Reduce amount of size calculations.Fernando Sahmkow2019-06-217-88/+86
| |
| * texture_cache: Correct premature texceptionsFernando Sahmkow2019-06-214-14/+51
| | | | | | | | | | | | | | | | | | | | | | | | Due to our current infrastructure, it is possible for a mipmap to be set on as a render target before a texception of that mipmap's superset be set afterwards. This is problematic as we rely on texture views to set up texceptions and protecting render targets targets for 3D texture rendering. One simple solution is to configure framebuffers after texture setup but this brings other problems. This solution, forces a reconfiguration of the framebuffers after such event happens.
| * texture_cache: Implement guest flushingFernando Sahmkow2019-06-213-10/+29
| |
| * Fixes to mipmap's process and reconstruct processFernando Sahmkow2019-06-212-3/+3
| |
| * surface_base: Add parenthesis to EmplaceOverview's predicateReinUsesLisp2019-06-211-3/+2
| |
| * Texture Cache: Implement Blitting and Fermi CopiesFernando Sahmkow2019-06-217-100/+93
| |
| * surface_view: Add constructor for ViewParamsReinUsesLisp2019-06-213-39/+23
| |
| * surface_base: Split BreakDown into layered and non-layered variantsReinUsesLisp2019-06-211-45/+48
| |
| * surface_base: Silence truncation warnings and minor renames and reorderingReinUsesLisp2019-06-212-32/+37
| |
| * copy_params: Use constructor instead of C-like initializationReinUsesLisp2019-06-213-47/+39
| |
| * Correct Mipmaps View method in Texture CacheFernando Sahmkow2019-06-213-32/+29
| |
| * Change texture_cache chaching from GPUAddr to CacheAddrFernando Sahmkow2019-06-217-101/+60
| | | | | | | | | | This also reverses the changes to make invalidation and flushing through the GPU address.
| * Corrections to Structural MatchingFernando Sahmkow2019-06-212-24/+53
| | | | | | | | | | The texture will now be reconstructed if the width only matches on GoB alignment.
| * Implement Texture Cache V2Fernando Sahmkow2019-06-216-381/+568
| |
| * Correct Surface Base and Views for new Texture CacheFernando Sahmkow2019-06-217-380/+466
| |
| * Add OGLTextureViewFernando Sahmkow2019-06-212-0/+43
| |
| * Deglobalize Memory Manager on texture cahe and Implement Invalidation and Flushing using GPUVAddrFernando Sahmkow2019-06-214-1/+20
| |
| * texture_cache: Remove execution context copies from the texture cacheReinUsesLisp2019-06-217-168/+59
| | | | | | | | | | This is done to simplify the OpenGL implementation, it is needed for Vulkan.
| * gl_texture_cache: Implement fermi copiesReinUsesLisp2019-06-215-2/+105
| |
| * texture_cache: Split texture cache into different filesReinUsesLisp2019-06-2112-876/+965
| |
| * texture_cache: Move staging buffer into a generic implementationReinUsesLisp2019-06-214-181/+211
| |
| * texture_cache: Flush 3D textures in the order they are drawnReinUsesLisp2019-06-215-19/+44
| |
| * gl_texture_cache: Minor changesReinUsesLisp2019-06-215-140/+185
| |
| * gl_texture_cache: Add copy from multiple overlaps into a single surfaceReinUsesLisp2019-06-213-6/+84
| |
| * gl_texture_cache: Attach surface textures instead of viewsReinUsesLisp2019-06-213-20/+32
| |
| * gl_texture_cache: Add fast copy pathReinUsesLisp2019-06-214-7/+60
| |
| * gl_texture_cache: Initial implementationReinUsesLisp2019-06-219-47/+809
| |
* | gl_shader_cache: Make CachedShader constructor privateZach Hilman2019-07-042-5/+5
| | | | | | | | Fixes missing review comments introduced.
* | Merge pull request #2563 from ReinUsesLisp/shader-initializersZach Hilman2019-07-042-52/+53
|\ \ | | | | | | gl_shader_cache: Use static constructors for CachedShader initialization
| * | gl_shader_cache: Use static constructors for CachedShader initializationReinUsesLisp2019-06-082-52/+53
| | |
* | | rasterizer_cache: Protect inherited caches from submission levelFernando Sahmkow2019-07-013-1/+5
| | |
* | | Merge pull request #2579 from ReinUsesLisp/fix-aoffi-testbunnei2019-06-211-1/+2
|\ \ \ | |_|/ |/| | gl_device: Fix TestVariableAoffi test
| * | gl_device: Fix TestVariableAoffi testReinUsesLisp2019-06-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test is intended to be invalid GLSL, but it was being invalid in two points instead of one. The intention is to use a non-immediate parameter in a textureOffset like function. The problem is that this shader was being compiled as a separable shader object and the text was writting to gl_Position without a redeclaration, being invalid GLSL. Address that issue by using a user-defined output attribute.
* | | Merge pull request #2591 from lioncash/recordbunnei2019-06-201-1/+0
|\ \ \ | | | | | | | | core: Remove unused CiTrace source files
| * | | core: Remove unused CiTrace source filesLioncash2019-06-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These source files have been unused for the entire lifecycle of the project. They're a hold-over from Citra and only add to the build time of the project, so they can be removed. There's also likely no way this would ever work in yuzu in its current form without revamping quite a bit of it, given how different the GPU on the Switch is compared to the 3DS.
* | | | Merge pull request #2562 from ReinUsesLisp/split-cbuf-uploadbunnei2019-06-186-56/+69
|\ \ \ \ | | | | | | | | | | video_core/engines: Move ConstBufferInfo out of Maxwell3D
| * | | | gl_rasterizer: Remove unused parameters in descriptor uploadsReinUsesLisp2019-06-082-8/+6
| | | | |
| * | | | video_core/engines: Move ConstBufferInfo out of Maxwell3DReinUsesLisp2019-06-086-49/+64
| | |_|/ | |/| |
* | | | Merge pull request #2538 from ReinUsesLisp/ssy-pbkZach Hilman2019-06-164-27/+78
|\ \ \ \ | |_|_|/ |/| | | shader: Split SSY and PBK stack
| * | | shader: Split SSY and PBK stackReinUsesLisp2019-06-074-27/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware testing revealed that SSY and PBK push to a different stack, allowing code like this: SSY label1; PBK label2; SYNC; label1: PBK; label2: EXIT;
* | | | Merge pull request #2572 from FernandoS27/gpu-membunnei2019-06-121-2/+2
|\ \ \ \ | |_|_|/ |/| | | GPUVM: Correct GPU VM virtual address space
| * | | GPUVM: Correct GPU VM virtual address spaceFernando Sahmkow2019-06-091-2/+2
| | |/ | |/|
* | | kepler_compute: Use std::array for cbuf infoReinUsesLisp2019-06-081-2/+3
| | |
* | | kepler_compute: Fix block_dim_x encodingReinUsesLisp2019-06-081-1/+1
|/ /
* | Merge pull request #2514 from ReinUsesLisp/opengl-compatZach Hilman2019-06-0716-223/+42
|\ \ | |/ |/| video_core: Drop OpenGL core in favor of OpenGL compatibility
| * gl_buffer_cache: Remove unused ReserveMemory methodReinUsesLisp2019-05-302-13/+0
| |
| * maxwell_to_gl: Use GL_CLAMP to emulate Clamp wrap modeReinUsesLisp2019-05-303-7/+4
| |
| * gl_rasterizer: Move alpha testing to the OpenGL pipelineReinUsesLisp2019-05-308-71/+33
| | | | | | | | Removes the alpha testing code from each fragment shader invocation.
| * gl_rasterizer: Use GL_QUADS to emulate quads renderingReinUsesLisp2019-05-306-132/+5
| |
* | shader/node: Minor changesReinUsesLisp2019-06-071-50/+54
| | | | | | | | | | | | | | Reflect std::shared_ptr nature of Node on initializers and remove constant members in nodes. Add some commentaries.
* | shader: Move Node declarations out of the shader IR headerReinUsesLisp2019-06-074-493/+518
| | | | | | | | | | | | Analysis passes do not have a good reason to depend on shader_ir.h to work on top of nodes. This splits node-related declarations to their own file and leaves the IR in shader_ir.h
* | shader: Use shared_ptr to store nodes and move initialization to fileReinUsesLisp2019-06-0635-248/+296
| | | | | | | | | | | | | | | | | | Instead of having a vector of unique_ptr stored in a vector and returning star pointers to this, use shared_ptr. While changing initialization code, move it to a separate file when possible. This is a first step to allow code analysis and node generation beyond the ShaderIR class.
* | Merge pull request #2520 from ReinUsesLisp/vulkan-refreshbunnei2019-06-064-88/+218
|\ \ | | | | | | vk_device,vk_shader_decompiler: Miscellaneous changes
| * | vk_device: Let formats array type be deducedReinUsesLisp2019-05-261-33/+33
| | |
| * | vk_shader_decompiler: Misc fixesReinUsesLisp2019-05-262-45/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix missing OpSelectionMerge instruction. This caused devices loses on most hardware, Intel didn't care. Fix [-1;1] -> [0;1] depth conversions. Conditionally use VK_EXT_scalar_block_layout. This allows us to use non-std140 layouts on UBOs. Update external Vulkan headers.
| * | vk_device: Enable features when available and misc changesReinUsesLisp2019-05-262-43/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keeps track of native ASTC support, VK_EXT_scalar_block_layout availability and SSBO range. Check for independentBlend and vertexPipelineStorageAndAtomics as a required feature. Always enable it. Use vk::to_string format to log Vulkan enums. Style changes.
* | | Merge pull request #2540 from ReinUsesLisp/remove-guest-positionbunnei2019-06-062-36/+21
|\ \ \ | | | | | | | | gl_shader_decompiler: Remove guest "position" varying
| * | | gl_shader_decompiler: Remove guest "position" varyingReinUsesLisp2019-06-032-36/+21
| | |/ | |/| | | | | | | | | | | | | | | | | | | "position" was being written but not read anywhere besides geometry shaders, where it had the same value as gl_Position. This commit replaces "position" with gl_Position, reducing the complexity of our code and the emitted GLSL code.
* | | Merge pull request #2512 from ReinUsesLisp/comp-indexingbunnei2019-06-063-3/+80
|\ \ \ | | | | | | | | gl_shader_decompiler: Pessimize uniform buffer access on AMD's prorpietary driver
| * | | gl_shader_decompiler: Use an if based cbuf indexing for broken driversReinUsesLisp2019-05-241-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following code is broken on AMD's proprietary GLSL compiler: ```glsl uint idx = ...; vec4 values = ...; float some_value = values[idx & 3]; ``` It index the wrong components, to fix this the following pessimized code is emitted when that bug is present: ```glsl uint idx = ...; vec4 values = ...; float some_value; if ((idx & 3) == 0) some_value = values.x; if ((idx & 3) == 1) some_value = values.y; if ((idx & 3) == 2) some_value = values.z; if ((idx & 3) == 3) some_value = values.w; ```
| * | | gl_device: Add test to detect broken component indexingReinUsesLisp2019-05-242-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Component indexing on AMD's proprietary driver is broken. This commit adds a test to detect when we are on a driver that can't successfully manage component indexing. It dispatches a dummy draw with just one vertex shader that writes to an indexed SSBO from the GPU with data sent through uniforms, it then reads that data from the CPU and compares the expected output.
* | | | Merge pull request #2545 from lioncash/timingZach Hilman2019-06-051-1/+1
|\ \ \ \ | | | | | | | | | | core/core_timing_util: Use std::chrono types for specifying time units
| * | | | core/core_timing_util: Use std::chrono types for specifying time unitsLioncash2019-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Makes the interface more type-safe and consistent in terms of return values.
* | | | | Merge pull request #2534 from ReinUsesLisp/shader-cleanupZach Hilman2019-06-052-31/+36
|\ \ \ \ \ | |/ / / / |/| | | | gl_shader_cache: Minor style changes
| * | | | gl_shader_cache: Store a system class and drop global accessorsReinUsesLisp2019-05-302-7/+9
| | | | |
| * | | | gl_shader_cache: Add commentaries explaining the intention in shaders creationReinUsesLisp2019-05-301-0/+2
| | | | |
| * | | | gl_shader_cache: Flip if condition in GetStageProgram to reduce indentationReinUsesLisp2019-05-301-25/+26
| | |/ / | |/| |
* / | | shader_bytecode: Mark EXIT as flow instructionFernando Sahmkow2019-06-041-1/+1
|/ / /
* | | Merge pull request #2446 from ReinUsesLisp/tidbunnei2019-05-294-22/+76
|\ \ \ | | | | | | | | shader: Implement S2R Tid{XYZ} and CtaId{XYZ}
| * | | shader: Implement S2R Tid{XYZ} and CtaId{XYZ}ReinUsesLisp2019-05-204-15/+69
| | | |
| * | | gl_shader_decompiler: Make GetSwizzle constexprReinUsesLisp2019-05-201-7/+7
| | | |
* | | | gl_device: Add commentary to AOFFI unit test source codeReinUsesLisp2019-05-271-0/+1
| | | | | | | | | | | | | | | | | | | | The intention behind this commit is to hint someone inspecting an apitrace dump to ignore this ill-formed GLSL code.
* | | | gl_shader_gen: Always declare extensions after the version declarationReinUsesLisp2019-05-272-7/+5
| |_|/ |/| | | | | | | | | | | This addresses a bug on geometry shaders where code was being written before all #extension declarations were done. Ref to #2523
* | | renderer_opengl/utils: Use a std::string_view with LabelGLObject()Lioncash2019-05-252-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses a std::string_view instead of a std::string, given the pointed to string isn't modified and is only used in a formatting operation. This is nice because a few usages directly supply a string literal to the function, allowing these usages to otherwise not heap allocate, unlike the std::string overloads. While we're at it, we can combine the address formatting into a single formatting call.
* | | Merge pull request #2358 from ReinUsesLisp/parallel-shaderbunnei2019-05-258-53/+113
|\ \ \ | | | | | | | | gl_shader_cache: Use shared contexts to build shaders in parallel at boot
| * | | gl_shader_cache: Fix clang strict standard build issuesReinUsesLisp2019-05-213-9/+13
| | | |
| * | | gl_shader_cache: Use shared contexts to build shaders in parallelReinUsesLisp2019-05-216-47/+103
| | | |
* | | | Merge pull request #2485 from ReinUsesLisp/generic-memorybunnei2019-05-253-35/+73
|\ \ \ \ | |_|_|/ |/| | | shader/memory: Implement generic memory stores and loads (ST and LD)
| * | | shader/memory: Implement ST (generic memory)ReinUsesLisp2019-05-212-21/+36
| | | |
| * | | shader/memory: Implement LD (generic memory)ReinUsesLisp2019-05-213-15/+38
| |/ /
* | | shader/shader_ir: Make Comment() take a std::string by valueLioncash2019-05-232-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for forming comment nodes without making unnecessary copies of the std::string instance. e.g. previously: Comment(fmt::format("Base address is c[0x{:x}][0x{:x}]", cbuf->GetIndex(), cbuf_offset)); Would result in a copy of the string being created, as CommentNode() takes a std::string by value (a const ref passed to a value parameter results in a copy). Now, only one instance of the string is ever moved around. (fmt::format returns a std::string, and since it's returned from a function by value, this is a prvalue (which can be treated like an rvalue), so it's moved into Comment's string parameter), we then move it into the CommentNode constructor, which then moves the string into its member variable).
* | | shader/decode/*: Add missing newline to files lacking themLioncash2019-05-2318-18/+18
| | | | | | | | | | | | Keeps the shader code file endings consistent.
* | | shader/decode/*: Eliminate indirect inclusionsLioncash2019-05-236-1/+5
| | | | | | | | | | | | | | | | | | | | | Amends cases where we were using things that were indirectly being satisfied through other headers. This way, if those headers change and eliminate dependencies on other headers in the future, we don't have cascading compilation errors.
* | | shader/decode/memory: Remove left in debug pragmaLioncash2019-05-221-2/+0
| | |
* | | renderer_opengl/gl_shader_decompiler: Remove redundant name specification in format stringLioncash2019-05-211-1/+1
|/ / | | | | | | This accidentally slipped through a rebase.
* | Merge pull request #2494 from lioncash/shader-textbunnei2019-05-211-181/+195
|\ \ | |/ |/| gl_shader_decompiler: Add AddLine() overloads with single function that forwards to libfmt
| * gl_shader_decompiler: Tidy up minor remaining cases of unnecessary std::string concatenationLioncash2019-05-201-21/+20
| |
| * gl_shader_decompiler: Replace individual overloads with the fmt-based oneLioncash2019-05-201-28/+16
| | | | | | | | | | | | | | | | | | | | Gets rid of the need to special-case brace handling depending on the overload used, and makes it consistent across the board with how fmt handles them. Strings with compile-time deducible strings are directly forwarded to std::string's constructor, so we don't need to worry about the performance difference here, as it'll be identical.
| * gl_shader_decompiler: Utilize fmt overload of AddLine() where applicableLioncash2019-05-201-136/+152
| |
| * gl_shader_decompiler: Add AddLine() overload that forwards to fmtLioncash2019-05-191-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a lot of places throughout the decompiler, string concatenation via operator+ is used quite heavily. This is usually fine, when not heavily used, but when used extensively, can be a problem. operator+ creates an entirely new heap allocated temporary string and given we perform expressions like: std::string thing = a + b + c + d; this ends up with a lot of unnecessary temporary strings being created and discarded, which kind of thrashes the heap more than we need to. Given we utilize fmt in some AddLine calls, we can make this a part of the ShaderWriter's API. We can make an overload that simply acts as a passthrough to fmt. This way, whenever things need to be appended to a string, the operation can be done via a single string formatting operation instead of discarding numerous temporary strings. This also has the benefit of making the strings themselves look nicer and makes it easier to spot errors in them.
* | Revert #2466Fernando Sahmkow2019-05-191-1/+3
|/ | | | | | This reverts a tested behavior on delay slots not exiting if the exit flag is set. Currently new tests are required in order to ensure this behavior.
* Merge pull request #2441 from ReinUsesLisp/al2pbunnei2019-05-1910-157/+310
|\ | | | | shader: Implement AL2P and ALD.PHYS
| * shader_ir/other: Implement IPA.IDXReinUsesLisp2019-05-032-5/+9
| |
| * gl_shader_decompiler: Skip physical unused attributesReinUsesLisp2019-05-031-18/+27
| |
| * shader_ir/memory: Assert on non-32 bits ALD.PHYSReinUsesLisp2019-05-031-0/+3
| |
| * shader: Add physical attributes commentariesReinUsesLisp2019-05-034-4/+8
| |
| * gl_shader_decompiler: Implement GLSL physical attributesReinUsesLisp2019-05-032-66/+101
| |
| * shader_ir/memory: Implement physical input attributesReinUsesLisp2019-05-034-6/+32
| |
| * gl_shader_decompiler: Abstract generic attribute operationsReinUsesLisp2019-05-031-29/+26
| |
| * gl_shader_decompiler: Declare all possible varyings on physical attribute usageReinUsesLisp2019-05-034-27/+88
| |
| * shader: Remove unused AbufNode Ipa modeReinUsesLisp2019-05-036-35/+14
| |
| * shader_ir/memory: Emit AL2P IRReinUsesLisp2019-05-032-0/+22
| |
| * shader_bytecode: Add AL2P decodingReinUsesLisp2019-05-031-2/+15
| |
* | Merge pull request #2491 from FernandoS27/dma-fixHexagon122019-05-191-0/+7
|\ \ | | | | | | Dma_pusher: ASSERT on empty command_list
| * | Dma_pusher: ASSERT on empty command_listFernando Sahmkow2019-05-191-0/+7
| | | | | | | | | | | | | | | This is a measure to avoid crashes on command list reading as an empty command_list is considered a NOP.
* | | Merge pull request #2452 from FernandoS27/raster-cache-fixHexagon122019-05-191-1/+2
|\ \ \ | | | | | | | | Correct possible error on Rasterizer Caches
| * | | Correct possible error on Rasterizer CachesFernando Sahmkow2019-05-071-1/+2
| | | | | | | | | | | | | | | | | | | | There was a weird bug that could happen if the object died directly and the cache address wasn't stored.
* | | | Merge pull request #2497 from lioncash/shader-irHexagon122019-05-193-32/+28
|\ \ \ \ | | | | | | | | | | shader/shader_ir: Minor changes
| * | | | shader/shader_ir: Remove unnecessary inline specifiersLioncash2019-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | constexpr internally links by default, so the inline specifier is unnecessary.
| * | | | shader/shader_ir: Simplify constructors for OperationNodeLioncash2019-05-191-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of these constructors don't even need to be templated. The only ones that need to be templated are the ones that actually make use of the parameter pack. Even then, since std::vector accepts an initializer list, we can supply the parameter pack directly to it instead of creating our own copy of the list, then copying it again into the std::vector.
| * | | | shader/shader_ir: Remove unnecessary template parameter packs from Operation() overloads where applicableLioncash2019-05-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | These overloads don't actually make use of the parameter pack, so they can be turned into regular non-template function overloads.
| * | | | shader/shader_ir: Mark tracking functions as const member functionsLioncash2019-05-192-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | These don't actually modify instance state, so they can be marked as const member functions
| * | | | shader/shader_ir: Place implementations of constructor and destructor in cpp fileLioncash2019-05-192-5/+9
| | |/ / | |/| | | | | | | | | | | | | | | | | | Given the class contains quite a lot of non-trivial types, place the constructor and destructor within the cpp file to avoid inlining construction and destruction code everywhere the class is used.
* | | | Merge pull request #2495 from lioncash/cacheHexagon122019-05-192-34/+48
|\ \ \ \ | | | | | | | | | | gl_shader_disk_cache: Minor cleanup
| * | | | gl_shader_disk_cache: in-class initialize virtual file offset of ShaderDiskCacheOpenGLLioncash2019-05-192-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the offset is assigned a fixed value in the constructor, we can just assign it directly and get rid of the need to write the name of the variable again in the constructor initializer list.
| * | | | gl_shader_disk_cache: Default ShaderDiskCacheOpenGL's destructor in the cpp fileLioncash2019-05-192-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the disk shader cache contains non-trivial types, we should default it in the cpp file in order to prevent inlining of the complex destruction logic.
| * | | | gl_shader_disk_cache: Make hash specializations noexceptLioncash2019-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The standard library expects hash specializations that don't throw exceptions. Make this explicit in the type to allow selection of better code paths if possible in implementations.
| * | | | gl_shader_disk_cache: Remove redundant code string construction in LoadDecompiledEntry()Lioncash2019-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to load the code into a vector and then construct a string over the data. We can just create a string with the necessary size ahead of time, and read the data directly into it, getting rid of an unnecessary heap allocation.
| * | | | gl_shader_disk_cache: Make variable non-const in decompiled entry caseLioncash2019-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::move does nothing when applied to a const variable. Resources can't be moved if the object is immutable. With this change, we don't end up making several unnecessary heap allocations and copies.
| * | | | gl_shader_disk_cache: Special-case boolean handlingLioncash2019-05-192-24/+37
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Booleans don't have a guaranteed size, but we still want to have them integrate into the disk cache system without needing to actually use a different type. We can do this by supplying non-template overloads for the bool type. Non-template overloads always have precedence during function resolution, so this is safe to provide. This gets rid of the need to smatter ternary conditionals, as well as the need to use u8 types to store the value in.
* | | | Merge pull request #2467 from lioncash/moveHexagon122019-05-191-6/+0
|\ \ \ \ | | | | | | | | | | video_core/gpu_thread: Remove redundant copy constructor for CommandDataContainer
| * | | | video_core/gpu_thread: Remove redundant copy constructor for CommandDataContainerLioncash2019-05-141-6/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | std::move within a copy constructor (on a data member that isn't mutable) will always result in a copy. Because of that, the behavior of this copy constructor is identical to the one that would be generated automatically by the compiler, so we can remove it.
* | | | Merge pull request #2466 from yuzu-emu/mme-exit-delay-slotHexagon122019-05-191-3/+3
|\ \ \ \ | | | | | | | | | | GPU/MMEInterpreter: Ignore the 'exit' flag when it's executed inside a delay slot.
| * | | | GPU/MMEInterpreter: Ignore the 'exit' flag when it's executed inside a delay slot.Sebastian Valle2019-05-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | It seems instructions marked with the 'exit' flag will not cause an exit when executed within a delay slot. This was hwtested by fincs.
* | | | | Merge pull request #2468 from lioncash/deductionHexagon122019-05-192-2/+2
|\ \ \ \ \ | | | | | | | | | | | | yuzu: Remove explicit types from locks where applicable
| * | | | | yuzu: Remove explicit types from locks where applicableLioncash2019-05-142-2/+2
| | |/ / / | |/| | | | | | | | | | | | | | | | | | With C++17's deduction guides, the type doesn't need to be explicitly specified within locking primitives anymore.
* | | | | Merge pull request #2472 from FernandoS27/ticHexagon122019-05-191-1/+1
|\ \ \ \ \ | | | | | | | | | | | | maxwell_3d: reduce severity of different component formats assert.
| * | | | | maxwell_3d: reduce sevirity of different component formats assert.Fernando Sahmkow2019-05-141-1/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was reduced due to happening on most games and at such constant rate that it affected performance heavily for the end user. In general, we are well aware of the assert and an implementation is already planned.
* | | | | Merge pull request #2469 from lioncash/copyableHexagon122019-05-191-0/+2
|\ \ \ \ \ | | | | | | | | | | | | video_core/engines/maxwell_3d: Add is_trivially_copyable_v check for Regs
| * | | | | video_core/engines/maxwell_3d: Add is_trivially_copyable_v check for RegsLioncash2019-05-141-0/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::memset is used to clear the entire register structure, which requires that the Regs struct be trivially copyable (otherwise undefined behavior is invoked). This prevents the case where a non-trivial type is potentially added to the struct.
* | | | | Merge pull request #2470 from lioncash/ranged-forSebastian Valle2019-05-191-18/+18
|\ \ \ \ \ | | | | | | | | | | | | video_core/engines/maxwell_3d: Simplify for loops into ranged for loops within InitializeRegisterDefaults()
| * | | | | video_core/engines/maxwell3d: Get rid of three magic values in CallMethod()Lioncash2019-05-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | We can use the named constant instead of using 32 directly.
| * | | | | video_core/engines/maxwell_3d: Simplify for loops into ranged for loops within InitializeRegisterDefaults()Lioncash2019-05-141-15/+15
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Lessens the amount of code that needs to be read, and gets rid of the need to introduce an indexing variable. Instead, we just operate on the objects directly.
* | | | | Merge pull request #2480 from ReinUsesLisp/fix-quadsHexagon122019-05-191-2/+2
|\ \ \ \ \ | | | | | | | | | | | | gl_rasterizer: Pass the right number of array quad vertices count
| * | | | | gl_rasterizer: Pass the right number of array quad vertices countReinUsesLisp2019-05-171-2/+2
| |/ / / /
* | | | | Merge pull request #2483 from ReinUsesLisp/fix-point-sizeHexagon122019-05-191-1/+3
|\ \ \ \ \ | | | | | | | | | | | | gl_rasterizer: Limit OpenGL point size to a minimum of 1
| * | | | | gl_rasterizer: Limit OpenGL point size to a minimum of 1ReinUsesLisp2019-05-181-1/+3
| |/ / / /
* | | | | Merge pull request #2471 from lioncash/engine-uploadSebastian Valle2019-05-192-6/+8
|\ \ \ \ \ | | | | | | | | | | | | video_core/engines/engine_upload: Minor tidying
| * | | | | video_core/engines/engine_upload: Amend constructor initializer list orderLioncash2019-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Silences a -Wreorder warning.
| * | | | | video_core/engines/engine_upload: Default destructor in the cpp fileLioncash2019-05-142-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids inlining destruction logic where applicable, and also makes forward declarations not cause unexpected compilation errors depending on where the State class is used.
| * | | | | video_core/engines/engine_upload: Remove unnecessary const on parameters in function declarationsLioncash2019-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These only apply in the definition of the function. They can be omitted from the declaration.
| * | | | | video_core/engines/engine_upload: Remove unnecessary includesLioncash2019-05-142-2/+2
| |/ / / /
* | | | | Merge pull request #2484 from ReinUsesLisp/triangle-fanSebastian Valle2019-05-191-0/+2
|\ \ \ \ \ | | | | | | | | | | | | maxwell_to_gl: Add TriangleFan primitive topology
| * | | | | maxwell_to_gl: Add TriangleFan primitive topologyReinUsesLisp2019-05-181-0/+2
| |/ / / /
* / / / / gl_shader_gen: std::move objects where applicableLioncash2019-05-191-7/+7
|/ / / / | | | | | | | | | | | | | | | | | | | | Avoids performing copies into the pair being returned. Instead, we can just move the resources into the pair, avoiding the need to make copies of both the std::string and ShaderEntries struct.
* | | | Merge pull request #2462 from lioncash/video-mmMat M2019-05-142-17/+20
|\ \ \ \ | | | | | | | | | | video_core/memory_manager: Minor tidying
| * | | | video_core/memory_manager: Mark IsBlockContinuous() as a const member functionLioncash2019-05-102-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Corrects the typo in its name and marks the function as a const member function, given it doesn't actually modify memory manager state.
| * | | | video_core/memory_manager: Mark the constructor as explicitLioncash2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | Prevents implicit converting constructions of the memory manager.
| * | | | video_core/memory_manager: Default the destructor within the cpp fileLioncash2019-05-102-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes the class less surprising when it comes to forward declaring the type, and also prevents inlining the destruction code of the class, given it contains non-trivial types.
| * | | | video_core/memory_manager: Amend doxygen commentsLioncash2019-05-101-7/+7
| | | | | | | | | | | | | | | | | | | | Corrects references to non-existent parameters and corrects typos.
| * | | | video_core/memory_manager: Remove superfluous const from function declarationsLioncash2019-05-101-7/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are able to be omitted from the declaration of functions, since they don't do anything at the type system level. The definitions of the functions can retain the use of const though, since they make the variables immutable in the implementation of the function where they're used.
* | | | Merge pull request #2461 from lioncash/unused-varMat M2019-05-147-22/+4
|\ \ \ \ | | | | | | | | | | video_core: Remove a few unused variables and functions
| * | | | video_core/renderer_opengl/gl_shader_cache: Correct member initialization orderLioncash2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | Silences a -Wreorder warning.
| * | | | video_core/shader/decode/texture: Remove unused variable from GetTld4Code()Lioncash2019-05-101-1/+0
| | | | |
| * | | | renderer_vulkan/vk_shader_decompiler: Remove unused variable from DeclareInternalFlags()Lioncash2019-05-101-1/+0
| | | | |
| * | | | video_core/renderer_opengl/gl_shader_decompiler: Remove unused Composite() functionLioncash2019-05-101-11/+0
| | | | | | | | | | | | | | | | | | | | This isn't used at all, so it can be removed.
| * | | | video_core/renderer_opengl/gl_rasterizer_cache: Remove unused variable in UploadGLMipmapTexture()Lioncash2019-05-101-1/+0
| | | | | | | | | | | | | | | | | | | | This variable is unused entirely, so it can be removed.
| * | | | video_core/gpu_thread: Remove unused local variableLioncash2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of retrieving the data from the std::variant instance, we can just check if the variant contains that type of data. This is essentially the same behavior, only it returns a bool indicating whether or not the type in the variant is currently active, instead of actually retrieving the data.
| * | | | video_core/textures/astc: Remove unused variablesLioncash2019-05-101-6/+2
| |/ / / | | | | | | | | | | | | Silences a few compilation warnings.
* | | | Merge pull request #2413 from FernandoS27/opt-gpuRodrigo Locatti2019-05-147-33/+54
|\ \ \ \ | |/ / / |/| | | Rasterizer Cache: refactor flushing & optimize memory usage of surfaces
| * | | Rasterizer Cache: Use a temporal storage for Surfaces loading/flushing.Fernando Sahmkow2019-04-214-18/+30
| | | | | | | | | | | | | | | | | | | | This PR should heavily reduce memory usage since temporal buffers are no longer stored per Surface but instead managed by the Rasterizer Cache.
| * | | RasterizerCache Redesign: Flush Fernando Sahmkow2019-04-206-17/+26
| | | | | | | | | | | | | | | | | | | | | | | | flushing is now responsability of children caches instead of the cache object. This change will allow the specific cache to pass extra parameters on flushing and will allow more flexibility.
* | | | Merge pull request #2442 from FernandoS27/astc-fixbunnei2019-05-091-1/+3
|\ \ \ \ | | | | | | | | | | Fix Layered ASTC Textures
| * | | | Fix Layered ASTC TexturesFernando Sahmkow2019-05-011-1/+3
| | |_|/ | |/| | | | | | | | | | By adding the missing layer offset in ASTC compression.
* | | | Merge pull request #2443 from ReinUsesLisp/skip-repeated-variantsbunnei2019-05-091-1/+4
|\ \ \ \ | | | | | | | | | | gl_shader_disk_cache: Skip stored shader variants instead of asserting
| * | | | gl_shader_disk_cache: Skip stored shader variants instead of assertingReinUsesLisp2019-05-011-1/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Instead of asserting on already stored shader variants, silently skip them. This shouldn't be happening but when a shader is invalidated and it is not stored in the shader cache, this assert would hit and save that shader anyways when the asserts are disabled.
* | | | Merge pull request #2429 from FernandoS27/computebunnei2019-05-0913-142/+483
|\ \ \ \ | |_|_|/ |/| | | Corrections and Implementation on GPU Engines
| * | | Refactors and name corrections.Fernando Sahmkow2019-05-016-35/+35
| | | |
| * | | Fixes and Corrections to DMA EngineFernando Sahmkow2019-04-232-37/+57
| | | |
| * | | Add Swizzle Parameters to the DMA engineFernando Sahmkow2019-04-232-2/+27
| | | |
| * | | Add Documentation Headers to all the GPU EnginesFernando Sahmkow2019-04-235-0/+29
| | | |
| * | | Corrections and stylingFernando Sahmkow2019-04-235-6/+9
| | | |
| * | | Implement Maxwell3D Data UploadFernando Sahmkow2019-04-232-3/+32
| | | |
| * | | Introduce skeleton of the GPU Compute Engine.Fernando Sahmkow2019-04-233-8/+202
| | | |
| * | | Revamp Kepler Memory to use a subegine to manage uploadsFernando Sahmkow2019-04-236-93/+134
| | | |
* | | | shader/decode/texture: Remove unused variableLioncash2019-05-041-1/+0
| | | | | | | | | | | | | | | | This isn't used anywhere, so we can get rid of it.
* | | | gl_rasterizer: Silence unused variable warningLioncash2019-05-041-2/+2
| |/ / |/| | | | | | | | Makes use of src, so it's not considered unused.
* | | Merge pull request #2100 from FreddyFunk/disk-cache-precompiled-filebunnei2019-05-013-133/+170
|\ \ \ | | | | | | | | gl_shader_disk_cache: Improve precompiled shader cache generation speed and size
| * | | Re added new lines at the end of filesFreddyFunk2019-04-232-2/+2
| | | |
| * | | gl_shader_disk_cache: Compress precompiled shader cache file with Zstandardunknown2019-04-231-6/+10
| | | |
| * | | gl_shader_disk_cache: Use VectorVfsFile for the virtual precompiled shader cache fileunknown2019-04-233-101/+168
| | | |
| * | | gl_shader_disk_cache: Remove per shader compressionunknown2019-04-232-45/+11
| | | |
* | | | Merge pull request #2435 from ReinUsesLisp/misc-vcbunnei2019-04-292-3/+4
|\ \ \ \ | | | | | | | | | | shader_ir: Miscellaneous fixes
| * | | | shader_ir: Move Sampler index entry in operand< to sort declarationsReinUsesLisp2019-04-261-2/+2
| | | | |
| * | | | shader_ir: Add missing entry to Sampler operand< comparisonReinUsesLisp2019-04-261-2/+3
| | | | |
| * | | | shader_ir/texture: Fix sampler const buffer key shiftReinUsesLisp2019-04-261-1/+1
| |/ / /
* | | | Merge pull request #2322 from ReinUsesLisp/wswitchbunnei2019-04-2910-77/+106
|\ \ \ \ | | | | | | | | | | video_core: Silent -Wswitch warnings
| * | | | video_core: Silent -Wswitch warningsReinUsesLisp2019-04-1810-77/+106
| | | | |
* | | | | Merge pull request #2423 from FernandoS27/half-correctbunnei2019-04-292-15/+16
|\ \ \ \ \ | |_|/ / / |/| | | | Corrections on Half Float operations: HADD2 HMUL2 and HFMA2
| * | | | Corrections Half Float operations on const buffers and implement saturation.Fernando Sahmkow2019-04-212-15/+16
| | | | |
* | | | | Merge pull request #2422 from ReinUsesLisp/fixup-samplersHexagon122019-04-231-3/+5
|\ \ \ \ \ | | | | | | | | | | | | gl_state: Fix samplers memory corruption
| * | | | | gl_state: Fix samplers memory corruptionReinUsesLisp2019-04-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was possible for "samplers" to be read without being written. This addresses that.
* | | | | | Merge pull request #2425 from FernandoS27/y-directionHexagon122019-04-231-0/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix flipping on some games by applying Y direction register
| * | | | | | Apply Position Y DirectionFernando Sahmkow2019-04-201-0/+3
| | |_|_|_|/ | |/| | | |
* | | | | | Merge pull request #2383 from ReinUsesLisp/aoffi-testbunnei2019-04-2311-75/+163
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | gl_shader_decompiler: Disable variable AOFFI on unsupported devices
| * | | | | gl_shader_decompiler: Use variable AOFFI on supported hardwareReinUsesLisp2019-04-1410-71/+102
| | | | | |
| * | | | | gl_device: Implement interface and add uniform offset alignmentReinUsesLisp2019-04-105-13/+70
| | | | | |
* | | | | | Merge pull request #2403 from FernandoS27/compressed-linearbunnei2019-04-221-2/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | Support compressed formats on linear textures.
| * | | | | | Support compressed formats on linear textures.Fernando Sahmkow2019-04-151-2/+5
| | |_|_|_|/ | |/| | | |
* | | | | | Merge pull request #2411 from FernandoS27/unsafe-gpubunnei2019-04-225-15/+99
|\ \ \ \ \ \ | | | | | | | | | | | | | | GPU Manager: Implement ReadBlockUnsafe and WriteBlockUnsafe
| * | | | | | make ReadBlockunsafe and WriteBlockunsafe, ignore invalid pages.Fernando Sahmkow2019-04-201-4/+12
| | | | | | |
| * | | | | | Implement IsBlockContinousFernando Sahmkow2019-04-172-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This detects when a GPU Memory Block is not continous within host cpu memory.
| * | | | | | Use ReadBlockUnsafe for fetyching DMA CommandListsFernando Sahmkow2019-04-162-4/+2
| | | | | | |
| * | | | | | Document unsafe versions and add BlockCopyUnsafeFernando Sahmkow2019-04-163-16/+45
| | | | | | |
| * | | | | | Use ReadBlockUnsafe for Shader CacheFernando Sahmkow2019-04-161-5/+7
| | | | | | |
| * | | | | | Use ReadBlockUnsafe on TIC and TSC readingFernando Sahmkow2019-04-162-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ReadBlockUnsafe on TIC and TSC reading as memory is never flushed from host GPU there.
| * | | | | | GPU MemoryManager: Implement ReadBlockUnsafe and WriteBlockUnsafeFernando Sahmkow2019-04-162-0/+34
| |/ / / / /
* | | | | | Merge pull request #2400 from FernandoS27/corret-kepler-membunnei2019-04-224-17/+81
|\ \ \ \ \ \ | | | | | | | | | | | | | | Implement Kepler Memory on both Linear and BlockLinear.
| * | | | | | Apply Const correctness to SwizzleKepler and replace u32 for size_t on iterators.Fernando Sahmkow2019-04-162-9/+12
| | | | | | |
| * | | | | | Use WriteBlock and ReadBlock.Fernando Sahmkow2019-04-161-10/+6
| | | | | | |
| * | | | | | Implement Block Linear copies in Kepler Memory.Fernando Sahmkow2019-04-163-5/+38
| | | | | | |
| * | | | | | Correct Kepler Memory on Linear Pushes.Fernando Sahmkow2019-04-152-16/+48
| |/ / / / /
* | | | | | Merge pull request #2407 from FernandoS27/f2fbunnei2019-04-202-23/+73
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | Do some corrections in conversion shader instructions.
| * | | | | Do some corrections in conversion shader instructions.Fernando Sahmkow2019-04-162-23/+73
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Corrects encodings for I2F, F2F, I2I and F2I Implements Immediate variants of all four conversion types. Add assertions to unimplemented stuffs.
* | | | | Merge pull request #2409 from ReinUsesLisp/half-floatsbunnei2019-04-209-136/+181
|\ \ \ \ \ | |_|_|/ / |/| | | | shader_ir/decode: Miscellaneous fixes to half-float decompilation
| * | | | vk_shader_decompiler: Add missing operationsReinUsesLisp2019-04-161-0/+7
| | | | |
| * | | | shader_ir/decode: Fix half float pre-operations and remove MetaHalfArithmeticReinUsesLisp2019-04-169-85/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Operations done before the main half float operation (like HAdd) were managing a packed value instead of the unpacked one. Adding an unpacked operation allows us to drop the per-operand MetaHalfArithmetic entry, simplifying the code overall.
| * | | | gl_shader_decompiler: Fix MrgH0 decompilationReinUsesLisp2019-04-161-2/+2
| | | | | | | | | | | | | | | | | | | | GLSL decompilation for HMergeH0 was wrong. This addresses that issue.
| * | | | shader_ir/decode: Implement half float saturationReinUsesLisp2019-04-165-8/+31
| | | | |
| * | | | shader_ir/decode: Reduce severity of unimplemented half-float FTZReinUsesLisp2019-04-163-3/+9
| | | | |
| * | | | renderer_opengl: Implement half float NaN comparisonsReinUsesLisp2019-04-163-36/+59
| | | | |
| * | | | shader_ir: Avoid using static on heap-allocated objectsReinUsesLisp2019-04-161-5/+4
| |/ / / | | | | | | | | | | | | | | | | Using static here might be faster at runtime, but it adds a heap allocation called before main.
* | | | Merge pull request #2374 from lioncash/pagetablebunnei2019-04-209-14/+47
|\ \ \ \ | |_|_|/ |/| | | core: Reorganize boot order
| * | | video_core/gpu: Create threads separately from initializationLioncash2019-04-129-14/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like with CPU emulation, we generally don't want to fire off the threads immediately after the relevant classes are initialized, we want to do this after all necessary data is done loading first. This splits the thread creation into its own interface member function to allow controlling when these threads in particular get created.
* | | | Merge pull request #2318 from ReinUsesLisp/sampler-cachebunnei2019-04-189-181/+183
|\ \ \ \ | | | | | | | | | | gl_sampler_cache: Port sampler cache to OpenGL
| * | | | gl_sampler_cache: Port sampler cache to OpenGLReinUsesLisp2019-04-025-123/+82
| | | | |
| * | | | video_core: Abstract vk_sampler_cache into a templated classReinUsesLisp2019-04-025-58/+101
| | | | |
* | | | | Merge pull request #2348 from FernandoS27/guest-bindlessbunnei2019-04-188-44/+217
|\ \ \ \ \ | | | | | | | | | | | | Implement Bindless Textures on Shader Decompiler and GL backend
| * | | | | Adapt Bindless to work with AOFFIFernando Sahmkow2019-04-081-7/+18
| | | | | |
| * | | | | Move ConstBufferAccessor to Maxwell3d, correct mistakes and clang format.Fernando Sahmkow2019-04-089-44/+25
| | | | | |
| * | | | | Fix bad rebaseFernando Sahmkow2019-04-081-2/+1
| | | | | |
| * | | | | Fix TMMLFernando Sahmkow2019-04-081-5/+7
| | | | | |
| * | | | | Simplify ConstBufferAccessorFernando Sahmkow2019-04-085-53/+22
| | | | | |
| * | | | | Refactor GetTextureCode and GetTexCode to use an optional instead of optional parametersFernando Sahmkow2019-04-082-34/+33
| | | | | |
| * | | | | Implement TXQ_BFernando Sahmkow2019-04-082-2/+10
| | | | | |
| * | | | | Implement TMML_BFernando Sahmkow2019-04-081-5/+10
| | | | | |
| * | | | | Corrections to TEX_BFernando Sahmkow2019-04-082-4/+37
| | | | | |
| * | | | | Fixes to Const Buffer Accessor and FormattingFernando Sahmkow2019-04-083-10/+10
| | | | | |
| * | | | | Implement Bindless Handling on SetupTextureFernando Sahmkow2019-04-084-18/+34
| | | | | |
| * | | | | Unify both sampler types.Fernando Sahmkow2019-04-084-22/+48
| | | | | |
| * | | | | Implement Bindless Samplers and TEX_B in the IR.Fernando Sahmkow2019-04-084-16/+77
| | | | | |
| * | | | | Implement Const Buffer AccessorFernando Sahmkow2019-04-085-2/+65
| | | | | |
* | | | | | Merge pull request #2315 from ReinUsesLisp/severity-decompilerbunnei2019-04-172-5/+20
|\ \ \ \ \ \ | | | | | | | | | | | | | | shader_ir/decode: Reduce the severity of common assertions
| * | | | | | shader_ir/memory: Reduce severity of LD_L cache management and log itReinUsesLisp2019-04-032-2/+9
| | | | | | |
| * | | | | | shader_ir/memory: Reduce severity of ST_L cache management and log itReinUsesLisp2019-04-032-3/+11
| | | | | | |
* | | | | | | Merge pull request #2384 from ReinUsesLisp/gl-state-clearbunnei2019-04-171-4/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | gl_rasterizer: Apply just the needed state on Clear
| * | | | | | | gl_rasterizer: Apply just the needed state on ClearReinUsesLisp2019-04-101-4/+4
| | |_|_|_|_|/ | |/| | | | |
* | | | | | | Merge pull request #2092 from ReinUsesLisp/stgbunnei2019-04-1711-89/+186
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | shader/memory: Implement STG and global memory flushing
| * | | | | | | shader_ir: Implement STG, keep track of global memory usage and flushReinUsesLisp2019-04-1411-89/+186
| | |_|_|_|_|/ | |/| | | | |
* / | | | | | Correct Pitch in Fermi2DFernando Sahmkow2019-04-151-4/+1
|/ / / / / /
* | | | | | Merge pull request #2373 from FernandoS27/z32bunnei2019-04-142-2/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | Set Pixel Format to Z32 if its R32F and depth compare enabled, and Implement format ZF32_X24S8
| * | | | | | Implement Texture Format ZF32_X24S8.Fernando Sahmkow2019-04-091-0/+2
| | | | | | |
| * | | | | | Correct depth compare with color formats for R32FFernando Sahmkow2019-04-091-2/+17
| | |_|/ / / | |/| | | |
* | | | | | Merge pull request #2386 from ReinUsesLisp/shader-managerbunnei2019-04-142-34/+61
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | gl_shader_manager: Move code to source file and minor clean up
| * | | | | gl_shader_manager: Move code to source file and minor clean upReinUsesLisp2019-04-112-34/+61
| | |/ / / | |/| | |
* | | | | Merge pull request #2235 from ReinUsesLisp/spirv-decompilerbunnei2019-04-123-1/+1465
|\ \ \ \ \ | | | | | | | | | | | | vk_shader_decompiler: Implement a SPIR-V decompiler
| * | | | | vk_shader_decompiler: Implement flow primitivesReinUsesLisp2019-04-101-5/+82
| | | | | |
| * | | | | vk_shader_decompiler: Implement most common texture primitivesReinUsesLisp2019-04-101-8/+65
| | | | | |
| * | | | | vk_shader_decompiler: Implement texture decompilation helper functionsReinUsesLisp2019-04-101-0/+32
| | | | | |
| * | | | | vk_shader_decompiler: Implement Assign and LogicalAssignReinUsesLisp2019-04-101-2/+64
| | | | | |
| * | | | | vk_shader_decompiler: Implement non-OperationCode visitsReinUsesLisp2019-04-101-7/+129
| | | | | |
| * | | | | vk_shader_decompiler: Implement OperationCode decompilation interfaceReinUsesLisp2019-04-101-1/+411
| | | | | |
| * | | | | vk_shader_decompiler: Implement VisitReinUsesLisp2019-04-101-1/+50
| | | | | |
| * | | | | vk_shader_decompiler: Implement labels tree and flowReinUsesLisp2019-04-101-0/+71
| | | | | |
| * | | | | vk_shader_decompiler: Implement declarationsReinUsesLisp2019-04-101-3/+457
| | | | | |
| * | | | | vk_shader_decompiler: Declare and stub interface for a SPIR-V decompilerReinUsesLisp2019-04-103-0/+127
| | | | | |
| * | | | | video_core: Add sirit as optional dependency with VulkanReinUsesLisp2019-04-101-1/+4
| |/ / / / | | | | | | | | | | | | | | | sirit is a runtime assembler for SPIR-V
* | | | | gl_rasterizer_cache: Relax restrictions on FastCopySurface and FastLayeredCopySurfaceFernando Sahmkow2019-04-111-4/+10
| | | | |
* | | | | Merge pull request #2278 from ReinUsesLisp/vc-texture-cachebunnei2019-04-113-0/+974
|\ \ \ \ \ | | | | | | | | | | | | video_core: Implement API agnostic view based texture cache
| * | | | | video_core: Implement API agnostic view based texture cacheReinUsesLisp2019-03-223-0/+974
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements an API agnostic texture view based texture cache. Classes defined here are intended to be inherited by the API implementation and used in API-specific code. This implementation exposes protected virtual functions to be called from the implementer. Before executing any surface copies methods (defined in API-specific code) it tries to detect if the overlapping surface is a superset and if it is, it creates a view. Views are references of a subset of a surface, it can be a superset view (the same as referencing the whole texture). Current code manages 1D, 1D array, 2D, 2D array, cube maps and cube map arrays with layer and mipmap level views. Texture 3D slices views are not implemented. If the view attempt fails, the fast path is invoked with the overlapping textures (defined in the implementer). If that one fails (returning nullptr) it will flush and reload the texture.
* | | | | | Merge pull request #2372 from FernandoS27/fermi-fixbunnei2019-04-111-0/+4
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Correct Fermi Copy on Linear Textures.
| * | | | | Correct Fermi Copy on Linear Textures.Fernando Sahmkow2019-04-091-0/+4
| | |/ / / | |/| | |
* | | | | Merge pull request #2345 from ReinUsesLisp/multibindbunnei2019-04-104-30/+69
|\ \ \ \ \ | | | | | | | | | | | | gl_rasterizer: Use ARB_multi_bind to update buffers with a single call per drawcall
| * | | | | renderer_opengl/utils: Skip empty bindsReinUsesLisp2019-04-061-0/+3
| | | | | |
| * | | | | gl_rasterizer: Use ARB_multi_bind to update SSBOsReinUsesLisp2019-04-062-9/+9
| | | | | |
| * | | | | gl_rasterizer: Use ARB_multi_bind to update UBOs across stagesReinUsesLisp2019-04-064-22/+58
| | | | | |
* | | | | | Merge pull request #2375 from FernandoS27/fix-ldcbunnei2019-04-101-2/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove unnecessary bounding in LD_C
| * | | | | | Remove bounding in LD_CFernando Sahmkow2019-04-101-2/+1
| | |/ / / / | |/| | | |
* | | | | | Merge pull request #2354 from lioncash/headerbunnei2019-04-108-3/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | video_core/texures/texture: Remove unnecessary includes
| * | | | | | video_core/textures/convert: Replace include with a forward declarationLioncash2019-04-062-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids dragging in a direct dependency in a header.
| * | | | | | video_core/texures/texture: Remove unnecessary includesLioncash2019-04-066-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing in this header relies on common_funcs or the memory manager. This gets rid of reliance on indirect inclusions in the OpenGL caches.
* | | | | | | Merge pull request #2366 from FernandoS27/xmad-fixbunnei2019-04-102-9/+33
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Correct XMAD mode, psl and high_b on different encodings.
| * | | | | | | Correct XMAD mode, psl and high_b on different encodings.Fernando Sahmkow2019-04-082-9/+33
| | |/ / / / / | |/| | | | |
* | | | | | | Merge pull request #2369 from FernandoS27/mip-alignbunnei2019-04-092-4/+12
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | gl_backend: Align Pixel Storage
| * | | | | | | gl_backend: Align Pixel StorageFernando Sahmkow2019-04-082-4/+12
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes sure GL reads on the correct pack size for the respective texture buffer.
* / / / / / / Correct LOP_IMN encodingFernando Sahmkow2019-04-081-1/+1
|/ / / / / /
* | | | | | Merge pull request #2300 from FernandoS27/null-shaderbunnei2019-04-071-0/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | shader_cache: Permit a Null Shader in case of a bad host_ptr.
| * | | | | | Permit a Null Shader in case of a bad host_ptr.Fernando Sahmkow2019-04-071-0/+4
| | | | | | |
* | | | | | | Merge pull request #2355 from ReinUsesLisp/sync-pointbunnei2019-04-071-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | maxwell_3d: Reduce severity of ProcessSyncPoint
| * | | | | | | maxwell_3d: Reduce severity of ProcessSyncPointReinUsesLisp2019-04-061-2/+2
| | |/ / / / / | |/| | | | |
* | | | | | | Merge pull request #2306 from ReinUsesLisp/aoffibunnei2019-04-074-71/+205
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | shader_ir: Implement AOFFI for TEX and TLD4
| * | | | | | | gl_shader_decompiler: Hide local definitions inside an anonymous namespaceReinUsesLisp2019-03-311-6/+8
| | | | | | | |
| * | | | | | | shader_ir/decode: Silent implicit sign conversion warningMat M2019-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
| * | | | | | | gl_shader_decompiler: Add AOFFI backing implementationReinUsesLisp2019-03-301-38/+85
| | | | | | | |
| * | | | | | | shader_ir/decode: Implement AOFFI for TEX and TLD4ReinUsesLisp2019-03-302-27/+94
| | | | | | | |
| * | | | | | | shader_ir: Implement immediate register trackingReinUsesLisp2019-03-302-1/+19
| | | | | | | |
* | | | | | | | Merge pull request #2321 from ReinUsesLisp/gl-state-reworkbunnei2019-04-073-339/+324
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | gl_state: Rework to enable individual applies
| * | | | | | | | gl_state: Rework to enable individual appliesReinUsesLisp2019-04-043-339/+324
| | |_|_|_|_|/ / | |/| | | | | |
* | | | | | | | Merge pull request #2098 from FreddyFunk/disk-cache-zstdbunnei2019-04-071-6/+6
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | gl_shader_disk_cache: Use Zstandard for compression
| * | | | | | | | common/zstd_compression: simplify decompression interfaceunknown2019-03-291-3/+2
| | | | | | | | |
| * | | | | | | | gl_shader_disk_cache: Fixup clang formatunknown2019-03-291-2/+3
| | | | | | | | |
| * | | | | | | | gl_shader_disk_cache: Use Zstandard for compressionunknown2019-03-291-6/+6
| | | | | | | | |
* | | | | | | | | Merge pull request #2352 from bunnei/mem-manager-fixesbunnei2019-04-073-12/+84
|\ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / |/| | | | | | | | memory_manager: Improved implementation of read/write/copy block.
| * | | | | | | | memory_manager: Improved implementation of read/write/copy block.bunnei2019-04-063-12/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fixes graphical issues with Chocobo's Mystery Dungeon EVERY BUDDY! - Fixes a crash with Mario Tennis Aces
* | | | | | | | | Merge pull request #2317 from FernandoS27/syncbunnei2019-04-062-1/+27
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Implement SyncPoint Register in the GPU.
| * | | | | | | | | Implement SyncPoint Register in the GPU.Fernando Sahmkow2019-04-062-1/+27
| | |_|_|/ / / / / | |/| | | | | | |
* | | | | | | | | Merge pull request #2346 from lioncash/headerbunnei2019-04-0610-22/+39
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | video_core/engines: Remove unnecessary inclusions where applicable
| * | | | | | | | video_core/engines: Make memory manager members privateLioncash2019-04-069-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These aren't used externally by anything, so they can be made private data members.
| * | | | | | | | video_core/engines: Remove unnecessary inclusions where applicableLioncash2019-04-0610-9/+25
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces header inclusions with forward declarations where applicable and also removes unused headers within the cpp file. This reduces a few more dependencies on core/memory.h
* | | | | | | | Merge pull request #2350 from lioncash/vmembunnei2019-04-062-22/+38
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | video_core/memory_manager: Mark a few member functions with the const qualifier
| * | | | | | | | video_core/memory_manager: Make Read() a const qualified member functionLioncash2019-04-062-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given this doesn't actually alter internal state, this can be made a const member function.
| * | | | | | | | video_core/memory_manager: Make ReadBlock() a const qualifier member functionLioncash2019-04-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, since we have a const qualified variant of GetPointer(), we can put it to use in ReadBlock() to retrieve the source pointer that is passed into memcpy. Now block reading may be done from a const context.
| * | | | | | | | video_core/memory_manager: Add a const qualified variant of GetPointer()Lioncash2019-04-062-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows retrieving read-only pointers from a const context externally.
| * | | | | | | | video_core/memory_manager: Make FindFreeRegion() a const member functionLioncash2019-04-062-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't modify internal state, so it can be made a const member function.
| * | | | | | | | video_core/memory_manager: Make GpuToCpuAddress() a const member functionLioncash2019-04-062-3/+3
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't modify any internal state, so it can be made a const member function to allow its use in const contexts.
* | | | | | | | Merge pull request #2347 from lioncash/truncbunnei2019-04-061-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | video_core/gpu_thread: Silence truncation warning in ThreadManager's constructor
| * | | | | | | | video_core/gpu_thread: Silence truncation warning in ThreadManager's constructorLioncash2019-04-061-1/+1
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since c5d41fd812d7eb1a04f36b76c08fe971cee0868c callback parameters were changed to use an s64 to represent late cycles instead of an int, so this was causing a truncation warning to occur here. Changing it to s64 is sufficient to silence the warning.
* | | | | | | | Merge pull request #2327 from ReinUsesLisp/crash-safe-visitbunnei2019-04-061-1/+6
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | gl_shader_decompiler: Return early when an operation is invalid
| * | | | | | | | gl_shader_decompiler: Return early when an operation is invalidReinUsesLisp2019-04-031-1/+6
| | |_|_|/ / / / | |/| | | | | |
* | | | | | | | Merge pull request #2337 from lioncash/temporarybunnei2019-04-061-12/+12
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | gl_shader_decompiler: Rename GenerateTemporal() to GenerateTemporary()
| * | | | | | | | gl_shader_decompiler: Rename GenerateTemporal() to GenerateTemporary()Lioncash2019-04-051-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Temporal generally indicates a relation to time, but this is just creating a temporary, so this isn't really an accurate name for what the function is actually doing.
* | | | | | | | | video_core/macro_interpreter: Remove assertion within FetchParameter()Lioncash2019-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can just use .at(), which essentially does the same thing, but with less code.
* | | | | | | | | video_core/macro_interpreter: Simplify GetRegister()Lioncash2019-04-061-11/+6
| |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given we already ensure nothing can set the zeroth register in SetRegister(), we don't need to check if the index is zero and special case it. We can just access the register normally, since it's already going to be zero. We can also replace the assertion with .at() to perform the equivalent behavior inline as part of the API.
* | | | | | | | Merge pull request #2282 from bunnei/gpu-asynch-v2bunnei2019-04-053-51/+65
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | gpu_thread: Improve synchronization by using CoreTiming.
| * | | | | | | | gpu_thread: Improve synchronization by using CoreTiming.bunnei2019-04-023-51/+65
| | |_|_|_|_|_|/ | |/| | | | | |
* | | | | | | | Merge pull request #2336 from ReinUsesLisp/txqbunnei2019-04-051-2/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | gl_shader_decompiler: Fix TXQ types
| * | | | | | | | gl_shader_decompiler: Fix TXQ typesReinUsesLisp2019-04-051-2/+3
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TXQ returns integer types. Shaders usually do: R0 = TXQ(); // => int R0 = static_cast<float>(R0); If we don't treat it as an integer, it will cast a binary float value as float - resulting in a corrupted number.
* | | | | | | | video_core/renderer_opengl: Remove unnecessary includesLioncash2019-04-0413-24/+4
| |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quite a few unused includes have built up over time, particularly on core/memory.h. Removing these includes means the source files including those files will no longer need to be rebuilt if they're changed, making compilation slightly faster in this scenario.
* | | | | | | Merge pull request #2093 from FreddyFunk/disk-cache-better-compressionbunnei2019-04-042-39/+9
|\ \ \ \ \ \ \ | | |_|_|/ / / | |/| | | | | Better LZ4 compression utilization for the disk based shader cache and the yuzu build system
| * | | | | | gl_shader_disk_cache: Use LZ4HC with compression level 9 instead of compression level 12 for less compression timeunknown2019-03-291-3/+3
| | | | | | |
| * | | | | | Addressed feedbackunknown2019-03-291-6/+6
| | | | | | |
| * | | | | | gl_shader_disk_cache: Use better compression for transferable and precompiled shader disk chache filesunknown2019-03-291-2/+2
| | | | | | |
| * | | | | | data_compression: Move LZ4 compression from video_core/gl_shader_disk_cache to common/data_compressionunknown2019-03-292-39/+9
| | |_|/ / / | |/| | | |
* | | | | | Merge pull request #2299 from lioncash/maxwellbunnei2019-04-044-17/+15
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | gl_shader_manager: Remove reliance on a global accessor within MaxwellUniformData::SetFromRegs()
| * | | | | gl_shader_manager: Remove unnecessary gl_shader_manager inclusionLioncash2019-03-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't used at all in the OpenGL shader cache, so we can remove it's include here, meaning one less file needs to be recompiled if any changes ever occur within that header. core/memory.h is also not used within this file at all, so we can remove it as well.
| * | | | | gl_shader_manager: Move using statement into the cpp fileLioncash2019-03-282-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids introducing Maxwell3D into the namespace for everything that includes the header.
| * | | | | gl_shader_manager: Remove reliance on global accessor within MaxwellUniformData::SetFromRegs()Lioncash2019-03-283-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can just pass in the Maxwell3D instance instead of going through the system class to get at it. This also lets us simplify the interface a little bit. Since we pass in the Maxwell3D context now, we only really need to pass the shader stage index value in.
| * | | | | gl_shader_manager: Amend Doxygen string for MaxwellUniformDataLioncash2019-03-271-3/+3
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | Previously only one line of the whole comment was in proper Doxygen formatting.
* | | | | Merge pull request #2302 from ReinUsesLisp/vk-swapchainbunnei2019-04-033-1/+305
|\ \ \ \ \ | |_|_|/ / |/| | | | vk_swapchain: Implement a swapchain manager
| * | | | vk_swapchain: Implement a swapchain managerReinUsesLisp2019-03-293-1/+305
| | |/ / | |/| |
* | | | general: Use deducation guides for std::lock_guard and std::unique_lockLioncash2019-04-014-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since C++17, the introduction of deduction guides for locking facilities means that we no longer need to hardcode the mutex type into the locks themselves, making it easier to switch mutex types, should it ever be necessary in the future.
* | | | Merge pull request #2297 from lioncash/reorderbunnei2019-03-316-14/+14
|\ \ \ \ | | | | | | | | | | video_core: Amend constructor initializer list order where applicable
| * | | | video_core: Amend constructor initializer list order where applicableLioncash2019-03-276-14/+14
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Specifies the members in the same order that initialization would take place in. This also silences -Wreorder warnings.
* | | | Merge pull request #2298 from lioncash/variablebunnei2019-03-315-14/+7
|\ \ \ \ | |_|/ / |/| | | video_core/{gl_rasterizer, gpu_thread}: Remove unused class variables where applicable
| * | | gpu_thread: Remove unused dma_pusher class member variable from ThreadManagerLioncash2019-03-272-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | The pusher instance is only ever used in the constructor of the ThreadManager for creating the thread that the ThreadManager instance contains. Aside from that, the member is unused, so it can be removed.
| * | | gl_rasterizer: Remove unused reference member variable from RasterizerOpenGLLioncash2019-03-273-9/+5
| |/ / | | | | | | | | | | | | This member variable is no longer being used, so it can be removed, removing a dependency on EmuWindow from the rasterizer's interface"
* | | Merge pull request #2296 from lioncash/overridebunnei2019-03-283-4/+4
|\ \ \ | | | | | | | | video_core: Add missing override specifiers
| * | | video_core: Add missing override specifiersLioncash2019-03-273-4/+4
| |/ / | | | | | | | | | | | | | | | Ensures that the signatures will always match with the base class. Also silences a few compilation warnings.
* / / video_core/gpu: Amend typo in GPU member variable nameLioncash2019-03-272-7/+8
|/ / | | | | | | smaphore -> semaphore
* | Merge pull request #2256 from bunnei/gpu-vmmbunnei2019-03-2221-237/+533
|\ \ | | | | | | gpu: Rewrite MemoryManager based on the VMManager implementation.
| * | memory_manager: Cleanup FindFreeRegion.bunnei2019-03-212-12/+6
| | |
| * | memory_manager: Use Common::AlignUp in public interface as needed.bunnei2019-03-211-11/+22
| | |
| * | memory_manager: Bug fixes and further cleanup.bunnei2019-03-212-73/+72
| | |
| * | maxwell_dma: Check for valid source in destination before copy.bunnei2019-03-211-0/+10
| | | | | | | | | | | | - Avoid a crash in Octopath Traveler.
| * | memory_manager: Add protections for invalid GPU addresses.bunnei2019-03-212-22/+43
| | | | | | | | | | | | - Avoid a crash in Xenoblade Chronicles 2.
| * | gl_rasterizer_cache: Check that backing memory is valid before creating a surface.bunnei2019-03-212-15/+12
| | | | | | | | | | | | - Fixes a crash in Puyo Puyo Tetris.
| * | gpu: Rewrite virtual memory manager using PageTable.bunnei2019-03-2110-201/+472
| | |
| * | gpu: Move GPUVAddr definition to common_types.bunnei2019-03-2113-31/+24
| |/
* / Revert "Devirtualize Register/Unregister and use a wrapper instead."bunnei2019-03-223-8/+12
|/ | | | - Fixes graphical issues from transitions in Super Mario Odyssey.
* gl_rasterizer: Skip zero addr/sized regions on flush/invalidate.bunnei2019-03-171-0/+6
|
* Merge pull request #2244 from bunnei/gpu-mem-refactorbunnei2019-03-1719-186/+194
|\ | | | | video_core: Refactor to use MemoryManager interface for all memory access.
| * video_core: Refactor to use MemoryManager interface for all memory access.bunnei2019-03-1619-186/+194
| | | | | | | | | | | | | | | | | | | | | | # Conflicts: # src/video_core/engines/kepler_memory.cpp # src/video_core/engines/maxwell_3d.cpp # src/video_core/morton.cpp # src/video_core/morton.h # src/video_core/renderer_opengl/gl_global_cache.cpp # src/video_core/renderer_opengl/gl_global_cache.h # src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
* | memory: Simplify rasterizer cache operations.bunnei2019-03-161-2/+1
|/
* gpu: Use host address for caching instead of guest address.bunnei2019-03-1524-288/+384
|
* Merge pull request #2233 from ReinUsesLisp/morton-cleanupbunnei2019-03-154-187/+146
|\ | | | | video_core/morton: Miscellaneous changes
| * video_core/morton: Use enum to describe MortonCopyPixels128 modeReinUsesLisp2019-03-133-7/+10
| |
| * video_core/morton: Remove unused parameter in MortonSwizzleReinUsesLisp2019-03-133-8/+7
| |
| * video_core/morton: Remove clang-format off when it's not neededReinUsesLisp2019-03-131-133/+129
| |
| * video_core/morton: Remove unused functionsReinUsesLisp2019-03-131-39/+0
| |
* | Merge pull request #2229 from ReinUsesLisp/vk-sampler-cachebunnei2019-03-154-24/+168
|\ \ | | | | | | vk_sampler_cache: Implement a sampler cache
| * | vk_sampler_cache: Use operator== instead of memcmpMat M2019-03-131-1/+1
| | | | | | | | | Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
| * | vk_sampler_cache: Implement a sampler cacheReinUsesLisp2019-03-134-1/+140
| | |
| * | video_core/texture: Add a raw representation of TSCEntryReinUsesLisp2019-03-121-24/+29
| |/
* | Merge pull request #2216 from ReinUsesLisp/rasterizer-systembunnei2019-03-142-29/+31
|\ \ | | | | | | gl_rasterizer: Use system instance passed from argument
| * | gl_rasterizer: Use system instance passed from argumentReinUsesLisp2019-03-112-29/+31
| | |
* | | Merge pull request #2227 from lioncash/overridebunnei2019-03-132-5/+5
|\ \ \ | | | | | | | | renderer_opengl/gl_global_cache: Add missing override specifiers
| * | | renderer_opengl/gl_global_cache: Replace indexing for assignment with insert_or_assignLioncash2019-03-112-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code had some minor issues with it, really not a big deal, but amending it is basically 'free', so I figured, "why not?". With the standard container maps, when: map[key] = thing; is done, this can cause potentially undesirable behavior in certain scenarios. In particular, if there's no value associated with the key, then the map constructs a default initialized instance of the value type. In this case, since it's a std::shared_ptr (as a type alias) that is the value type, this will construct a std::shared_pointer, and then assign over it (with objects that are quite large, or actively heap allocate this can be extremely undesirable). We also make the function take the region by value, as we can avoid a copy (and by extension with std::shared_ptr, a copy causes an atomic reference count increment), in certain scenarios when ownership isn't a concern (i.e. when ReserveGlobalRegion is called with an rvalue reference, then no copy at all occurs). So, it's more-or-less a "free" gain without many downsides.
| * | | renderer_opengl/gl_global_cache: Append missing override specifiersLioncash2019-03-111-2/+2
| |/ / | | | | | | | | | | | | Two of the functions here are overridden functions, so we can append these specifiers to make it explicit.
* | / video_core/texture: Fix up sampler lod biasReinUsesLisp2019-03-131-1/+1
| |/ |/|
* | Merge pull request #2215 from ReinUsesLisp/samplersbunnei2019-03-123-64/+72
|\ \ | |/ |/| gl_rasterizer: Encapsulate sampler queries into methods
| * gl_rasterizer: Encapsulate sampler queries into methodsReinUsesLisp2019-03-093-64/+72
| |
* | Merge pull request #2147 from ReinUsesLisp/texture-cleanbunnei2019-03-107-527/+588
|\ \ | | | | | | shader_ir: Remove "extras" from the MetaTexture
| * | shader/decode: Remove extras from MetaTextureReinUsesLisp2019-02-264-40/+65
| | |
| * | shader/decode: Split memory and texture instructions decodingReinUsesLisp2019-02-266-501/+537
| | |
* | | Merge pull request #2143 from ReinUsesLisp/texviewbunnei2019-03-103-32/+42
|\ \ \ | | | | | | | | gl_rasterizer_cache: Create texture views for array discrepancies
| * | | gl_rasterizer_cache: Create texture views for array discrepanciesReinUsesLisp2019-02-273-32/+42
| | | | | | | | | | | | | | | | | | | | | | | | When a texture is sampled in a shader with a different array mode than the cached state, create a texture view and bind that to the shader instead.
* | | | gl_rasterizer: Minor logger changesReinUsesLisp2019-03-091-19/+13
| |_|/ |/| |
* | | Merge pull request #2209 from lioncash/reorderbunnei2019-03-081-5/+2
|\ \ \ | | | | | | | | video_core/gpu_thread: Silence a -Wreorder warning
| * | | video_core/gpu_thread: Remove unimplemented WaitForIdle function prototypeLioncash2019-03-071-3/+0
| | | | | | | | | | | | | | | | | | | | This function didn't have a definition, so we can remove it to prevent accidentally attempting to use it.
| * | | video_core/gpu_thread: Amend constructor initializer list orderLioncash2019-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves the data members to satisfy the order they're declared as in the constructor initializer list. Silences a -Wreorder warning.
* | | | Merge pull request #2208 from lioncash/gpubunnei2019-03-083-3/+3
|\ \ \ \ | | | | | | | | | | video_core/gpu: Make GPU's destructor virtual
| * | | | video_core/gpu: Make GPU's destructor virtualLioncash2019-03-073-3/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the recent separation of GPU functionality into sync/async variants, we need to mark the destructor virtual to provide proper destruction behavior, given we use the base class within the System class. Prior to this, it was undefined behavior whether or not the destructor in the derived classes would ever execute.
* | | | Merge pull request #2191 from ReinUsesLisp/maxwell-to-vkbunnei2019-03-084-3/+553
|\ \ \ \ | | | | | | | | | | maxwell_to_vk: Initial implementation
| * | | | maxwell_to_vk: Initial implementationReinUsesLisp2019-03-044-3/+553
| | | | |
* | | | | dma_pusher: Store command_list_header by copyReinUsesLisp2019-03-081-1/+1
| |/ / / |/| | | | | | | | | | | | | | | | | | | Instead of holding a reference that will get invalidated by dma_pushbuffer.pop(), hold it as a copy. This doesn't have any performance cost since CommandListHeader is 8 bytes long.
* | | | Merge pull request #2055 from bunnei/gpu-threadbunnei2019-03-0712-26/+480
|\ \ \ \ | | | | | | | | | | Asynchronous GPU command processing
| * | | | gpu_thread: Fix deadlock with threading idle state check.bunnei2019-03-072-7/+11
| | | | |
| * | | | gpu_thread: (HACK) Ignore flush on FlushAndInvalidateRegion.bunnei2019-03-071-3/+1
| | | | |
| * | | | gpu: Always flush.bunnei2019-03-072-13/+6
| | | | |
| * | | | gpu: Refactor a/synchronous implementations into their own classes.bunnei2019-03-077-63/+155
| | | | |
| * | | | gpu: Move command processing to another thread.bunnei2019-03-077-10/+353
| | | | |
| * | | | gpu: Refactor command and swap buffers interface for asynch.bunnei2019-03-072-3/+22
| | | | |
| * | | | gpu: Refactor to take RendererBase instead of RasterizerInterface.bunnei2019-03-072-17/+22
| | | | |
* | | | | Merge pull request #2149 from ReinUsesLisp/decoders-stylebunnei2019-03-078-150/+183
|\ \ \ \ \ | | | | | | | | | | | | gl_rasterizer_cache: Move format conversion functions to their own file
| * | | | | gl_rasterizer_cache: Move format conversion to its own fileReinUsesLisp2019-02-277-136/+175
| | | | | |
| * | | | | decoders: Minor style changesReinUsesLisp2019-02-272-14/+8
| | |_|_|/ | |/| | |
* | | | | Merge pull request #2190 from lioncash/ogl-globalbunnei2019-03-072-11/+17
|\ \ \ \ \ | |_|/ / / |/| | | | core: Remove the global telemetry accessor function
| * | | | video_core/renderer_opengl: Replace direct usage of global system object accessorsLioncash2019-03-042-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | We already pass a reference to the system object to the constructor of the renderer, so we can just use that instead of using the global accessor functions.
* | | | | Merge pull request #2203 from lioncash/engines-includebunnei2019-03-0610-11/+11
|\ \ \ \ \ | | | | | | | | | | | | video_core/engines: Remove unnecessary includes
| * | | | | video_core/engines: Remove unnecessary includesLioncash2019-03-0610-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes a few unnecessary dependencies on core-related machinery, such as the core.h and memory.h, which reduces the amount of rebuilding necessary if those files change. This also uncovered some indirect dependencies within other source files. This also fixes those.
* | | | | | video_core/surface: Remove obsolete TODO in PixelFormatFromRenderTargetFormat()Lioncash2019-03-051-2/+0
|/ / / / / | | | | | | | | | | | | | | | This isn't needed anymore, according to Hexagon
* | | | | Merge pull request #2165 from ReinUsesLisp/unbind-texbunnei2019-03-042-14/+2
|\ \ \ \ \ | |_|_|/ / |/| | | | gl_rasterizer: Unbind textures but don't apply the gl_state
| * | | | gl_rasterizer: Remove texture unbinding after dispatching a draw callReinUsesLisp2019-02-281-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Unbinding was required when OpenGL delete operations didn't unbind a resource if it was bound. This is no longer needed and can be removed.
| * | | | gl_state: Fixup multibind bugReinUsesLisp2019-02-281-2/+2
| | | | |
* | | | | Merge pull request #2183 from ReinUsesLisp/vk-buffer-cache-clangMat M2019-03-021-3/+3
|\ \ \ \ \ | |_|/ / / |/| | | | vk_buffer_cache: Fix clang-format
| * | | | vk_buffer_cache: Fix clang-formatReinUsesLisp2019-03-021-3/+3
| | | | |
* | | | | Merge pull request #2182 from bunnei/my-wasted-fridaybunnei2019-03-021-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | fuck git for ruining my day, I will learn but I will not forgive
| * | | | fuck git for ruining my day, I will learn but I will not forgivebunnei2019-03-021-1/+1
| |/ / /
* / / / vk_buffer_cache: Implement a buffer cacheReinUsesLisp2019-03-013-0/+205
|/ / / | | | | | | | | | | | | This buffer cache is just like OpenGL's buffer cache with some minor style changes. It uses VKStreamBuffer.
* | | Merge pull request #2152 from ReinUsesLisp/vk-stream-bufferbunnei2019-02-285-8/+172
|\ \ \ | | | | | | | | vk_stream_buffer: Implement a stream buffer
| * | | vk_stream_buffer: Remove copy code pathReinUsesLisp2019-02-262-53/+18
| | | |
| * | | vk_stream_buffer: Implement a stream bufferReinUsesLisp2019-02-243-1/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This manages two kinds of streaming buffers: one for unified memory models and one for dedicated GPUs. The first one skips the copy from the staging buffer to the real buffer, since it creates an unified buffer. This implementation waits for all fences to finish their operation before "invalidating". This is suboptimal since it should allocate another buffer or start searching from the beginning. There is room for improvement here. This could also handle AMD's "pinned" memory (a heap with 256 MiB) that seems to be designed for buffer streaming.
| * | | vk_resource_manager: Minor VKFenceWatch changesReinUsesLisp2019-02-242-7/+7
| | | |
* | | | Merge pull request #2121 from FernandoS27/texception2bunnei2019-02-284-16/+213
|\ \ \ \ | | | | | | | | | | Improve the Accuracy of the Rasterizer Cache through a Texception Pass
| * | | | Devirtualize Register/Unregister and use a wrapper instead.Fernando Sahmkow2019-02-283-12/+8
| | | | |
| * | | | Corrections and redesign.Fernando Sahmkow2019-02-282-51/+51
| | | | |
| * | | | Fix linux compile error.Fernando Sahmkow2019-02-281-1/+1
| | | | |
| * | | | Remove NotifyFrameBuffer as we are doing a texception pass every drawcall.Fernando Sahmkow2019-02-282-25/+0
| | | | |
| * | | | Remove certain optimizations that caused texception to fail in certain scenarios.Fernando Sahmkow2019-02-283-24/+1
| | | | |
| * | | | Bug fixes and formattingFernando Sahmkow2019-02-282-3/+4
| | | | |
| * | | | rasterizer_cache_gl: Implement Texception PassFernando Sahmkow2019-02-283-0/+51
| | | | |
| * | | | rasterizer_cache_gl: Implement Partial Reinterpretation of Surfaces.Fernando Sahmkow2019-02-282-0/+100
| | | | |
| * | | | rasterizer_cache: mark reinterpreted surfaces and add ability to reload marked surfaces on next use.Fernando Sahmkow2019-02-282-0/+78
| | | | |
| * | | | rasterizer_cache_gl: Notify on framebuffer changeFernando Sahmkow2019-02-282-4/+23
| | | | |
| * | | | rasterizer_cache: Expose FlushObject to Child classes and allow redefining of Register and UnregisterFernando Sahmkow2019-02-281-11/+11
| | | | |
* | | | | Merge pull request #2172 from lioncash/reorderbunnei2019-02-282-3/+3
|\ \ \ \ \ | |/ / / / |/| | | | gl_rasterizer/vk_memory_manager: Silence -Wreorder warnings
| * | | | vk_memory_manager: Reorder constructor initializer list in terms of member declaration orderLioncash2019-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Reorders members in the order that they would actually be initialized in. Silences a -Wreorder warning.
| * | | | gl_rasterizer: Reorder constructor initializer list in terms of member declaration orderLioncash2019-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Orders the members in the order they would actually be initialized in. Silences a -Wreorder warning.
* | | | | Merge pull request #2163 from ReinUsesLisp/bitset-dirtybunnei2019-02-284-52/+51
|\ \ \ \ \ | |_|_|_|/ |/| | | | maxwell_3d: Use std::bitset to manage dirty flags
| * | | | maxwell_3d: Use std::bitset to manage dirty flagsReinUsesLisp2019-02-264-52/+51
| | |_|/ | |/| |
* | | | Merge pull request #2167 from lioncash/namespacebunnei2019-02-279-23/+23
|\ \ \ \ | | | | | | | | | | common: Move Quaternion, Rectangle, Vec2, Vec3, and Vec4 into the Common namespace
| * | | | common/math_util: Move contents into the Common namespaceLioncash2019-02-279-23/+23
| | |/ / | |/| | | | | | | | | | | | | | These types are within the common library, so they should be within the Common namespace.
* / | | gl_shader_disk_cache: Remove #pragma once from cpp fileLioncash2019-02-271-2/+0
|/ / / | | | | | | | | | This is only necessary in headers. Silences a warning with clang.
* / / renderer_opengl: Update pixel format trackingReinUsesLisp2019-02-261-0/+1
|/ /
* | shader/track: Resolve variable shadowing warningsLioncash2019-02-251-5/+5
| |
* | Merge pull request #2118 from FernandoS27/ipa-improvebunnei2019-02-256-38/+74
|\ \ | | | | | | shader_decompiler: Improve Accuracy of Attribute Interpolation.
| * | shader_decompiler: Improve Accuracy of Attribute Interpolation.Fernando Sahmkow2019-02-146-38/+74
| | |
* | | Merge pull request #2119 from FernandoS27/fix-copybunnei2019-02-251-1/+5
|\ \ \ | | | | | | | | rasterizer_cache_gl: Only do fast layered copy on the same format.
| * | | rasterizer_cache_gl: Only do fast layered copy on the same format. AsFernando Sahmkow2019-02-131-1/+5
| |/ / | | | | | | | | | glCopyImageSubData does not support different formats.
* | | Merge pull request #2139 from degasus/dma_pusherbunnei2019-02-242-28/+34
|\ \ \ | |_|/ |/| | video_core/dma_pusher: The full list of headers at once.
| * | video_core/dma_pusher: Simplyfy Step() logic.Markus Wick2019-02-192-81/+77
| | | | | | | | | | | | | | | As fetching command list headers and and the list of command headers is a fixed 1:1 relation now, they can be implemented within a single call. This cleans up the Step() logic quite a bit.
| * | video_core/dma_pusher: The full list of headers at once.Markus Wick2019-02-192-48/+58
| | | | | | | | | | | | | | | Fetching every u32 from memory leads to a big overhead. So let's fetch all of them as a block if possible. This reduces the Memory::* calls by the dma_pusher by a factor of 10.
* | | Merge pull request #2146 from ReinUsesLisp/vulkan-schedulerbunnei2019-02-243-1/+132
|\ \ \ | | | | | | | | vk_scheduler: Implement a scheduler
| * | | vk_scheduler: Implement a schedulerReinUsesLisp2019-02-223-1/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The scheduler abstracts command buffer and fence management with an interface that's able to do OpenGL-like operations on Vulkan command buffers. It returns by value a command buffer and fence that have to be used for subsequent operations until Flush or Finish is executed, after that the current execution context (the pair of command buffers and fences) gets invalidated a new one must be fetched. Thankfully validation layers will quickly detect if this is skipped throwing an error due to modifications to a sent command buffer.
* | | | Merge pull request #2150 from ReinUsesLisp/fixup-layer-swizzlebunnei2019-02-241-1/+1
|\ \ \ \ | | | | | | | | | | gl_rasterizer_cache: Fixup parameter order in layered swizzle
| * | | | gl_rasterizer_cache: Fixup parameter order in layered swizzleReinUsesLisp2019-02-241-1/+1
| |/ / /
* / / / vk_memory_manager: Fixup commit interval allocationReinUsesLisp2019-02-241-2/+1
|/ / / | | | | | | | | | | | | VKMemoryCommitImpl was using as the end of its interval "begin + end". That ended up wasting memory.
* | | Merge pull request #2138 from ReinUsesLisp/vulkan-memory-managerbunnei2019-02-223-0/+342
|\ \ \ | | | | | | | | vk_memory_manager: Implement memory manager
| * | | vk_memory_manager: Implement memory managerReinUsesLisp2019-02-193-0/+342
| |/ / | | | | | | | | | | | | A memory manager object handles the memory allocations for a device. It allocates chunks of Vulkan memory objects and then suballocates.
* | | Merge pull request #2125 from ReinUsesLisp/fixup-glstatebunnei2019-02-211-83/+61
|\ \ \ | | | | | | | | gl_state: Synchronize gl_state even when state is disabled
| * | | gl_state: Synchronize gl_state even when state is disabledReinUsesLisp2019-02-151-83/+61
| | | | | | | | | | | | | | | | | | | | | | | | There are some potential edge cases where gl_state may fail to track the state if a related state changes while the toggle is disabled or it didn't change. This addresses that.
* | | | Merge pull request #2130 from lioncash/system_enginebunnei2019-02-218-22/+48
|\ \ \ \ | |_|/ / |/| | | video_core: Remove usages of System::GetInstance() within the engines
| * | | video_core: Remove usages of System::GetInstance() within the enginesLioncash2019-02-168-22/+48
| | | | | | | | | | | | | | | | | | | | Avoids the use of the global accessor in favor of explicitly making the system a dependency within the interface.
* | | | Merge pull request #2122 from ReinUsesLisp/vulkan-resource-managerbunnei2019-02-193-1/+468
|\ \ \ \ | | | | | | | | | | vk_resource_manager: Implement fence and command buffer allocator
| * | | | vk_resource_manager: Implement a command buffer pool with VKFencedPoolReinUsesLisp2019-02-142-1/+59
| | | | |
| * | | | vk_resource_manager: Add VKFencedPool interfaceReinUsesLisp2019-02-142-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handles a pool of resources protected by fences. Manages resource overflow allocating more resources. This class is intended to be used through inheritance.
| * | | | vk_resource_manager: Implement VKResourceManager and fence allocatorReinUsesLisp2019-02-142-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | CommitFence iterates a pool of fences until one is found. If all fences are being used at the same time, allocate more.
| * | | | vk_resource_manager: Implement VKFenceWatchReinUsesLisp2019-02-142-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A fence watch is used to keep track of the usage of a fence and protect a resource or set of resources without having to inherit from their handlers.
| * | | | vk_resource_manager: Implement VKFenceReinUsesLisp2019-02-142-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fences take ownership of objects, protecting them from GPU-side or driver-side concurrent access. They must be commited from the resource manager. Their usage flow is: commit the fence from the resource manager, protect resources with it and use them, send the fence to an execution queue and Wait for it if needed and then call Release. Used resources will automatically be signaled when they are free to be reused.
| * | | | vk_resource_manager: Add VKResource interfaceReinUsesLisp2019-02-143-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | VKResource is an interface that gets signaled by a fence when it is free to be reused.
* | | | | Merge pull request #2127 from FearlessTobi/fix-screenshot-srgbbunnei2019-02-161-1/+2
|\ \ \ \ \ | |_|/ / / |/| | | | renderer_opengl: respect the sRGB colorspace for the screenshot feature
| * | | | renderer_opengl: respect the sRGB colorspace for the screenshot featurefearlessTobi2019-02-151-1/+2
| | |/ / | |/| | | | | | | | | | | | | | Previously, we were completely ignoring for screenshots whether the game uses RGB or sRGB. This resulted in screenshot colors that looked off for some titles.
* | | | Merge pull request #2123 from lioncash/coretiming-globalJames Rowe2019-02-163-3/+4
|\ \ \ \ | |/ / / |/| | | core_timing: De-globalize core_timing facilities
| * | | core_timing: Convert core timing into a classLioncash2019-02-163-3/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
* | | Merge pull request #2112 from lioncash/shadowingbunnei2019-02-151-7/+13
|\ \ \ | | | | | | | | gl_rasterizer_cache: Get rid of variable shadowing
| * | | gl_rasterizer_cache: Remove unnecessary newlineLioncash2019-02-121-2/+0
| | | |
| * | | gl_rasterizer_cache: Get rid of variable shadowingLioncash2019-02-121-6/+14
| | | | | | | | | | | | | | | | | | | | Avoids shadowing the members of the struct itself, which results in a -Wshadow warning.
* | | | Merge pull request #2111 from ReinUsesLisp/fetch-fixbunnei2019-02-152-22/+35
|\ \ \ \ | |_|/ / |/| | | gl_shader_decompiler: Re-implement TLDS lod
| * | | gl_shader_decompiler: Re-implement TLDS lodReinUsesLisp2019-02-122-22/+35
| | | |
* | | | Merge pull request #2113 from ReinUsesLisp/vulkan-basebunnei2019-02-144-0/+402
|\ \ \ \ | |_|_|/ |/| | | vulkan: Add dependencies and device abstraction
| * | | vk_device: Abstract device handling into a classReinUsesLisp2019-02-133-1/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | VKDevice contains all the data required to manage and initialize a physical device. Its intention is to be passed across Vulkan objects to query device-specific data (for example the logical device and the dispatch loader).
| * | | renderer_vulkan: Add declarations fileReinUsesLisp2019-02-122-0/+52
| |/ / | | | | | | | | | | | | | | | | | | This file is intended to be included instead of vulkan/vulkan.hpp. It includes declarations of unique handlers using a dynamic dispatcher instead of a static one (which would require linking to a Vulkan library).
* | | Merge pull request #2099 from greggameplayer/BGRA8-Framebuffer-Realbunnei2019-02-133-0/+4
|\ \ \ | | | | | | | | Implement BGRA8 framebuffer format
| * | | Implement BGRA8 framebuffer formatgreggameplayer2019-02-093-0/+4
| | |/ | |/|
* | | renderer_opengl: Remove reference to global system instanceLioncash2019-02-131-3/+3
| | | | | | | | | | | | | | | | | | We already store a reference to the system instance that the renderer is created with, so we don't need to refer to the system instance via Core::System::GetInstance()
* | | Merge pull request #2110 from lioncash/namespacebunnei2019-02-133-3/+3
|\ \ \ | | | | | | | | core_timing: Rename CoreTiming namespace to Core::Timing
| * | | core_timing: Rename CoreTiming namespace to Core::TimingLioncash2019-02-123-3/+3
| |/ / | | | | | | | | | | | | | | | Places all of the timing-related functionality under the existing Core namespace to keep things consistent, rather than having the timing utilities sitting in its own completely separate namespace.
* | | Merge pull request #2104 from ReinUsesLisp/compute-assertbunnei2019-02-136-52/+59
|\ \ \ | |_|/ |/| | kepler_compute: Fixup assert and rename the engine
| * | kepler_compute: Fixup assert and rename enginesReinUsesLisp2019-02-106-52/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I originally added the compute assert I used the wrong documentation. This addresses that. The dispatch register was tested with homebrew against hardware and is triggered by some games (e.g. Super Mario Odyssey). What exactly is missing to get a valid program bound by this engine requires more investigation.
* | | Merge pull request #2108 from FernandoS27/fix-ccbunnei2019-02-121-2/+2
|\ \ \ | | | | | | | | Fix incorrect value for CC bit in IADD
| * | | Fix incorrect value for CC bit in IADDFernando Sahmkow2019-02-111-2/+2
| | |/ | |/|
* | | Merge pull request #2109 from FernandoS27/fix-f2ibunnei2019-02-122-4/+4
|\ \ \ | | | | | | | | Corrected F2I None mode to RoundEven.
| * | | Corrected F2I None mode to RoundEven.Fernando Sahmkow2019-02-112-4/+4
| |/ /
* | | Merge pull request #2068 from ReinUsesLisp/shader-cleanup-texturesbunnei2019-02-123-153/+123
|\ \ \ | |/ / |/| | shader_ir: Clean texture management code
| * | shader_ir: Remove F4 prefix to texture operationsReinUsesLisp2019-02-073-26/+25
| | | | | | | | | | | | | | | | | | This was originally included because texture operations returned a vec4. These operations now return a single float and the F4 prefix doesn't mean anything.
| * | shader_ir: Clean texture management codeReinUsesLisp2019-02-073-133/+104
| |/ | | | | | | | | | | | | | | | | Previous code relied on GLSL parameter order (something that's always ill-formed on an IR design). This approach passes spatial coordiantes through operation nodes and array and depth compare values in the the texture metadata. It still contains an "extra" vector containing generic nodes for bias and component index (for example) which is still a bit ill-formed but it should be better than the previous approach.
* | Merge pull request #1904 from bunnei/better-fermi-copybunnei2019-02-097-72/+206
|\ \ | | | | | | gl_rasterizer: Implement a more accurate fermi 2D copy.
| * | gl_rasterizer_cache: Mark surface copy destinations as modified.bunnei2019-02-072-4/+18
| | |
| * | gl_rasterizer: Implement a more accurate fermi 2D copy.bunnei2019-02-077-68/+188
| | | | | | | | | | | | - This is a blit, use the blit registers.
* | | Implement linear textures (#2089)Fernando Sahmkow2019-02-092-5/+39
| | |
* | | gl_rasterizer_cache: Fixup texture view parametersReinUsesLisp2019-02-081-2/+2
| |/ |/| | | | | | | These parameters were declared as constants and passed to glTextureView but then they were removed on a rabase. This addresses that mistake.
* | Merge pull request #2083 from ReinUsesLisp/shader-ir-cbuf-trackingbunnei2019-02-0730-127/+141
|\ \ | |/ |/| shader/track: Add a more permissive global memory tracking
| * shader/track: Search inside of conditional nodesReinUsesLisp2019-02-031-0/+11
| | | | | | | | | | | | Some games search conditionally use global memory instructions. This allows the heuristic to search inside conditional nodes for the source constant buffer.
| * shader_ir: Rename BasicBlock to NodeBlockReinUsesLisp2019-02-0330-122/+120
| | | | | | | | It's not always used as a basic block. Rename it for consistency.
| * shader_ir: Pass decoded nodes as a whole instead of per basic blocksReinUsesLisp2019-02-0327-57/+62
| | | | | | | | | | | | | | | | | | Some games call LDG at the top of a basic block, making the tracking heuristic to fail. This commit lets the heuristic the decoded nodes as a whole instead of per basic blocks. This may lead to some false positives but allows it the heuristic to track cases it previously couldn't.
* | gl_shader_disk_cache: Check LZ4 size limitFrederic L2019-02-071-0/+4
| | | | | | Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
* | gl_shader_disk_cache: Consider compressed size zero as an errorFrederic L2019-02-071-2/+2
| | | | | | Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
* | gl_shader_disk_cache: Use unordered containersReinUsesLisp2019-02-074-56/+64
| |
* | gl_shader_cache: Fixup GLSL unique identifiersReinUsesLisp2019-02-072-3/+3
| |
* | gl_shader_cache: Link loading screen with disk shader cache loadReinUsesLisp2019-02-075-9/+40
| |
* | gl_shader_cache: Set GL_PROGRAM_SEPARABLE to dumped shadersReinUsesLisp2019-02-071-0/+1
| | | | | | | | | | | | i965 (and probably all mesa drivers) require GL_PROGRAM_SEPARABLE when using glProgramBinary. This is probably required by the standard but it's ignored by permisive proprietary drivers.
* | gl_shader_disk_cache: Pass core system as argument and guard against games without title idsReinUsesLisp2019-02-0710-17/+57
| |
* | gl_shader_disk_cache: Guard reads and writes against failureReinUsesLisp2019-02-072-216/+339
| |
* | gl_shader_disk_cache: Address miscellaneous feedbackReinUsesLisp2019-02-075-43/+57
| |
* | gl_shader_disk_cache: Pass return values returning instead of by parametersReinUsesLisp2019-02-073-39/+37
| |
* | gl_shader_disk_cache: Compress program binaries using LZ4ReinUsesLisp2019-02-071-7/+28
| |
* | gl_shader_disk_cache: Compress GLSL code using LZ4ReinUsesLisp2019-02-072-6/+57
| |
* | gl_shader_disk_cache: Save GLSL and entries into the precompiled fileReinUsesLisp2019-02-079-135/+234
| |
* | settings: Hide shader cache behind a settingReinUsesLisp2019-02-071-0/+21
| |
* | gl_shader_disk_cache: Invalidate shader cache changes with CMake hashReinUsesLisp2019-02-071-7/+16
| |
* | gl_shader_cache: Refactor to support disk shader cacheReinUsesLisp2019-02-072-121/+388
| |
* | gl_shader_disk_cache: Add transferable cache invalidationReinUsesLisp2019-02-072-0/+8
| |
* | gl_shader_disk_cache: Add precompiled loadReinUsesLisp2019-02-072-0/+45
| |
* | gl_shader_disk_cache: Add precompiled saveReinUsesLisp2019-02-072-0/+57
| |
* | gl_shader_disk_cache: Add transferable loadReinUsesLisp2019-02-072-0/+56
| |
* | gl_shader_disk_cache: Add transferable storesReinUsesLisp2019-02-072-0/+194
| |
* | gl_shader_disk_cache: Add ShaderDiskCacheOpenGL class and helpersReinUsesLisp2019-02-072-0/+76
| |
* | gl_shader_disk_cache: Add file and move BaseBindings declarationReinUsesLisp2019-02-074-10/+58
| |
* | gl_shader_decompiler: Remove name entriesReinUsesLisp2019-02-072-28/+10
| |
* | gl_shader_util: Add parameter to handle retrievable programsReinUsesLisp2019-02-073-6/+10
| |
* | rasterizer_interface: Add disk cache entry for the rasterizerReinUsesLisp2019-02-075-0/+14
| |
* | shader_decode: Implement LDG and basic cbuf trackingReinUsesLisp2019-02-071-0/+33
| |
* | Merge pull request #2042 from ReinUsesLisp/nouveau-texbunnei2019-02-0711-79/+82
|\ \ | | | | | | maxwell_3d: Allow texture handles with TIC id zero
| * | video_core: Assert on invalid GPU to CPU address queriesReinUsesLisp2019-02-038-47/+67
| | |
| * | maxwell_3d: Allow sampler handles with TSC id zeroReinUsesLisp2019-02-031-10/+6
| | |
| * | maxwell_3d: Allow texture handles with TIC id zeroReinUsesLisp2019-02-033-21/+7
| | | | | | | | | | | | | | | Also remove "enabled" field from Tegra::Texture::FullTextureInfo because it would become unused.
| * | memory_manager: Check for reserved page statusReinUsesLisp2019-02-031-1/+2
| |/
* | Merge pull request #2071 from ReinUsesLisp/dsa-texturebunnei2019-02-078-216/+153
|\ \ | | | | | | gl_rasterizer: Use DSA for textures and move swizzling to texture state
| * | gl_rasterizer_cache: Fixup test clauseReinUsesLisp2019-01-301-6/+5
| | |
| * | gl_rasterizer_cache: Guard clause swizzle testingMat M2019-01-301-1/+3
| | | | | | | | | Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
| * | gl_state: Remove texture target trackingReinUsesLisp2019-01-302-5/+0
| | |
| * | gl_rasterizer_cache: Move swizzling to textures instead of stateReinUsesLisp2019-01-306-28/+35
| | |
| * | gl_state: Use DSA and multi bind to update texture bindingsReinUsesLisp2019-01-301-8/+22
| | |
| * | gl_rasterizer: Use DSA for texturesReinUsesLisp2019-01-305-185/+105
| | |
* | | Merge pull request #2085 from ReinUsesLisp/cube-minus-onebunnei2019-02-051-1/+1
|\ \ \ | | | | | | | | video_core/texture: Fix BitField size for depth_minus_one
| * | | video_core/texture: Fix BitField size for depth_minus_oneReinUsesLisp2019-02-051-1/+1
| | | |
* | | | Merge pull request #2081 from ReinUsesLisp/lmem-64bunnei2019-02-052-15/+46
|\ \ \ \ | |/ / / |/| | | shader_ir/memory: Add LD_L 64 bits loads
| * | | shader_ir/memory: Add ST_L 64 and 128 bits storesReinUsesLisp2019-02-031-3/+11
| | | |
| * | | shader_ir/memory: Add LD_L 128 bits loadsReinUsesLisp2019-02-031-7/+19
| | | |
| * | | shader_bytecode: Rename BytesN enums to BitsNReinUsesLisp2019-02-032-7/+7
| | | |
| * | | shader_ir/memory: Add LD_L 64 bits loadsReinUsesLisp2019-02-031-6/+17
| | |/ | |/|
* | | Merge pull request #2082 from FernandoS27/txq-stlbunnei2019-02-052-6/+13
|\ \ \ | |/ / |/| | Fix TXQ not using the component mask.
| * | Update src/video_core/engines/shader_bytecode.hMat M2019-02-041-1/+1
| | | | | | | | | Co-Authored-By: FernandoS27 <fsahmkow27@gmail.com>
| * | Fix TXQ not using the component mask.Fernando Sahmkow2019-02-032-6/+13
| | |
* | | Merge pull request #2074 from ReinUsesLisp/shader-ir-unify-offsetbunnei2019-02-0117-25/+36
|\ \ \ | | | | | | | | shader_ir: Unify constant buffer offset values
| * | | shader_ir: Unify constant buffer offset valuesReinUsesLisp2019-01-3017-25/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Constant buffer values on the shader IR were using different offsets if the access direct or indirect. cbuf34 has a non-multiplied offset while cbuf36 does. On shader decoding this commit multiplies it by four on cbuf34 queries.
* | | | Merge pull request #2067 from ReinUsesLisp/workaround-fbbunnei2019-02-012-14/+19
|\ \ \ \ | | | | | | | | | | gl_rasterizer: Workaround invalid zeta clears
| * | | | gl_rasterizer: Workaround invalid zeta clearsReinUsesLisp2019-01-302-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some games (like Xenoblade Chronicles 2) clear both depth and stencil buffers while there's a depth-only texture attached (e.g. D16 Unorm). This commit reads the zeta format of the bound surface on ConfigureFramebuffers and returns if depth and/or stencil attachments were set. This is ignored on DrawArrays but on Clear it's used to just clear those attachments, bypassing an OpenGL error.
* | | | | rasterizer_interface: Remove unused AccelerateFill operationReinUsesLisp2019-02-013-11/+0
| | | | |
* | | | | video_core: Remove unused Fill surface typeReinUsesLisp2019-02-012-6/+1
| |_|/ / |/| | |
* | | | Merge pull request #2076 from lioncash/encHexagon122019-01-301-1/+1
|\ \ \ \ | |_|_|/ |/| | | video_core/dma_pusher: Silence C4828 warnings
| * | | video_core/dma_pusher: Silence C4828 warningsLioncash2019-01-301-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | This was previously causing: warning C4828: The file contains a character starting at offset 0xa33 that is illegal in the current source character set (codepage 65001). warnings on Windows when compiling yuzu.
* | | Merge pull request #1485 from FernandoS27/render-infobunnei2019-01-302-2/+57
|\ \ \ | |/ / |/| | Add more info into textures' object labels
| * | Add more info into textures' object labelsFernandoS272018-12-092-2/+57
| | |
* | | Merge pull request #2070 from ReinUsesLisp/cubearray-viewbunnei2019-01-304-3/+28
|\ \ \ | | | | | | | | gl_shader_cache: Fix texture view for cubemaps as cubemap arrays
| * | | gl_shader_cache: Fix texture view for cubemaps as cubemap arraysReinUsesLisp2019-01-304-3/+28
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cubemaps are considered layered and to create a texture view the texture mustn't be a layered texture, resulting in cubemaps being bound as cubemap arrays. To fix this issue this commit introduces an extra surface parameter called "is_array" and uses this to query for texture view creation. Now that texture views for cubemaps are actually being created, this also fixes the number of layers created for the texture view (since they have to be 6 to create a texture view of cubemaps).
* | | gl_shader_cache: Use explicit bindingsReinUsesLisp2019-01-307-249/+194
| | |
* | | gl_rasterizer: Implement global memory managementReinUsesLisp2019-01-306-4/+140
| | |
* | | shader_decode: Implement LDG and basic cbuf trackingReinUsesLisp2019-01-307-10/+240
| | |
* | | video_core/GPU Implemented the GPU PFIFO puller semaphore operations. (#1908)Kevin2019-01-302-12/+242
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implemented the puller semaphore operations. * Nit: Fix 2 style issues * Nit: Add Break to default case. * Fix style. * Update for comments. Added ReferenceCount method * Forgot to remove GpuSmaphoreAddress union. * Fix the clang-format issues. * More clang formatting. * two more white spaces for the Clang formatting. * Move puller members into the regs union * Updated to use Memory::WriteBlock instead of Memory::Write* * Fix clang style issues * White space clang error * Removing unused funcitons and other pr comment * Removing unused funcitons and other pr comment * More union magic for setting regs value. * union magic refcnt as well * Remove local var * Set up the regs and regs_assert_positions up properly * Fix clang error
* | shader/shader_ir: Amend three comment typosLioncash2019-01-281-3/+3
| | | | | | | | | | Given we're in the area, these are three trivial typos that can be corrected.
* | shader/shader_ir: Amend constructor initializer ordering for AbufNodeLioncash2019-01-281-2/+2
| | | | | | | | | | Orders the class members in the same order that they would actually be initialized in. Gets rid of two compiler warnings.
* | shader/decode: Avoid a pessimizing std::move within DecodeRange()Lioncash2019-01-281-1/+1
| | | | | | | | | | | | std::moveing a local variable in a return statement has the potential to prevent copy elision from occurring, so this can just be converted into a regular return.
* | video_core: Silent implicit conversion warningReinUsesLisp2019-01-261-3/+4
| |
* | Merge pull request #1927 from ReinUsesLisp/shader-irbunnei2019-01-2639-3808/+5497
|\ \ | | | | | | video_core: Replace gl_shader_decompiler with an IR based decompiler
| * | shader_ir: Fixup clang buildReinUsesLisp2019-01-161-4/+6
| | |
| * | gl_shader_decompiler: replace std::get<> with std::get_if<> for macOS compatibilityReinUsesLisp2019-01-151-44/+58
| | |
| * | gl_shader_decompiler: Inline textureGather componentReinUsesLisp2019-01-151-15/+16
| | |
| * | shader_decode: Fixup XMADReinUsesLisp2019-01-151-1/+1
| | |
| * | shader_ir: Pass to decoder functions basic block's codeReinUsesLisp2019-01-1527-82/+83
| | |
| * | shader_decode: Improve zero flag implementationReinUsesLisp2019-01-1515-75/+79
| | |
| * | shader_ir: Remove composite primitives and use temporals insteadReinUsesLisp2019-01-154-241/+224
| | |
| * | gl_shader_decompiler: Fixup AssignCompositeHalfReinUsesLisp2019-01-151-1/+1
| | |
| * | shader_decode: Use proper primitive namesReinUsesLisp2019-01-154-25/+21
| | |
| * | shader_decode: Use BitfieldExtract instead of shift + andReinUsesLisp2019-01-158-48/+37
| | |
| * | shader_ir: Remove Ipa primitiveReinUsesLisp2019-01-153-13/+2
| | |
| * | gl_shader_decompiler: Use rasterizer's UBO size limitReinUsesLisp2019-01-151-1/+3
| | |
| * | gl_shader_gen: Fixup code formattingReinUsesLisp2019-01-152-18/+22
| | |
| * | video_core: Rename glsl_decompiler to gl_shader_decompilerReinUsesLisp2019-01-157-7/+7
| | |
| * | shader_ir: Remove RZ and use Register::ZeroIndex insteadReinUsesLisp2019-01-153-12/+16
| | |
| * | shader_decode: Implement TEXS.F16ReinUsesLisp2019-01-153-15/+57
| | |
| * | shader_decode: Fixup R2PReinUsesLisp2019-01-151-2/+3
| | |
| * | glsl_decompiler: Fixup TLDSReinUsesLisp2019-01-151-1/+0
| | |
| * | glsl_decompiler: Fixup geometry shadersReinUsesLisp2019-01-152-15/+17
| | |
| * | shader_decode: Fixup WriteLogicOperation zero comparisonReinUsesLisp2019-01-151-1/+1
| | |
| * | glsl_decompiler: Fixup permissive member function declarationsReinUsesLisp2019-01-151-133/+133
| | |
| * | shader_decode: Fixup PSETReinUsesLisp2019-01-151-2/+3
| | |
| * | shader_decode: Fixup clang-formatReinUsesLisp2019-01-152-2/+4
| | |
| * | video_core: Implement IR based geometry shadersReinUsesLisp2019-01-154-10/+102
| | |
| * | shader_decode: Implement VMAD and VSETPReinUsesLisp2019-01-155-2/+129
| | |
| * | shader_decode: Implement HSET2ReinUsesLisp2019-01-153-1/+50
| | |
| * | shader_decode: Rework HSETP2ReinUsesLisp2019-01-154-47/+57
| | |
| * | shader_decode: Implement R2PReinUsesLisp2019-01-151-1/+28
| | |
| * | shader_decode: Implement CSETPReinUsesLisp2019-01-151-14/+37
| | |
| * | shader_decode: Implement PSETReinUsesLisp2019-01-151-1/+16
| | |
| * | shader_decode: Implement HFMA2ReinUsesLisp2019-01-154-5/+60
| | |
| * | glsl_decompiler: Remove HNegate inliningReinUsesLisp2019-01-151-10/+0
| | |
| * | shader_decode: Implement POPCReinUsesLisp2019-01-154-1/+22
| | |
| * | shader_decode: Implement TLDS (untested)ReinUsesLisp2019-01-153-10/+92
| | |
| * | shader_decode: Update TLD4 reflecting #1862 changesReinUsesLisp2019-01-152-52/+52
| | |
| * | shader_ir: Fixup TEX and TEXS and partially fix TLD4 decompilingReinUsesLisp2019-01-153-60/+72
| | |
| * | shader_decode: Fixup FSETReinUsesLisp2019-01-151-2/+2
| | |
| * | shader_decode: Implement IADD32IReinUsesLisp2019-01-151-0/+11
| | |
| * | shader_decode: Fixup clang-formatReinUsesLisp2019-01-151-1/+1
| | |
| * | video_core: Return safe values after an assert hitsReinUsesLisp2019-01-158-8/+19
| | |
| * | shader_decode: Implement FFMAReinUsesLisp2019-01-151-1/+36
| | |
| * | video_core: Address feedbackReinUsesLisp2019-01-154-13/+16
| | |
| * | shader_ir: Fixup file inclusions and clang-formatReinUsesLisp2019-01-153-2/+2
| | |
| * | shader_ir: Move comment node stringMat M2019-01-151-2/+2
| | | | | | | | | Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
| * | shader_ir: Address feedback to avoid UB in bit castingReinUsesLisp2019-01-151-2/+4
| | |
| * | shader_decode: Fixup clang-formatReinUsesLisp2019-01-152-3/+2
| | |
| * | shader_decode: Implement LEAReinUsesLisp2019-01-151-0/+55
| | |
| * | shader_decode: Implement IADD3ReinUsesLisp2019-01-151-0/+61
| | |
| * | shader_decode: Implement LOP3ReinUsesLisp2019-01-152-0/+62
| | |
| * | shader_decode: Implement ST_LReinUsesLisp2019-01-151-0/+17
| | |
| * | shader_decode: Implement LD_LReinUsesLisp2019-01-151-0/+18
| | |
| * | shader_decode: Implement HSETP2ReinUsesLisp2019-01-151-1/+37
| | |
| * | shader_decode: Implement HADD2 and HMUL2ReinUsesLisp2019-01-151-1/+48
| | |
| * | shader_decode: Implement HADD2_IMM and HMUL2_IMMReinUsesLisp2019-01-151-1/+28
| | |
| * | shader_decode: Implement MOV_SYSReinUsesLisp2019-01-151-0/+27
| | |
| * | shader_decode: Implement IMNMXReinUsesLisp2019-01-151-0/+16
| | |
| * | shader_decode: Implement F2F_CReinUsesLisp2019-01-151-2/+10
| | |
| * | shader_decode: Implement I2IReinUsesLisp2019-01-151-0/+26
| | |
| * | shader_decode: Implement BRA internal flagReinUsesLisp2019-01-151-4/+8
| | |
| * | shader_decode: Implement ISCADDReinUsesLisp2019-01-151-0/+15
| | |
| * | shader_decode: Implement XMADReinUsesLisp2019-01-151-1/+85
| | |
| * | shader_decode: Implement PBK and BRKReinUsesLisp2019-01-151-1/+22
| | |
| * | shader_decode: Implement LOPReinUsesLisp2019-01-151-0/+15
| | |
| * | shader_decode: Implement SELReinUsesLisp2019-01-151-0/+8
| | |
| * | shader_decode: Implement IADDReinUsesLisp2019-01-151-1/+28
| | |
| * | shader_decode: Implement ISETPReinUsesLisp2019-01-151-1/+30
| | |
| * | shader_decode: Implement BFIReinUsesLisp2019-01-151-1/+22
| | |
| * | shader_decode: Implement ISETReinUsesLisp2019-01-151-1/+27
| | |
| * | shader_decode: Implement LD_CReinUsesLisp2019-01-151-0/+31
| | |
| * | shader_decode: Implement SHLReinUsesLisp2019-01-151-0/+8
| | |
| * | shader_decode: Implement SHRReinUsesLisp2019-01-151-1/+26
| | |
| * | shader_decode: Implement LOP32IReinUsesLisp2019-01-152-1/+72
| | |
| * | shader_decode: Implement BFEReinUsesLisp2019-01-151-1/+25
| | |
| * | shader_decode: Implement FSETReinUsesLisp2019-01-151-1/+36
| | |
| * | shader_decode: Implement F2IReinUsesLisp2019-01-151-0/+37
| | |
| * | shader_decode: Implement I2FReinUsesLisp2019-01-151-0/+23
| | |
| * | shader_decode: Implement F2FReinUsesLisp2019-01-151-1/+37
| | |
| * | shader_decode: Stub DEPBARReinUsesLisp2019-01-151-0/+4
| | |
| * | shader_decode: Implement SSY and SYNCReinUsesLisp2019-01-151-0/+19
| | |
| * | shader_decode: Implement PSETPReinUsesLisp2019-01-151-1/+21
| | |
| * | shader_decode: Implement TMMLReinUsesLisp2019-01-151-3/+45
| | |
| * | shader_decode: Implement TEX and TXQReinUsesLisp2019-01-152-0/+223
| | |
| * | shader_decode: Implement TEXS (F32)ReinUsesLisp2019-01-152-0/+217
| | |
| * | shader_decode: Implement FSETPReinUsesLisp2019-01-151-1/+33
| | |
| * | shader_decode: Partially implement BRAReinUsesLisp2019-01-151-0/+12
| | |
| * | shader_decode: Implement IPAReinUsesLisp2019-01-151-0/+12
| | |
| * | shader_decode: Implement EXITReinUsesLisp2019-01-151-1/+32
| | |
| * | shader_decode: Implement ST_AReinUsesLisp2019-01-151-0/+30
| | |
| * | shader_decode: Implement LD_AReinUsesLisp2019-01-151-1/+39
| | |
| * | shader_decode: Implement FADD32IReinUsesLisp2019-01-151-0/+12
| | |
| * | shader_decode: Implement FMUL32_IMMReinUsesLisp2019-01-151-0/+10
| | |
| * | shader_decode: Implement MOV32_IMMReinUsesLisp2019-01-151-1/+9
| | |
| * | shader_decode: Stub RRO_C, RRO_R and RRO_IMMReinUsesLisp2019-01-151-0/+9
| | |
| * | shader_decode: Implement FMNMX_C, FMNMX_R and FMNMX_IMMReinUsesLisp2019-01-151-0/+18
| | |
| * | shader_decode: Implement MUFUReinUsesLisp2019-01-151-0/+29
| | |
| * | shader_decode: Implement FADD_C, FADD_R and FADD_IMMReinUsesLisp2019-01-151-0/+15
| | |
| * | shader_decode: Implement FMUL_C, FMUL_R and FMUL_IMMReinUsesLisp2019-01-151-0/+42
| | |
| * | shader_decode: Implement MOV_C and MOV_RReinUsesLisp2019-01-151-1/+23
| | |
| * | video_core: Replace gl_shader_decompilerReinUsesLisp2019-01-158-4185/+57
| | |
| * | glsl_decompiler: ImplementationReinUsesLisp2019-01-153-0/+1483
| | |
| * | shader_ir: Add condition code helperReinUsesLisp2019-01-152-0/+13
| | |
| * | shader_ir: Add predicate combiner helperReinUsesLisp2019-01-152-0/+15
| | |
| * | shader_ir: Add comparison helpersReinUsesLisp2019-01-152-0/+106
| | |
| * | shader_ir: Add half float helpersReinUsesLisp2019-01-152-0/+44
| | |
| * | shader_ir: Add integer helpersReinUsesLisp2019-01-152-0/+40
| | |
| * | shader_ir: Add float helpersReinUsesLisp2019-01-152-0/+24
| | |
| * | shader_ir: Add settersReinUsesLisp2019-01-152-0/+24
| | |
| * | shader_ir: Add local memory gettersReinUsesLisp2019-01-152-0/+7
| | |
| * | shader_ir: Add internal flag gettersReinUsesLisp2019-01-152-0/+10
| | |
| * | shader_ir: Add attribute gettersReinUsesLisp2019-01-152-0/+26
| | |
| * | shader_ir: Add constant buffer gettersReinUsesLisp2019-01-152-0/+25
| | |
| * | shader_ir: Add register getterReinUsesLisp2019-01-152-0/+9
| | |
| * | shader_ir: Add immediate node constructorsReinUsesLisp2019-01-152-1/+34
| | |
| * | shader_ir: Initial implementationReinUsesLisp2019-01-1530-0/+1573
| | |
| * | shader_bytecode: Fixup encodingReinUsesLisp2019-01-151-1/+1
| | |
| * | shader_header: Make local memory size getter constantReinUsesLisp2019-01-151-1/+1
| | |
* | | frontend: Refactor ScopeAcquireWindowContext out of renderer_opengl.bunnei2019-01-243-28/+2
| | |
* | | maxwell_3d: Set rt_separate_frag_data to 1 by defaultReinUsesLisp2019-01-222-4/+6
| | | | | | | | | | | | | | | | | | | | | Commercial games assume that this value is 1 but they never set it. On the other hand nouveau manually sets this register. On ConfigureFramebuffers we were asserting for what we are actually implementing (according to envytools).
* | | Rename step 1 and step 2 to be a little more descriptiveJames Rowe2019-01-211-2/+2
| | |
* | | QT: Upgrade the Loading Bar to look much betterJames Rowe2019-01-201-0/+9
| | |
* | | Merge pull request #2008 from ReinUsesLisp/dirty-framebuffersbunnei2019-01-206-8/+78
|\ \ \ | | | | | | | | gl_rasterizer_cache: Use dirty flags for framebuffers
| * | | gl_rasterizer: Skip framebuffer configuration if rendertargets have not been changedReinUsesLisp2019-01-072-1/+31
| | | |
| * | | gl_rasterizer_cache: Use dirty flags for the depth bufferReinUsesLisp2019-01-074-3/+23
| | | |
| * | | gl_rasterizer_cache: Use dirty flags for color buffersReinUsesLisp2019-01-074-4/+24
| | | |
* | | | Merge pull request #2002 from ReinUsesLisp/dsa-vao-bufferbunnei2019-01-209-103/+73
|\ \ \ \ | | | | | | | | | | gl_rasterizer: Use DSA for VAOs and buffers
| * | | | gl_rasterizer: Workaround Intel VAO DSA bugReinUsesLisp2019-01-093-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a bug on Intel's blob driver where it fails to properly build a vertex array object if it's not bound even after creating it with glCreateVertexArrays. This workaround binds it after creating it to bypass the issue.
| * | | | gl_stream_buffer: Use DSA for buffer managementReinUsesLisp2019-01-063-17/+14
| | | | |
| * | | | gl_rasterizer: Use DSA for vertex array objectsReinUsesLisp2019-01-066-79/+53
| | | | |
| * | | | gl_state: Drop uniform buffer state trackingReinUsesLisp2019-01-063-10/+0
| | | | |
* | | | | gl_rasterizer: Silent unsafe mix warningReinUsesLisp2019-01-181-1/+1
| |_|/ / |/| | |
* | | | gl_global_cache: Add dummy global cache managerReinUsesLisp2019-01-085-3/+96
| | | |
* | | | Merge pull request #1999 from ReinUsesLisp/dirty-shaderbunnei2019-01-075-2/+23
|\ \ \ \ | | |/ / | |/| | gl_shader_cache: Use dirty flags for shaders
| * | | gl_shader_cache: Use dirty flags for shadersReinUsesLisp2019-01-075-2/+23
| |/ /
* / / gl_rasterizer_cache: Use GL_STREAM_COPY for PBOsReinUsesLisp2019-01-051-1/+1
|/ / | | | | | | | | | | Since the data is doing the path CPU -> GPU -> GPU copy is the most approximate hint. Using GL_STREAM_DRAW generated a performance warning on Nvidia's stack. Changing this hint removed the warning.
* | Merge pull request #1961 from ReinUsesLisp/tex-view-2dbunnei2019-01-023-14/+74
|\ \ | | | | | | gl_rasterizer_cache: Texture view if shader samples array but OGL is not
| * | gl_rasterizer_cache: Texture view if shader samples array but OGL is notReinUsesLisp2018-12-303-14/+74
| | | | | | | | | | | | | | | | | | | | | When a shader samples a texture array but that texture in OpenGL is created without layers, use a texture view to increase the texture hierarchy. For example, instead of binding a GL_TEXTURE_2D bind a GL_TEXTURE_2D_ARRAY view.
* | | gpu: Remove PixelFormat G8R8U and G8R8S, as they do not seem to exist.bunnei2018-12-284-79/+46
| | | | | | | | | | | | - Fixes UI rendering issues in The Legend of Zelda: Breath of the Wild.
* | | Add missing uintBitsToFloat to SetRegisterToHalfFloatRodolfo Bogado2018-12-271-2/+2
| | |
* | | Merge pull request #1892 from Tinob/masterbunnei2018-12-271-113/+122
|\ \ \ | | | | | | | | Improve Zero flag implementation
| * | | Apply CC test to the final value to be stored in the registerRodolfo Bogado2018-12-261-9/+12
| | | |
| * | | Includde saturation in the evaluation of the control codeRodolfo Bogado2018-12-221-3/+4
| | | |
| * | | Handle RZ cases evaluating the expression instead of the register value.Rodolfo Bogado2018-12-221-14/+22
| | | |
| * | | complete emulation of ZeroFlagRodolfo Bogado2018-12-221-100/+97
| | | |
* | | | renderer_opengl: Correct forward declaration of FramebufferLayoutLioncash2018-12-261-1/+1
| | | | | | | | | | | | | | | | | | | | This is actually a struct, not a class, which can lead to compilation warnings.
* | | | Fixed shader linking error due to TLDS (#1934)David2018-12-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixed shader linking error due to TLDS coord should be coords * Fix remaining coords
* | | | shader_bytecode: Fixup TEXS.F16 encodingReinUsesLisp2018-12-261-1/+1
| |/ / |/| |
* | | Merge pull request #1886 from FearlessTobi/port-4164bunnei2018-12-236-4/+95
|\ \ \ | |/ / |/| | Port citra-emu/citra#4164: "citra_qt, video_core: Screenshot functionality"
| * | yuzu, video_core: Screenshot functionalityzhupengfei2018-12-186-4/+95
| |/ | | | | | | Allows capturing screenshot at the current internal resolution (native for software renderer), but a setting is available to capture it in other resolutions. The screenshot is saved to a single PNG in the current layout.
* | Merge pull request #1921 from ogniK5377/no-unitbunnei2018-12-2110-3/+30
|\ \ | | | | | | Fixed uninitialized memory due to missing returns in canary
| * | hopefully fix clang format issueDavid Marcec2018-12-191-0/+1
| | |
| * | Fixed uninitialized memory due to missing returns in canaryDavid Marcec2018-12-1910-3/+29
| | | | | | | | | | | | Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used.
* | | Merge pull request #1920 from heapo/texture_format_selectionbunnei2018-12-211-1/+11
|\ \ \ | | | | | | | | Texture format fixes for RGBA16UI for copies and R16U when used as depth
| * | | Texture format fixes: Flag RGBA16UI as GL_RGBA_INTEGER format, and interpret R16U as Z16 when depth_compare is enabled.heapo2018-12-181-1/+11
| |/ /
* | | Merge pull request #1909 from heapo/shadow_sampling_fixesbunnei2018-12-191-16/+14
|\ \ \ | |/ / |/| | Fix arrayed texture LOD selection and depth comparison ordering
| * | Fix arrayed shadow sampler array slice/depth comparison ordering, as well as invalid GLSL LOD selection.heapo2018-12-171-16/+14
| | |
* | | shader_bytecode: Fixup half float's operator B encodingReinUsesLisp2018-12-181-1/+1
| | |
* | | Implement postfactor multiplication/division for fmul instructionsheapo2018-12-172-5/+21
|/ /
* | Merge pull request #1893 from lioncash/warnbunnei2018-12-121-3/+3
|\ \ | | | | | | gl_shader_cache: Resolve truncation compiler warning
| * | gl_shader_cache: Dehardcode constant in CalculateProgramSize()Lioncash2018-12-111-2/+2
| | | | | | | | | | | | This constant is related to the size of the instruction.
| * | gl_shader_cache: Resolve truncation compiler warningLioncash2018-12-111-1/+1
| | | | | | | | | | | | | | | The previous code would cause a warning, as it was truncating size_t (64-bit) to a u32 (32-bit) implicitly.
* | | Merge pull request #1888 from marcosvitali/glFrontFacingbunnei2018-12-111-1/+1
|\ \ \ | |/ / |/| | gl_shader_decompiler: IPA fix FrontFacing.
| * | gl_shader_decompiler: IPA FrontFacing: the right value when is the front face is 0xFFFFFFFF.Marcos Vitali2018-12-101-1/+1
| |/
* | Merge pull request #1740 from FernandoS27/shader_propsbunnei2018-12-104-0/+57
|\ \ | | | | | | Implemented Shader Unique Identifiers
| * | Implemented a shader unique identifier.Fernando Sahmkow2018-12-094-0/+57
| |/
* / gl_shader_decompiler: TLDS/TLD4/TLD4S Reworked reflecting the source registers, bugs fixed and modularize.Marcos Vitali2018-12-071-106/+134
|/
* Merge pull request #1824 from ReinUsesLisp/fbcachebunnei2018-12-062-40/+82
|\ | | | | gl_rasterizer: Implement a framebuffer cache
| * gl_rasterizer: Implement a framebuffer cacheReinUsesLisp2018-11-292-40/+82
| |
* | gl_shader_decompiler: Implement TEXS.F16ReinUsesLisp2018-12-052-13/+51
| |
* | gl_shader_decompiler: Fixup inverted ifReinUsesLisp2018-12-051-6/+5
| |
* | Improve msvc codegen for hot-path array LUTsheapo2018-12-051-275/+277
| | | | | | | | | | | | | | In some constexpr functions, msvc is building the LUT at runtime (pushing each element onto the stack) out of an abundance of caution. Moving the arrays into be file-scoped constexpr's avoids this and turns the functions into simple look-ups as intended.
* | Rewrited TEX/TEXS (TEX Scalar). (#1826)Marcos2018-12-041-259/+177
| | | | | | | | | | | | | | | | * Rewrited TEX/TEXS (TEX Scalar). * Style fixes. * Styles issues.
* | Merge pull request #1854 from Subv/old_command_processorbunnei2018-12-042-142/+6
|\ \ | | | | | | Don't try to route PFIFO methods (0-0x40) to the other engines.
| * | Removed unused file.Subv2018-12-041-142/+0
| | | | | | | | | | | | This is a leftover from #1792
| * | GPU: Don't try to route PFIFO methods (0-0x40) to the other engines.Subv2018-12-041-0/+6
| | |
* | | Merge pull request #1822 from ReinUsesLisp/glsl-scopebunnei2018-12-031-250/+213
|\ \ \ | | | | | | | | gl_shader_decompiler: Introduce a scoped object and style changes
| * | | gl_shader_decompiler: Remove texture temporal in TLD4ReinUsesLisp2018-11-291-3/+1
| | | |
| * | | gl_shader_decompiler: Flip negated if else statementReinUsesLisp2018-11-291-3/+3
| | | |
| * | | gl_shader_decompiler: Use GLSL scope on instructions unrelated to texturesReinUsesLisp2018-11-291-35/+10
| | | |
| * | | gl_shader_decompiler: Move texture code generation into lambdasReinUsesLisp2018-11-291-97/+78
| | | |
| * | | gl_shader_decompiler: Clean up texture instructionsReinUsesLisp2018-11-291-87/+56
| | | |
| * | | gl_shader_decompiler: Scope GLSL variables with a scoped objectReinUsesLisp2018-11-291-32/+72
| | |/ | |/|
* | | Merge pull request #1827 from ReinUsesLisp/clip-and-shaderbunnei2018-12-025-13/+37
|\ \ \ | | | | | | | | gl_rasterizer: Enable clip distances when set in register and in shader
| * | | gl_rasterizer: Enable clip distances when set in register and in shaderReinUsesLisp2018-11-295-13/+37
| |/ /
* | | Merge pull request #1825 from ReinUsesLisp/shader-pipeline-cachebunnei2018-12-021-4/+17
|\ \ \ | | | | | | | | gl_shader_manager: Update pipeline when programs have changed
| * | | gl_shader_manager: Update pipeline when programs have changedReinUsesLisp2018-11-291-4/+17
| |/ /
* | | Merge pull request #1795 from ReinUsesLisp/vc-cleanupbunnei2018-12-023-32/+3
|\ \ \ | | | | | | | | video_core: Minor style changes
| * | | gl_rasterizer: Signal UNIMPLEMENTED when rt_separate_frag_data is not zeroReinUsesLisp2018-11-291-1/+1
| | | |
| * | | gl_rasterizer_cache: Use brackets for two-line single-expresion blocksReinUsesLisp2018-11-291-1/+2
| | | |
| * | | gl_rasterizer: Remove unused struct declarationsReinUsesLisp2018-11-291-14/+0
| | | |
| * | | gl_rasterizer: Remove extension booleansReinUsesLisp2018-11-292-16/+0
| |/ /
* | | Merge pull request #1823 from bunnei/fix-surface-copybunnei2018-12-021-145/+5
|\ \ \ | |_|/ |/| | gl_rasterizer_cache: Fix several surface copy issues.
| * | gl_rasterizer_cache: Update AccurateCopySurface to flush complete source surface.bunnei2018-11-301-1/+4
| | | | | | | | | | | | - Fixes issues with Breath of the Wild with use_accurate_gpu_emulation setting.
| * | gl_rasterizer_cache: Remove BlitSurface and replace with more accurate copy.bunnei2018-11-291-144/+1
| |/ | | | | | | | | | | - BlitSurface with different texture targets is inherently broken. - When target is the same, we can just use FastCopySurface. - Fixes rendering issues with Breath of the Wild.
* / Fix debug buildLioncash2018-12-011-4/+2
|/ | | | | A non-existent parameter was left in some formatting calls (the logging macro for which only does anything meaningful on debug builds)
* Merge pull request #1808 from Tinob/masterbunnei2018-11-283-15/+31
|\ | | | | Fix clip distance and viewport
| * remove viewport_transform_enabled as it seems to be inactive when valid transforms are used.Rodolfo Bogado2018-11-271-12/+5
| |
| * Add support for Clip Distance enabled registerRodolfo Bogado2018-11-273-3/+26
| |
* | Merge pull request #1786 from Tinob/DepthClampbunnei2018-11-285-10/+58
|\ \ | | | | | | Add Depth Clamp Support
| * | Implement depth clampRodolfo Bogado2018-11-275-10/+58
| |/
* | Merge pull request #1792 from bunnei/dma-pusherbunnei2018-11-2817-105/+355
|\ \ | | | | | | gpu: Rewrite GPU command list processing with DmaPusher class.
| * | dma_pushbuffer: Optimize to avoid loop and copy on Push.bunnei2018-11-282-5/+17
| | |
| * | gpu: Move command list profiling to DmaPusher::DispatchCalls.bunnei2018-11-282-5/+5
| | |
| * | gpu: Rewrite GPU command list processing with DmaPusher class.bunnei2018-11-2717-105/+343
| |/ | | | | | | - More accurate impl., fixes Undertale (among other games).
* | Merge pull request #1735 from FernandoS27/tex-spacingbunnei2018-11-288-36/+55
|\ \ | | | | | | Texture decoder: Implemented Tile Width Spacing
| * | Implemented Tile Width SpacingFernandoS272018-11-268-36/+55
| | |
* | | gl_shader_decompiler: Fixup clip distance indexReinUsesLisp2018-11-271-1/+1
| | |
* | | gl_rasterizer: Fixup for #1723.Markus Wick2018-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On invalidating the streaming buffer, we need to reupload all vertex buffers. But we don't need to reconfigure the vertex format. This was a (silly) misstake in #1723. Thanks at Rodrigo for discovering the issue. Fun fact, as configuring the vertex format also invalidate the vertex buffer, this misstake had no affect on the behavior.
* | | morton: Fixup compiler warningReinUsesLisp2018-11-271-1/+2
| |/ |/|
* | Merge pull request #1794 from Tinob/masterbunnei2018-11-272-8/+32
|\ \ | | | | | | Add support for viewport_transfom_enable register
| * | Limit the amount of viewports tested for state changes only to the usable onesRodolfo Bogado2018-11-251-2/+10
| | |
| * | Add support for viewport_transfom_enable registerRodolfo Bogado2018-11-242-6/+22
| | |
* | | Merge pull request #1723 from degasus/dirty_flagsbunnei2018-11-279-6/+60
|\ \ \ | | | | | | | | gl_rasterizer: Skip VB upload if the state is clean.
| * | | gl_rasterizer: Skip VB upload if the state is clean.Markus Wick2018-11-179-6/+60
| | | |
* | | | GPU States: Implement Polygon Offset. This is used in SMO all the time. (#1784)Marcos2018-11-275-5/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * GPU States: Implement Polygon Offset. This is used in SMO all the time. * Clang Format fixes. * Initialize polygon_offset in the constructor.
* | | | Merge pull request #1713 from FernandoS27/bra-ccbunnei2018-11-271-4/+14
|\ \ \ \ | | | | | | | | | | Implemented BRA CC conditional and FSET CC Setting
| * | | | Implemented BRA CC conditional and FSET CC SettingFernandoS272018-11-241-4/+14
| | |/ / | |/| |
* | | | Merge pull request #1798 from ReinUsesLisp/y-directionbunnei2018-11-275-16/+26
|\ \ \ \ | |_|_|/ |/| | | gl_shader_decompiler: Implement S2R's Y_DIRECTION
| * | | gl_shader_decompiler: Implement S2R's Y_DIRECTIONReinUsesLisp2018-11-255-16/+26
| |/ /
* | | Merge pull request #1763 from ReinUsesLisp/bfibunnei2018-11-262-0/+23
|\ \ \ | | | | | | | | gl_shader_decompiler: Implement BFI_IMM_R
| * | | gl_shader_decompiler: Implement BFI_IMM_RReinUsesLisp2018-11-212-0/+23
| | | |
* | | | Merge pull request #1760 from ReinUsesLisp/r2pbunnei2018-11-262-0/+42
|\ \ \ \ | | | | | | | | | | gl_shader_decompiler: Implement R2P_IMM
| * | | | gl_shader_decompiler: Implement R2P_IMMReinUsesLisp2018-11-212-0/+42
| |/ / /
* | | | Merge pull request #1782 from FernandoS27/dcbunnei2018-11-261-116/+188
|\ \ \ \ | | | | | | | | | | Fixed Coordinate Encodings in TEX and TEXS instructions
| * | | | Fix Texture OverlappingFernandoS272018-11-241-43/+70
| | | | |
| * | | | Fix TEXS Instruction encodingsFernandoS272018-11-241-22/+48
| | | | |
| * | | | Fix one encoding in TEX InstructionFernandoS272018-11-241-3/+3
| | | | |
| * | | | Corrected inputs indexing in TEX instructionFernandoS272018-11-241-66/+85
| | | | |
* | | | | Merge pull request #1783 from ReinUsesLisp/clip-distancesbunnei2018-11-263-21/+58
|\ \ \ \ \ | | | | | | | | | | | | gl_shader_decompiler: Implement clip distances
| * | | | | gl_shader_decompiler: Implement clip distancesReinUsesLisp2018-11-233-21/+58
| | | | | |
* | | | | | Merge pull request #1796 from ReinUsesLisp/morton-movebunnei2018-11-266-345/+391
|\ \ \ \ \ \ | | | | | | | | | | | | | | video_core: Move morton functions out of gl_rasterizer_cache
| * | | | | | morton: Style changesReinUsesLisp2018-11-251-12/+12
| | | | | | |
| * | | | | | video_core: Move morton functions to their own fileReinUsesLisp2018-11-256-345/+391
| | |_|_|/ / | |/| | | |
* | | | | | Merge pull request #1787 from bunnei/fix-gpu-mmbunnei2018-11-252-1/+9
|\ \ \ \ \ \ | |/ / / / / |/| | | | | memory_manager: Do not allow 0 to be a valid GPUVAddr.
| * | | | | memory_manager: Do not allow 0 to be a valid GPUVAddr.bunnei2018-11-232-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | - Fixes a bug with Undertale using 0 for a render target.
* | | | | | Merge pull request #1725 from FernandoS27/gl43bunnei2018-11-245-20/+13
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update OpenGL's backend version from 3.3 to 4.3
| * | | | | | Removed pre 4.3 ARB extensionsFernandoS272018-11-215-20/+13
| | | | | | |
* | | | | | | Merge pull request #1785 from Tinob/masterbunnei2018-11-245-28/+95
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add support for clear_flags register
| * | | | | | | Add support for clear_flags registerRodolfo Bogado2018-11-245-28/+95
| | |_|_|/ / / | |/| | | | |
* | | | | | | Merge pull request #1769 from ReinUsesLisp/ccbunnei2018-11-242-70/+81
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | gl_shader_decompiler: Rename cc to condition code and name internal flags
| * | | | | | gl_shader_decompiler: Add a message for unimplemented cc generationReinUsesLisp2018-11-221-23/+46
| | | | | | |
| * | | | | | gl_shader_decompiler: Rename internal flag stringsReinUsesLisp2018-11-221-15/+20
| | | | | | |
| * | | | | | gl_shader_decompiler: Rename control codes to condition codesReinUsesLisp2018-11-222-67/+50
| | | | | | |
* | | | | | | Merge pull request #1744 from degasus/shader_cachebunnei2018-11-244-8/+24
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | shader_cache: Only lock covered instructions.
| * | | | | | shader_cache: Only lock covered instructions.Markus Wick2018-11-204-8/+24
| | |/ / / / | |/| | | |
* | | | | | Added predicate comparison LessEqualWithNan (#1736)Hexagon122018-11-232-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added predicate comparison LessEqualWithNan * oops * Clang fix
* | | | | | Merge pull request #1756 from ReinUsesLisp/fix-texturesbunnei2018-11-231-60/+78
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_shader_decompiler: Fix register overwriting on texture calls
| * | | | | | gl_shader_decompiler: Fix register overwriting on texture callsReinUsesLisp2018-11-221-60/+78
| | |/ / / / | |/| | | |
* | | | | | Merge pull request #1766 from FernandoS27/fix-txqbunnei2018-11-231-2/+12
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Properly Implemented TXQ Instruction
| * | | | | Properly Implemented TXQ InstructionFernandoS272018-11-211-2/+12
| | |/ / / | |/| | |
* | | | | Merge pull request #1775 from bunnei/blend-eqbunnei2018-11-222-0/+12
|\ \ \ \ \ | | | | | | | | | | | | maxwell_3d: Implement alternate blend equations.
| * | | | | maxwell_3d: Implement alternate blend equations.bunnei2018-11-222-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | - Used by Undertale.
* | | | | | Merge pull request #1764 from bunnei/macrointerpreterbunnei2018-11-222-8/+25
|\ \ \ \ \ \ | | | | | | | | | | | | | | macro_interpreter: Implement AddWithCarry and SubtractWithBorrow.
| * | | | | | macro_interpreter: Implement AddWithCarry and SubtractWithBorrow.bunnei2018-11-222-8/+25
| |/ / / / / | | | | | | | | | | | | | | | | | | - Used by Undertale.
* | | | | | Merge pull request #1737 from FernandoS27/layer-copybunnei2018-11-222-2/+30
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Implemented Fast Layered Copy
| * | | | | Implemented Fast Layered CopyFernandoS272018-11-202-2/+30
| | |/ / / | |/| | |
* | | | | Merge pull request #1753 from FernandoS27/ufbtypebunnei2018-11-212-0/+8
|\ \ \ \ \ | | | | | | | | | | | | Use default values for unknown framebuffer pixel format
| * | | | | Use default values for unknown framebuffer pixel formatFernandoS272018-11-212-0/+8
| |/ / / /
* | | | | Merge pull request #1752 from ReinUsesLisp/unimpl-decompilerbunnei2018-11-211-371/+258
|\ \ \ \ \ | |_|/ / / |/| | | | gl_shader_decompiler: Use UNIMPLEMENTED when applicable
| * | | | gl_shader_decompiler: Use UNIMPLEMENTED instead of LOG+UNREACHABLE when applicableReinUsesLisp2018-11-211-371/+258
| |/ / /
* | | | Merge pull request #1754 from ReinUsesLisp/zero-registerbunnei2018-11-211-2/+1
|\ \ \ \ | |_|/ / |/| | | gl_shader_decompiler: Remove UNREACHABLE when setting RZ
| * | | gl_shader_decompiler: Remove UNREACHABLE when setting RZReinUsesLisp2018-11-211-2/+1
| |/ /
* / / maxwell_3d: Initialize rasterizer color mask registers as enabled.bunnei2018-11-211-0/+9
|/ / | | | | | | - Fixes rendering regression with Sonic Mania.
* | Merge pull request #1717 from FreddyFunk/swizzle-gobbunnei2018-11-191-37/+33
|\ \ | | | | | | textures/decoders: Replace magic numbers
| * | textures/decoders: Replace magic numbersFrederic Laing2018-11-171-37/+33
| |/
* | Merge pull request #1693 from Tinob/masterbunnei2018-11-199-211/+315
|\ \ | | | | | | Missing ogl states
| * | drop support for non separate alpha as it seems to cause issues in some gamesRodolfo Bogado2018-11-183-61/+35
| | |
| * | fix sampler configuration, thanks to Marcos for his investigationRodolfo Bogado2018-11-173-19/+57
| | |
| * | small type fixRodolfo Bogado2018-11-171-6/+6
| | |
| * | small fix for alphaToOne bit locationRodolfo Bogado2018-11-171-2/+2
| | |
| * | fix for gcc compilationRodolfo Bogado2018-11-171-60/+61
| | |
| * | add AlphaToCoverage and AlphaToOneRodolfo Bogado2018-11-175-1/+39
| | |
| * | add support for fragment_color_clampRodolfo Bogado2018-11-175-1/+24
| | |
| * | add missing MirrorOnceBorder support where supportedRodolfo Bogado2018-11-171-0/+6
| | |
| * | set border color not depending on the wrap modeRodolfo Bogado2018-11-171-9/+9
| | | | | | | | | | | | only enable color mask for the first framebuffer id independent blending is disabled
| * | set default value for point size registerRodolfo Bogado2018-11-172-5/+4
| | |
| * | fix viewport and scissor behaviorRodolfo Bogado2018-11-176-64/+89
| |/
* | Eliminated unnessessary memory allocation and copy (#1702)Frederic L2018-11-193-9/+20
| |
* | gl_rasterizer: Remove default clip distanceReinUsesLisp2018-11-191-2/+0
|/
* Merge pull request #1700 from FreddyFunk/cleanupbunnei2018-11-161-3/+3
|\ | | | | gl_rasterizer_chache: Minor cleanup
| * gl_rasterizer_chache: Minor cleanupFrederic Laing2018-11-151-3/+3
| |
* | Merge pull request #1701 from FreddyFunk/decodersbunnei2018-11-161-16/+16
|\ \ | | | | | | textures/decoders: Minor cleanup
| * | textures/decoders: Minor cleanupFrederic Laing2018-11-151-16/+16
| |/
* | Merge pull request #1676 from lioncash/warnbunnei2018-11-162-3/+4
|\ \ | |/ |/| gl_state: Amend compilation warnings
| * gl_state: Amend compilation warningsLioncash2018-11-132-3/+4
| | | | | | | | | | Makes float -> integral conversions explicit via casts and also silences a sign conversion warning.
* | Merge pull request #1637 from FernandoS27/cachebunnei2018-11-151-18/+17
|\ \ | | | | | | Improved GPU Caches lookup Speed
| * | Improved GPU Caches lookup SpeedFernandoS272018-11-111-18/+17
| | |
* | | Merge pull request #1662 from FreddyFunk/CopySurface-Optimizationbunnei2018-11-141-10/+7
|\ \ \ | | | | | | | | gl_rasterizer_cache: CopySurface optimization
| * | | gl_rasterizer_cache: Remove unnecessary memory allocation and copy in CopySurfaceFrederic Laing2018-11-081-10/+7
| | | |
* | | | Merge pull request #1685 from lioncash/basebunnei2018-11-141-1/+0
|\ \ \ \ | | | | | | | | | | video_core/renderer_base: Remove GL include from the renderer base class files
| * | | | video_core/renderer_base: Remove GL include from the renderer base class filesLioncash2018-11-131-1/+0
| | |_|/ | |/| | | | | | | | | | Keeps the base class source files implementation-agnostic.
* / | | gl_rasterizer: Minor cleanupFrederic L2018-11-131-4/+2
|/ / / | | | | | | Minor code cleanup from unaddressed feedback in #1654
* | | Merge pull request #1628 from greggameplayer/Texture2DArraybunnei2018-11-131-0/+1
|\ \ \ | | | | | | | | Implement SurfaceTarget Texture2DArray
| * \ \ Merge branch 'master' into Texture2DArraygreggameplayer2018-11-0612-186/+338
| |\ \ \
| * | | | correct syntaxgreggameplayer2018-11-021-4/+3
| | | | |
| * | | | Merge branch 'master' into Texture2DArraygreggameplayer2018-11-0214-1031/+1296
| |\ \ \ \
| * | | | | Implement SurfaceTarget Texture2DArraygreggameplayer2018-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | ( needed by Mario+Rabbids Kingdom Battle )
* | | | | | Implement ASTC_2D_10X8 & ASTC_2D_10X8_SRGB (#1666)greggameplayer2018-11-134-71/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement ASTC_2D_10X8 & ASTC_2D_10X8_SRGB ( needed by Mario+Rabbids Kingdom Battle ) * Small placement correction
* | | | | | Merge pull request #1660 from Tinob/masterbunnei2018-11-129-88/+138
|\ \ \ \ \ \ | | | | | | | | | | | | | | Map more missing opengl states
| * | | | | | Use core extensions when available to set max anisotropic filtering levelRodolfo Bogado2018-11-111-2/+7
| | | | | | |
| * | | | | | Improve state management by splitting some of the states id separated function to avoid a full apply overheadRodolfo Bogado2018-11-116-39/+40
| | | | | | |
| * | | | | | Try to fix problems with stencil test in some games, relax translation to opengl enums to avoid crashing and only generate logs of the errors.Rodolfo Bogado2018-11-114-37/+61
| | | | | | |
| * | | | | | set sampler max lod, min lod, lod bias and max anisotropyRodolfo Bogado2018-11-113-13/+33
| | |_|_|_|/ | |/| | | |
* | | | | | Merge pull request #1664 from FreddyFunk/cast2bunnei2018-11-111-2/+2
|\ \ \ \ \ \ | |/ / / / / |/| | | | | gl_rasterizer: Fix compiler warnings
| * | | | | gl_rasterizer: Fix compiler warningsFrederic Laing2018-11-081-2/+2
| | |_|_|/ | |/| | |
* | | | | Merge pull request #1669 from ReinUsesLisp/fixup-gsbunnei2018-11-114-15/+24
|\ \ \ \ \ | | | | | | | | | | | | gl_shader_decompiler: Guard out of bound geometry shader input reads
| * | | | | gl_shader_decompiler: Guard out of bound geometry shader input readsReinUsesLisp2018-11-104-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Geometry shaders follow a pattern that results in out of bound reads. This pattern is: - VSETP to predicate - Use that predicate to conditionally set a register a big number - Use the register to access geometry shaders At the time of writing this commit I don't know what's the intent of this number. Some drivers argue about these out of bound reads. To avoid this issue, input reads are guarded limiting reads to the highest posible vertex input of the current topology (e.g. points to 1 and triangles to 3).
* | | | | | Merge pull request #1663 from lioncash/rasterbunnei2018-11-119-10/+25
|\ \ \ \ \ \ | | | | | | | | | | | | | | rasterizer_cache: Remove reliance on the System singleton
| * | | | | | rasterizer_cache: Remove reliance on the System singletonLioncash2018-11-089-10/+25
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than have a transparent dependency, we can make it explicit in the interface. This also gets rid of the need to put the core include in a header.
* | | | | | Merge pull request #1648 from FernandoS27/texs-3-arraybunnei2018-11-111-7/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | Implement 3 coordinate array in TEXS instruction
| * | | | | | Correct issue where texturelod could not be applied to 2darrayshadowFernandoS272018-11-081-1/+5
| | | | | | |
| * | | | | | Implement 3 coordinate array in TEXS instructionFernandoS272018-11-071-6/+6
| | |/ / / / | |/| | | |
* | | | | | Merge pull request #1654 from degasus/dirty_flagsbunnei2018-11-114-7/+37
|\ \ \ \ \ \ | | | | | | | | | | | | | | gl_rasterizer: Skip VAO binding if the state is clean.
| * | | | | | gl_rasterizer: Skip VAO binding if the state is clean.Markus Wick2018-11-063-2/+21
| | | | | | |
| * | | | | | gl_rasterizer: Split VAO and VB setup functions.Markus Wick2018-11-062-5/+16
| | |_|_|_|/ | |/| | | |
* | | | | | rasterizer_cache: Add missing virtual destructor to RasterizerCacheObjectLioncash2018-11-083-0/+10
| |_|/ / / |/| | | | | | | | | | | | | | Ensures that destruction will always do the right thing in any context.
* | | | | gl_resource_manager: Amend clang-format discrepanciesLioncash2018-11-081-4/+2
| |/ / / |/| | | | | | | | | | | Fixes the buildbot.
* | | | Merge pull request #1630 from bunnei/fix-mapbufferexbunnei2018-11-072-31/+52
|\ \ \ \ | | | | | | | | | | memory_manager: Do not MapBufferEx over already in use memory.
| * | | | memory_manager: Do not MapBufferEx over already in use memory.bunnei2018-11-012-31/+52
| | |_|/ | |/| | | | | | | | | | - This fixes rendering when changing areas in Super Mario Odyssey.
* | | | Merge pull request #1635 from Tinob/masterbunnei2018-11-076-153/+338
|\ \ \ \ | | | | | | | | | | Implement multi-target viewports and blending
| * | | | Add support to color mask to avoid issues in blending caused by wrong values in the alpha channel in some render targets.Rodolfo Bogado2018-11-055-25/+79
| | | | |
| * | | | Implement multi-target viewports and blendingRodolfo Bogado2018-11-056-128/+259
| | | | |
* | | | | gl_rasterizer_cache: Add profiles for Copy and Blit.Markus Wick2018-11-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | They were missed, and Copy is very high in profile here. It doesn't block the GPU, but it stalls the driver thread. So with our bad GL instructions, this might block quite a while.
* | | | | gl_resource_manager: Profile creation and deletion.Markus Wick2018-11-061-0/+42
| | | | |
* | | | | gl_stream_buffer: Profile orphaning of stream buffer.Markus Wick2018-11-061-0/+5
| |_|/ / |/| | | | | | | | | | | | | | | This serialize to the driver thread and so it may block for a while. So if it is in the benchmark, we get noticed if it happens too often.
* | | | gl_resource_manager: Split implementations in .cpp file.Markus Wick2018-11-065-114/+167
| | | | | | | | | | | | | | | | | | | | Those implementations are quite costly, so there is no need to inline them to the caller. Ressource deletion is often a performance bug, so in this way, we support to add breakpoints to them.
* | | | Merge pull request #1616 from FernandoS27/cube-arraybunnei2018-11-054-0/+20
|\ \ \ \ | |/ / / |/| | | Implement Cube Arrays
| * | | Implement Cube ArraysFernandoS272018-11-014-0/+20
| | | |
* | | | Merge pull request #1625 from FernandoS27/astcbunnei2018-11-058-72/+151
|\ \ \ \ | |_|/ / |/| | | Implement ASTC Textures 5x5 and fix a bunch of ASTC texture problems
| * | | Fix ASTC Decompressor to support depth parameterFernandoS272018-11-026-62/+128
| | | |
| * | | Fix ASTC formatsFernandoS272018-11-013-11/+20
| | | |
| * | | Implemented ASTC 5x5FernandoS272018-11-011-1/+5
| | | |
* | | | Merge pull request #1623 from Tinob/masterbunnei2018-11-013-105/+158
|\ \ \ \ | |/ / / |/| | | Improve OpenGL state handling
| * | | Improve OpenGL state handlingRodolfo Bogado2018-10-313-105/+158
| | |/ | |/|
* | | Merge pull request #1527 from FernandoS27/assert-flowbunnei2018-11-012-2/+27
|\ \ \ | | | | | | | | Assert Control Flow Instructions using Control Codes
| * | | Assert Control Flow Instructions using Control CodesFernandoS272018-10-292-3/+28
| | | |
* | | | maxwell_3d: Restructure macro upload to use a single macro code memory.bunnei2018-11-014-27/+55
| | | | | | | | | | | | | | | | | | | | - Fixes an issue where macros could be skipped. - Fixes rendering of distant objects in Super Mario Odyssey.
* | | | Merge pull request #1528 from FernandoS27/assert-control-codesbunnei2018-11-012-1/+103
|\ \ \ \ | |_|_|/ |/| | | Assert Control Codes Generation on Shader Instructions
| * | | Assert Control Codes GenerationFernandoS272018-10-302-1/+103
| | | |
* | | | video_core: Move surface declarations out of gl_rasterizer_cacheReinUsesLisp2018-10-306-898/+954
| |_|/ |/| |
* | | global: Use std::optional instead of boost::optional (#1578)Frederic L2018-10-3017-97/+107
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
* | Merge pull request #1580 from FernandoS27/mm-implbunnei2018-10-306-109/+254
|\ \ | | | | | | Implemented Mipmaps
| * | Fixed black textures, pixelation and we no longer require to auto-generate mipmapsFernandoS272018-10-291-14/+2
| | |
| * | Fixed mipmap block autosizing algorithmFernandoS272018-10-293-13/+25
| | |
| * | Fixed Invalid Image size and Mipmap calculationFernandoS272018-10-291-4/+7
| | |
| * | Fixed Block Resizing algorithm and Clang FormatFernandoS272018-10-293-12/+19
| | |
| * | Implement Mip FilterFernandoS272018-10-294-10/+33
| | |
| * | Zero out memory region of recreated surface before flushingFernandoS272018-10-291-0/+2
| | |
| * | Implement MipmapsFernandoS272018-10-282-101/+211
| |/
* | Merge pull request #1613 from ReinUsesLisp/gl-utilsbunnei2018-10-296-30/+61
|\ \ | | | | | | video_core: Move OpenGL specific utils to its renderer
| * | video_core: Move OpenGL specific utils to its rendererReinUsesLisp2018-10-296-30/+61
| |/
* | Merge pull request #1610 from slashiee/dxt1-alphabunnei2018-10-291-2/+2
|\ \ | | | | | | renderer_opengl: Enable alpha channel for DXT1 texture format
| * | Enable alpha channel for DXT1 texture formatMichael2018-10-281-2/+2
| |/
* / renderer_opengl: Correct bpp value for ASTC_2D_8X5_SRGBRodolfo Bogado2018-10-291-1/+1
|/
* Correct bpp value for ASTC_2D_8X5Tobias2018-10-281-1/+1
|
* Merge pull request #1601 from FernandoS27/shader-precisionbunnei2018-10-281-20/+35
|\ | | | | Improved Shader accuracy on Vertex and Geometry Shaders.
| * Refactor precise usage and add FMNMX, MUFU, FMUL32 and FADD332FernandoS272018-10-282-74/+37
| |
| * Improved Shader accuracy on Vertex and Geometry Shaders with FFMA, FMUL and FADDFernandoS272018-10-282-6/+58
| |
* | Implement sRGB Support, including workarounds for nvidia driver issues and QT sRGB supportRodolfo Bogado2018-10-288-40/+197
| |
* | Merge pull request #1594 from FreddyFunk/static-castbunnei2018-10-281-2/+2
|\ \ | |/ |/| gl_rasterizer_cache: Fix compiler warning
| * gl_rasterizer_cache: Fix compiler warningFrederic Laing2018-10-271-2/+2
| |
* | Merge pull request #1592 from bunnei/prim-restartbunnei2018-10-275-1/+40
|\ \ | | | | | | gl_rasterizer: Implement primitive restart.
| * | gl_rasterizer: Implement primitive restart.bunnei2018-10-265-1/+40
| |/
* / Implement Default Block Height for each formatFernandoS272018-10-271-0/+62
|/
* Merge pull request #1533 from FernandoS27/lmembunnei2018-10-263-1/+138
|\ | | | | Implemented Shader Local Memory
| * Implemented LD_L and ST_LFernandoS272018-10-243-12/+112
| |
| * Implement Shader Local MemoryFernandoS272018-10-241-0/+37
| |
* | maxwell_3d: Add code for initializing register defaults.bunnei2018-10-262-1/+21
| |
* | gl_rasterizer: Implement depth range.bunnei2018-10-264-13/+20
| |
* | Merge pull request #1524 from FernandoS27/layers-fixbunnei2018-10-253-72/+109
|\ \ | |/ |/| rasterizer: Fix Layered Textures Loading and Cubemaps
| * Fixed Layered Textures Loading and CubemapsFernandoS272018-10-233-72/+109
| |
* | Merge pull request #1554 from FernandoS27/pointsizebunnei2018-10-243-5/+28
|\ \ | | | | | | Implement PointSize Output Attribute.
| * | Implement PointSizeFernandoS272018-10-233-5/+28
| | |
* | | decoders: Remove unused variable within SwizzledData()Lioncash2018-10-241-1/+0
| | |
* | | maxwell_3d: Remove unused variable within ProcessQueryGet()Lioncash2018-10-241-1/+0
|/ /
* | Merge pull request #1519 from ReinUsesLisp/vsetpbunnei2018-10-232-75/+108
|\ \ | | | | | | gl_shader_decompiler: Implement VSETP
| * | gl_shader_decompiler: Implement VSETPReinUsesLisp2018-10-232-0/+26
| | |
| * | gl_shader_decompiler: Abstract VMAD into a video subsetReinUsesLisp2018-10-232-75/+82
| | |
* | | Merge pull request #1539 from lioncash/dmabunnei2018-10-233-19/+10
|\ \ \ | | | | | | | | maxwell_dma: Silence compilation warnings
| * | | engines/maxwell_*: Use nested namespace specifiers where applicableLioncash2018-10-203-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | These three source files are the only ones within the engines directory that don't use nested namespaces. We may as well change these over to keep things consistent.
| * | | maxwell_dma: Make variables const where applicable within HandleCopy()Lioncash2018-10-201-3/+3
| | | | | | | | | | | | | | | | These are never modified, so we can make that assumption explicit.
| * | | maxwell_dma: Make FlushAndInvalidate's size parameter a u64Lioncash2018-10-201-1/+1
| | | | | | | | | | | | | | | | This prevents truncation warnings at the lambda's usage sites.
| * | | maxwell_dma: Remove unused variables in HandleCopy()Lioncash2018-10-201-3/+0
| | |/ | |/| | | | | | | These pointer variables are never used, so we can get rid of them.
* | | Merge pull request #1470 from FernandoS27/alpha_testingbunnei2018-10-237-20/+87
|\ \ \ | | | | | | | | Implemented Alpha Test using Shader Emulation
| * | | Assert that multiple render targets are not set while alpha testingFernandoS272018-10-223-3/+17
| | | |
| * | | Use standard UBO and fix/stylize the codeFernandoS272018-10-228-91/+51
| | | |
| * | | Cache uniform locations and restructure the implementationFernandoS272018-10-223-33/+29
| | | |
| * | | Remove SyncAlphaTest and clang formatFernandoS272018-10-224-8/+9
| | | |
| * | | Added Alpha FuncFernandoS272018-10-222-3/+43
| | | |
| * | | Implemented Alpha TestingFernandoS272018-10-226-3/+59
| | | |
* | | | Merge pull request #1512 from ReinUsesLisp/brkbunnei2018-10-232-22/+43
|\ \ \ \ | |_|_|/ |/| | | gl_shader_decompiler: Implement PBK and BRK
| * | | gl_shader_decompiler: Implement PBK and BRKReinUsesLisp2018-10-182-22/+43
| | | |
* | | | Merge pull request #1550 from FernandoS27/fmul32bunnei2018-10-232-3/+8
|\ \ \ \ | | | | | | | | | | Added Saturation to FMUL32I
| * | | | Added Saturation to FMUL32IFernandoS272018-10-232-3/+8
| | |/ / | |/| |
* | | | Merge pull request #1537 from lioncash/shaderbunnei2018-10-231-6/+7
|\ \ \ \ | |/ / / |/| | | gl_shader_decompiler: Minor changes
| * | | gl_shader_decompiler: Allow std::move to function in SetPredicateLioncash2018-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | If the variable being moved is const, then std::move will always perform a copy (since it can't actually move the data).
| * | | gl_shader_decompiler: Get rid of variable shadowing warningsLioncash2018-10-201-2/+2
| | | | | | | | | | | | | | | | A variable with the same name was previously declared in an outer scope.
| * | | gl_shader_decompiler: Fix a few comment typosLioncash2018-10-201-3/+4
| | |/ | |/|
* | | Merge pull request #1547 from FernandoS27/fix-fsetbunnei2018-10-222-30/+12
|\ \ \ | | | | | | | | Fixed FSETP and FSET
| * | | Fixed FSETP and FSETFernandoS272018-10-222-30/+12
| |/ /
* / / Fixed VAOs Float types only returning GL_FLOAT in cases that they had to return GL_HALF_FLOATFernandoS272018-10-221-2/+14
|/ /
* | gl_shader_decompiler: Move position varying declaration back to gl_shader_genReinUsesLisp2018-10-203-13/+9
| | | | | | | | | | | | | | The intention of declaring them in gl_shader_decompiler was to be able to use blocks to implement geometry shaders. But that wasn't needed in the end and it caused issues when both vertex stages were being used, resulting in a redeclaration of "position".
* | Merge pull request #1501 from ReinUsesLisp/half-floatbunnei2018-10-202-0/+458
|\ \ | | | | | | gl_shader_decompiler: Implement H* instructions
| * | gl_shader_decompiler: Implement HSET2_RReinUsesLisp2018-10-152-0/+62
| | |
| * | gl_shader_decompiler: Implement HSETP2_RReinUsesLisp2018-10-152-0/+65
| | |
| * | gl_shader_decompiler: Implement HFMA2 instructionsReinUsesLisp2018-10-152-0/+85
| | |
| * | gl_shader_decompiler: Implement HADD2_IMM and HMUL2_IMMReinUsesLisp2018-10-152-0/+73
| | |
| * | gl_shader_decompiler: Implement non-immediate HADD2 and HMUL2 instructionsReinUsesLisp2018-10-152-0/+75
| | |
| * | gl_shader_decompiler: Setup base for half float unpacking and settingReinUsesLisp2018-10-152-0/+98
| | |
* | | GPU: Improved implementation of maxwell DMA (Subv).bunnei2018-10-193-17/+66
| | |
* | | decoders: Introduce functions for un/swizzling subrects.bunnei2018-10-192-0/+49
| | |
* | | GPU: Invalidate destination address of kepler_memory writes.bunnei2018-10-193-3/+17
| | |
* | | fermi_2d: Add support for more accurate surface copies.bunnei2018-10-192-3/+12
| | |
* | | Merge pull request #1505 from FernandoS27/tex-3dbunnei2018-10-184-2/+13
|\ \ \ | | | | | | | | Implemented 3D Textures
| * | | Clang format and other fixesFernandoS272018-10-181-16/+0
| | | |
| * | | Implement Reinterpret Surface, to accurately blit 3D texturesFernandoS272018-10-181-2/+4
| | | |
| * | | Implement GetInRange in the Rasterizer CacheFernandoS272018-10-181-0/+16
| | | |
| * | | Implement 3D TexturesFernandoS272018-10-184-1/+10
| | | |
* | | | Merge pull request #1489 from FernandoS27/fix-tldsbunnei2018-10-181-1/+5
|\ \ \ \ | |/ / / |/| | | shader_decompiler: Fix TLDS
| * | | Fix TLDSFernandoS272018-10-141-1/+5
| |/ /
* | | Merge pull request #1497 from bunnei/flush-framebuffersbunnei2018-10-188-174/+415
|\ \ \ | | | | | | | | Implement flushing in the rasterizer cache
| * | | gl_rasterizer_cache: Remove unnecessary block_depth=1 on Flush.bunnei2018-10-181-1/+0
| | | |
| * | | gl_rasterizer_cache: Remove unnecessary temporary buffer with unswizzle.bunnei2018-10-181-5/+2
| | | |
| * | | gl_rasterizer_cache: Use AccurateCopySurface for use_accurate_gpu_emulation.bunnei2018-10-162-2/+18
| | | |
| * | | config: Rename use_accurate_framebuffers -> use_accurate_gpu_emulation.bunnei2018-10-163-6/+6
| | | | | | | | | | | | | | | | - This will be used as a catch-all for slow-but-accurate GPU emulation paths.
| * | | rasterizer_cache: Refactor to support in-order flushing.bunnei2018-10-166-63/+116
| | | |
| * | | gl_rasterizer_cache: Refactor to only call GetRegionEnd on surface creation.bunnei2018-10-162-16/+23
| | | |
| * | | gl_rasterizer_cache: Only flush when use_accurate_framebuffers is enabled.bunnei2018-10-162-2/+13
| | | |
| * | | gl_rasterizer_cache: Separate guest and host surface size managment.bunnei2018-10-162-92/+94
| | | |
| * | | gl_rasterizer_cache: Rename GetGLBytesPerPixel to GetBytesPerPixel.bunnei2018-10-162-17/+18
| | | | | | | | | | | | | | | | - This does not really have anything to do with OpenGL.
| * | | gl_rasterizer_cache: Remove unused FlushSurface method.bunnei2018-10-162-7/+0
| | | |
| * | | gl_rasterizer: Implement flushing.bunnei2018-10-161-1/+25
| | | |
| * | | gl_rasterizer_cache: Remove usage of Memory::Read/Write functions.bunnei2018-10-161-13/+8
| | | | | | | | | | | | | | | | - These cannot be used within the cache, as they change cache state.
| * | | gl_rasterizer_cache: Clamp cached surface size to mapped GPU region size.bunnei2018-10-162-19/+37
| | | |
| * | | memory_manager: Add a method for querying the end of a mapped GPU region.bunnei2018-10-162-0/+11
| | | |
| * | | rasterizer_cache: Reintroduce method for flushing.bunnei2018-10-163-0/+23
| | | |
| * | | gl_rasterizer_cache: Reintroduce code for handling swizzle and flush to guest RAM.bunnei2018-10-162-28/+119
| | |/ | |/|
* | | Merge pull request #1496 from FernandoS27/tex-arraybunnei2018-10-181-14/+55
|\ \ \ | |/ / |/| | Implement Arrays on Tex Instruction
| * | Implement Arrays on Tex InstructionFernandoS272018-10-141-14/+55
| |/
* | shader_bytecode: Add Control Code enum 0xfReinUsesLisp2018-10-151-1/+1
| | | | | | | | | | | | Control Code 0xf means to unconditionally execute the instruction. This value is passed to most BRA, EXIT and SYNC instructions (among others) but this may not always be the case.
* | gl_shader_decompiler: Fixup style inconsistenciesReinUsesLisp2018-10-151-5/+3
| |
* | gl_rasterizer: Silence implicit cast warning in glBindBufferRangeReinUsesLisp2018-10-151-1/+2
| |
* | Merge pull request #1488 from Hexagon12/astc-typesbunnei2018-10-143-6/+32
|\ \ | | | | | | video_core: Added ASTC 5x4; 8x5 types
| * | Added ASTC 5x4; 8x5Hexagon122018-10-133-6/+32
| | |
* | | Shorten the implementation of 3D swizzle to only 3 functionsFernandoS272018-10-141-70/+27
| | |
* | | Fix a Crash on Zelda BotW and Splatoon 2, and simplified LoadGLBufferFernandoS272018-10-132-19/+2
| | |
* | | Propagate depth and depth_block on modules using decodersFernandoS272018-10-137-52/+64
| | |
* | | Remove old Swizzle algorithms and use 3d SwizzleFernandoS272018-10-131-93/+69
| | |
* | | Implement Precise 3D SwizzleFernandoS272018-10-131-3/+71
| | |
* | | Implement Fast 3D SwizzleFernandoS272018-10-131-2/+74
| |/ |/|
* | Implemented helper function to correctly calculate a texture's sizeFernandoS272018-10-122-0/+22
| |
* | gl_shader_decompiler: Implement VMADReinUsesLisp2018-10-112-0/+118
|/
* Merge pull request #1458 from FernandoS27/fix-render-target-block-settingsbunnei2018-10-115-18/+81
|\ | | | | Fixed block height settings for RenderTargets and Depth Buffers
| * Add memory Layout to Render Targets and Depth BuffersFernandoS272018-10-103-21/+33
| |
| * Fixed block height settings for RenderTargets and Depth Buffers, and added block width and block depthFernandoS272018-10-105-12/+63
| |
* | Merge pull request #1460 from FernandoS27/scissor_testbunnei2018-10-103-1/+36
|\ \ | | | | | | Implemented Scissor Testing
| * | Implement Scissor TestFernandoS272018-10-091-4/+9
| | |
| * | Assert Scissor testsFernandoS272018-10-093-1/+31
| |/
* | Merge pull request #1425 from ReinUsesLisp/geometry-shadersbunnei2018-10-1011-120/+543
|\ \ | | | | | | gl_shader_decompiler: Implement geometry shaders
| * | gl_shader_decompiler: Move position varying location from 15 to 0 and apply an offsetReinUsesLisp2018-10-071-6/+10
| | |
| * | gl_shader_decompiler: Implement geometry shadersReinUsesLisp2018-10-0710-107/+522
| | |
| * | video_core: Allow LabelGLObject to use extra info on any objectReinUsesLisp2018-10-071-10/+14
| |/
* / gl_shader_decompiler: Remove unused variables in TMML's implementationLioncash2018-10-091-7/+3
|/ | | | | Given "y" isn't always used, but "x" is, we can rearrange this to avoid unused variable warnings by changing the names of op_a and op_b
* Merge pull request #1446 from bunnei/fast_fermi_copybunnei2018-10-078-40/+117
|\ | | | | gl_rasterizer: Implement accelerated Fermi2D copies.
| * fermi_2d: Implement simple copies with AccelerateSurfaceCopy.bunnei2018-10-063-24/+36
| |
| * gl_rasterizer: Add rasterizer cache code to handle accerated fermi copies.bunnei2018-10-065-16/+60
| |
| * gl_rasterizer_cache: Implement a simpler surface copy using glCopyImageSubData.bunnei2018-10-061-0/+21
| |
* | Merge pull request #1437 from FernandoS27/tex-mode2bunnei2018-10-076-69/+265
|\ \ | | | | | | Implemented Depth Compare, Shadow Samplers and Texture Processing Modes for TEXS and TLDS
| * | Implemented Depth Compare and Shadow SamplersFernandoS272018-10-066-65/+224
| | |
| * | Implemented Texture Processing Modes in TEXS and TLDSFernandoS272018-10-031-5/+42
| | |
* | | gl_rasterizer: Fixup undefined behaviour in SetupDrawReinUsesLisp2018-10-071-0/+1
| |/ |/|
* | gl_rasterizer: Implement quads topologyReinUsesLisp2018-10-048-46/+236
|/
* gl_rasterizer: Fixup unassigned point sizesReinUsesLisp2018-10-011-1/+4
|
* Merge pull request #1330 from raven02/tldsbunnei2018-10-011-7/+15
|\ | | | | TLDS: Add 1D sampler
| * Fix trailing whitespaceraven022018-09-301-1/+4
| |
| * Merge branch 'master' into tldsraven022018-09-1924-195/+651
| |\
| * | Add 1D sampler for TLDS - TexelFetch (Mario Rabbids)raven022018-09-171-7/+12
| | |
* | | gl_rasterizer_cache: Fixes to how we do render to cubemap.bunnei2018-09-302-32/+5
| | | | | | | | | | | | - Fixes issues with Splatoon 2.
* | | gl_rasterizer_cache: Add check for array rendering to cubemap texture.bunnei2018-09-301-0/+8
| | |
* | | gl_rasterizer_cache: Implement render to cubemap.bunnei2018-09-303-119/+218
| | |
* | | gl_shader_decompiler: TEXS: Implement TextureType::TextureCube.bunnei2018-09-301-0/+8
| | |
* | | gl_rasterizer_cache: Add support for SurfaceTarget::TextureCubemap.bunnei2018-09-302-1/+36
| | |
* | | gl_rasterizer_cache: Implement LoadGLBuffer for Texture2DArray.bunnei2018-09-301-0/+8
| | |
* | | gl_rasterizer_cache: Update BlitTextures to support non-Texture2D ColorTexture surfaces.bunnei2018-09-301-23/+88
| | |
* | | gl_rasterizer_cache: Track texture target and depth in the cache.bunnei2018-09-301-2/+3
| | |
* | | gl_rasterizer_cache: Workaround for Texture2D -> Texture2DArray scenario.bunnei2018-09-303-6/+21
| | |
* | | gl_rasterizer_cache: Keep track of surface 2D size separately from total size.bunnei2018-09-302-32/+46
| | |
* | | Merge pull request #1411 from ReinUsesLisp/point-sizebunnei2018-09-295-1/+27
|\ \ \ | | | | | | | | video_core: Implement point_size and add point state sync
| * | | video_core: Implement point_size and add point state syncReinUsesLisp2018-09-285-1/+27
| | | |
* | | | Merge pull request #1406 from ReinUsesLisp/multibind-samplersbunnei2018-09-295-8/+25
|\ \ \ \ | |/ / / |/| | | gl_state: Pack sampler bindings into a single ARB_multi_bind
| * | | gl_state: Pack sampler bindings into a single ARB_multi_bindReinUsesLisp2018-09-285-8/+25
| | | |
* | | | Merge pull request #1377 from FernandoS27/faster-swizzlebunnei2018-09-271-51/+66
|\ \ \ \ | |/ / / |/| | | Improved Fast Swizzle and Legacy Swizzle
| * | | Reverse stride align restriction on FastSwizzle due to lost performanceFernandoS272018-09-211-3/+2
| | | |
| * | | Join both Swizzle methods within one interface functionFernandoS272018-09-211-11/+19
| | | |
| * | | Standarized Legacy Swizzle to look alike FastSwizzle and use a Swizzling Table insteadFernandoS272018-09-211-42/+38
| | | |
| * | | Remove same output bpp restriction on FastSwizzleFernandoS272018-09-211-4/+5
| | | |
| * | | Improved Legacy Swizzler to be better documented and work betterFernandoS272018-09-211-15/+21
| | | |
| * | | Improved fast swizzle and removed restrictions to itFernandoS272018-09-211-7/+12
| | | |
* | | | video_core: Add asserts for CS, TFB and alpha testingReinUsesLisp2018-09-265-3/+92
| | | | | | | | | | | | | | | | | | | | | | | | Add asserts for compute shader dispatching, transform feedback being enabled and alpha testing. These have in common that they'll probably break rendering without logging.
* | | | Added glObjectLabels for renderdoc for textures and shader programs (#1384)David2018-09-234-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added glObjectLabels for renderdoc for textures and shader programs * Changed hardcoded "Texture" name to reflect the texture type instead * Removed string initialize
* | | | correct BC6Hgreggameplayer2018-09-231-2/+2
| | | |
* | | | Merge pull request #1380 from lioncash/constbunnei2018-09-221-8/+19
|\ \ \ \ | | | | | | | | | | shader_bytecode: Make operator== and operator!= of IpaMode const qualified
| * | | | shader_bytecode: Lay out the Ipa-related enums betterLioncash2018-09-211-2/+12
| | | | | | | | | | | | | | | | | | | | This is more consistent with the surrounding enums.
| * | | | shader_bytecode: Make operator== and operator!= of IpaMode const qualifiedLioncash2018-09-211-6/+7
| |/ / / | | | | | | | | | | | | | | | | These don't affect the state of the struct and can be const member functions.
* | | | Merge pull request #1382 from lioncash/incbunnei2018-09-222-4/+1
|\ \ \ \ | | | | | | | | | | gl_state: Remove unused type alias
| * | | | gl_state: Remove unused type aliasLioncash2018-09-222-4/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | This isn't used anywhere within the header, so we can remove it, along with the include that was previously necessary. This also uncovers an indirect include in the cpp file for the assertion macros.
* | | | Merge pull request #1379 from lioncash/bitwisebunnei2018-09-211-1/+1
|\ \ \ \ | | | | | | | | | | gl_stream_buffer: Fix use of bitwise OR instead of logical OR in Map()
| * | | | gl_stream_buffer: Fix use of bitwise OR instead of logical OR in Map()Lioncash2018-09-211-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was very likely intended to be a logical OR based off the conditioning and testing of inversion in one case. Even if this was intentional, this is the kind of non-obvious thing one should be clarifying with a comment.
* / / / RasterizerGL: Use the correct framebuffer when clearing via the CLEAR_BUFFERS register.Subv2018-09-211-1/+1
|/ / / | | | | | | | | | | | | | | | Previously we were clearing the default backbuffer framebuffer. Found thanks to a Piglit test :)
* | / gl_rasterizer: Fix StartAddress handling with indexed draw calls.Markus Wick2018-09-191-6/+7
| |/ |/| | | | | | | We uploaded the wrong data before. So the offset on the host GPU pointer may work for the first vertices, the last ones run out bounds. Let's just offset the upload instead.
* | Merge pull request #1342 from lioncash/truncbunnei2018-09-191-4/+4
|\ \ | | | | | | gl_shader_decompiler: Avoid truncation warnings within LD_A and ST_A code
| * | gl_shader_decompiler: Avoid truncation warnings within LD_A and ST_A codeLioncash2018-09-181-4/+4
| | | | | | | | | | | | | | | | | | These are internally stored as u64 values, so using u32 here causes truncation warnings. Instead, we can just use u64 and preserve the bit width.
* | | Merge pull request #1279 from FernandoS27/csetpbunnei2018-09-192-21/+133
|\ \ \ | | | | | | | | shader_decompiler: Implemented (Partialy) Control Codes and CSETP
| * | | Implemented Internal FlagsFernandoS272018-09-181-13/+35
| | | |
| * | | Implemented I2I.CC on the NEU control code, used by SMOFernandoS272018-09-172-14/+18
| | | |
| * | | Implemented CSETPFernandoS272018-09-172-14/+49
| | | |
| * | | Implemented Control CodesFernandoS272018-09-172-0/+51
| |/ /
* | | Merge pull request #1299 from FernandoS27/texture-sanatizebunnei2018-09-192-3/+192
|\ \ \ | | | | | | | | shader_decompiler: Asserts for Texture Instructions
| * | | Added asserts for texture misc modes to texture instructionsFernandoS272018-09-171-2/+45
| | | |
| * | | Added texture misc modes to texture instructionsFernandoS272018-09-171-1/+147
| |/ /
* | | Merge pull request #1290 from FernandoS27/shader-headerbunnei2018-09-183-24/+111
|\ \ \ | |/ / |/| | Implemented (Partialy) Shader Header
| * | Replace old FragmentHeader for the new HeaderFernandoS272018-09-112-31/+18
| | |
| * | Implemented (Partialy) Shader HeaderFernandoS272018-09-113-2/+102
| | |
* | | Merge pull request #1311 from FernandoS27/fast-swizzlebunnei2018-09-171-2/+49
|\ \ \ | | | | | | | | Optimized Texture Swizzling
| * | | Optimized Texture SwizzlingFernandoS272018-09-141-2/+49
| | | |
* | | | Merge pull request #1316 from lioncash/shadowbunnei2018-09-171-2/+0
|\ \ \ \ | | | | | | | | | | gl_shader_decompiler: Get rid of variable shadowing within LEA instructions
| * | | | gl_shader_decompiler: Get rid of variable shadowing within LEA instructionsLioncash2018-09-141-2/+0
| | | | | | | | | | | | | | | | | | | | These variables are already defined within an outer scope.
* | | | | Merge pull request #1326 from FearlessTobi/port-4182bunnei2018-09-1720-133/+138
|\ \ \ \ \ | | | | | | | | | | | | Port #4182 from Citra: "Prefix all size_t with std::"
| * | | | | Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-1520-133/+138
| |/ / / /
* | | | | Merge pull request #1329 from raven02/bgr5a1ubunnei2018-09-172-0/+4
|\ \ \ \ \ | | | | | | | | | | | | Implement RenderTargetFormat::BGR5A1_UNORM
| * | | | | Implement RenderTargetFormat::BGR5A1_UNORM (Pokken Tournament DX)raven022018-09-152-0/+4
| |/ / / /
* | | | / Implement ASTC_2D_8X8 (Bayonetta 2)raven022018-09-163-6/+20
| |_|_|/ |/| | |
* | | | Merge pull request #1273 from Subv/ld_sizesbunnei2018-09-152-7/+58
|\ \ \ \ | | | | | | | | | | Shaders: Implemented multiple-word loads and stores to and from attribute memory.
| * | | | Shaders: Implemented multiple-word loads and stores to and from attribute memory.Subv2018-09-152-7/+58
| |/ / / | | | | | | | | | | | | This seems to be an optimization performed by nouveau.
* | | | Merge pull request #1271 from Subv/kepler_enginebunnei2018-09-156-0/+146
|\ \ \ \ | |/ / / |/| | | GPU: Basic implementation of the Kepler Inline Memory engine (p2mf).
| * | | GPU: Basic implementation of the Kepler Inline Memory engine (p2mf).Subv2018-09-126-0/+146
| | | | | | | | | | | | | | | | This engine writes data from a FIFO register into the configured address.
* | | | Use ARB_multi_bind for uniform buffers (#1287)ReinUsesLisp2018-09-132-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | * gl_rasterizer: use ARB_multi_bind for uniform buffers * address feedback
* | | | gl_rasterizer_cache: B5G6R5U should use GL_RGB8 as an internal format.bunnei2018-09-131-1/+1
| |/ / |/| | | | | | | | - Fixes a regression with Sonic Mania with ARB_texture_storage.
* | | Merge pull request #1263 from FernandoS27/tex-modebunnei2018-09-122-1/+43
|\ \ \ | |/ / |/| | shader_decompiler: Implemented (Partially) Texture Processing Modes
| * | Implemented Texture Processing ModesFernandoS272018-09-122-1/+43
| |/
* | Merge pull request #1278 from tech4me/bg-color-fixbunnei2018-09-123-0/+8
|\ \ | | | | | | Port Citra #4047 & #4052: add change background color support
| * | Port Citra #4047 & #4052: add change background color supporttech4me2018-09-093-0/+8
| | |
* | | Merge pull request #1295 from bunnei/accurate-copiesbunnei2018-09-122-18/+12
|\ \ \ | | | | | | | | gl_rasterizer_cache: Improve accuracy of caching and copies.
| * | | gl_rasterizer_cache: Always blit on recreate, regardless of format.bunnei2018-09-121-6/+10
| | | | | | | | | | | | | | | | - Fixes several rendering issues with Super Mario Odyssey.
| * | | gl_shader_cache: Remove cache_width/cache_height.bunnei2018-09-122-12/+2
| | |/ | |/| | | | | | | | | | - This was once an optimization, but we no longer need it with the cache reserve. - This is also inaccurate.
* | | Merge pull request #1294 from degasus/optimizationsbunnei2018-09-121-11/+8
|\ \ \ | | | | | | | | gl_rasterizer: Use ARB_texture_storage.
| * | | gl_rasterizer: Use ARB_texture_storage.Markus Wick2018-09-111-11/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | It allows us to use texture views and it reduces the overhead within the GPU driver. But it disallows us to reallocate the texture, but we don't do so anyways. In the end, it is the new way to allocate textures, so there is no need to use the old way.
* | | Implemented LEA and PSETFernandoS272018-09-111-0/+91
| | |
* | | Implemented encodings for LEA and PSETFernandoS272018-09-111-0/+64
|/ /
* | Fixed renderdoc input/output textures not working due to render targetsDavid Marcec2018-09-112-2/+9
| |
* | Merge pull request #1286 from bunnei/multi-clearbunnei2018-09-112-50/+66
|\ \ | | | | | | gl_rasterizer: Implement clear for non-zero render targets.
| * | gl_rasterizer: Implement clear for non-zero render targets.bunnei2018-09-102-50/+66
| | | | | | | | | | | | - Several misc. changes to ConfigureFramebuffers in support of this.
* | | Merge pull request #1285 from bunnei/depth-fixbunnei2018-09-111-6/+22
|\ \ \ | | | | | | | | gl_rasterizer_cache: Only use depth for applicable texture formats.
| * | | gl_rasterizer_cache: Only use depth for applicable texture formats.bunnei2018-09-101-6/+22
| |/ / | | | | | | | | | - Fixes an issue with Octopath Traveler leaving stale data here.
* | | Merge pull request #1284 from bunnei/bgra8_srgbbunnei2018-09-113-0/+4
|\ \ \ | | | | | | | | gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.
| * | | gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.bunnei2018-09-103-0/+4
| |/ / | | | | | | | | | - Used by Octopath Traveler (with multiple render targets).
* | | video_core: Refactor command_processor.Markus Wick2018-09-102-44/+42
| | | | | | | | | | | | Inline the WriteReg helper as it is called ~20k times per frame.
* | | video_core: Move command buffer loop.Markus Wick2018-09-103-46/+72
| | | | | | | | | | | | This moves the hot loop into video_core. This refactoring shall reduce the CPU overhead of calling ProcessCommandList.
* | | rasterizer: Drop unused handler.Markus Wick2018-09-104-8/+0
|/ / | | | | | | | | | | | | | | This virtual function is called in a very hot spot, and it does nothing. If this kind of feature is required, please be more specific and add callbacks in the switch statement within Maxwell3D::WriteReg. There is no point in having another switch statement within the rasterizer.
* | gl_rasterizer: Implement multiple color attachments.bunnei2018-09-105-132/+95
| |
* | Merge pull request #1268 from FernandoS27/tmmlbunnei2018-09-102-5/+67
|\ \ | | | | | | shader_decompiler: Implemented TMML
| * | Implemented TMMLFernandoS272018-09-102-5/+67
| | |
* | | Merge pull request #1272 from Subv/dma_2dbunnei2018-09-101-2/+10
|\ \ \ | | | | | | | | GPU/DMA: Partially implemented the 'enable_2d' bit in the DMA engine.
| * | | GPU/DMA: Partially implemented the 'enable_2d' bit in the DMA engine.Subv2018-09-081-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When not set, this tells the GPU to only use the X size when performing a DMA copy. This is only implemented for linear->linear and tiled->tiled copies. Conversion copies still retain the assert. This bit is unset by some games for various purposes, and by nouveau when copying the vertex buffers.
* | | | Merge pull request #1280 from zero334/improvementsbunnei2018-09-105-89/+101
|\ \ \ \ | |_|/ / |/| | | video_core: fixed arithmetic overflow warnings & improved code style
| * | | video_core: fixed arithmetic overflow warnings & improved code stylePatrick Elsässer2018-09-095-89/+101
| | |/ | |/| | | | | | | | | | | | | | | | | | | - Fixed all warnings, for renderer_opengl items, which were indicating a possible incorrect behavior from integral promotion rules and types larger than those in which arithmetic is typically performed. - Added const for variables where possible and meaningful. - Added constexpr where possible.
* | | Implemented TXQ dimension query type, used by SMO.FernandoS272018-09-092-1/+36
| | |
* | | Change name of TEXQ to TXQ, in order to match NVIDIA's namingFernandoS272018-09-091-2/+2
|/ /
* | Merge pull request #1256 from bunnei/tex-target-supportbunnei2018-09-0811-229/+422
|\ \ | |/ |/| Initial support for non-2D textures
| * gl_rasterizer_cache: Improve accuracy of RecreateSurface for non-2D textures.bunnei2018-09-082-27/+45
| |
| * maxwell_3d: Remove assert that no longer applies.bunnei2018-09-081-4/+0
| |
| * gl_rasterizer_cache: Partially implement several non-2D texture types.bunnei2018-09-081-30/+111
| |
| * gl_shader_decompiler: Partially implement several non-2D texture types (Subv).bunnei2018-09-082-32/+143
| |
| * gl_rasterizer: Implement texture wrap mode p.bunnei2018-09-082-2/+8
| |
| * gl_rasterizer_cache: Track texture depth.bunnei2018-09-083-4/+15
| |
| * gl_rasterizer_cache: Remove impl. of FlushGLBuffer.bunnei2018-09-081-34/+1
| | | | | | | | - Will not work for non-2d textures, and was not used anyways.
| * gl_rasterizer_cache: Keep track of texture type per surface.bunnei2018-09-083-32/+84
| |
| * gl_rasterizer_cache: Remove unused DownloadGLTexture.bunnei2018-09-082-51/+0
| |
| * gl_state: Keep track of texture target.bunnei2018-09-085-26/+28
| |
* | gl_rasterizer: Use baseInstance instead of moving the buffer points.bunnei2018-09-081-21/+25
| | | | | | | | | | | | | | This hopefully helps our cache not to redundant upload the vertex buffer. # Conflicts: # src/video_core/renderer_opengl/gl_rasterizer.cpp
* | video_core: Arithmetic overflow warning fix for gl_rasterizer (#1262)Patrick Elsässer2018-09-081-12/+14
|/ | | | | | | | | | | | | | | * video_core: Arithmetic overflow fix for gl_rasterizer - Fixed warnings, which were indicating incorrect behavior from integral promotion rules and types larger than those in which arithmetic is typically performed. - Added const for variables where possible and meaningful. * Changed the casts from C to C++ style Changed the C-style casts to C++ casts as proposed. Took also care about signed / unsigned behaviour.
* Merge pull request #1252 from lioncash/headerbunnei2018-09-071-0/+1
|\ | | | | video_core/CMakeLists: Add missing gl_buffer_cache.h
| * video_core/CMakeLists: Add missing gl_buffer_cache.hLioncash2018-09-061-0/+1
| | | | | | | | | | Without this, the header file won't show up by default within IDEs such as Visual Studio.
* | Merge pull request #1253 from lioncash/explicitbunnei2018-09-072-8/+10
|\ \ | | | | | | video_core/gl_buffer_cache: Minor tidying changes
| * | gl_buffer_cache: Default initialize member variablesLioncash2018-09-061-3/+3
| | | | | | | | | | | | Ensures that the cache always has a deterministic initial state.
| * | gl_buffer_cache: Make GetHandle() a const member functionLioncash2018-09-062-2/+2
| | | | | | | | | | | | | | | GetHandle() internally calls GetHandle() on the stream_buffer instance, which is a const member function, so this can be made const as well.
| * | gl_buffer_cache: Remove unnecessary includesLioncash2018-09-062-2/+4
| | |
| * | gl_buffer_cache: Make constructor explicitLioncash2018-09-061-1/+1
| |/ | | | | | | Implicit conversions during construction isn't desirable here.
* | Merge pull request #1255 from bunnei/minor-optbunnei2018-09-071-4/+2
|\ \ | | | | | | gl_rasterizer: Call state.Apply only once on SetupShaders.
| * | gl_rasterizer: Call state.Apply only once on SetupShaders.bunnei2018-09-061-4/+2
| |/
* / gl_shader_decompiler: Implement saturate mode for IPA.bunnei2018-09-061-1/+5
|/
* gl_shader_gen: Initialize position.Markus Wick2018-09-061-0/+1
| | | | | IMO the old code is fine, but nvidia raises shader compiler warnings. Trivial fix through...
* Merge pull request #1243 from degasus/VAO_cachebunnei2018-09-063-53/+60
|\ | | | | gl_rasterizer: Implement a VAO cache.
| * gl_rasterizer: Implement a VAO cache.Markus Wick2018-09-053-53/+60
| | | | | | | | | | | | This patch caches VAO objects instead of re-emiting all pointers per draw call. Configuring this pointers is known as a fast task, but it yields too many GL calls. So for better performance, just bind the VAO instead of 16 pointers.
* | Merge pull request #1244 from FernandoS27/ipabunnei2018-09-062-47/+98
|\ \ | | | | | | shader_decompiler: Implemented IPA Properly (Stage 1)
| * | Implemented IPA ProperlyFernandoS272018-09-062-47/+98
| | |
* | | gl_rasterizer: Skip TODO log.Markus Wick2018-09-051-1/+1
| |/ |/| | | | | | | | | | | This is called ~3k times per frame in SMO ingame. My laptop spends ~3ms per frame on allocating and freeing this string. Let's just stop printing this kind of redundant information.
* | renderer_opengl: Implement a buffer cache.Markus Wick2018-09-055-86/+182
|/ | | | | | | | | The idea of this cache is to avoid redundant uploads. So we are going to cache the uploaded buffers within the stream_buffer and just reuse the old pointers. The next step is to implement a VBO cache on GPU memory, but for now, I want to check the overhead of the cache management. Fetching the buffer over PCI-E should be quite fast.
* gl_shader_cache: Use an u32 for the binding point cache.Markus Wick2018-09-044-15/+23
| | | | | | | The std::string generation with its malloc and free requirement was a noticeable overhead. Also switch to an ordered_map to avoid the std::hash call. As those maps usually have a size of two elements, the lookup time shall not matter.
* Merge pull request #1237 from degasus/optimizationsbunnei2018-09-042-4/+4
|\ | | | | Optimizations
| * command_processor: Use std::array for bound_engines.Markus Wick2018-09-042-4/+4
| | | | | | | | | | subchannel is a 3 bit field. So there must not be more than 8 bound engines. And using a hashmap for up to 8 values is a bit overpowered.
* | Merge pull request #1232 from lioncash/copybunnei2018-09-041-1/+1
|\ \ | | | | | | gl_shader_decompiler: Use used_shaders member variable directly within GenerateDeclarations()
| * | gl_shader_decompiler: Use used_shaders member variable directly within GenerateDeclarations()Lioncash2018-09-021-1/+1
| |/ | | | | | | | | Using the getter function intended for external code here makes an unnecessary copy of the already-accessible used_shaders vector.
* / Update microprofile scopes.Markus Wick2018-09-041-3/+11
|/ | | | | | Blame the subsystems which deserve the blame :) The updated list is not complete, just the ones I've spotted on random sampling the stack trace.
* Merge pull request #1213 from DarkLordZach/octopath-fsbunnei2018-09-021-2/+3
|\ | | | | filesystem/maxwell_3d: Various changes to boot Project Octopath Traveller
| * maxwell_3d: Use CoreTiming for query timestampZach Hilman2018-09-011-2/+3
| |
* | Merge pull request #1215 from ogniK5377/texs-nodep-assertbunnei2018-09-022-0/+3
|\ \ | | | | | | Added assert for TEXS nodep
| * | Added assert for TEXS nodepDavid Marcec2018-09-012-0/+3
| |/
* | Merge pull request #1214 from ogniK5377/ipa-assertbunnei2018-09-022-6/+13
|\ \ | | | | | | Added better asserts to IPA, Renamed IPA modes to match mesa
| * | Added better asserts to IPA, Renamed IPA modes to match mesaDavid Marcec2018-09-012-6/+13
| |/ | | | | | | | | | | | | | | | | | | IpaMode is changed to IpaInterpMode IpaMode is suppose to be 2 bits not 3 Added IpaSampleMode Added Saturate Renamed modes based on https://github.com/mesa3d/mesa/blob/d27c7918916cdc8092959124955f887592e37d72/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp#L2530
* | Merge pull request #1216 from ogniK5377/ffma-assertbunnei2018-09-022-0/+9
|\ \ | | | | | | Added FFMA asserts and missing fields
| * | Removed saturate assertDavid Marcec2018-09-012-2/+0
| | | | | | | | | | | | Saturate already implemented
| * | Changed tab5980_0 default from 0 -> 1David Marcec2018-09-011-2/+2
| | |
| * | Added FFMA assertsDavid Marcec2018-09-012-0/+11
| |/
* | Removed saturate assertDavid Marcec2018-09-012-2/+0
| | | | | | | | Unneeded as we already implement it
* | Added FMUL assertsDavid Marcec2018-09-012-0/+15
|/
* core/core: Replace includes with forward declarations where applicableLioncash2018-08-313-4/+4
| | | | | | | | | | | The follow-up to e2457418dae19b889b2ad85255bb95d4cd0e4bff, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers.
* gl_rasterizer_cache: Use accurate framebuffer setting for accurate copies.bunnei2018-08-312-73/+54
|
* gl_rasterizer_cache: Also use reserve cache for RecreateSurface.bunnei2018-08-312-24/+18
|
* rasterizer_cache: Use boost::interval_map for a more accurate cache.bunnei2018-08-311-33/+45
|
* gl_renderer: Cache textures, framebuffers, and shaders based on CPU address.bunnei2018-08-318-100/+53
|
* gl_rasterizer: Fix issues with the rasterizer cache.bunnei2018-08-314-46/+57
| | | | | - Use a single cached page map. - Fix calculation of ending page.
* Implement BC6H_UF16 & BC6H_SF16 (#1092)greggameplayer2018-08-313-31/+55
| | | | | | | | | * Implement BC6H_UF16 & BC6H_SF16 Require by ARMS * correct coding style * correct coding style part 2
* Merge pull request #1204 from lioncash/pimplbunnei2018-08-311-3/+4
|\ | | | | core: Make the main System class use the PImpl idiom
| * core: Make the main System class use the PImpl idiomLioncash2018-08-311-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | core.h is kind of a massive header in terms what it includes within itself. It includes VFS utilities, kernel headers, file_sys header, ARM-related headers, etc. This means that changing anything in the headers included by core.h essentially requires you to rebuild almost all of core. Instead, we can modify the System class to use the PImpl idiom, which allows us to move all of those headers to the cpp file and forward declare the bulk of the types that would otherwise be included, reducing compile times. This change specifically only performs the PImpl portion.
* | Merge pull request #1207 from degasus/hotfixbunnei2018-08-311-1/+1
|\ \ | | | | | | Report correct shader size.
| * | Report correct shader size.Markus Wick2018-08-311-1/+1
| | | | | | | | | | | | | | | Seems like this was an oversee in regards to 1fd979f50a9f4c21fa8cafba7268d959e3076924 It changed GLShader::ProgramCode to a std::vector, so sizeof is wrong.
* | | Added predicate comparison GreaterEqualWithNanHexagon122018-08-312-3/+4
|/ /
* | gl_shader_decompiler: Implement POPC (#1203)Laku2018-08-312-0/+19
| | | | | | | | | | | | * Implement POPC * implement invert
* | Merge pull request #1200 from bunnei/improve-ipabunnei2018-08-302-1/+39
|\ \ | |/ |/| gl_shader_decompiler: Improve IPA for Pass mode with Position attribute.
| * gl_shader_decompiler: Improve IPA for Pass mode with Position attribute.bunnei2018-08-292-1/+39
| |
* | Shaders: Implemented IADD3tech4me2018-08-292-1/+84
|/
* Merge pull request #1193 from lioncash/privbunnei2018-08-284-16/+30
|\ | | | | gpu: Make memory_manager private
| * gpu: Make memory_manager privateLioncash2018-08-284-16/+30
| | | | | | | | | | | | | | | | | | | | Makes the class interface consistent and provides accessors for obtaining a reference to the memory manager instance. Given we also return references, this makes our more flimsy uses of const apparent, given const doesn't propagate through pointers in the way one would typically expect. This makes our mutable state more apparent in some places.
* | Merge pull request #1192 from lioncash/unusedbunnei2018-08-281-2/+0
|\ \ | | | | | | gl_rasterizer: Remove unused variables
| * | gl_rasterizer: Remove unused variablesLioncash2018-08-281-2/+0
| |/
* / gl_shader_cache: Remove unused program_code vector in GetShaderAddress()Lioncash2018-08-281-2/+1
|/ | | | | | | | Given std::vector is a type with a non-trivial destructor, this variable cannot be optimized away by the compiler, even if unused. Because of that, something that was intended to be fairly lightweight, was actually allocating 32KB and deallocating it at the end of the function.
* renderer_opengl: Implement a new shader cache.bunnei2018-08-289-285/+250
|
* gl_rasterizer_cache: Update to use RasterizerCache base class.bunnei2018-08-283-132/+20
|
* video_core: Add RasterizerCache class for common cache management code.bunnei2018-08-282-0/+117
|
* Merge pull request #1169 from Lakumakkara/selbunnei2018-08-281-1/+1
|\ | | | | shader_bytecode: fix SEL_IMM bitstring
| * fix SEL_IMM bitstringLaku2018-08-241-1/+1
| |
* | Merge pull request #1174 from lioncash/debugbunnei2018-08-272-26/+3
|\ \ | | | | | | debug_utils: Minor individual interface changes
| * | debug_utils: Remove unused includesLioncash2018-08-252-23/+0
| | | | | | | | | | | | | | | Quite a bit of these aren't necessary directly within the debug_utils header and can be removed or included where actually necessary.
| * | debug_utils: Make BreakpointObserver class' constructor explicitLioncash2018-08-251-1/+1
| | | | | | | | | | | | Avoids implicit conversions.
| * | debug_utils: Initialize active_breakpoint member of DebugContextLioncash2018-08-251-2/+2
| | | | | | | | | | | | Ensures that all class members are initialized.
* | | Merge pull request #1173 from lioncash/batchbunnei2018-08-251-4/+4
|\ \ \ | | | | | | | | maxwell3d: Move FinishedPrimitiveBatch event after AcceleratedDrawBatch()
| * | | maxwell3d: Move FinishedPrimitiveBatch event after AcceleratedDrawBatch()Lioncash2018-08-251-4/+4
| |/ / | | | | | | | | | | | | The start and finish events should likely not be right after one another like this, otherwise the batch will appear to complete immediately
* | | Merge pull request #1167 from lioncash/assertbunnei2018-08-251-1/+2
|\ \ \ | |_|/ |/| | gl_rasterizer: Correct assertion condition in SyncLogicOpState()
| * | gl_rasterizer: Correct assertion condition in SyncLogicOpState()Lioncash2018-08-241-1/+2
| |/ | | | | | | | | Previously the assert would always be hit, since it was the equivalent of: array == nullptr, which is never true.
* / Shaders: Added decodings for IADD3 instructionstech4me2018-08-231-0/+6
|/
* Merge pull request #1160 from bunnei/surface-reservebunnei2018-08-232-17/+91
|\ | | | | gl_rasterizer_cache: Several improvements
| * gl_rasterizer_cache: Blit when possible on RecreateSurface.bunnei2018-08-231-5/+12
| |
| * gl_rasterizer_cache: Reserve surfaces that have already been created for later use.bunnei2018-08-232-3/+61
| |
| * gl_rasterizer_cache: Remove assert for RecreateSurface type.bunnei2018-08-231-1/+0
| |
| * gl_rasterizer_cache: Implement compressed texture copies.bunnei2018-08-231-8/+18
| |
* | gl_rasterizer: Implement stencil test.bunnei2018-08-233-4/+58
| | | | | | | | - Used by Splatoon 2.
* | gl_rasterizer: Implement partial color clear and stencil clear.bunnei2018-08-231-12/+42
| |
* | maxwell_3d: Update to include additional stencil registers.bunnei2018-08-231-20/+50
| |
* | gl_state: Update to handle stencil front/back face separately.bunnei2018-08-232-33/+38
|/
* Merge pull request #1157 from lioncash/vecbunnei2018-08-232-11/+16
|\ | | | | gl_shader_gen: Use a std::vector to represent program code instead of std::array
| * gl_shader_gen: Make ShaderSetup's constructor explicitLioncash2018-08-221-1/+1
| | | | | | | | Prevents implicit conversions.
| * gl_shader_gen: Use a std::vector to represent program code instead of std::arrayLioncash2018-08-222-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | While convenient as a std::array, it's also quite a large set of data as well (32KB). It being an array also means data cannot be std::moved. Any situation where the code is being set or relocated means that a full copy of that 32KB data must be done. If we use a std::vector we do need to allocate on the heap, however, it does allow us to std::move the data we have within the std::vector into another std::vector instance, eliminating the need to always copy the program data (as std::move in this case would just transfer the pointers and bare necessities over to the new vector instance).
* | Merge pull request #1156 from Lakumakkara/lop3bunnei2018-08-232-0/+60
|\ \ | | | | | | gl_shader_decompiler: Implement LOP3
| * | more fixesLaku2018-08-221-6/+7
| | |
| * | fixesLaku2018-08-221-6/+12
| | |
| * | remove debug loggingLaku2018-08-221-2/+0
| | |
| * | implement lop3Laku2018-08-222-0/+55
| |/
* / renderer_opengl: Namespace OpenGL codeLioncash2018-08-2221-23/+70
|/ | | | | | | Namespaces all OpenGL code under the OpenGL namespace. Prevents polluting the global namespace and allows clear distinction between other renderers' code in the future.
* Merge pull request #840 from FearlessTobi/port-3353bunnei2018-08-221-1/+1
|\ | | | | Port #3353 from Citra: "citra-qt: Add customizable speed limit target "
| * Port #3353 from CitrafearlessTobi2018-08-211-1/+1
| |
* | Merge pull request #1154 from OatmealDome/topology-linesbunnei2018-08-221-0/+2
|\ \ | | | | | | maxwell_to_gl: Implement PrimitiveTopology::Lines
| * | maxwell_to_gl: Implement PrimitiveTopology::LinesOatmealDome2018-08-221-0/+2
| | | | | | | | | Used by Splatoon 2's debug menu.
* | | Merge pull request #1124 from Subv/logic_opsbunnei2018-08-226-7/+108
|\ \ \ | |/ / |/| | GPU: Implemented logic ops.
| * | GPU: Implemented the logic op functionality of the GPU.Subv2018-08-213-0/+61
| | | | | | | | | | | | This will ASSERT if blending is enabled at the same time as logic ops.
| * | GLState: Allow enabling/disabling GL_COLOR_LOGIC_OP independently from blending.Subv2018-08-212-6/+19
| | |
| * | GPU: Added registers for the logicop functionality.Subv2018-08-211-1/+28
| |/
* | Revert "Shader: Use the right sampler type in the TEX, TEXS and TLDS instructions."bunnei2018-08-222-153/+31
| | | | | | | | | | - This reverts commit 3ef4b3d4b445960576f10d1ba6521580d03e3da8. - This commit had broken a lot of games. We really should do a full implementation of this in one change.
* | shader_bytecode: Parenthesize conditional expression within GetTextureType()Lioncash2018-08-211-1/+1
| | | | | | | | Resolves a -Wlogical-op-parentheses warning.
* | Merge pull request #1123 from lioncash/screenbunnei2018-08-217-30/+25
|\ \ | | | | | | rasterizer_interface: Remove renderer-specific ScreenInfo type from AccelerateDraw() in RasterizerInterface
| * | rasterizer_interface: Remove ScreenInfo from AccelerateDraw()'s signatureLioncash2018-08-215-17/+14
| | | | | | | | | | | | | | | | | | This is an OpenGL renderer-specific data type. Given that, this type shouldn't be used within the base interface for the rasterizer. Instead, we can pass this information to the rasterizer via reference.
| * | renderer_base: Make creation of the rasterizer, the responsibility of the renderers themselvesLioncash2018-08-214-14/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given we use a base-class type within the renderer for the rasterizer (RasterizerInterface), we want to allow renderers to perform more complex initialization if they need to do such a thing. This makes it important to reserve type information. Given the OpenGL renderer is quite simple settings-wise, this is just a simple shuffling of the initialization code. For something like Vulkan however this might involve doing something like: // Initialize and call rasterizer-specific function that requires // the full type of the instance created. auto raster = std::make_unique<VulkanRasterizer>(some, params); raster->CallSomeVulkanRasterizerSpecificFunction(); // Assign to base class variable rasterizer = std::move(raster)
* | Merge pull request #1132 from Subv/gl_FragDepthbunnei2018-08-211-1/+6
|\ \ | | | | | | Shaders: Implement depth writing in fragment shaders.
| * | Shaders: Implement depth writing in fragment shaders.Subv2018-08-211-1/+6
| | | | | | | | | | | | We'll write <last color output reg + 2> to gl_FragDepth.
* | | Merge pull request #1134 from lioncash/logbunnei2018-08-211-1/+1
|\ \ \ | | | | | | | | renderer_opengl: Use LOG_DEBUG for GL_DEBUG_SEVERITY_NOTIFICATION and GL_DEBUG_SEVERITY_LOW logs
| * | | renderer_opengl: Use LOG_DEBUG for GL_DEBUG_SEVERITY_NOTIFICATION and GL_DEBUG_SEVERITY_LOW logsLioncash2018-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | LOG_TRACE is only enabled on debug builds which can be quite slow when trying to debug graphics issues. Instead we can log the messages to the debug log, which is available on both release and debug builds.
* | | | Merge pull request #1121 from Subv/tex_reinterpretbunnei2018-08-214-16/+70
|\ \ \ \ | |/ / / |/| | | Rasterizer: Use PBOs to reinterpret texture formats when games re-use the same memory.
| * | | Rasterizer: Reinterpret the raw texture bytes instead of blitting (and thus doing format conversion) to a new texture when a game requests an old texture address with a different format.Subv2018-08-201-3/+49
| | | |
| * | | Rasterizer: Don't attempt to copy over the old texture's data when doing a format reinterpretation if we're only going to clear the framebuffer.Subv2018-08-204-13/+21
| | |/ | |/|
* | | Merge pull request #1133 from lioncash/guardbunnei2018-08-211-0/+2
|\ \ \ | |_|/ |/| | gl_stream_buffer: Add missing header guard
| * | gl_stream_buffer: Add missing header guardLioncash2018-08-211-0/+2
| |/ | | | | | | | | Prevents potential compilation errors from occuring due to multiple inclusions
* | Merge pull request #1131 from bunnei/impl-tex3d-texcubebunnei2018-08-212-2/+21
|\ \ | | | | | | gl_shader_decompiler: Implement TextureCube/Texture3D for TEX/TEXS.
| * | shader_bytecode: Replace some UNIMPLEMENTED logs.bunnei2018-08-211-2/+6
| | |
| * | gl_shader_decompiler: Implement Texture3D for TEXS.bunnei2018-08-211-0/+7
| | |
| * | gl_shader_decompiler: Implement TextureCube for TEX.bunnei2018-08-211-0/+8
| | |
* | | Merge pull request #1106 from Subv/multiple_rendertargetsbunnei2018-08-212-6/+45
|\ \ \ | |/ / |/| | Shaders: Write all the enabled color outputs when a fragment shader exits.
| * | Shaders: Write all the enabled color outputs when a fragment shader exits.Subv2018-08-212-6/+45
| | | | | | | | | | | | | | | | | | | | | We were only writing to the first render target before. Note that this is only the GLSL side of the implementation, supporting multiple render targets requires more changes in the OpenGL renderer. Dual Source blending is not implemented and stuff that uses it might not work at all.
* | | Shaders: Fixed the coords in TEX with Texture2D.Subv2018-08-211-1/+1
| | | | | | | | | | | | | | | | | | The X and Y coordinates should be in gpr8 and gpr8+1, respectively. This fixes the cutscene rendering in Sonic Mania.
* | | Shaders: Log and crash when using an unimplemented texture type in a texture sampling instruction.Subv2018-08-211-5/+14
| |/ |/|
* | Merge pull request #1104 from Subv/instanced_arraysbunnei2018-08-202-4/+30
|\ \ | | | | | | GLRasterizer: Implemented instanced vertex arrays.
| * | GLRasterizer: Implemented instanced vertex arrays.Subv2018-08-182-4/+30
| |/ | | | | | | Before each draw call, for every enabled vertex array configured as instanced, we take the current instance id and divide it by its configured divisor, then we multiply that by the corresponding stride and increment the start address by the resulting amount. This way we can simulate the vertex array being incremented once per instance without actually using OpenGL's instancing functions.
* | Merge pull request #1115 from Subv/texs_maskbunnei2018-08-201-18/+18
|\ \ | | | | | | Shaders/TEXS: Write to the correct output register when swizzling.
| * | Shaders/TEXS: Fixed the component mask in the TEXS instruction.Subv2018-08-201-18/+18
| | | | | | | | | | | | Previously we could end up with a TEXS that didn't write any outputs, this was wrong.
* | | Merge pull request #1112 from Subv/sampler_typesbunnei2018-08-203-33/+250
|\ \ \ | | | | | | | | Shaders: Use the correct shader type when sampling textures.
| * | | Shader: Implemented the TLD4 and TLD4S opcodes using GLSL's textureGather.Subv2018-08-191-0/+51
| | | | | | | | | | | | | | | | It is unknown how TLD4S determines the sampler type, more research is needed.
| * | | Shader: Use the right sampler type in the TEX, TEXS and TLDS instructions.Subv2018-08-192-29/+127
| | | | | | | | | | | | | | | | Different sampler types have their parameters in different registers.
| * | | Shader: Added bitfields for the texture type of the various sampling instructions.Subv2018-08-191-1/+65
| | | |
| * | | Shaders: Added decodings for TLD4 and TLD4SSubv2018-08-191-3/+7
| | | |
* | | | Implemented RGBA8_UINTDavid Marcec2018-08-204-45/+58
| |/ / |/| | | | | | | | Needed by kirby
* | | Merge pull request #1089 from Subv/neg_bitsbunnei2018-08-192-16/+38
|\ \ \ | | | | | | | | Shaders: Corrected the 'abs' and 'neg' bit usage in the float arithmetic instructions.
| * | | Shaders: Corrected the 'abs' and 'neg' bit usage in the float arithmetic instructions.Subv2018-08-182-16/+38
| | | | | | | | | | | | | | | | We should definitely audit our shader generator for more errors like this.
* | | | Merge pull request #1105 from Subv/convert_negbunnei2018-08-191-2/+0
|\ \ \ \ | | | | | | | | | | Shader: Remove an unneeded assert, the negate bit is implemented for conversion instructions.
| * | | | Shader: Remove an unneeded assert, the negate bit is implemented for conversion instructions.Subv2018-08-181-2/+0
| | |_|/ | |/| |
* | | | Merge pull request #1113 from Subv/texs_maskbunnei2018-08-191-6/+11
|\ \ \ \ | | | | | | | | | | Shaders/TEXS: Fixed the component mask in the TEXS instruction.
| * | | | Shaders/TEXS: Fixed the component mask in the TEXS instruction.Subv2018-08-191-6/+11
| | |_|/ | |/| | | | | | | | | | Previously we could end up with a TEXS that didn't write any outputs, this was wrong.
* | | | Merge pull request #1102 from ogniK5377/mirror-clamp-edgebunnei2018-08-191-0/+2
|\ \ \ \ | | | | | | | | | | Added WrapMode MirrorOnceClampToEdge
| * | | | Added WrapMode MirrorOnceClampToEdgeDavid Marcec2018-08-181-0/+2
| | |/ / | |/| | | | | | | | | | Used by splatoon 2
* | | | Merge pull request #1101 from Subv/ssy_stackbunnei2018-08-191-3/+36
|\ \ \ \ | |_|/ / |/| | | Shaders: Implemented a stack for the SSY/SYNC instructions.
| * | | Shaders: Implemented a stack for the SSY/SYNC instructions.Subv2018-08-181-3/+36
| |/ / | | | | | | | | | The SSY instruction pushes an address into the stack, and the SYNC instruction pops it. The current stack depth is 20, we should figure out if this is enough or not.
* | | Merge pull request #1109 from Subv/ldg_decodebunnei2018-08-191-0/+4
|\ \ \ | | | | | | | | Shaders: Added decodings for the LDG and STG instructions.
| * | | Shaders: Added decodings for the LDG and STG instructions.Subv2018-08-191-0/+4
| |/ /
* | | Merge pull request #1108 from Subv/front_facingbunnei2018-08-192-0/+7
|\ \ \ | | | | | | | | Shaders: Implemented the gl_FrontFacing input attribute (attr 63).
| * | | Shaders: Implemented the gl_FrontFacing input attribute (attr 63).Subv2018-08-192-0/+7
| |/ /
* / / Shader: Implemented the predicate and mode arguments of LOP.Subv2018-08-182-11/+39
|/ / | | | | | | | | | | The mode can be used to set the predicate to true depending on the result of the logic operation. In some cases, this means discarding the result (writing it to register 0xFF (Zero)). This is used by Super Mario Odyssey.
* | Added predcondition GreaterThanWithNanDavid Marcec2018-08-182-5/+8
| |
* | Merge pull request #1096 from bunnei/supported-blitsbunnei2018-08-181-2/+0
|\ \ | | | | | | gl_rasterizer_cache: Remove asserts for supported blits.
| * | gl_rasterizer_cache: Remove asserts for supported blits.bunnei2018-08-171-2/+0
| | |
* | | renderer_opengl: Treat OpenGL errors as critical.bunnei2018-08-171-1/+1
|/ /
* | Merge pull request #1019 from Subv/vertex_divisorbunnei2018-08-177-5/+28
|\ \ | | | | | | Rasterizer: Manually implemented instanced rendering.
| * | Rasterizer: Implemented instanced rendering.Subv2018-08-157-5/+28
| | | | | | | | | | | | | | | | | | We keep track of the current instance and update an uniform in the shaders to let them know which instance they are. Instanced vertex arrays are not yet implemented.
* | | gl_rasterizer_cache: Treat Depth formats differently from DepthStencil.bunnei2018-08-162-16/+26
| |/ |/|
* | Shader/Conversion: Implemented the negate bit in F2F and I2I instructions.Subv2018-08-151-4/+12
| |
* | Shader/I2F: Implemented the negate I2F_C instruction variant.Subv2018-08-151-7/+23
| |
* | Shader/F2I: Implemented the negate bit in the I2F instructionSubv2018-08-151-0/+4
| |
* | Shader/F2I: Implemented the F2I_C instruction variant.Subv2018-08-151-2/+10
| |
* | Shader/F2I: Implemented the negate bit in the F2I instruction.Subv2018-08-151-0/+4
| |
* | Merge pull request #1077 from bunnei/rgba16ubunnei2018-08-151-1/+9
|\ \ | | | | | | gl_rasterizer_cache: Add RGBA16U to PixelFormatFromTextureFormat.
| * | gl_rasterizer_cache: Add RGBA16U to PixelFormatFromTextureFormat.bunnei2018-08-151-1/+9
| |/ | | | | | | - Used by Breath of the Wild.
* / gl_rasterizer_cache: Cleanup some PixelFormat names and logging.bunnei2018-08-152-41/+71
|/
* Merge pull request #1069 from bunnei/vtx-szbunnei2018-08-151-5/+20
|\ | | | | maxwell_to_gl: Properly handle UnsignedInt/SignedInt sizes.
| * maxwell_to_gl: Properly handle UnsignedInt/SignedInt sizes.bunnei2018-08-151-5/+20
| |
* | Merge pull request #1070 from bunnei/cbuf-szbunnei2018-08-151-3/+3
|\ \ | | | | | | gl_rasterizer: Fix upload size for constant buffers.
| * | gl_rasterizer: Fix upload size for constant buffers.bunnei2018-08-151-3/+3
| |/
* | Merge pull request #1071 from bunnei/fix-ldcbunnei2018-08-151-13/+22
|\ \ | | | | | | gl_shader_decompiler: Several fixes for indirect constant buffer loads.
| * | gl_shader_decompiler: Several fixes for indirect constant buffer loads.bunnei2018-08-151-13/+22
| |/
* | Merge pull request #1068 from bunnei/g8r8sbunnei2018-08-152-34/+49
|\ \ | | | | | | gl_rasterizer_cache: Implement G8R8S format.
| * | gl_rasterizer_cache: Implement G8R8S format.bunnei2018-08-152-34/+49
| |/ | | | | | | - Used by Super Mario Odyssey.
* / Implement Z16_UNORM in PixelFormatFromTextureFormat functiongreggameplayer2018-08-151-0/+2
|/ | | Require by Zelda Breath Of The Wild
* Merge pull request #1058 from greggameplayer/BC7U_Fixbunnei2018-08-141-1/+1
|\ | | | | Fix BC7U
| * Fix BC7Ugreggameplayer2018-08-141-1/+1
| |
* | renderer_opengl: Implement RenderTargetFormat::RGBA16_UNORM.bunnei2018-08-144-37/+48
|/ | | | - Used by Breath of the Wild.
* Merge pull request #1052 from ogniK5377/xenobunnei2018-08-134-7/+45
|\ | | | | Implement RG32UI and R32UI
| * Implement RG32UI and R32UIDavid Marcec2018-08-134-7/+45
| | | | | | | | Needed for xenoblade
* | maxwell_to_gl: Implement VertexAttribute::Size::Size_8.bunnei2018-08-131-0/+1
|/ | | | - Used by Breath of the Wild.
* renderer_opengl: Implement RenderTargetFormat::RGBA16_UINT.bunnei2018-08-134-34/+45
| | | | - Used by Breath of the Wild.
* Merge pull request #1045 from bunnei/rg8-unormbunnei2018-08-134-26/+61
|\ | | | | renderer_opengl: Implement RenderTargetFormat::RG8_UNORM.
| * renderer_opengl: Implement RenderTargetFormat::RG8_UNORM.bunnei2018-08-134-26/+61
| | | | | | | | - Used by Breath of the Wild.
* | maxwell_to_gl: Implement PrimitiveTopology::LineStrip.bunnei2018-08-131-0/+2
|/ | | | - Used by Breath of the Wild.
* gl_shader_decompiler: Implement XMAD instruction.bunnei2018-08-132-4/+120
|
* gl_rasterizer: Use a shared helper to upload from CPU memory.Markus Wick2018-08-122-28/+33
|
* gl_state: Don't track constant buffer mappings.Markus Wick2018-08-123-41/+3
|
* gl_rasterizer: Use the stream buffer for constant buffers.Markus Wick2018-08-124-29/+32
|
* gl_rasterizer: Use the streaming buffer itself for the constant buffer.Markus Wick2018-08-122-33/+15
| | | | Don't emut copies, especially not for data, which is used once. They just end in a huge GPU overhead.
* gl_rasterizer: Use a helper for aligning the buffer.Markus Wick2018-08-122-15/+22
|
* Update the stream_buffer helper from Citra.Markus Wick2018-08-124-184/+98
| | | | Please see https://github.com/citra-emu/citra/pull/3666 for more details.
* gl_shader_decompiler: Fix SetOutputAttributeToRegister empty check.bunnei2018-08-121-2/+2
|
* gl_shader_decompiler: Fix GLSL compiler error with KIL instruction.bunnei2018-08-121-0/+8
|
* Merge pull request #1020 from lioncash/namespacebunnei2018-08-128-15/+26
|\ | | | | core: Namespace EmuWindow
| * core: Namespace EmuWindowLioncash2018-08-128-15/+26
| | | | | | | | Gets the class out of the global namespace.
* | Merge pull request #1021 from lioncash/warnbunnei2018-08-121-1/+1
|\ \ | | | | | | gl_rasterizer: Silence implicit truncation warning in SetupShaders()
| * | gl_rasterizer: Silence implicit truncation warning in SetupShaders()Lioncash2018-08-121-1/+1
| |/ | | | | | | | | | | Previously this would warn of truncating a std::size_t to a u32. This is safe because we'll obviously never have more than UINT32_MAX amount of uniform buffers.
* | Merge pull request #1024 from Subv/blend_glbunnei2018-08-122-0/+40
|\ \ | | | | | | GPU/Maxwell3D: Implemented an alternative set of blend factors.
| * | GPU/Maxwell3D: Implemented an alternative set of blend factors.Subv2018-08-122-0/+40
| |/ | | | | | | These are used by nouveau and some games like SMO.
* | Merge pull request #1023 from Subv/invalid_attribsbunnei2018-08-122-1/+11
|\ \ | | | | | | RasterizerGL: Ignore invalid/unset vertex attributes.
| * | RasterizerGL: Ignore invalid/unset vertex attributes.Subv2018-08-122-1/+11
| |/ | | | | | | This should make the es2gears example not crash anymore.
* / Implement R8_UINT RenderTargetFormat & PixelFormat (#1014)greggameplayer2018-08-124-55/+74
|/ | | | - Used by Go Vacation
* Merge pull request #1010 from bunnei/unk-vert-attrib-shaderbunnei2018-08-122-10/+11
|\ | | | | gl_shader_decompiler: Improve handling of unknown input/output attributes.
| * gl_shader_decompiler: Improve handling of unknown input/output attributes.bunnei2018-08-122-10/+11
| |
* | Merge pull request #1009 from bunnei/rg8-rgba8-snormbunnei2018-08-124-64/+93
|\ \ | | | | | | Implement render target formats RGBA8_SNORM and RG8_SNORM.
| * | gl_rasterizer: Implement render target format RG8_SNORM.bunnei2018-08-124-8/+18
| | | | | | | | | | | | - Used by Super Mario Odyssey.
| * | gl_rasterizer: Implement render target format RGBA8_SNORM.bunnei2018-08-124-64/+83
| |/ | | | | | | - Used by Super Mario Odyssey.
* | Merge pull request #1018 from Subv/ssy_syncbunnei2018-08-122-8/+38
|\ \ | |/ |/| GPU/Shader: Implemented SSY and SYNC as a set_target/jump pair.
| * GPU/Shader: Don't predicate instructions that don't have a predicate field (SSY).Subv2018-08-112-2/+13
| |
| * GPU/Shaders: Implemented SSY and SYNC as a way to modify control flow during shader execution.Subv2018-08-111-6/+25
| | | | | | | | SSY sets the target label to jump to when the SYNC instruction is executed.
* | Merge pull request #1016 from lioncash/videobunnei2018-08-116-30/+42
|\ \ | | | | | | video_core: Get rid of global variable g_toggle_framelimit_enabled
| * | video_core; Get rid of global g_toggle_framelimit_enabled variableLioncash2018-08-116-25/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, we make a struct for renderer settings and allow the renderer to update all of these settings, getting rid of the need for global-scoped variables. This also uncovered a few indirect inclusions for certain headers, which this commit also fixes.
| * | renderer_base: Remove unused kFramebuffer enumerationLioncash2018-08-111-3/+0
| | | | | | | | | | | | This is entirely unused and can be removed.
| * | video_core: Remove unused Renderer enumerationLioncash2018-08-111-2/+0
| |/ | | | | | | | | Currently we only have an OpenGL renderer, so this is unused in code (and occupies the Renderer identifier in the VideoCore namespace).
* | Merge pull request #1003 from lioncash/varbunnei2018-08-112-4/+2
|\ \ | | | | | | video_core: Use variable template variants of type_traits interfaces where applicable
| * | video_core: Use variable template variants of type_traits interfaces where applicableLioncash2018-08-102-4/+2
| | |
* | | Implement R16S & R16UI & R16I RenderTargetFormats & PixelFormats and more (R16_UNORM needed by Fate Extella) (#848)greggameplayer2018-08-114-19/+92
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement R16S & R16UI & R16I RenderTargetFormats & PixelFormats Do a separate function in order to get Bytes Per Pixel of DepthFormat Apply the new function in gpu.h delete unneeded white space * correct merging error
* | maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8.bunnei2018-08-101-0/+1
| | | | | | | | - Used by Super Mario Odyssey.
* | maxwell_to_gl: Implement VertexAttribute::Size::Size_32_32_32.bunnei2018-08-101-0/+2
| | | | | | | | - Used by Super Mario Odyssey.
* | Merge pull request #1004 from lioncash/unusedbunnei2018-08-103-8/+6
|\ \ | | | | | | gl_rasterizer_cache: Remove unused viewport parameter of GetFramebufferSurfaces()
| * | gl_rasterizer_cache: Remove unused viewport parameter of GetFramebufferSurfaces()Lioncash2018-08-103-8/+6
| |/
* | Merge pull request #1008 from yuzu-emu/revert-697-disable-depth-cullbunnei2018-08-101-3/+1
|\ \ | | | | | | Revert "gl_state: Temporarily disable culling and depth test."
| * | Revert "gl_state: Temporarily disable culling and depth test."bunnei2018-08-101-3/+1
| | |
* | | textures: Refactor out for Texture/Depth FormatFromPixelFormat.bunnei2018-08-104-179/+27
|/ /
* | Merge pull request #995 from bunnei/gl-buff-boundsbunnei2018-08-101-10/+12
|\ \ | |/ |/| gl_rasterizer_cache: Add bounds checking for gl_buffer copies.
| * gl_rasterizer_cache: Add bounds checking for gl_buffer copies.bunnei2018-08-101-10/+12
| |
* | Merge pull request #1001 from lioncash/reservebunnei2018-08-101-0/+2
|\ \ | |/ |/| gl_shader_decompiler: Reserve element memory beforehand in BuildRegisterList()
| * gl_shader_decompiler: Reserve element memory beforehand in BuildRegisterList()Lioncash2018-08-091-0/+2
| | | | | | | | | | Avoids potentially perfoming multiple reallocations when we know the total amount of memory we need beforehand.
* | Merge pull request #991 from bunnei/ignore-macbunnei2018-08-101-4/+9
|\ \ | | | | | | maxwell_3d: Ignore macros that have not been uploaded yet.
| * | maxwell_3d: Ignore macros that have not been uploaded yet.bunnei2018-08-091-4/+9
| | | | | | | | | | | | - Used by Super Mario Odyssey (in game).
* | | Implement SNORM for BC5/DXN2 (#998)Khangaroo2018-08-102-38/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement BC5/DXN2 (#996) - Used by Kirby Star Allies. * Implement BC5/DXN2 SNORM UNORM for Kirby Star Allies SNORM for Super Mario Odyssey
* | | gl_rasterizer_cache: Avoid iterator invalidation issues within InvalidateRegion()Lioncash2018-08-091-2/+4
| |/ |/| | | | | | | A range-based for loop can't be used when the container being iterated is also being erased from.
* | Merge pull request #992 from bunnei/declr-predbunnei2018-08-091-4/+5
|\ \ | | | | | | gl_shader_decompiler: Declare predicates on use.
| * | gl_shader_decompiler: Declare predicates on use.bunnei2018-08-091-4/+5
| |/ | | | | | | - Used by Super Mario Odyssey (when going in game).
* | Merge pull request #994 from lioncash/constbunnei2018-08-091-7/+9
|\ \ | | | | | | gl_rasterizer_cache: Use std::vector::assign vs resize() then copy for the non-tiled case
| * | gl_rasterizer_cache: Invert conditional in LoadGLBuffer()Lioncash2018-08-091-5/+5
| | | | | | | | | | | | | | | | | | It's generally easier to follow code using conditionals that operate in terms of the true case followed by the false case (no chance of overlooking the exclamation mark).
| * | gl_rasterizer_cache: Use std::vector::assign in LoadGLBuffer() for the non-tiled caseLioncash2018-08-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | resize() causes the vector to expand and zero out the added members to the vector, however we can avoid this zeroing by using assign(). Given we have the pointer to the data we want to copy, we can calculate the end pointer and directly copy the range of data without the need to perform the resize() beforehand.
| * | gl_rasterizer_cache: Make pointer const in LoadGLBuffer()Lioncash2018-08-091-1/+1
| |/ | | | | | | | | This is only ever read from, so we can make the data it's pointing to const.
* | Merge pull request #993 from bunnei/smo-vtx-ptsbunnei2018-08-091-0/+3
|\ \ | | | | | | Implement VertexAttribute::Size::Size_16_16_16_16 and PrimitiveTopology::Points.
| * | maxwell_to_gl: Implement VertexAttribute::Size::Size_16_16_16_16.bunnei2018-08-091-0/+1
| | | | | | | | | | | | - Used by Super Mario Odyssey (in game).
| * | maxwell_to_gl: Implement PrimitiveTopology::Points.bunnei2018-08-091-0/+2
| |/ | | | | | | - Used by Super Mario Odyssey (in game).
* | Merge pull request #984 from bunnei/rt-nonebunnei2018-08-091-0/+5
|\ \ | | | | | | gl_rasterizer: Do not render when no render target is configured.
| * | gl_rasterizer: Do not render when no render target is configured.bunnei2018-08-091-0/+5
| | | | | | | | | | | | - Used by Super Mario Odyssey.
* | | Implement BC5/DXN2 (#996)Khangaroo2018-08-093-33/+45
| | | | | | | | | - Used by Kirby Star Allies.
* | | Merge pull request #977 from bunnei/bgr565bunnei2018-08-092-0/+4
|\ \ \ | |_|/ |/| | gl_rasterizer_cached: Implement RenderTargetFormat::B5G6R5_UNORM.
| * | gl_rasterizer_cached: Implement RenderTargetFormat::B5G6R5_UNORM.bunnei2018-08-082-0/+4
| | | | | | | | | | | | - Used by Super Mario Odyssey.
* | | Merge pull request #982 from bunnei/stub-unk-63bunnei2018-08-092-0/+9
|\ \ \ | | | | | | | | gl_shader_decompiler: Stub input attribute Unknown_63.
| * | | gl_shader_decompiler: Stub input attribute Unknown_63.bunnei2018-08-082-0/+9
| |/ /
* | | Merge pull request #976 from bunnei/shader-immbunnei2018-08-092-11/+6
|\ \ \ | | | | | | | | gl_shader_decompiler: Let OpenGL interpret floats.
| * | | gl_shader_decompiler: Let OpenGL interpret floats.bunnei2018-08-082-11/+6
| |/ / | | | | | | | | | | | | - Accuracy is lost in translation to string, e.g. with NaN. - Needed for Super Mario Odyssey.
* | | Merge pull request #981 from bunnei/cbuf-corruptbunnei2018-08-094-3/+12
|\ \ \ | |_|/ |/| | maxwell_3d: Use correct const buffer size and check bounds.
| * | maxwell_3d: Use correct const buffer size and check bounds.bunnei2018-08-084-3/+12
| |/ | | | | | | - Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
* | Merge pull request #985 from bunnei/rt-r11g11b10bunnei2018-08-091-0/+1
|\ \ | | | | | | gpu: Add R11G11B10_FLOAT to RenderTargetBytesPerPixel.
| * | gpu: Add R11G11B10_FLOAT to RenderTargetBytesPerPixel.bunnei2018-08-081-0/+1
| |/ | | | | | | - Used by Super Mario Odyssey.
* | Merge pull request #979 from bunnei/vtx88bunnei2018-08-091-0/+1
|\ \ | | | | | | maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8.
| * | maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8.bunnei2018-08-081-0/+1
| |/
* / renderer_opengl: Use trace log in a few places.bunnei2018-08-082-2/+2
|/
* Merge pull request #964 from Hexagon12/lower-logsbunnei2018-08-081-4/+4
|\ | | | | Lowered down the logging for command processor methods
| * Lowered down the logging for methodsHexagon122018-08-071-4/+4
| |
* | Fixed the sRGB pixel format (#963)Hexagon122018-08-081-1/+2
| | | | | | | | | | | | * Changed the sRGB pixel format return * Add a message about SRGBA -> RGBA conversion
* | maxwell_3d: Remove outdated assert.bunnei2018-08-061-2/+0
| |
* | gl_rasterizer_cache: Avoid superfluous surface copies.bunnei2018-08-062-4/+21
| |
* | Merge pull request #927 from bunnei/fix-texsbunnei2018-08-051-2/+5
|\ \ | | | | | | gl_shader_decompiler: Fix TEXS mask and dest.
| * | gl_shader_decompiler: Fix TEXS mask and dest.bunnei2018-08-051-2/+5
| | |
* | | Merge pull request #912 from lioncash/global-varbunnei2018-08-0510-50/+50
|\ \ \ | |/ / |/| | video_core: Eliminate the g_renderer global variable
| * | renderer_base: Make Rasterizer() return the rasterizer by referenceLioncash2018-08-042-4/+8
| | | | | | | | | | | | | | | | | | | | | All calling code assumes that the rasterizer will be in a valid state, which is a totally fine assumption. The only way the rasterizer wouldn't be is if initialization is done incorrectly or fails, which is checked against in System::Init().
| * | video_core: Eliminate the g_renderer global variableLioncash2018-08-0410-47/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We move the initialization of the renderer to the core class, while keeping the creation of it and any other specifics in video_core. This way we can ensure that the renderer is initialized and doesn't give unfettered access to the renderer. This also makes dependencies on types more explicit. For example, the GPU class doesn't need to depend on the existence of a renderer, it only needs to care about whether or not it has a rasterizer, but since it was accessing the global variable, it was also making the renderer a part of its dependency chain. By adjusting the interface, we can get rid of this dependency.
* | | added braces for conditionsDavid Marcec2018-08-051-2/+3
| | |
* | | fix the attrib format for intsDavid Marcec2018-08-051-2/+7
| | |
* | | Merge pull request #919 from lioncash/signbunnei2018-08-041-8/+9
|\ \ \ | |/ / |/| | gl_shader_manager: Amend sign differences in an assertion comparison in SetShaderUniformBlockBinding()
| * | gl_shader_manager: Invert conditional in SetShaderUniformBlockBinding()Lioncash2018-08-041-7/+9
| | | | | | | | | | | | | | | This lets us indent the majority of the code and places the error case first.
| * | gl_shader_manager: Amend sign differences in an assertion comparison in SetShaderUniformBlockBinding()Lioncash2018-08-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Ensures both operands have the same sign in the comparison. While we're at it, we can get rid of the redundant casting of ub_size to an int. This type will always be trivial and alias a built-in type (not doing so would break backwards compatibility at a standard level).
* | | Merge pull request #911 from lioncash/prototypebunnei2018-08-041-3/+0
|\ \ \ | | | | | | | | video_core: Remove unimplemented Start() function prototype
| * | | video_core: Remove unimplemented Start() function prototypeLioncash2018-08-031-3/+0
| | | | | | | | | | | | | | | | Given this has no definition, we can just remove it entirely.
* | | | Merge pull request #910 from lioncash/unusedbunnei2018-08-031-2/+0
|\ \ \ \ | |_|/ / |/| | | gl_shader_decompiler: Remove unused variable in GenerateDeclarations()
| * | | gl_shader_decompiler: Remove unused variable in GenerateDeclarations()Lioncash2018-08-031-2/+0
| |/ / | | | | | | | | | | | | This variable was being incremented, but we were never actually using it.
* / / gl_shader_manager: Make ProgramManager's GetCurrentProgramStage() a const member functionLioncash2018-08-031-1/+1
|/ / | | | | | | This function doesn't modify class state, so it can be made const.
* | Merge pull request #892 from lioncash/globalbunnei2018-08-038-51/+41
|\ \ | | | | | | video_core: Make global EmuWindow instance part of the base renderer …
| * | video_core: Make global EmuWindow instance part of the base renderer classLioncash2018-08-028-51/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes the global a member of the RendererBase class. We also change this to be a reference. Passing any form of null pointer to these functions is incorrect entirely, especially given the code itself assumes that the pointer would always be in a valid state. This also makes it easier to follow the lifecycle of instances being used, as we explicitly interact the renderer with the rasterizer, rather than it just operating on a global pointer.
* | | Merge pull request #901 from lioncash/refbunnei2018-08-031-2/+2
|\ \ \ | | | | | | | | gl_shader_manager: Take ShaderSetup instances by const reference in UseProgrammableVertexShader() and UseProgrammableFragmentShader()
| * | | gl_shader_manager: Take ShaderSetup instances by const reference in UseProgrammableVertexShader() and UseProgrammableFragmentShader()Lioncash2018-08-021-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Avoids performing unnecessary copies of 65560 byte sized ShaderSetup instances, considering it's only used as part of lookup and not modified. Given the parameters were already const, it's likely taking these parameters by reference was intended but the ampersand was forgotten.
* | | Merge pull request #902 from lioncash/arraybunnei2018-08-021-2/+3
|\ \ \ | | | | | | | | gl_state: Make texture_units a std::array
| * | | gl_state: Make texture_units a std::arrayLioncash2018-08-021-2/+3
| |/ / | | | | | | | | | Gets rid of the use of a raw C array.
* / / Implement RGB32F PixelFormat (#886) (used by Go Vacation)greggameplayer2018-08-023-9/+23
|/ /
* | Implement R32_FLOAT RenderTargetFormatUnknown2018-08-013-0/+5
| |
* | Merge pull request #869 from Subv/ubsanbunnei2018-07-312-2/+6
|\ \ | |/ |/| Corrected a few error cases detected by asan/ubsan
| * MacroInterpreter: Avoid left shifting negative values.Subv2018-07-312-2/+6
| | | | | | | | The branch target is signed, so multiply by 4 instead of left shifting by 2
* | Merge pull request #808 from lioncash/mem-dedupbunnei2018-07-261-14/+22
|\ \ | | | | | | video_core/memory_manager: Avoid repeated unnecessary page slot lookups
| * | video_core/memory_manager: Replace a loop with std::array's fill() function in PageSlot()Lioncash2018-07-241-3/+1
| | | | | | | | | | | | | | | We already have a function that does what this code was doing, so let's use that instead.
| * | video_core/memory_manager: Avoid repeated unnecessary page slot lookupsLioncash2018-07-241-11/+21
| | | | | | | | | | | | | | | | | | | | | We don't need to keep calling the same function over and over again in a loop, especially when the behavior is slightly non-trivial. We can just keep a reference to the looked up location and do all the checking and assignments based off it instead.
* | | GPU: Allow using R16F as a render target format.Subv2018-07-262-1/+4
| |/ |/|
* | Implement R16_G16Unknown2018-07-264-19/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correct trailing white spaces Delete tabs correct placement Add RG16F & RG16UI & RG16I & RG16S PixelFormats Return correct data according to changes done previously correct PixelFormat declaration correct coding style error correct coding style error part 2 correct RG16S Declaration error correct alignment
* | Merge pull request #819 from Subv/srgbbunnei2018-07-252-9/+17
|\ \ | | | | | | GPU: Use the right texture format for sRGBA framebuffers.
| * | GPU: Use the right texture format for sRGBA framebuffers.Subv2018-07-252-9/+17
| | |
* | | GPU: Allow the use of Z24S8 as a texture format.Subv2018-07-251-0/+4
|/ /
* | Merge pull request #816 from Subv/z32_s8bunnei2018-07-254-1/+16
|\ \ | | | | | | GPU: Implemented the Z32_S8_X24 depth buffer format.
| * | GPU: Implemented the Z32_S8_X24 depth buffer format.Subv2018-07-254-1/+16
| | |
* | | Merge pull request #815 from Subv/z32f_texbunnei2018-07-251-0/+4
|\ \ \ | | | | | | | | GPU: Allow using Z32 as a texture format.
| * | | GPU: Allow using Z32 as a texture format.Subv2018-07-251-0/+4
| |/ /
* | | Merge pull request #814 from Subv/rt_r8bunnei2018-07-252-0/+4
|\ \ \ | | | | | | | | GPU: Allow the usage of R8 as a render target format.
| * | | GPU: Allow the usage of R8 as a render target format.Subv2018-07-252-0/+4
| |/ /
* | | Merge pull request #809 from lioncash/rasterizerbunnei2018-07-252-16/+13
|\ \ \ | | | | | | | | gl_rasterizer: Minor cleanup
| * | | gl_rasterizer: Replace magic number with GL_INVALID_INDEX in SetupConstBuffers()Lioncash2018-07-241-3/+5
| | | | | | | | | | | | | | | | | | | | This is just the named constant that OpenGL provides, so we can use that instead of using a literal -1
| * | | gl_rasterizer: Use std::string_view instead of std::string when checking for extensionsLioncash2018-07-241-1/+3
| | | | | | | | | | | | | | | | | | | | We can avoid heap allocations here by just using a std::string_view instead of performing unnecessary copying of the string data.
| * | | gl_rasterizer: Use in-class member initializers where applicableLioncash2018-07-242-12/+5
| | |/ | |/| | | | | | | We can just assign to the members directly in these cases.
* | | Merge pull request #811 from Subv/code_address_assertbunnei2018-07-251-8/+0
|\ \ \ | |_|/ |/| | GPU: Remove the assert that required the CODE_ADDRESS to be 0.
| * | GPU: Remove the assert that required the CODE_ADDRESS to be 0.Subv2018-07-241-8/+0
| |/ | | | | | | Games usually just leave it at 0 but nouveau sets it to something else. This already works fine, the assert is useless.
* / GPU: Implemented the R16 and R16F texture formats.Subv2018-07-243-5/+32
|/
* Merge pull request #799 from Subv/tex_r32fbunnei2018-07-243-6/+19
|\ | | | | GPU: Implement texture format R32F.
| * GPU: Implement texture format R32F.Subv2018-07-243-6/+19
| |
* | Merge pull request #796 from bunnei/gl-uintbunnei2018-07-241-0/+3
|\ \ | | | | | | maxwell_to_gl: Implement VertexAttribute::Type::UnsignedInt.
| * | maxwell_to_gl: Implement VertexAttribute::Type::UnsignedInt.bunnei2018-07-241-0/+3
| | |
* | | gl_rasterizer: Implement texture border color.bunnei2018-07-243-11/+11
| | |
* | | maxwell_to_gl: Implement Texture::WrapMode::Border.bunnei2018-07-241-0/+2
| |/ |/|
* | Merge pull request #791 from bunnei/rg32f-rgba32f-bgra8bunnei2018-07-245-12/+70
|\ \ | |/ |/| gl_rasterizer_cache: Implement formats BGRA8_UNORM/RGBA32_FLOAT/RG32_FLOAT
| * gl_rasterizer_cache: Implement RenderTargetFormat RG32_FLOAT.bunnei2018-07-245-7/+25
| |
| * gl_rasterizer_cache: Implement RenderTargetFormat RGBA32_FLOAT.bunnei2018-07-242-10/+34
| |
| * gl_rasterizer_cache: Implement RenderTargetFormat BGRA8_UNORM.bunnei2018-07-244-8/+22
| |
| * gl_rasterizer_cache: Add missing log statements.bunnei2018-07-241-0/+2
| |
* | Merge pull request #792 from lioncash/retvalbunnei2018-07-241-2/+2
|\ \ | | | | | | gl_shader_decompiler: Correct return value of WriteTexsInstruction()
| * | gl_shader_decompiler: Correct return value of WriteTexsInstruction()Lioncash2018-07-241-2/+2
| | | | | | | | | | | | This should be returning void, not a std::string
* | | Merge pull request #790 from bunnei/shader-print-instrbunnei2018-07-241-1/+2
|\ \ \ | | | | | | | | gl_shader_decompiler: Print instruction value in shader comments.
| * | | gl_shader_decompiler: Print instruction value in shader comments.bunnei2018-07-241-1/+2
| | |/ | |/|
* | | Merge pull request #788 from bunnei/shader-check-zerobunnei2018-07-241-0/+6
|\ \ \ | |_|/ |/| | gl_shader_decompiler: Check if SetRegister result is ZeroIndex.
| * | gl_shader_decompiler: Check if SetRegister result is ZeroIndex.bunnei2018-07-241-0/+6
| |/
* | gl_shader_decompiler: Implement shader instruction TLDS.bunnei2018-07-241-29/+43
| |
* | gl_shader_decompiler: Simplify GetCommonDeclarations()Lioncash2018-07-231-5/+5
|/
* Merge pull request #769 from bunnei/shader-mask-fixesbunnei2018-07-231-5/+9
|\ | | | | shader_bytecode: Implement other TEXS masks.
| * shader_bytecode: Implement other TEXS masks.bunnei2018-07-221-5/+9
| |
* | gl_shader_decompiler: Remove redundant Subroutine construction in AddSubroutine()Lioncash2018-07-221-4/+8
|/ | | | | | We don't need to toss away the Subroutine instance after the find() call and reconstruct another instance with the same data right after it. Particularly give Subroutine contains a std::set.
* Merge pull request #767 from bunnei/shader-cleanupbunnei2018-07-221-78/+15
|\ | | | | gl_shader_decompiler: Remove unused state tracking and minor cleanup.
| * gl_shader_decompiler: Remove unused state tracking and minor cleanup.bunnei2018-07-221-78/+15
| |
* | gl_shader_decompiler: Implement SEL instruction.bunnei2018-07-222-0/+20
|/
* gl_rasterizer_cache: Blit surfaces on recreation instead of flush and load.bunnei2018-07-222-2/+86
|
* gl_rasterizer_cache: Use GPUVAddr as cache key, not parameter set.bunnei2018-07-223-57/+46
|
* gl_rasterizer_cache: Use zeta_width and zeta_height registers for depth buffer.bunnei2018-07-222-11/+11
|
* gl_rasterizer: Use zeta_enable register to enable depth buffer.bunnei2018-07-221-2/+2
|
* maxwell_3d: Add depth buffer enable, width, and height registers.bunnei2018-07-221-2/+14
|
* Merge pull request #748 from lioncash/namespacebunnei2018-07-2211-48/+24
|\ | | | | video_core: Use nested namespaces where applicable
| * video_core: Use nested namespaces where applicableLioncash2018-07-2111-48/+24
| | | | | | | | Compresses a few namespace specifiers to be more compact.
* | Merge pull request #747 from lioncash/unimplementedbunnei2018-07-212-3/+3
|\ \ | | | | | | gl_shader_manager: Remove unimplemented function prototype
| * | gl_shader_manager: Replace unimplemented function prototypeLioncash2018-07-212-3/+3
| |/ | | | | | | This was just a linker error waiting to happen.
* / gpu: Rename Get3DEngine() to Maxwell3D()Lioncash2018-07-213-11/+14
|/ | | | This makes it match its const qualified equivalent.
* Merge pull request #738 from lioncash/signbunnei2018-07-201-16/+20
|\ | | | | gl_state: Get rid of mismatched sign conversions in Apply()
| * gl_state: Make references const where applicable in Apply()Lioncash2018-07-201-2/+3
| |
| * gl_state: Get rid of mismatched sign conversionsLioncash2018-07-201-14/+17
| | | | | | | | | | While we're at it, amend the loop variable type to be the same width as that returned by the .size() call.
* | Merge pull request #735 from lioncash/video-unusedbunnei2018-07-201-2/+0
|\ \ | | | | | | maxwell_3d: Remove unused variable within GetStageTextures()
| * | maxwell_3d: Remove unused variable within GetStageTextures()Lioncash2018-07-201-2/+0
| |/
* | Merge pull request #731 from lioncash/shadowbunnei2018-07-201-6/+4
|\ \ | | | | | | gl_shader_decompiler: Eliminate variable and declaration shadowing
| * | gl_shader_decompiler: Eliminate variable and declaration shadowingLioncash2018-07-201-6/+4
| |/ | | | | | | | | Ensures that no identifiers are being hidden, which also reduces compiler warnings.
* / gl_shader_decompiler: Remove unnecessary const from return valuesLioncash2018-07-201-2/+2
|/ | | | | This adds nothing from a behavioral point of view, and can inhibit the move constructor/RVO
* gl_state: Temporarily disable culling and depth test.bunnei2018-07-191-1/+3
|
* Merge pull request #687 from lioncash/instancebunnei2018-07-193-15/+15
|\ | | | | core: Don't construct instance of Core::System, just to access its live instance
| * core: Don't construct instance of Core::System, just to access its live instanceLioncash2018-07-193-15/+15
| | | | | | | | | | | | | | | | | | This would result in a lot of allocations and related object construction, just to toss it all away immediately after the call. These are definitely not intentional, and it was intended that all of these should have been accessing the static function GetInstance() through the name itself, not constructed instances.
* | decoders: Fix calc of swizzle image_width_in_gobs.bunnei2018-07-191-1/+4
|/
* Merge pull request #678 from lioncash/astcbunnei2018-07-181-78/+60
|\ | | | | astc: Minor changes
| * astc: Initialize vector size directly in DecompressLioncash2018-07-181-2/+1
| | | | | | | | There's no need to perform a separate resize.
| * astc: Mark functions as internally linked where applicableLioncash2018-07-181-17/+20
| |
| * astc: const-correctness changes where applicableLioncash2018-07-181-14/+13
| | | | | | | | | | A few member functions didn't actually modify class state, so these can be amended as necessary.
| * astc: Delete Bits' copy contstructor and assignment operatorLioncash2018-07-181-8/+6
| | | | | | | | | | This also potentially avoids warnings, considering the copy assignment operator is supposed to have a return value.
| * astc: In-class initialize member variables where appropriateLioncash2018-07-181-39/+22
| |
* | vi: Partially implement buffer crop parameters.bunnei2018-07-183-4/+20
|/
* GPU: Added register definitions for the stencil parameters.Subv2018-07-171-2/+25
|
* gl_rasterizer_cache: Implement texture format G8R8.bunnei2018-07-153-9/+40
|
* Merge pull request #665 from bunnei/fix-z24-s8bunnei2018-07-151-1/+2
|\ | | | | gl_rasterizer_cache: Fix incorrect offset in ConvertS8Z24ToZ24S8.
| * gl_rasterizer_cache: Fix incorrect offset in ConvertS8Z24ToZ24S8.bunnei2018-07-151-1/+2
| |
* | gl_rasterizer_cache: Implement depth format Z16_UNORM.bunnei2018-07-153-1/+15
|/
* Merge pull request #598 from bunnei/makedonecurrentbunnei2018-07-153-1/+27
|\ | | | | OpenGL: Use MakeCurrent/DoneCurrent for multithreaded rendering.
| * OpenGL: Use MakeCurrent/DoneCurrent for multithreaded rendering.bunnei2018-07-143-1/+27
| |
* | GPU: Always enable the depth write when clearing the depth buffer.Subv2018-07-141-3/+8
|/ | | | The GPU ignores that register when clearing, but OpenGL obeys the glDepthMask parameter, so we set the depth mask to GL_TRUE when clearing the depth buffer. It will be restored to the correct value automatically on the next draw call.
* gl_rasterizer: Fix check for if a shader stage is enabled.bunnei2018-07-133-35/+11
|
* gl_shader_gen: Implement dual vertex shader mode.bunnei2018-07-135-55/+139
| | | | - When VertexA shader stage is enabled, we combine with VertexB program to make a single Vertex Shader stage.
* Merge pull request #655 from bunnei/pred-lt-nanbunnei2018-07-132-5/+7
|\ | | | | gl_shader_decompiler: Implement PredCondition::LessThanWithNan.
| * gl_shader_decompiler: Implement PredCondition::LessThanWithNan.bunnei2018-07-132-5/+7
| |
* | gl_shader_decompiler: Use FlowCondition field in EXIT instruction.bunnei2018-07-132-8/+34
|/
* Merge pull request #652 from Subv/fadd32iSebastian Valle2018-07-132-0/+32
|\ | | | | GPU: Implement the FADD32I shader instruction.
| * GPU: Implement the FADD32I shader instruction.Subv2018-07-122-0/+32
| |
* | Merge pull request #651 from Subv/ffma_decodebunnei2018-07-121-1/+1
|\ \ | | | | | | GPU: Corrected the decoding of FFMA for immediate operands.
| * | GPU: Corrected the decoding of FFMA for immediate operands.Subv2018-07-121-1/+1
| |/
* | gl_rasterizer: Flip triangles when regs.viewport_transform[0].scale_y is negative.bunnei2018-07-081-1/+4
| | | | | | | | - Fixes a regression with Binding of Isaac.
* | Merge pull request #625 from Subv/imnmxbunnei2018-07-082-3/+31
|\ \ | | | | | | GPU: Implemented the IMNMX shader instruction.
| * | GPU: Implemented the IMNMX shader instruction.Subv2018-07-042-3/+31
| | | | | | | | | | | | It's similar to the FMNMX instruction but it works on integers.
* | | GPU: Implemented the BC7U texture format.Subv2018-07-073-7/+21
| |/ |/| | | | | Note: Our version of glad exports GL_COMPRESSED_RGBA_BPTC_UNORM as GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, maybe it's time we update it.
* | Merge pull request #629 from Subv/depth_testbunnei2018-07-052-9/+29
|\ \ | | | | | | GPU: Allow using the old NV04 values for the depth test function.
| * | GPU: Allow using the old NV04 values for the depth test function.Subv2018-07-052-9/+29
| | | | | | | | | | | | | | | | | | These seem to be just a valid as the GL token values. Thanks @ReinUsesLisp This restores graphical output to Disgaea 5
* | | Merge pull request #626 from Subv/shader_syncbunnei2018-07-052-0/+12
|\ \ \ | |/ / |/| | GPU: Stub the shader SYNC and DEPBAR instructions.
| * | GPU: Stub the shader SYNC and DEPBAR instructions.Subv2018-07-042-0/+12
| |/ | | | | | | It is unknown at this moment if we actually need to do something with these instructions or if the GLSL compiler takes care of that for us.
* | Merge pull request #624 from Subv/f2f_roundbunnei2018-07-051-0/+3
|\ \ | | | | | | GPU: Implemented the F2F 'round' rounding mode.
| * | GPU: Implemented the F2F 'round' rounding mode.Subv2018-07-041-0/+3
| |/ | | | | | | It's implemented via the GLSL 'roundEven()' function.
* | Merge pull request #623 from Subv/vertex_typesbunnei2018-07-051-0/+8
|\ \ | | | | | | GPU: Implement the Size_16_16 and Size_10_10_10_2 vertex attribute types
| * | GPU: Implement the Size_16_16 and Size_10_10_10_2 vertex attribute types.Subv2018-07-041-0/+8
| |/ | | | | | | Both signed and unsigned variants.
* | Merge pull request #622 from Subv/unused_texbunnei2018-07-052-2/+5
|\ \ | | | | | | GPU: Ignore unused textures and corrected the TEX shader instruction decoding.
| * | GPU: Ignore textures that the GLSL compiler deemed unused when binding textures to the shaders.Subv2018-07-041-1/+4
| | |
| * | GPU: Corrected the decoding for the TEX shader instruction.Subv2018-07-041-1/+1
| |/
* | Merge pull request #621 from Subv/psetp_bunnei2018-07-052-0/+43
|\ \ | | | | | | GPU: Implemented the PSETP shader instruction.
| * | GPU: Implemented the PSETP shader instruction.Subv2018-07-042-0/+43
| |/ | | | | | | It's similar to the isetp and fsetp instructions but it works on predicates instead.
* | Merge pull request #620 from Subv/depth_z32fbunnei2018-07-053-2/+15
|\ \ | | | | | | GPU: Implemented the 32 bit float depth buffer format.
| * | GPU: Implemented the 32 bit float depth buffer format.Subv2018-07-043-2/+15
| |/
* / GPU: Flip the triangle front face winding if the GPU is configured to not flip the triangles.Subv2018-07-042-3/+29
|/ | | | | | OpenGL's default behavior is already correct when the GPU is configured to flip the triangles. This fixes 1-2 Switch's splash screen.
* GPU: Only configure the used framebuffers during clear.Subv2018-07-044-17/+48
| | | | Don't try to configure the color buffer if it is not being cleared, it may not be completely valid at this point.
* Merge pull request #609 from Subv/clear_buffersbunnei2018-07-045-16/+105
|\ | | | | GPU: Implemented the CLEAR_BUFFERS register.
| * GPU: Factor out the framebuffer configuration code for both Clear and Draw commands.Subv2018-07-032-72/+39
| |
| * GPU: Support clears that don't clear the color buffer.Subv2018-07-032-6/+17
| |
| * GPU: Bind and clear the render target when the CLEAR_BUFFERS register is written to.Subv2018-07-034-0/+86
| |
| * GPU: Added registers for the CLEAR_BUFFERS and CLEAR_COLOR methods.Subv2018-07-031-2/+27
| |
* | gl_rasterizer_cache: Implement PixelFormat S8Z24.bunnei2018-07-033-11/+83
| |
* | Merge pull request #607 from jroweboy/loggingbunnei2018-07-0313-88/+87
|\ \ | | | | | | Logging - Customizable backends
| * | Update clang formatJames Rowe2018-07-037-21/+20
| | |
| * | Rename logging macro back to LOG_*James Rowe2018-07-0313-70/+70
| |/
* | Merge pull request #612 from bunnei/fix-cullbunnei2018-07-031-2/+5
|\ \ | | | | | | gl_rasterizer: Only set cull mode and front face if enabled.
| * | gl_rasterizer: Only set cull mode and front face if enabled.bunnei2018-07-031-2/+5
| |/
* | Merge pull request #611 from Subv/enabled_depth_testbunnei2018-07-032-9/+13
|\ \ | | | | | | GPU: Don't try to parse the depth test function if the depth test is disabled and use only the least significant 3 bits in the depth test func
| * | GPU: Use only the least significant 3 bits when reading the depth test func.Subv2018-07-031-9/+9
| | | | | | | | | | | | Some games set the full GL define value here (including nouveau), but others just seem to set those last 3 bits.
| * | GPU: Don't try to parse the depth test function if the depth test is disabled.Subv2018-07-031-0/+4
| |/
* | Merge pull request #610 from Subv/mufu_8bunnei2018-07-032-0/+5
|\ \ | |/ |/| GPU: Implemented MUFU suboperation 8, sqrt.
| * GPU: Implemented MUFU suboperation 8, sqrt.Subv2018-07-032-0/+5
| |
* | Merge pull request #608 from Subv/depthbunnei2018-07-039-32/+246
|\ \ | | | | | | GPU: Implemented the depth buffer and depth test + culling
| * | GPU: Set up the culling configuration on each draw.Subv2018-07-031-6/+8
| | |
| * | GPU: Set up the depth test state on every draw.Subv2018-07-022-0/+14
| | |
| * | MaxwellToGL: Added conversion functions for depth test and cull mode.Subv2018-07-021-0/+50
| | |
| * | GPU: Added registers for depth test and cull mode.Subv2018-07-021-3/+51
| | |
| * | GPU: Implemented the Z24S8 depth format and load the depth framebuffer.Subv2018-07-027-24/+124
| |/
* | Merge pull request #606 from Subv/base_vertexSebastian Valle2018-07-022-8/+15
|\ \ | | | | | | GPU: Fixed the index offset and implement BaseVertex when doing indexed rendering.
| * | GPU: Implement offsetted rendering when using non-indexed drawing.Subv2018-07-021-1/+1
| | |
| * | GPU: Fixed the index offset rendering, and implemented the base vertex functionality.Subv2018-07-021-6/+8
| | | | | | | | | | | | This fixes Stardew Valley.
| * | GPU: Added register definitions for the vertex buffer base element.Subv2018-07-021-1/+6
| |/
* | Merge pull request #605 from Subv/dma_copySebastian Valle2018-07-021-1/+5
|\ \ | | | | | | GPU: Directly copy the pixels when performing a same-layout DMA.
| * | GPU: Directly copy the pixels when performing a same-layout DMA.Subv2018-07-021-1/+5
| | |
* | | Merge pull request #604 from Subv/invalid_texturesbunnei2018-07-023-3/+12
|\ \ \ | |_|/ |/| | GPU: Ignore invalid and disabled textures when drawing.
| * | GPU: Ignore disabled textures and textures with an invalid address.Subv2018-07-022-1/+10
| | |
| * | GPU: Allow GpuToCpuAddress to return boost::none for unmapped addresses.Subv2018-07-021-2/+2
| |/
* | Merge pull request #602 from Subv/mufu_subopbunnei2018-07-012-6/+1
|\ \ | | | | | | GPU: Corrected the size of the MUFU subop field, and removed incorrect "min" operation.
| * | GPU: Corrected the size of the MUFU subop field, and removed incorrect "min" operation.Subv2018-06-302-6/+1
| |/
* | Merge pull request #601 from Subv/rgba32_uibunnei2018-07-014-25/+48
|\ \ | | | | | | GPU: Implement the RGBA32_UINT rendertarget format.
| * | GPU: Implemented the RGBA32_UINT rendertarget format.Subv2018-06-304-9/+28
| | |
| * | GLCache: Specify the component type along the texture type in the format tuple.Subv2018-06-301-17/+21
| |/
* / gl_shader_decompiler: Implement predicate NotEqualWithNan.bunnei2018-06-302-17/+24
|/
* Merge pull request #595 from bunnei/raster-cachebunnei2018-06-298-1454/+404
|\ | | | | Rewrite the OpenGL rasterizer cache
| * gl_rasterizer_cache: Only dereference color_surface/depth_surface if valid.bunnei2018-06-291-2/+6
| |
| * gl_rasterizer_cache: Implement caching for texture and framebuffer surfaces.bunnei2018-06-273-16/+168
| | | | | | | | | | | | gl_rasterizer_cache: Improved cache management based on Citra's implementation. gl_surface_cache: Add some docstrings.
| * gl_rasterizer_cache: Various fixes for ASTC handling.bunnei2018-06-272-35/+39
| |
| * gl_rasterizer_cache: Use SurfaceParams as a key for surface caching.bunnei2018-06-272-43/+72
| |
| * maxwell_3d: Add a struct for RenderTargetConfig.bunnei2018-06-271-17/+19
| |
| * gl_rasterizer: Implement AccelerateDisplay to forward textures to framebuffers.bunnei2018-06-276-8/+62
| |
| * gl_rasterizer_cache: Cache size_in_bytes as a const per surface.bunnei2018-06-272-9/+13
| |
| * gl_rasterizer_cache: Refactor to make SurfaceParams members const.bunnei2018-06-272-52/+37
| |
| * gl_rasterizer_cache: Remove Citra's rasterizer cache, always load/flush surfaces.bunnei2018-06-274-1494/+210
| |
* | gl_shader_decompiler: Add a return path for unknown instructions.bunnei2018-06-271-0/+1
|/
* gl_rasterizer: Workaround for when exceeding max UBO size.bunnei2018-06-272-1/+7
|
* Merge pull request #593 from bunnei/fix-swizzlebunnei2018-06-275-12/+20
|\ | | | | gl_state: Fix state management for texture swizzle.
| * gl_state: Fix state management for texture swizzle.bunnei2018-06-265-12/+20
| |
* | Merge pull request #592 from bunnei/cleanup-gl-statebunnei2018-06-272-94/+0
|\ \ | | | | | | gl_state: Remove unused state management from 3DS.
| * | gl_state: Remove unused state management from 3DS.bunnei2018-06-262-94/+0
| |/
* / gl_rasterizer_cache: Fix inverted B5G6R5 format.bunnei2018-06-261-1/+1
|/
* Merge pull request #554 from Subv/constbuffer_ubobunnei2018-06-264-18/+39
|\ | | | | Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.
| * Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.Subv2018-06-104-18/+39
| | | | | | | | This should help a bit with GPU performance once we're GPU-bound.
* | Fix crash at exitmailwl2018-06-251-2/+4
| |
* | Build: Fixed some MSVC warnings in various parts of the code.Subv2018-06-207-12/+13
| |
* | Merge pull request #574 from Subv/shader_abs_negbunnei2018-06-191-7/+14
|\ \ | | | | | | GPU: Perform negation after absolute value in the float shader instructions.
| * | GPU: Perform negation after absolute value in the float shader instructions.Subv2018-06-191-7/+14
| | |
* | | GPU: Don't mark uniform buffers and registers as used for instructions which don't have them.Subv2018-06-192-14/+18
|/ / | | | | | | | | Like the MOV32I and FMUL32I instructions. This fixes a potential crash when using these instructions.
* | Merge pull request #570 from bunnei/astcbunnei2018-06-196-1/+1709
|\ \ | | | | | | gl_rasterizer: Implement texture format ASTC_2D_4X4.
| * | gl_rasterizer: Implement texture format ASTC_2D_4X4.bunnei2018-06-186-1/+1709
| | |
* | | Merge pull request #571 from Armada651/loose-blendbunnei2018-06-181-1/+1
|\ \ \ | |/ / |/| | gl_rasterizer: Get loose on independent blending.
| * | gl_rasterizer: Get loose on independent blending.Jules Blok2018-06-181-1/+1
| | |
* | | gl_rasterizer_cache: Loosen things up a bit.bunnei2018-06-181-26/+8
| | |
* | | gl_shader_decompiler: Implement LOP instructions.bunnei2018-06-172-6/+42
| | |
* | | gl_shader_decompiler: Refactor LOP32I instruction a bit in support of LOP.bunnei2018-06-172-57/+42
|/ /
* | gl_shader_decompiler: Implement integer size conversions for I2I/I2F/F2I.bunnei2018-06-162-14/+43
| |
* | Merge pull request #564 from bunnei/lop32i_passbbunnei2018-06-161-6/+12
|\ \ | | | | | | gl_shader_decompiler: Implement LOP32I LogicOperation PassB.
| * | gl_shader_decompiler: Implement LOP32I LogicOperation PassB.bunnei2018-06-161-6/+12
| | |
* | | gl_shader_gen: Set position.w to 1.bunnei2018-06-161-0/+4
|/ /
* | Merge pull request #556 from Subv/dma_enginebunnei2018-06-127-1/+237
|\ \ | | | | | | GPU: Partially implemented the Maxwell DMA engine.
| * | GPU: Partially implemented the Maxwell DMA engine.Subv2018-06-127-1/+237
| | | | | | | | | | | | Only tiled->linear and linear->tiled copies that aren't offsetted are supported for now. Queries are not supported. Swizzled copies are not supported.
* | | Merge pull request #558 from Subv/iadd32ibunnei2018-06-122-2/+31
|\ \ \ | | | | | | | | GPU: Implemented the iadd32i shader instruction.
| * | | GPU: Implemented the iadd32i shader instruction.Subv2018-06-122-2/+31
| | | |
* | | | gl_shader_decompiler: Implement saturate for float instructions.bunnei2018-06-122-39/+32
|/ / /
* / / GPU: Convert the gl_InstanceId and gl_VertexID variables to floats when reading from them.Subv2018-06-101-1/+1
|/ / | | | | | | This corrects the invalid position values in some games when doing attribute-less rendering.
* | GPU: Implement the iset family of shader instructions.Subv2018-06-092-2/+46
| |
* | GPU: Added decodings for the ISET family of instructions.Subv2018-06-091-0/+7
|/
* Merge pull request #550 from Subv/ssybunnei2018-06-092-0/+7
|\ | | | | GPU: Stub the SSY shader instruction.
| * GPU: Stub the SSY shader instruction.Subv2018-06-092-0/+7
| | | | | | | | This instruction tells the GPU where the flow reconverges in a non-uniform control flow scenario, we can ignore this when generating GLSL code.
* | Merge pull request #551 from bunnei/shrbunnei2018-06-092-0/+17
|\ \ | | | | | | gl_shader_decompiler: Implement SHR instruction.
| * | gl_shader_decompiler: Implement SHR instruction.bunnei2018-06-092-0/+17
| |/
* | gl_shader_decompiler: Implement IADD instruction.bunnei2018-06-092-11/+37
| |
* | gl_shader_decompiler: Add missing asserts for saturate_a instructions.bunnei2018-06-092-8/+18
|/
* GPU: Synchronize the blend state on every draw call.Subv2018-06-092-16/+20
| | | | | | Only independent blending on render target 0 is implemented for now. This fixes the elongated squids in Splatoon 2's boot screen.
* GPU: Added registers for normal and independent blending.Subv2018-06-092-31/+27
|
* Merge pull request #547 from Subv/compressed_alignmentbunnei2018-06-081-2/+7
|\ | | | | GLCache: Align compressed texture sizes to their compression ratio, and then align that compressed size to the block height for tiled textures.
| * GLCache: Align compressed texture sizes to their compression ratio, and then align that compressed size to the block height for tiled textures.Subv2018-06-081-2/+7
| | | | | | | | This fixes issues with retrieving non-block-aligned tiled compressed textures from the cache.
* | Rasterizer: Flush the written region when writing shader uniform data before copying it to the uniform buffers.Subv2018-06-081-0/+3
|/ | | | This fixes the flip_viewport uniform having invalid values when drawing.
* Merge pull request #543 from Subv/uniformsbunnei2018-06-071-3/+4
|\ | | | | GLRenderer: Write the shader stage configuration UBO data *before* copying it to the GPU.
| * GLRenderer: Write the shader stage configuration UBO data *before* copying it to the GPU.Subv2018-06-071-3/+4
| | | | | | | | This should fix the bug with the vs_config UBO being uninitialized during shader execution.
* | Merge pull request #542 from bunnei/bfe_immbunnei2018-06-072-7/+44
|\ \ | | | | | | gl_shader_decompiler: Implement BFE_IMM instruction.
| * | gl_shader_decompiler: Implement BFE_IMM instruction.bunnei2018-06-072-7/+44
| | |
* | | Merge pull request #541 from Subv/blittexturesbunnei2018-06-071-56/+9
|\ \ \ | |/ / |/| | GLCache: Fixed copying compressed textures in the rasterizer cache.
| * | GLCache: Use the full uncompressed size when blitting from one texture to another.Subv2018-06-071-3/+6
| | | | | | | | | | | | This avoids the problem of only copying a tiny piece of the textures when they are compressed.
| * | GLCache: Simplify the logic to copy from one texture to another in BlitTextures.Subv2018-06-071-53/+3
| |/ | | | | | | | | | | We now use glCopyImageSubData, this should avoid errors with trying to attach a compressed texture as a framebuffer's color attachment and then blitting to it. Maybe in the future we can change this to glCopyTextureSubImage which only requires GL_ARB_direct_state_access.
* | gl_shader_decompiler: F2F: Implement rounding modes.bunnei2018-06-072-10/+35
| |
* | Merge pull request #537 from bunnei/misc-shaderbunnei2018-06-072-8/+24
|\ \ | | | | | | gl_shader_decompiler: Additional decodings, remove unused stuff from TEX
| * | gl_shader_decompiler: Remove some attribute stuff that has nothing to do with TEX/TEXS.bunnei2018-06-071-8/+4
| | |
| * | shader_bytecode: Add instruction decodings for BFE, IMNMX, and XMAD.bunnei2018-06-071-0/+20
| |/
* | Merge pull request #535 from Subv/gpu_swizzlebunnei2018-06-076-0/+65
|\ \ | | | | | | GPU: Support changing the texture swizzles for Maxwell textures.
| * | GPU: Support changing the texture swizzles for Maxwell textures.Subv2018-06-073-0/+45
| | |
| * | GLState: Support changing the GL_TEXTURE_SWIZZLE parameter of each texture unit.Subv2018-06-073-0/+20
| |/
* / gl_shader_decompiler: Implement ISETP_IMM instruction.bunnei2018-06-071-8/+9
|/
* Merge pull request #534 from Subv/multitexturingbunnei2018-06-079-69/+172
|\ | | | | GPU: Implement sampling multiple textures in the generated glsl shaders.
| * GPU: Implement sampling multiple textures in the generated glsl shaders.Subv2018-06-069-69/+172
| | | | | | | | | | | | All tested games that use a single texture show no regression. Only Texture2D textures are supported right now, each shader gets its own "tex_fs/vs/gs" sampler array to maintain independent textures between shader stages, the textures themselves are reused if possible.
* | gl_shader_decompiler: Implement LD_C instruction.bunnei2018-06-072-0/+43
| |
* | gl_shader_gen: Add uniform handling for indirect const buffer access.bunnei2018-06-073-4/+40
| |
* | gl_shader_decompiler: Refactor uniform handling to allow different decodings.bunnei2018-06-062-26/+29
|/
* Merge pull request #531 from bunnei/fix-shlSebastian Valle2018-06-061-1/+1
|\ | | | | gl_shader_decompiler: Fix un/signed mismatch with SHL.
| * gl_shader_decompiler: Fix un/signed mismatch with SHL.bunnei2018-06-061-1/+1
| |
* | Merge pull request #530 from bunnei/wrap-mirrorSebastian Valle2018-06-061-0/+2
|\ \ | | | | | | maxwell_to_gl: Implement WrapMode Mirror.
| * | maxwell_to_gl: Implement WrapMode Mirror.bunnei2018-06-061-0/+2
| |/
* | Merge pull request #527 from Subv/rgba32f_texcopybunnei2018-06-062-0/+5
|\ \ | | | | | | GPU: Allow the usage of RGBA32_FLOAT and RGBA16_FLOAT in the texture copy engine.
| * | GPU: Allow the usage of RGBA16_FLOAT in the texture copy engine.Subv2018-06-061-0/+2
| | |
| * | GPU: Allow the usage of RGBA32_FLOAT in the texture copy engine.Subv2018-06-062-0/+3
| | |
* | | Merge pull request #528 from Subv/rg11b10fbunnei2018-06-064-12/+31
|\ \ \ | |_|/ |/| | GPU: Implemented the R11FG11FB10F texture and rendertarget formats.
| * | GPU: Implemented the R11FG11FB10F texture and rendertarget formats.Subv2018-06-064-11/+30
| | |
| * | GPU: Fixed the compression factor for RGBA16F textures.Subv2018-06-061-1/+1
| |/ | | | | | | They're not compressed.
* | Merge pull request #516 from Subv/f2i_rbunnei2018-06-062-7/+64
|\ \ | | | | | | GPU: Implemented the F2I_R shader instruction.
| * | GPU: Implemented the F2I_R shader instruction.Subv2018-06-052-7/+64
| | |
* | | Merge pull request #521 from Subv/brabunnei2018-06-051-4/+5
|\ \ \ | | | | | | | | GPU: Corrected the branch targets for the shader bra instruction.
| * | | GPU: Corrected the branch targets for the shader bra instruction.Subv2018-06-051-4/+5
| | |/ | |/|
* | | Merge pull request #520 from bunnei/shader-shlbunnei2018-06-052-15/+48
|\ \ \ | |/ / |/| | gl_shader_decompiler: Implement SHL instruction.
| * | gl_shader_decompiler: Fix typo with ISCADD instruction.bunnei2018-06-051-1/+1
| | |
| * | gl_shader_decompiler: Implement SHL instruction.bunnei2018-06-052-14/+47
| | |
* | | Merge pull request #518 from Subv/incomplete_shadersbunnei2018-06-051-5/+16
|\ \ \ | |/ / |/| | GPU: Implemented predicated exit instructions in the shader programs.
| * | GPU: Implement predicated exit instructions in the shader programs.Subv2018-06-051-4/+6
| | |
| * | GPU: Take into account predicated exits when performing shader control flow analysis.Subv2018-06-051-1/+10
| | |
* | | gl_shader_decompiler: Implement PredCondition::NotEqual.bunnei2018-06-051-3/+3
| | |
* | | GPU: Implement the ISCADD shader instructions.Subv2018-06-052-0/+40
| | |
* | | GPU: Added decodings for the ISCADD instructions.Subv2018-06-051-0/+7
| |/ |/|
* | Merge pull request #514 from Subv/lop32ibunnei2018-06-052-1/+58
|\ \ | | | | | | GPU: Implemented the LOP32I instruction.
| * | GPU: Implemented the LOP32I instruction.Subv2018-06-042-1/+58
| | |
* | | Merge pull request #510 from Subv/isetpbunnei2018-06-052-6/+63
|\ \ \ | | | | | | | | GPU: Implemented the ISETP_R and ISETP_C instructions
| * | | GPU: Use explicit types when retrieving the uniform values for fsetp/fset and isetp instead of the type of an invalid output register.Subv2018-06-041-9/+18
| | | |
| * | | GPU: Implemented the ISETP_R and ISETP_C shader instructions.Subv2018-06-042-0/+48
| |/ /
* | | Merge pull request #512 from Subv/fsetbunnei2018-06-052-4/+19
|\ \ \ | |_|/ |/| | GPU: Corrected the FSET and I2F instructions.
| * | GPU: Use the bf bit in FSET to determine whether to write 0xFFFFFFFF or 1.0f.Subv2018-06-042-2/+7
| | |
| * | GPU: Corrected the I2F_R implementation.Subv2018-06-041-2/+12
| |/
* | Merge pull request #501 from Subv/shader_brabunnei2018-06-052-1/+45
|\ \ | | | | | | GPU: Partially implemented the bra shader instruction
| * | GPU: Partially implemented the shader BRA instruction.Subv2018-06-042-1/+43
| | |
| * | GPU: Added decoding for the BRA instruction.Subv2018-06-041-0/+2
| |/
* | Merge pull request #515 from Subv/viewport_fixbunnei2018-06-052-14/+30
|\ \ | | | | | | GPU: Calculate the correct viewport dimensions based on the scale and translate registers.
| * | GPU: Calculate the correct viewport dimensions based on the scale and translate registers.Subv2018-06-042-14/+30
| |/ | | | | | | This is how nouveau calculates the viewport width and height. For some reason some games set 0xFFFF in the VIEWPORT_HORIZ and VIEWPORT_VERT registers, maybe those are a misnomer and actually refer to something else?
* / GLCache: Corrected a mismatch between storing compressed sizes and verifying the uncompressed alignment in GetSurface.Subv2018-06-041-1/+2
|/
* Merge pull request #500 from Subv/long_queriesbunnei2018-06-041-9/+24
|\ | | | | GPU: Partial implementation of long GPU queries.
| * GPU: Partial implementation of long GPU queries.Subv2018-06-041-9/+24
| | | | | | | | | | | | | | | | Long queries write a 128-bit result value to memory, which consists of a 64 bit query value and a 64 bit timestamp. In this implementation, only select=Zero of the Crop unit is implemented, this writes the query sequence as a 64 bit value, and a 0u64 value for the timestamp, since we emulate an infinitely fast GPU. This specific type was hwtested, but more rigorous tests should be performed in the future for the other types.
* | gl_shader_decompiler: Implement TEXS component mask.bunnei2018-06-032-9/+26
| |
* | Merge pull request #494 from bunnei/shader-texbunnei2018-06-032-2/+58
|\ \ | | | | | | gl_shader_decompiler: Implement TEX, fixes for TEXS.
| * | gl_shader_decompiler: Implement TEX instruction.bunnei2018-06-012-1/+36
| | |
| * | gl_shader_decompiler: Support multi-destination for TEXS.bunnei2018-06-012-2/+23
| |/
* | Merge pull request #495 from bunnei/improve-rrobunnei2018-06-032-9/+18
|\ \ | | | | | | gl_shader_decompiler: Implement RRO as a register move.
| * | gl_shader_decompiler: Implement RRO as a register move.bunnei2018-06-032-9/+18
| |/
* / GPU: Implemented the DXN1 (BC4) texture format.Subv2018-06-023-3/+16
|/
* gl_rasterizer_cache: Assert that component type is UNorm or format is RGBA16F.bunnei2018-05-311-1/+2
|
* gl_rasterizer_cache: Implement PixelFormat RGBA16F.bunnei2018-05-313-6/+22
|
* Merge pull request #489 from Subv/vertexidbunnei2018-05-302-1/+11
|\ | | | | Shaders: Implemented reading the gl_InstanceID and gl_VertexID variables in the vertex shader.
| * Shaders: Implemented reading the gl_InstanceID and gl_VertexID variables in the vertex shader.Subv2018-05-302-1/+11
| |
* | Merge pull request #483 from bunnei/sonicSebastian Valle2018-05-303-5/+16
|\ \ | | | | | | Several GPU fixes to boot Sonic Mania
| * | gl_shader_decompiler: F2F_R instruction: Implement abs.bunnei2018-05-301-1/+7
| | |
| * | gl_shader_decompiler: Partially implement F2F_R instruction.bunnei2018-05-302-4/+9
| | |
| * | gl_rasterize_cache: Invert order of tex format RGB565.bunnei2018-05-301-1/+1
| |/
* / GPU: Implemented the R8 texture format (0x1D)Subv2018-05-303-5/+18
|/
* add all the known TextureFormat (#474)greggameplayer2018-05-291-2/+71
|
* Merge pull request #472 from bunnei/greater-equalbunnei2018-05-271-4/+3
|\ | | | | gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual.
| * gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual.bunnei2018-05-261-4/+3
| |
* | Merge pull request #476 from Subv/a1bgr5bunnei2018-05-274-5/+21
|\ \ | | | | | | GPU: Implemented the A1B5G5R5 texture format (0x14)
| * | GPU: Implemented the A1B5G5R5 texture format (0x14)Subv2018-05-274-5/+21
| |/
* / shader_bytecode: Implement other variants of FMNMX.bunnei2018-05-262-4/+10
|/
* Merge pull request #468 from Subv/compound_predsbunnei2018-05-261-46/+66
|\ | | | | Shader: Implemented compound predicates in the fset and fsetp instructions
| * Shader: Implemented compound predicates in fset.Subv2018-05-251-28/+12
| | | | | | | | | | | | You can specify a predicate in the fset instruction: Result = ((Value1 Comp Value2) OP P0) ? 1.0 : 0.0;
| * Shader: Implemented compound predicates in fsetp.Subv2018-05-251-19/+55
| | | | | | | | | | | | | | You can specify three predicates in an fsetp instruction: P1 = (Value1 Comp Value2) OP P0; P2 = !(Value1 Comp Value2) OP P0;
* | GPU: Allow command lists to rebind a channel to another engine in the middle of the command list.Subv2018-05-251-1/+0
|/
* Merge pull request #456 from Subv/unmap_bufferbunnei2018-05-212-0/+20
|\ | | | | Implemented nvhost-as-gpu's UnmapBuffer and nvmap's Free ioctls.
| * GPU: Implemented nvhost-as-gpu's UnmapBuffer ioctl.Subv2018-05-202-0/+20
| | | | | | | | It removes a mapping previously created with the MapBufferEx ioctl.
* | Merge pull request #458 from Subv/fmnmxbunnei2018-05-212-6/+26
|\ \ | | | | | | Shaders: Implemented the FMNMX shader instruction.
| * | Shaders: Implemented the FMNMX shader instruction.Subv2018-05-212-6/+26
| |/
* | Merge pull request #452 from Subv/psetpSebastian Valle2018-05-211-0/+3
|\ \ | | | | | | ShadersDecompiler: Added decoding for the PSETP instruction.
| * | ShadersDecompiler: Added decoding for the PSETP instruction.Subv2018-05-191-0/+3
| |/
* | Merge pull request #451 from Subv/gl_array_sizeSebastian Valle2018-05-212-13/+3
|\ \ | | | | | | GLRenderer: Remove unused vertex buffer and increase the size of the stream buffer to 128 MB.
| * | GLRenderer: Remove unused hw_vao_enabled_attributes variable.Subv2018-05-192-4/+0
| | |
| * | GLRenderer: Remove unused vertex buffer and increase the size of the stream buffer to 128 MB.Subv2018-05-192-9/+3
| |/ | | | | | | The stream buffer is where all the vertex data is copied, some games require this to be much bigger than the 4 MB we used to have.
* / GLRenderer: Log the shader source code when program linking fails.Subv2018-05-191-0/+27
|/
* general: Make formatting of logged hex values more straightforwardLioncash2018-05-021-1/+1
| | | | | | This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on).
* Merge pull request #422 from bunnei/shader-movbunnei2018-04-304-0/+30
|\ | | | | Shader instructions MOV_C, MOV_R, and several minor GPU things
| * maxwell_3d: Reset vertex counts after drawing.bunnei2018-04-291-0/+10
| |
| * gl_shader_decompiler: Implement MOV_R.bunnei2018-04-291-1/+2
| |
| * maxwell_to_gl: Implement type SignedNorm, Size_8_8_8_8.bunnei2018-04-291-0/+12
| |
| * shader_bytecode: Add decoding for FMNMX instruction.bunnei2018-04-291-0/+2
| |
| * gl_shader_decompiler: Implement MOV_C.bunnei2018-04-291-0/+5
| |
* | Shaders: Implemented predicate condition 3 (LessEqual) in the fset and fsetp instructions.Subv2018-04-291-0/+7
|/
* Merge pull request #416 from bunnei/shader-ints-p3bunnei2018-04-292-114/+206
|\ | | | | gl_shader_decompiler: Implement MOV32I, partially implement I2I, I2F
| * gl_shader_decompiler: Partially implement I2I_R, and I2F_R.bunnei2018-04-292-8/+34
| |
| * gl_shader_decompiler: More cleanups, etc. with how we handle register types.bunnei2018-04-291-44/+120
| |
| * GLSLRegister: Simplify register declarations, etc.bunnei2018-04-291-63/+31
| |
| * shader_bytecode: Add decodings for i2i instructions.bunnei2018-04-291-3/+20
| |
| * gl_shader_decompiler: Implement MOV32_IMM instruction.bunnei2018-04-292-2/+7
| |
* | fermi_2d: Fix surface copy block height.bunnei2018-04-292-2/+7
|/
* Merge pull request #408 from bunnei/shader-ints-p2bunnei2018-04-271-154/+262
|\ | | | | gl_shader_decompiler: Add GLSLRegisterManager class to track register state.
| * gl_shader_decompiler: Add GLSLRegisterManager class to track register state.bunnei2018-04-271-154/+262
| |
* | renderer_opengl: Replace usages of LOG_GENERIC with fmt-capable equivalentsLioncash2018-04-271-6/+7
|/
* general: Convert assertion macros over to be fmt-compatibleLioncash2018-04-274-7/+7
|
* gl_shader_decompiler: Boilerplate for handling integer instructions.bunnei2018-04-262-6/+111
|
* gl_shader_decompiler: Move color output to EXIT instruction.bunnei2018-04-261-6/+12
|
* Merge pull request #396 from Subv/shader_opsbunnei2018-04-262-9/+89
|\ | | | | Shaders: Implemented the FSET instruction.
| * Shaders: Added bit decodings for the I2I instruction.Subv2018-04-251-0/+6
| |
| * Shaders: Implemented the FSET instruction.Subv2018-04-251-0/+53
| | | | | | | | This instruction is similar to the FSETP instruction, but it doesn't set a predicate, it sets the destination register to 1.0 if the condition holds, and 0 otherwise.
| * Shaders: Added decodings for the FSET instructions.Subv2018-04-252-9/+30
| |
* | GPU: Partially implemented the Fermi2D surface copy operation.Subv2018-04-252-0/+59
| | | | | | | | | | The hardware allows for some rather complicated operations to be performed on the data during the copy, this is not implemented. Only same-format same-size raw copies are implemented for now.
* | GPU: Make the Textures::CopySwizzledData function accessible from the outside of the file.Subv2018-04-252-3/+6
| |
* | GPU: Added a function to retrieve the bytes per pixel of the render target formats.Subv2018-04-252-0/+15
| |
* | GPU: Added surface copy registers to Fermi2DSubv2018-04-251-1/+57
| |
* | GPU: Added boilerplate code for the Fermi2D engineSubv2018-04-253-3/+34
| |
* | GPU: Reduce the number of registers of Maxwell3D to 0xE00.Subv2018-04-252-5/+5
| | | | | | | | The rest are just macro shim registers.
* | GPU: Move the Maxwell3D macro uploading code to the inside of the Maxwell3D processor.Subv2018-04-254-40/+23
| | | | | | | | It doesn't belong in the PFIFO handler.
* | GPU: Corrected the upper bound of the PFIFO method ids in the command processor.Subv2018-04-251-1/+1
| |
* | video-core: Move logging macros over to new fmt-capable onesLioncash2018-04-255-18/+20
|/
* renderer_opengl: Use correct byte order for framebuffer pixel format ABGR8.bunnei2018-04-251-2/+1
|
* gl_rasterizer_cache: Use CHAR_BIT for bpp conversions instead of 8.bunnei2018-04-252-4/+4
|
* gl_rasterizer_cache: Use GPU PAGE_BITS/SIZE, not CPU.bunnei2018-04-251-5/+5
|
* gl_rasterizer_cache: Use new logger.bunnei2018-04-251-4/+4
|
* gl_rasterizer_cache: Add a function for finding framebuffer GPU address.bunnei2018-04-253-0/+31
|
* gl_rasterizer_cache: Handle compressed texture sizes.bunnei2018-04-252-24/+65
|
* gl_rasterizer_cache: Update to be based on GPU addresses, not CPU addresses.bunnei2018-04-258-50/+72
|
* memory_manager: Add implement CpuToGpuAddress.bunnei2018-04-242-0/+27
|
* memory_manager: Make GpuToCpuAddress return an optional.bunnei2018-04-246-24/+33
|
* memory_manager: Use GPUVAdddr, not PAddr, for GPU addresses.bunnei2018-04-246-58/+55
|
* Merge pull request #386 from Subv/gpu_querybunnei2018-04-242-2/+53
|\ | | | | GPU: Added asserts to our code for handling the QUERY_GET GPU command.
| * GPU: Added asserts to our code for handling the QUERY_GET GPU command.Subv2018-04-242-2/+53
| | | | | | | | | | This is based on research from nouveau. Many things are currently unknown and will require hwtests in the future. This commit also stubs QueryMode::Write2 to do the same as Write. Nouveau code treats them interchangeably, it is currently unknown what the difference is.
* | renderer_opengl: Silence a -Wdangling-else warning in DrawScreenTriangles()Lioncash2018-04-241-1/+2
| |
* | Merge pull request #379 from Subv/multi_buffersbunnei2018-04-243-43/+89
|\ \ | | | | | | GPU: Support multiple enabled vertex arrays.
| * | GPU: Support multiple enabled vertex arrays.Subv2018-04-233-43/+89
| |/ | | | | | | | | | | The vertex arrays will be copied to the stream buffer one after the other, and the attributes will be set using the ARB_vertex_attrib_binding extension. yuzu now thus requires OpenGL 4.3 or the ARB_vertex_attrib_binding extension.
* | Merge pull request #383 from Subv/gpu_mmubunnei2018-04-232-34/+25
|\ \ | | | | | | GPU: Make the GPU virtual memory manager use 16 page bits and 10 pagetable bits.
| * | GPU: Make the GPU virtual memory manager use 16 page bits and 10 page table bits.Subv2018-04-232-34/+25
| |/ | | | | | | Also removed some dead code and added memory map consistency asserts.
* | GPU: Implement the RGB10_A2 RenderTarget format, it will use the same format as the A2BGR10 texture format.Subv2018-04-231-0/+2
| |
* | GPU: Implement the A2BGR10 texture format.Subv2018-04-224-6/+18
|/
* Merge pull request #376 from bunnei/shader-decoderbunnei2018-04-212-210/+249
|\ | | | | Shader opcode decoding
| * gl_shader_decompiler: Skip RRO instruction.bunnei2018-04-211-0/+4
| |
| * gl_shader_decompiler: Cleanup error logging.bunnei2018-04-211-14/+6
| |
| * shader_bytecode: Add several more instruction decodings.bunnei2018-04-211-5/+52
| |
| * shader_bytecode: Decode instructions based on bit strings.bunnei2018-04-212-205/+201
| |
* | Merge pull request #375 from lioncash/headerbunnei2018-04-214-11/+0
|\ \ | |/ |/| opengl: Remove unnecessary header inclusions
| * opengl: Remove unnecessary header inclusionsLioncash2018-04-214-11/+0
| |
* | Merge pull request #369 from Subv/shader_instr2bunnei2018-04-212-4/+179
|\ \ | | | | | | ShaderGen: Implemented fsetp/kil and predicated instruction execution.
| * | ShaderGen: Implemented the KIL instruction, which is equivalent to 'discard'.Subv2018-04-211-1/+7
| | |
| * | ShaderGen: Implemented predicated instruction execution.Subv2018-04-212-1/+40
| | | | | | | | | | | | Each predicated instruction will be wrapped in an `if (predicate) { instruction_body; }` in the GLSL, where `predicate` is one of the predicate boolean variables previously set by fsetp.
| * | ShaderGen: Implemented the fsetp instruction.Subv2018-04-212-3/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Predicate variables are now added to the generated shader code in the form of 'pX' where X is the predicate id. These predicate variables are initialized to false on shader startup and are set via the fsetp instructions. TODO: * Not all the comparison types are implemented. * Only the single-predicate version is implemented.
| * | ShaderGen: Register id 255 is special and is hardcoded to return 0 (SR_ZERO).Subv2018-04-202-0/+5
| | |
| * | ShaderGen: Ignore the 'sched' instruction when generating shaders.Subv2018-04-201-0/+16
| |/ | | | | | | The 'sched' instruction has a very convoluted encoding, but fortunately it seems to only appear on a fixed interval (once every 4 instructions).
* | Merge pull request #374 from lioncash/noexceptbunnei2018-04-211-20/+19
|\ \ | | | | | | gl_resource_manager: Add missing noexcept specifiers to move constructors and assignment operators
| * | gl_resource_manager: Add missing noexcept specifiers to move constructors and assignment operatorsLioncash2018-04-211-20/+19
| |/ | | | | | | | | | | | | | | Standard library containers may use std::move_if_noexcept to perform move operations. If a move cannot be performed under these circumstances, then a copy is attempted. Given we only intend for these types to be move-only this can be somewhat problematic. By defining these to be noexcept we prevent cases where copies may be attempted.
* / gl_rasterizer_cache: Make MatchFlags an enum classLioncash2018-04-211-4/+9
|/ | | | Prevents implicit conversions and scope pollution.
* Merge pull request #367 from lioncash/clampbunnei2018-04-202-16/+17
|\ | | | | math_util: Remove the Clamp() function
| * math_util: Remove the Clamp() functionLioncash2018-04-202-16/+17
| | | | | | | | | | C++17 adds clamp() to the standard library, so we can remove ours in favor of it.
* | Merge pull request #363 from lioncash/array-sizebunnei2018-04-201-2/+2
|\ \ | | | | | | common_funcs: Remove ARRAY_SIZE macro
| * | common_funcs: Remove ARRAY_SIZE macroLioncash2018-04-201-2/+2
| |/ | | | | | | C++17 has non-member size() which we can just call where necessary.
* / renderer_opengl: Add missing header guardsLioncash2018-04-202-0/+4
|/
* Merge pull request #356 from lioncash/shaderbunnei2018-04-201-12/+30
|\ | | | | glsl_shader_decompiler: Minor API changes to ShaderWriter
| * glsl_shader_decompiler: Use std::string_view instead of std::string for AddLine()Lioncash2018-04-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This function doesn't need to take ownership of the string data being given to it, considering all we do is append the characters to the internal string instance. Instead, use a string view to simply reference the string data without any potential heap allocation. Now anything that is a raw const char* won't need to be converted to a std::string before appending.
| * glsl_shader_decompiler: Add AddNewLine() function to ShaderWriterLioncash2018-04-201-6/+12
| | | | | | | | Avoids constructing a std::string just to append a newline character
| * glsl_shader_decompiler: Add char overload for ShaderWriter's AddLine()Lioncash2018-04-201-4/+11
| | | | | | | | Avoids constructing a std::string just to append a character.
| * glsl_shader_decompiler: Append indentation without constructing a separate std::stringLioncash2018-04-201-1/+5
| | | | | | | | | | The interface of std::string already lets us append N copies of a character to an existing string.
* | ShaderGen: Implemented the fmul32i shader instruction.Subv2018-04-192-9/+30
| |
* | ShaderGen: Fixed a case where the TEXS instruction would use the same registers for the input and the output.Subv2018-04-191-2/+9
|/ | | | It will now save the coords before writing the outputs in a subscope.
* GPU: Add support for the DXT23 and DXT45 compressed texture formats.Subv2018-04-193-28/+35
|
* Merge pull request #351 from Subv/tex_formatsbunnei2018-04-194-8/+28
|\ | | | | GPU: Implemented the B5G6R5 format.