summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #9406 from vonchenplus/topologybunnei2022-12-121-3/+0
|\ | | | | video_core: Adjust topology update logic and Adjust Clear Manage
| * video_core: The draw manager manages whether Clear is required.FengChen2022-12-081-3/+0
| |
* | video_core: Integrate SMAALiam2022-12-085-2/+873
|/ | | | | Co-authored-by: goldenx86 <goldenx86@users.noreply.github.com> Co-authored-by: BreadFish64 <breadfish64@users.noreply.github.com>
* Merge pull request #9401 from vonchenplus/draw_managerFernando S2022-12-083-11/+16
|\ | | | | video_core: Implement maxwell3d draw manager and split draw logic
| * video_core: Implement maxwell3d draw manager and split draw logicFeng Chen2022-12-083-11/+16
| |
* | Vulkan: Implement Alpha coverageFernando Sahmkow2022-12-053-2/+6
|/
* vulkan_common: clean up extension usageLiam2022-12-048-21/+21
|
* vulkan_common: promote host query reset usage to coreLiam2022-12-041-1/+1
|
* vulkan_common: promote descriptor update template usage to coreLiam2022-12-045-16/+16
|
* Merge pull request #9289 from liamwhite/fruit-companyliamwhite2022-12-038-2/+8
|\ | | | | general: fix compile for Apple Clang
| * general: fix compile for Apple ClangLiam2022-11-238-2/+8
| |
* | Merge pull request #9303 from liamwhite/new-vulkan-initMatías Locatti2022-12-021-2/+2
|\ \ | | | | | | Vulkan: update initialization
| * | Vulkan: update initializationLiam2022-11-271-2/+2
| |/ | | | | | | Co-authored-by: bylaws <bylaws@users.noreply.github.com>
* | shader_recompiler: add gl_Layer translation GS for older hardwareLiam2022-12-011-1/+32
| |
* | Merge pull request #9276 from goldenx86/fsrSliderbunnei2022-11-271-1/+5
|\ \ | | | | | | FSR Sharpening Slider
| * | FSR Sharpening Slider part 1 - only a global sliderMatías Locatti2022-11-241-1/+5
| |/
* | Merge pull request #9307 from Morph1984/not-used-correctlyliamwhite2022-11-261-3/+3
|\ \ | | | | | | maxwell_to_vk: Fix format usage bits and add R16_SINT
| * | maxwell_to_vk: Add R16_SINTMorph2022-11-241-1/+1
| | | | | | | | | | | | This was somehow missed when the format was added to GL
| * | maxwell_to_vk: Fix format usage bitsMorph2022-11-241-2/+2
| |/ | | | | | | | | - VK_FORMAT_B8G8R8A8_UNORM supports the STORAGE_IMAGE_BIT - VK_FORMAT_R4G4B4A4_UNORM_PACK16 does not support the COLOR_ATTACHMENT_BIT
* | GPU: Implement additional render target formats.Fernando Sahmkow2022-11-241-0/+1
| |
* | Fermi2D: Rework blit engine and add a software blitter.Fernando Sahmkow2022-11-241-2/+1
|/
* Merge pull request #9216 from vonchenplus/reimp_inline_index_bufferliamwhite2022-11-202-17/+0
|\ | | | | video_core: Reimplement inline index buffer binding
| * video_core: Reimplement inline index buffer bindingFeng Chen2022-11-152-17/+0
| |
* | Merge pull request #9249 from goldenx86/available-vramMorph2022-11-201-0/+4
|\ \ | | | | | | Add available Vulkan VRAM to log files
| * | Update renderer_vulkan.cppMatías Locatti2022-11-161-0/+4
| | |
* | | Merge pull request #9252 from liamwhite/radv-superioritybunnei2022-11-192-3/+3
|\ \ \ | | | | | | | | maxwell3d: HLE multi-layer clear macro
| * | | maxwell3d: full HLE for multi-layer clearsLiam2022-11-172-3/+3
| |/ /
* | | Merge pull request #9229 from Docteh/achy_breaky_heartMorph2022-11-182-0/+2
|\ \ \ | |/ / |/| | Add break for default cases
| * | Add break for default casesKyle Kienapfel2022-11-142-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-123-0/+14
|\ \ \ | | | | | | | | [video_core] Fix a couple regs regressions
| * | | Fix regs regression with OpenGL two-sided stencil, and re-add data invalidation regKelebek12022-11-113-0/+14
| |/ /
* | | Merge pull request #9167 from vonchenplus/tessliamwhite2022-11-111-0/+1
|\ \ \ | |/ / |/| | video_core: Fix few issues in Tess stage
| * | video_core: Fix few issues in Tess stageFengChen2022-11-071-0/+1
| |/
* / ir/texture_pass: Use host_info instead of querying Settings::values (#9176)Morph2022-11-113-2/+3
|/
* 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-042-7/+7
|
* Merge pull request #8858 from vonchenplus/mipmapbunnei2022-11-044-6/+48
|\ | | | | video_core: Generate mipmap texture by drawing
| * Merge branch 'master' into mipmapFeng Chen2022-09-201-1/+1
| |\
| * | video_core: Generate mipmap texture by drawingFengChen2022-09-204-6/+48
| | |
* | | 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
| |_|/ / / |/| | | |
* | | | | video_core: Catch vulkan clear op not all channel need clearFengChen2022-10-251-8/+13
|/ / / /
* | | | Merge pull request #9112 from vonchenplus/deferred_drawliamwhite2022-10-252-7/+23
|\ \ \ \ | | | | | | | | | | video_core: Reimplementing the maxwell drawing trigger mechanism
| * | | | video_core: Implement maxwell inline_index methodFengChen2022-10-222-0/+17
| | | | |
| * | | | video_coare: Reimplementing the maxwell drawing trigger mechanismFengChen2022-10-212-7/+6
| |/ / /
* | | | Merge pull request #8873 from vonchenplus/fix_legacy_location_errorbunnei2022-10-241-0/+1
|\ \ \ \ | |/ / / |/| | | video_core: Fix legacy to generic location unpaired
| * | | video_core: Fix legacy to generic location unpairedFengChen2022-09-201-0/+1
| | |/ | |/|
* | | video_core: renderer_vulkan: vk_query_cache: Avoid shutdown crash in QueryPool::Reserve.bunnei2022-10-191-3/+4
| | |
* | | renderer_(opengl/vulkan): Fix tessellation clockwise parameterMorph2022-10-131-2/+2
| | | | | | | | | | | | 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
| | | |
* | | | Fix stencil func registers, make clip control equivalent to how it was before, but surely wrong.Kelebek12022-10-103-15/+17
| | | |
* | | | Merge pull request #8766 from Kelebek1/regsFernando S2022-10-098-439/+457
|\ \ \ \ | | | | | | | | | | [video_core] Update 3D registers
| * | | | Update 3D regsKelebek12022-10-078-439/+457
| |/ / /
* | | | 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-062-5/+10
| | |
* | | state_tracker: workaround channel setup for homebrewLiam2022-10-062-1/+3
| | |
* | | Address Feedback from bylaws.Fernando Sahmkow2022-10-061-1/+1
| | |
* | | General: Fix clang format.Fernando Sahmkow2022-10-061-9/+4
| | |
* | | 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-062-9/+26
| | |
* | | VideoCore: Implement formats needed for N64 emulation.Fernando Sahmkow2022-10-062-2/+2
| | |
* | | DMA & InlineToMemory Engines Rework.bunnei2022-10-063-4/+2
| | |
* | | Shader Decompiler: Check for shift when deriving composite samplers.Fernando Sahmkow2022-10-062-4/+5
| | |
* | | VideoCore: Refactor fencing system.Fernando Sahmkow2022-10-064-31/+16
| | |
* | | Vulkan: Fix Scissor on ClearsFernando Sahmkow2022-10-061-1/+8
| | |
* | | NVDRV: Further refactors and eliminate old code.Fernando Sahmkow2022-10-061-4/+0
| | |
* | | Texture cache: Fix the remaining issues with memory mnagement and unmapping.Fernando Sahmkow2022-10-062-3/+3
| | |
* | | VideoCore: Fix channels with disk pipeline/shader cache.Fernando Sahmkow2022-10-064-24/+31
| | |
* | | OpenGl: Implement Channels.Fernando Sahmkow2022-10-064-6/+10
| | |
* | | VideoCore: implement channels on gpu caches.Fernando Sahmkow2022-10-0611-79/+134
| | |
* | | Texture Cache: Add ASTC 10x5 Format.Fernando Sahmkow2022-10-061-0/+2
| | |
* | | Merge pull request #9013 from liamwhite/spinning-a-yarnbunnei2022-10-062-3/+3
|\ \ \ | | | | | | | | common: remove "yuzu:" prefix from thread names
| * | | common: remove "yuzu:" prefix from thread namesLiam2022-10-042-3/+3
| |/ /
* / / vulkan: automatically use larger staging buffer sizes when possibleLiam2022-09-252-27/+60
|/ /
* / (shader/pipeline)_cache: Raise shader/pipeline cache versionMorph2022-08-311-1/+1
|/ | | | 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-312-7/+6
|\ | | | | video_code: support rectangle texture
| * video_code: support rectangle textureFengChen2022-08-252-7/+6
| |
* | video_core: vulkan: rasterizer: Workaround on viewport swizzle on AMDNarr the Reg2022-08-241-1/+8
| |
* | video_core: support framebuffer crop rect top not zerovonchenplus2022-08-201-6/+12
| |
* | video_core: implement R16G16B16X16 texture formatLiam2022-08-191-1/+1
| |
* | 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-034-183/+193
|/ /
* / video_core: stop waiting for shader compilation on user cancelLiam2022-07-301-1/+1
|/
* 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-061-0/+1
| | | | - Used by Monster Hunter Rise Update 10.0.2
* 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
|
* 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.
* 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-146-24/+24
|\ | | | | general: fix compilation on GCC 12
| * common: Change semantics of UNREACHABLE to unconditionally crashLiam2022-06-146-24/+24
| |
* | vk_compute_pass: Silence Wextra warningMorph2022-06-141-1/+1
|/ | | | Silences a warning about using enumerated and non-enumerated types in a conditional expression.
* vk_rasterizer: fix stencil test when two faces are disabledLody2022-05-061-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-2356-168/+112
| | | | | 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.
* video_core: implement formats for N64 emulationFernando Sahmkow2022-04-142-7/+44
|
* video_core: Replace lock_guard with scoped_lockMerry2022-04-076-10/+10
|
* Vulkan: crop to screen dimensions if crop not explicitly requestedLiam2022-04-041-2/+3
|
* Merge pull request #8076 from ameerj/nv-vk-msaa-scalebunnei2022-03-312-7/+3
|\ | | | | Vulkan: Use 3D helpers for MSAA scaling on NV drivers 510+
| * Vulkan: Use 3D helpers for MSAA scaling on NV drivers 510+ameerj2022-03-242-7/+3
| | | | | | | | Nvidia Vulkan drivers 510+ crash when blitting MSAA images. Fall-back to 3D scale helpers for MSAA image scaling.
* | Revert "Memory GPU <-> CPU: reduce infighting in the texture cache by adding CPU Cached memory."bunnei2022-03-261-5/+1
| |
* | Texture Cache: Add Cached CPU system.Fernando Sahmkow2022-03-251-1/+5
| |
* | Merge pull request #7720 from FernandoS27/yfc-gcbunnei2022-03-255-1/+32
|\ \ | | | | | | First Nugget: Reworked Garbage Collection to be smarter [originally from Project YFC]
| * | Garbage Collection: Final tuning.Fernando Sahmkow2022-03-251-1/+1
| | |
| * | Buffer Cache: Tune to the levels of the new GC.Fernando Sahmkow2022-03-252-0/+18
| | |
| * | Garbage Collection: Redesign the algorithm to do a better use of memory.Fernando Sahmkow2022-03-253-1/+14
| |/
* | hle: nvflinger: Migrate android namespace -> Service::android.bunnei2022-03-251-5/+5
| |
* | hle: nvflinger: Move PixelFormat to its own header.bunnei2022-03-251-5/+5
|/
* Merge pull request #8048 from ameerj/include-purgebunnei2022-03-2222-42/+1
|\ | | | | general: Reduce unused includes across the project
| * general: Fix clang/gcc build errorsameerj2022-03-201-0/+1
| |
| * video_core: Reduce unused includesameerj2022-03-1923-43/+1
| |
* | 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>
* | general: Reduce core.h includesameerj2022-03-181-1/+0
|/
* Vulkan: convert S8D24 <-> ABGR8Liam2022-03-163-2/+17
|
* Merge pull request #8000 from liamwhite/hagiFernando S2022-03-151-1/+2
|\ | | | | Initial support for Wii Hagi emulator
| * TextureCacheRuntime: allow converting D24S8 to ABGR8Liam2022-03-111-1/+2
| | | | | | | | I can't see how this would be useful, but Galaxy uses it.
* | emit_spirv, vk_compute_pass: Resolve VS2022 compiler errorsameerj2022-03-121-1/+2
|/
* Merge pull request #7948 from Morph1984/11-11-10-floatMai M2022-02-261-0/+2
|\ | | | | maxwell_to_(gl/vk): Add 11_11_10 float vertex format
| * maxwell_to_(gl/vk): Add 11_11_10 float vertex formatMorph2022-02-251-0/+2
| | | | | | | | - Used by パワプロクンポケットR
* | vk_blit_screen: Add missing format bgra8Lody2022-02-241-0/+2
|/
* vulkan_device: fix missing format in ANVvoidanix2022-02-211-2/+4
| | | | | 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
| |
* | Rasterizer: Refactor inlineToMemory.Fernando Sahmkow2022-02-012-3/+4
| |
* | Rasterizer: Implement Inline2Memory Acceleration.Fernando Sahmkow2022-01-292-0/+23
|/
* 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.
* ShaderDecompiler: Add a debug option to dump the game's shaders.Fernando Sahmkow2022-01-041-0/+9
|
* Merge pull request #7624 from ameerj/intel-msaa-scaleFernando S2022-01-032-18/+23
|\ | | | | 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-242-18/+23
| | | | | | | | Fixes a crash when scaling MSAA textures in titles such as Sonic Colors Ultimate.
* | Merge pull request #7622 from ameerj/vk-rescale-invalid-ptrbunnei2021-12-282-5/+15
|\ \ | | | | | | vk_texture_cache: Fix invalidated pointer access
| * | vk_texture_cache: Fix invalidated pointer accessameerj2021-12-242-5/+15
| |/ | | | | | | | | 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-221-0/+2
|\ | | | | Convert all legacy attributes to generic attributes
| * Address format clangvonchenplus2021-12-181-1/+1
| |
| * Merge branch 'yuzu-emu:master' into convert_legacyFeng Chen2021-12-185-4/+401
| |\
| * | Implement convert legacy to genericFeng Chen2021-11-191-0/+2
| | |
* | | Merge pull request #7599 from FernandoS27/primrestart-vulkanbunnei2021-12-221-4/+7
|\ \ \ | | | | | | | | Vulkan: Fix Primitive Restart and implement Logical Operations
| * | | Vulkan: Fix the checks for primitive restart extension.Fernando Sahmkow2021-12-181-2/+5
| | | |
| * | | Vulkan: implement Logical Operations.Fernando Sahmkow2021-12-181-2/+2
| | | |
| * | | Vulkan: Implement VK_EXT_primitive_topology_list_restartFernando Sahmkow2021-12-181-2/+2
| | |/ | |/|
* | | Merge pull request #7399 from ameerj/art-refactorFernando S2021-12-185-119/+113
|\ \ \ | |/ / |/| | video_core: Refactoring post A.R.T. merge
| * | vk_texture_cache: Add ABGR src format check for D24S8 conversionsameerj2021-12-051-1/+5
| | |
| * | blit_image: Refactor upscale factors usageameerj2021-12-054-60/+51
| | | | | | | | | | | | 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.
* | | 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
* | | renderer_vulkan: Add R16G16_UINTMorph2021-12-081-1/+1
|/ / | | | | | | - Used by Immortals Fenyx Rising
* | Merge pull request #7396 from FernandoS27/blit-this-mfFernando S2021-11-284-92/+78
|\ \ | | | | | | TextureCache: Eliminate format deduction as full depth conversion has been supported.
| * | Texture Cache: Always copy on NVIDIA.Fernando Sahmkow2021-11-221-0/+5
| | |
| * | TextureCache: Simplify blitting of D24S8 formats and fix bugs.Fernando Sahmkow2021-11-224-90/+66
| | |
| * | VulkanTexturECache: Use reinterpret on D32_S8 formats.Fernando Sahmkow2021-11-211-2/+7
| | |
* | | 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 #7368 from FernandoS27/vulkan-convbunnei2021-11-214-1/+419
|\ \ | | | | | | Fix ART Blit detection regression and add D24S8 <-> RGBA8 conv to Vulkan
| * | TextureCache: Refactor and fix linux compiling.Fernando Sahmkow2021-11-201-5/+2
| | |
| * | TextureCache: Implement buffer copies on Vulkan.Fernando Sahmkow2021-11-202-1/+184
| | |
| * | TextureCache: Add R16G16 to D24S8 converter.Fernando Sahmkow2021-11-203-0/+19
| | |
| * | TextureCache: Add B10G11R11 to D24S8 converter.Fernando Sahmkow2021-11-193-13/+64
| | |
| * | TextureCache: Implement additional D24S8 convertions.Fernando Sahmkow2021-11-193-0/+42
| | |
| * | Vulkan: implement D24S8 <-> RGBA8 convertions.Fernando Sahmkow2021-11-193-0/+126
| |/
* | Merge pull request #7357 from Morph1984/s8_uintbunnei2021-11-192-0/+8
|\ \ | |/ |/| video_core: Implement S8_UINT format
| * renderer_vulkan: Implement S8_UINT stencil formatMorph2021-11-182-0/+8
| | | | | | | | It should be noted that on Windows, only nvidia gpus support this format natively as of this commit.
* | texture_cache: Use pixel format conversion when supported by the runtimeameerj2021-11-171-0/+1
|/
* TextureCache: Fix OGL cleaningFernando Sahmkow2021-11-172-0/+20
|
* TextureCache: Add automatic anisotropic filtering and refactor code.Fernando Sahmkow2021-11-161-7/+1
|
* TextureCache: Make a better Anisotropic setter.Fernando Sahmkow2021-11-161-1/+8
|
* Vulkan: fix regression.FernandoS272021-11-161-14/+17
|
* FSR: Fix GCC build errorsameerj2021-11-163-43/+50
|
* Vulkan: Reimplement FSR constant generation functions to avoid GCC warningsMarshall Mohror2021-11-161-8/+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-163-19/+46
|
* 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
|
* VulkanBufferCache: Avoid adding barriers between multiple copies.Fernando Sahmkow2021-11-162-4/+40
|
* Vulkan: Fix FXAA in AMD.Fernando Sahmkow2021-11-161-2/+40
|
* Vulkan: Implement FXAAFernandoS272021-11-162-21/+386
|
* VideoCore: Add gaussian filtering.FernandoS272021-11-162-0/+51
|
* Vulkan: fix waiting on semaphore.FernandoS272021-11-161-1/+3
|
* TextureCache: fix rescaling in aliases and overlap joins.FernandoS272021-11-161-9/+10
|
* 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-161-1/+33
|
* 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-162-6/+21
|
* Vulkan: Fix Blit Depth StencilFernando Sahmkow2021-11-162-14/+20
|
* Texture Cache: Fix downscaling and correct memory comsumption.Fernando Sahmkow2021-11-162-10/+86
|
* Presentation: add Nearest Neighbor filter.Fernando Sahmkow2021-11-162-8/+37
|
* vulkan: Implement FidelityFX Super ResolutionMarshall Mohror2021-11-164-15/+480
|
* Texture Cache: Rescale conversions between depth and colorFernandoS272021-11-164-23/+35
|
* Texture cache: Fix memory consumption and ignore rating when a depth texture is rendered.Fernando Sahmkow2021-11-161-2/+7
|
* vulkan: Fix rescaling push constant usageameerj2021-11-164-35/+42
|
* vk_texture_cache: Use 3D to scale images when blit is unsupportedameerj2021-11-164-29/+87
|
* vk_texture_cache: Fix BlitScale of non-2D imagesameerj2021-11-161-10/+9
|
* video_core: Refactor resolution scale functionameerj2021-11-161-13/+6
|
* vk_texture_cache: Fix unsupported blit format error checkingameerj2021-11-161-5/+5
|
* vk_texture_cache: Fix early returns on unsupported scalesameerj2021-11-161-18/+10
|
* video_core: Misc resolution scaling related refactoringameerj2021-11-163-19/+29
|
* Texture Cache: Fix Rescaling on MultisampleFernando Sahmkow2021-11-161-2/+6
|
* TextureCache: Base fixes on rescaling.Fernando Sahmkow2021-11-161-1/+2
|
* vk_texture_cache: Simplify scaled image managementameerj2021-11-162-107/+34
|
* vk_rasterizer: Fix scaling on Y_NEGATEameerj2021-11-161-3/+9
|
* vk_texture_cache: Use nearest neighbor scaling when availableameerj2021-11-161-2/+7
|
* vk_texture_cache: Minor cleanupameerj2021-11-162-11/+8
|
* Renderers: Unify post processing filter shadersameerj2021-11-161-4/+4
|
* Renderer: Implement Bicubic and ScaleForce filters.Fernando Sahmkow2021-11-162-10/+121
|
* Texture Cache: fix scaling on upload and stop scaling on base resolution.Fernando Sahmkow2021-11-161-14/+32
|
* emit_spirv: Fix RescalingLayout alignmentameerj2021-11-162-4/+7
|
* emit_spirv: Fix RescalingLayout alignmentameerj2021-11-161-1/+1
|
* shader: Properly scale image reads and add GL SPIR-V supportReinUsesLisp2021-11-162-7/+18
| | | | Thanks for everything!
* shader: Properly blacklist and scale image loadsReinUsesLisp2021-11-162-6/+10
|
* texture_cache: Add getter to query if image view is rescaledReinUsesLisp2021-11-161-2/+1
|
* vk_rasterizer: Minor style changeReinUsesLisp2021-11-161-2/+2
|
* texture_cache: Simplify image view queries and blacklistingReinUsesLisp2021-11-165-114/+82
|
* Vulkan: Fix downscaling Blit.Fernando Sahmkow2021-11-161-14/+18
|
* Vulkan: Fix AA when rescaling.Fernando Sahmkow2021-11-161-1/+1
|
* Texture Cache: Implement Blacklisting.Fernando Sahmkow2021-11-162-3/+54
|
* 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
|
* vk_texture_cache: Simplify and optimize scaling blitsReinUsesLisp2021-11-161-106/+62
|
* vk_texture_cache: Fix scaling blit validation errorsReinUsesLisp2021-11-161-81/+78
|
* Fix blits with mipsReinUsesLisp2021-11-161-12/+16
|
* Fix blitsReinUsesLisp2021-11-161-10/+10
|
* TextureCache: Fix rescaling of ImageCopiesFernando Sahmkow2021-11-161-13/+27
|
* TextureCache: Modify Viewports/Scissors according to Rescale.Fernando Sahmkow2021-11-162-32/+61
|
* Texture Cache: More rescaling fixes.Fernando Sahmkow2021-11-161-0/+8
|
* Texture Cache: Implement Vulkan UpScaling & DownScalingFernando Sahmkow2021-11-162-25/+244
|
* VideoCore: Initial Setup for the Resolution Scaler.Fernando Sahmkow2021-11-162-15/+85
|
* 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-242-3/+16
|\ \ | |/ |/| 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-232-3/+14
| |
* | Merge pull request #7077 from FernandoS27/face-downAmeer J2021-10-171-1/+2
|\ \ | | | | | | 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
| |/
* | Merge pull request #7127 from FernandoS27/i-saw-a-wabbitAmeer J2021-10-171-4/+13
|\ \ | | | | | | A few fixes on Vulkan and Rasterizer Caching
| * | Vulkan: Fix failing barrier on refresh.Fernando Sahmkow2021-10-041-1/+2
| | |
| * | Vulkan: Fix the master SemaphoreFernandoS272021-10-041-4/+12
| | |
* | | Merge pull request #7118 from ameerj/vc-gpu-implFernando S2021-10-062-1/+2
|\ \ \ | | | | | | | | gpu: Migrate implementation to the cpp file
| * | | gpu: Migrate implementation to the cpp fileameerj2021-10-032-1/+2
| | | |
* | | | 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 #7076 from ameerj/amd-botwbunnei2021-09-281-1/+1
|\ \ \ | | | | | | | | 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-241-1/+1
| | |/ | |/| | | | | | | 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-242-11/+7
|/ /
* | 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-192-17/+9
|\ \ \ | |_|/ |/| | videocore: Use std::jthread for worker threads
| * | vk_scheduler: Use std::jthreadameerj2021-09-162-17/+9
| | |
* | | renderers: Log total pipeline countMorph2021-09-141-0/+2
|/ /
* | Merge pull request #6944 from FernandoS27/dear-drunk-meMorph2021-09-131-3/+3
|\ \ | | | | | | Vulkan/Descriptors: Increase sets per pool on AMD propietary driver.
| * | Vulkan/Descriptors: Increase sets per pool on AMFD propietary driver.Fernando Sahmkow2021-09-131-3/+3
| | |
* | | 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
| |/ /
* / / vk_descriptor_pool: Add missing <algorithm> includeMorph2021-09-111-0/+1
|/ /
* | 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-113-11/+21
|\ \ \ | | | | | | | | vk_swapchain: Prefer linear swapchain format when presenting sRGB images
| * | | vulkan_device: Enable VK_KHR_swapchain_mutable_format if availableameerj2021-08-291-0/+11
| | | | | | | | | | | | | | | | 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.
* | | 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.
* | | Merge pull request #6900 from ameerj/attr-reorderbunnei2021-09-021-0/+2
|\ \ \ | | | | | | | | structured_control_flow: Add DemoteCombinationPass
| * | | structured_control_flow: Conditionally invoke demote reorder passameerj2021-08-301-0/+2
| |/ / | | | | | | | | | This is only needed on select drivers when a fragment shader discards/demotes.
* | | Merge pull request #6879 from ameerj/decoder-assertbunnei2021-08-311-1/+3
|\ \ \ | |/ / |/| | vk_blit_screen: Fix non-accelerated texture size calculation
| * | vk_blit_screen: Fix non-accelerated texture size calculationameerj2021-08-161-1/+3
| |/ | | | | | | Addresses the potential OOB access in UnswizzleTexture.
* / vulkan_device: Add a check for int8 supportameerj2021-08-251-1/+1
|/ | | | Silences validation errors when shaders use int8 without specifying its support to the API
* Merge pull request #6820 from yzct12345/split-cacheFernando S2021-08-104-2/+14
|\ | | | | texture_cache: Split out template definitions
| * texture_cache: Address ameerj's reviewyzct123452021-08-071-0/+2
| |
| * texture_cache: Don't change copyright yearyzct123452021-08-051-1/+1
| |
| * texture_cache: Address ameerj's reviewyzct123452021-08-053-3/+3
| |
| * texture_cache: Split templates outyzct123452021-08-052-1/+11
| |
* | Merge pull request #6791 from ameerj/astc-optbunnei2021-08-072-94/+8
|\ \ | |/ |/| astc_decoder: Various performance and memory optimizations
| * astc_decoder: Reduce workgroup sizeameerj2021-08-011-2/+2
| | | | | | | | 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-012-67/+5
| | | | | | | | Alleviates the dependency on the swizzle table and a uniform which is constant for all ASTC texture sizes.
| * astc_decoder: Optimize the use EncodingDataameerj2021-08-011-33/+9
| | | | | | | | | | | | | | 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.
* | Merge pull request #6720 from ameerj/vk-screenshotFernando S2021-08-014-69/+241
|\ \ | | | | | | renderer_vulkan: Implement screenshots
| * | renderers: Add explicit invert_y bool to screenshot callbackameerj2021-07-291-1/+1
| | | | | | | | | | | | 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.
* / renderer_vulkan: Add setting to log pipeline statisticsReinUsesLisp2021-07-288-19/+195
|/ | | | | | | | | | | | | | | | 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.
* vk_compute_pass: Remove unused capturesLioncash2021-07-271-3/+2
| | | | Resolves two compiler warnings.
* 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.
* 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.
* Revert "renderers: Disable async shader compilation"ReinUsesLisp2021-07-231-1/+1
| | | | This reverts commit 4a152767286717fa69bfc94846a124a366f70065.
* shader_environment: Receive cache version from outsideReinUsesLisp2021-07-231-3/+6
| | | | This allows us invalidating OpenGL and Vulkan separately in the future.
* 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-233-8/+12
|
* renderers: Disable async shader compilationameerj2021-07-231-1/+1
| | | | The current implementation is prone to causing graphical issues. Disable until a better solution is implemented.
* maxwell_to_vk: Add R16_SNORMReinUsesLisp2021-07-231-1/+1
|
* shader: Ignore global memory ops on devices lacking int64 supportameerj2021-07-231-0/+1
|
* emit_spirv: Workaround VK_KHR_shader_float_controls on fp16 NvidiaReinUsesLisp2021-07-231-0/+1
| | | | Fix regression on Fire Emblem: Three Houses when using native fp16.
* vk_rasterizer: Workaround bug in VK_EXT_vertex_input_dynamic_stateReinUsesLisp2021-07-232-14/+19
| | | | | Workaround potential bug on Nvidia's driver where only updating high attributes leaves low attributes out dated.
* vk_graphics_pipeline: Implement smooth linesReinUsesLisp2021-07-233-0/+23
|
* vk_graphics_pipeline: Implement line widthReinUsesLisp2021-07-235-6/+28
|
* shader: Rework varyings and implement passthrough geometry shadersReinUsesLisp2021-07-232-10/+12
| | | | | | 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-233-9/+26
|
* shader: Unify shader stage typesReinUsesLisp2021-07-234-11/+11
|
* shader: Emulate 64-bit integers when not supportedReinUsesLisp2021-07-231-1/+1
| | | | Useful for mobile and Intel Xe devices.
* gl_shader_cache: Check previous pipeline before checking hash mapReinUsesLisp2021-07-231-2/+1
| | | | Port optimization from Vulkan.
* shaders: Allow shader notify when async shaders is disabledameerj2021-07-231-7/+5
|
* vk_graphics_pipeline: Use VK_KHR_push_descriptor when availableReinUsesLisp2021-07-234-24/+45
| | | | ~51% faster on Nvidia compared to previous method.
* shader: Properly manage attributes not written from previous stagesReinUsesLisp2021-07-231-4/+12
|
* shader: Add support for native 16-bit floatsReinUsesLisp2021-07-232-4/+11
|
* shader: Rename maxwell/program.h to translate_program.hReinUsesLisp2021-07-231-1/+1
|
* 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
|
* vk_pipeline_cache: Skip cached pipelines with different dynamic stateReinUsesLisp2021-07-231-0/+6
|
* vulkan: Add VK_EXT_vertex_input_dynamic_state supportReinUsesLisp2021-07-238-116/+276
| | | | | Reduces the number of total pipelines generated on Vulkan. Tested on Super Smash Bros. Ultimate.
* shader: Reorder shader cache directoriesReinUsesLisp2021-07-231-10/+7
|
* vk_rasterizer: Implement first indexReinUsesLisp2021-07-231-2/+5
|
* vulkan: Use VK_EXT_provoking_vertex when availableReinUsesLisp2021-07-233-3/+12
|
* vk_pipeline_cache,shader_notify: Add shader notificationsReinUsesLisp2021-07-237-49/+83
|
* vk_pipeline_cache: Add asynchronous shadersReinUsesLisp2021-07-233-3/+33
|
* vk_rasterizer: Flush work on clear and dispatchesReinUsesLisp2021-07-231-0/+3
|
* vk_swapchain: Handle outdated swapchainsReinUsesLisp2021-07-233-17/+34
| | | | Fixes pixelated presentation on Intel devices.
* vk_buffer_cache: Handle null texture buffersReinUsesLisp2021-07-231-0/+4
| | | | Fixes a crash on Age of Calamity cutscenes.
* vk_pipeline_cache: Set support_derivative_control to trueReinUsesLisp2021-07-231-0/+1
|
* buffer_cache: Reduce uniform buffer size from shader usageReinUsesLisp2021-07-234-7/+18
| | | | Increases performance significantly on certain titles.
* 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-231-1/+1
| | | | Add support for Polaris AMD devices.
* vulkan: Enable depth bounds and use it conditionallyReinUsesLisp2021-07-232-1/+9
| | | | 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-231-0/+7
| | | | | | 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-232-1/+8
|
* shader: Handle host exceptionsReinUsesLisp2021-07-231-11/+24
|
* video_core,shader: Clang-format fixesReinUsesLisp2021-07-232-5/+10
|
* video_core: Abstract transform feedback translation utilityReinUsesLisp2021-07-233-111/+15
|
* shader: Split profile and runtime information in separate structsReinUsesLisp2021-07-232-215/+208
|
* 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
|
* 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
|
* Move SPIR-V emission functions to their own headerReinUsesLisp2021-07-231-4/+4
|
* shader: Initial OpenGL implementationReinUsesLisp2021-07-236-66/+31
|
* 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-234-649/+104
| | | | | | | | | 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-234-56/+105
|
* vk_compute_pipeline: Fix index comparison oversight on compute texture buffersReinUsesLisp2021-07-231-1/+1
|
* vk_graphics_pipeline: Guard against non-tessellation pipelines using patchesReinUsesLisp2021-07-231-2/+8
|
* shader: Fix bugs and build issues on GCCRodrigo Locatti2021-07-232-3/+3
|
* shader: Fix render targets with null attachmentsReinUsesLisp2021-07-232-26/+34
|
* 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
|
* spirv: Implement ViewportMask with NV_viewport_array2ReinUsesLisp2021-07-231-0/+1
|
* shader: Implement tessellation shaders, polygon mode and invocation idReinUsesLisp2021-07-235-2/+48
|
* vk_pipeline_cache: Silence GCC warningslat9nq2021-07-231-0/+2
| | | | | Silences `-Werror=missing-field-initializers` due to missing initializers.
* spirv: Implement image buffersReinUsesLisp2021-07-233-21/+37
|
* 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
|
* 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-231-0/+1
|
* nsight_aftermath_tracker: Report used shaders to Nsight AftermathReinUsesLisp2021-07-232-1/+4
|
* 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-237-65/+127
|
* shader: Address feedback + clang formatlat9nq2021-07-231-2/+2
|
* shader_recompiler,video_core: Cleanup some GCC and Clang errorslat9nq2021-07-234-15/+15
| | | | | | | | | | | | | | | | | 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-237-115/+140
|
* 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
|
* 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-231-4/+43
|
* 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-232-1/+8
|
* 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-2318-409/+1278
|
* 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-232-7/+15
|
* spirv: Add lower fp16 to fp32 passReinUsesLisp2021-07-233-4/+9
|
* shader: Primitive Vulkan integrationReinUsesLisp2021-07-2311-77/+428
|
* shader: Remove old shader managementReinUsesLisp2021-07-239-1604/+41
|
* spirv: Initial SPIR-V supportReinUsesLisp2021-07-232-3265/+0
|
* 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-204-0/+33
|\ \ | |/ |/| DMAEngine: Accelerate BufferClear [accelerateDMA Part 2]
| * DMAEngine: Accelerate BufferClearFernando Sahmkow2021-07-134-0/+33
| |
* | 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
| | | |
* | | | 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-161-1/+4
|\ \ \ | | | | | | | | settings: Eliminate usage of float-point setting values
| * | | configure_graphics: Use u8 for bg_color valuesameerj2021-07-091-1/+4
| |/ /
* | / vk_rasterizer: Only clear valid color attachmentsameerj2021-07-131-2/+4
| |/ |/|
* | accelerateDMA: Fixes and feedback.Fernando Sahmkow2021-07-121-4/+5
| |
* | accelerateDMA: Accelerate Buffer Copies.Fernando Sahmkow2021-07-112-1/+24
| |
* | Fence Manager: remove reference fencing.Fernando Sahmkow2021-07-091-5/+2
| |
* | Fence Manager: Force ordering on WFI.Fernando Sahmkow2021-07-091-0/+4
| |
* | Fence Manager: Add fences on Reference Count.Fernando Sahmkow2021-07-092-0/+8
|/
* 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.
* | Texture Cache: Initial Implementation of Sparse Textures.Fernando Sahmkow2021-07-042-0/+8
| |
* | Merge pull request #6502 from ameerj/vendor-titleMorph2021-06-281-0/+4
|\ \ | | | | | | main: Add GPU Vendor name to running title bar
| * | video_core: Add GPU vendor name to window title barameerj2021-06-211-0/+4
| | |
* | | vk_buffer_cache: Silence implicit cast warningsReinUsesLisp2021-06-261-2/+3
| |/ |/|
* | Merge pull request #6496 from ameerj/astc-fixesbunnei2021-06-251-93/+14
|\ \ | | | | | | astc: Various robustness enhancements for the gpu decoder
| * | astc_decoder.comp: Remove unnecessary LUT SSBOsameerj2021-06-191-64/+10
| | | | | | | | | | | | We can move them to instead be compile time constants within the shader.
| * | astc: Various robustness enhancements for the gpu decoderameerj2021-06-191-32/+7
| |/ | | | | | | | | | | 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.
* | common: Replace common_sizes into user-literalsWunkolo2021-06-242-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 #6465 from FernandoS27/sex-on-the-beachMai M2021-06-232-0/+17
|\ \ | | | | | | GPU: Implement a garbage collector for GPU Caches (project Reaper+)
| * | Reaper: Guarantee correct deletion.Fernando Sahmkow2021-06-202-0/+10
| | |
| * | Reaper: Change memory restrictions on TC depending on host memory on VK.Fernando Sahmkow2021-06-172-0/+7
| |/
* / vk_master_semaphore: Use jthread for debug threadReinUsesLisp2021-06-222-19/+8
|/
* configure_graphics: Add Accelerate ASTC decoding settingameerj2021-06-161-1/+6
|
* buffer_cache: Simplify uniform disabling logicameerj2021-06-012-0/+5
|
* Merge pull request #6317 from ameerj/fps-fixbunnei2021-05-191-0/+1
|\ | | | | perf_stats: Rework FPS counter to be more accurate
| * perf_stats: Rework FPS counter to be more accurateameerj2021-05-161-0/+1
| | | | | | | | | | | | | | | | | | 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.
* | texture_cache: Handle out of bound texture blitsameerj2021-05-084-43/+36
|/ | | | 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.
* 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.
* common: Move settings to common from core.bunnei2021-04-153-3/+3
| | | | - Removes a dependency on core and input_common from common.
* 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.
* | 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.
* 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.
* astc_decoder: Refactor for style and more efficient memory useameerj2021-03-251-79/+96
|
* astc_decoder: Reimplement LayersRodrigo Locatti2021-03-133-95/+122
| | | | Reimplements the approach to decoding layers in the compute shader. Fixes multilayer astc decoding when using Vulkan.
* renderer_vulkan: Accelerate ASTC decodingameerj2021-03-137-9/+386
| | | | Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
* Merge pull request #5891 from ameerj/bgra-oglRodrigo Locatti2021-03-091-0/+5
|\ | | | | renderer_opengl: Use compute shaders to swizzle BGR textures on copy
| * texture_cache: Blacklist BGRA8 copies and views on OpenGLameerj2021-03-041-0/+5
| | | | | | | | | | | | 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.
* | 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.
* Merge pull request #5936 from Kelebek1/Offsetsbunnei2021-02-221-7/+24
|\ | | | | Offsets for TexelFetch and TextureGather in Vulkan
| * Review 1Kelebek12021-02-151-2/+2
| |
| * Implement texture offset support for TexelFetch and TextureGather and add offsets for TldsKelebek12021-02-151-7/+24
| | | | | | | | Formatting
* | 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.
* | | 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.
* / 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.
* 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-131-1/+1
| | | | | | 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.
* video_core: Fix clang build issuesReinUsesLisp2021-02-131-1/+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.
* 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.
* buffer_cache: Skip cache on small uploads on VulkanReinUsesLisp2021-02-132-1/+9
| | | | | | | | 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-137-64/+214
| | | | | | | | 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.
* video_core: Reimplement the buffer cacheReinUsesLisp2021-02-1320-1003/+585
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gpu: Report renderer errors with exceptionsReinUsesLisp2021-02-136-141/+91
| | | | | | 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.
* 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.
* vk_graphics_pipeline: Fix narrowing conversion on MSVCReinUsesLisp2021-01-251-2/+2
|
* Merge pull request #5807 from ReinUsesLisp/vc-warningsLC2021-01-244-3/+4
|\ | | | | video_core: Silence the remaining gcc warnings and enforce them
| * video_core: Silence -Wmissing-field-initializers warningsReinUsesLisp2021-01-242-1/+2
| |
| * 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.
* | | 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.
* | 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.
* | 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 "download" memory usage hintReinUsesLisp2021-01-157-35/+48
| | | | | | | | | | | | | | 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-1510-330/+8
| | | | | | | | 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.
* vk_buffer_cache: Remove unused functionReinUsesLisp2021-01-151-4/+0
|
* 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).
* | Merge pull request #5288 from ReinUsesLisp/workaround-garbageMorph2021-01-061-0/+5
|\ \ | | | | | | gl_texture_cache: Avoid format views on Intel and AMD
| * | gl_texture_cache: Avoid format views on Intel and AMDReinUsesLisp2021-01-041-0/+5
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #5289 from ReinUsesLisp/vulkan-devicebunnei2021-01-0629-1521/+27
|\ \ \ | | | | | | | | vulkan_common: Move device abstraction to the common directory and allow surfaceless devices
| * | | renderer_vulkan/nsight_aftermath_tracker: Move to vulkan_commonReinUsesLisp2021-01-042-307/+0
| | | |
| * | | renderer_vulkan: Move device abstraction to vulkan_commonReinUsesLisp2021-01-0427-1214/+27
| | | |
* | | | 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-0350-166/+163
|/ / | | | | | | | | | | | | 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-0351-2575/+146
|\ \ | | | | | | vulkan_common: Move reusable Vulkan abstractions to a separate directory
| * | vulkan_instance: Allow different Vulkan versions and enforce 1.1ReinUsesLisp2020-12-315-28/+12
| | | | | | | | | | | | | | | | | | | | | 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-314-25/+7
| | | | | | | | | | | | | | | The Vulkan device abstraction either initializes successfully on the constructor or throws a Vulkan exception.
| * | renderer_vulkan: Throw when enumerating devices failsReinUsesLisp2020-12-311-22/+13
| | | | | | | | | | | | | | | | | | 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-312-73/+3
| | | | | | | | | | | | | | | | | | 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-312-34/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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-311-111/+1
| | | | | | | | | | | | | | | | | | 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-3150-2189/+48
| | | | | | | | | | | | Allows sharing Vulkan wrapper code between different rendering backends.
| * | vulkan_common: Move dynamic library load to a separate fileReinUsesLisp2020-12-311-31/+8
| | | | | | | | | | | | | | | Allows us to initialize a Vulkan dynamic library from different backends without duplicating code.
* | | general: Fix various spelling errorsMorph2021-01-021-1/+1
|/ /
* | 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-3052-2582/+2979
|/ | | | | | | | | | | | | | 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.
* vk_shader_decompiler: Silence warning when compiling without assertsReinUsesLisp2020-12-251-0/+1
|
* video_core: Make use of ordered container contains() where applicableLioncash2020-12-072-3/+2
| | | | | | 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.
* video_core: Remove unnecessary enum class casting in logging messagesLioncash2020-12-074-27/+24
| | | | | | | 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-0712-119/+119
|\ \ | | | | | | video_core: Resolve more variable shadowing scenarios pt.3
| * | video_core: Resolve more variable shadowing scenarios pt.3Lioncash2020-12-0512-119/+119
| |/ | | | | | | | | 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-071-1/+1
|/ | | | | | | | | | | | | | | | 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.
* video_core: Resolve more variable shadowing scenarios pt.2Lioncash2020-12-0532-241/+249
| | | | | | | Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
* video_core: Resolve more variable shadowing scenariosLioncash2020-12-042-3/+3
| | | | | | 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.
* vk_shader_decompiler: Implement force early fragment testsReinUsesLisp2020-11-265-10/+13
| | | | | | | | 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.
* Merge pull request #4976 from comex/poll-eventsRodrigo Locatti2020-11-261-3/+1
|\ | | | | 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-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* General: Resolve a few missing initializer warningsLioncash2020-10-302-2/+9
| | | | Resolves a few -Wmissing-initializer warnings.
* video_core: Enforce -Wredundant-move and -Wpessimizing-moveReinUsesLisp2020-10-281-1/+1
| | | | Silence three warnings and make them errors to avoid introducing more in the future.
* 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.
* | | 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.
* | 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.
* | | 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 #4674 from ReinUsesLisp/timeline-semaphoresbunnei2020-09-2437-799/+618
|\ \ | | | | | | 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-1937-799/+609
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | renderer_opengl: Remove emulated mailbox presentationReinUsesLisp2020-09-202-6/+0
|/ / | | | | | | | | Emulated mailbox presentation was causing performance issues on Nvidia's OpenGL driver. Remove it.
* | video_core: Enforce -Werror=switchReinUsesLisp2020-09-162-4/+36
| | | | | | | | This forces us to fix all -Wswitch warnings in video_core.
* | video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-0619-240/+221
| | | | | | | | | | | | | | | | | | 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.
* | 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 #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.
* | Merge pull request #4542 from ReinUsesLisp/gpu-init-basebunnei2020-08-252-3/+8
|\ \ | |/ |/| video_core: Initialize renderer with a GPU
| * video_core: Initialize renderer with a GPUReinUsesLisp2020-08-222-3/+8
| | | | | | | | | | Add an extra step in GPU initialization to be able to initialize render backends with a valid GPU instance.
* | Merge pull request #4546 from lioncash/telemetrybunnei2020-08-201-1/+1
|\ \ | | | | | | common/telemetry: Migrate namespace into the Common namespace
| * | common/telemetry: Migrate namespace into the Common namespaceLioncash2020-08-181-1/+1
| | | | | | | | | | | | | | | 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-182-8/+8
|\ \ | | | | | | common/fileutil: Convert namespace to Common::FS
| * | common/fileutil: Convert namespace to Common::FSLioncash2020-08-162-8/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove unneeded newlines, optional Registry in shader paramsameerj2020-08-163-6/+5
| | | | | | | | Addressing feedback from Rodrigo
* | move thread 1/4 count computation into allocate workers methodameerj2020-08-161-11/+1
| |
* | Address feedback, add shader compile notifier, update setting textameerj2020-08-166-93/+51
| |
* | Vk Async Worker directly emplace in cacheameerj2020-08-162-5/+16
| |
* | Address feedback. Bruteforce delete duplicatesameerj2020-08-165-19/+38
| |
* | Vk Async pipeline compilationameerj2020-08-1611-14/+98
|/
* General: Tidy up clang-format warnings part 2Lioncash2020-08-131-14/+14
|
* vulkan: Silence more -Wmissing-field-initializer warningsLioncash2020-08-036-3/+18
|
* vulkan: Resolve -Wmissing-field-initializer warningsLioncash2020-07-252-0/+4
|
* 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 #4394 from lioncash/unused6bunnei2020-07-242-4/+2
|\ \ | | | | | | video_core: Remove unused variables
| * | video_core: Remove unused variablesLioncash2020-07-212-4/+2
| |/ | | | | | | Silences several compiler warnings about unused variables.
* | Merge pull request #4359 from ReinUsesLisp/clamp-sharedRodrigo Locatti2020-07-212-3/+14
|\ \ | | | | | | renderer_{opengl,vulkan}: Clamp shared memory to host's limit
| * | renderer_{opengl,vulkan}: Clamp shared memory to host's limitReinUsesLisp2020-07-162-3/+14
| | | | | | | | | | | | | | | This stops shaders from failing to build when the exceed host's shared memory size limit. An error is logged.
* | | Merge pull request #4324 from ReinUsesLisp/formatsbunnei2020-07-214-88/+108
|\ \ \ | |_|/ |/| | video_core: Fix, add and rename pixel formats
| * | video_core: Rearrange pixel format namesReinUsesLisp2020-07-133-99/+99
| | | | | | | | | | | | | | | | | | 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-132-1/+4
| | |
| * | video_core: Fix B5G6R5_UNORM render target formatReinUsesLisp2020-07-131-0/+1
| | |
| * | video_core: Fix B5G6R5UReinUsesLisp2020-07-131-1/+1
| | |
| * | video_core: Implement RGBA32_SINT render targetReinUsesLisp2020-07-132-0/+2
| | |
| * | video_core: Implement RGBA32_SINT render targetReinUsesLisp2020-07-132-0/+2
| | |
| * | video_core: Implement RGBA16_SINT render targetReinUsesLisp2020-07-132-0/+2
| | |
| * | video_core: Implement RGBA8_SINT render targetReinUsesLisp2020-07-132-0/+2
| | |
| * | video_core: Implement RG32_SINT render targetReinUsesLisp2020-07-132-0/+2
| | |
| * | video_core: Implement RG8_SINT render target and fix RG8_UINTReinUsesLisp2020-07-132-0/+2
| | |
| * | video_core: Implement R8_SINT render targetReinUsesLisp2020-07-132-0/+2
| | |
| * | video_core: Implement R8_SNORM render targetReinUsesLisp2020-07-132-0/+2
| |/
* | 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.
* | | 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.
* / 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.
* 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-101-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 #4175 from ReinUsesLisp/read-bufferbunnei2020-07-032-6/+6
|\ \ | | | | | | 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-262-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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 #4191 from Morph1984/vertex-formatsRodrigo Locatti2020-06-301-75/+69
|\ \ \ | | | | | | | | maxwell_to_gl/vk: Reorder vertex formats
| * | | maxwell_to_vk: Reorder vertex formats and add A2B10G10R10 for all types except floatMorph2020-06-281-75/+69
| | |/ | |/|
* | | 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-271-0/+2
| |/ / |/| |
* | | 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.
* | | buffer_cache: Use buffer methods instead of cache virtual methodsReinUsesLisp2020-06-242-54/+58
| | |
* | | gl_buffer_cache: Mark buffers as residentReinUsesLisp2020-06-244-18/+29
| | | | | | | | | | | | | | | | | | Make stream buffer and cached buffers as resident and query their address. This allows us to use GPU addresses for several proprietary Nvidia extensions.
* | | 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 #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 #4099 from MerryMage/macOS-buildbunnei2020-06-202-2/+4
|\ \ \ | |/ / |/| | 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
| |/
* | 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.
* Merge pull request #4066 from ReinUsesLisp/shared-ptr-bufRodrigo Locatti2020-06-163-24/+16
|\ | | | | 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-093-24/+16
| | | | | | | | | | | | | | | | | | 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=).
* | Merge pull request #4049 from ReinUsesLisp/separate-samplersbunnei2020-06-131-0/+11
|\ \ | | | | | | shader/texture: Join separate image and sampler pairs offline
| * | shader/texture: Join separate image and sampler pairs offlineReinUsesLisp2020-06-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #3986 from ReinUsesLisp/shader-cachebunnei2020-06-135-60/+55
|\ \ \ | | | | | | | | shader_cache: Implement a generic runtime shader cache
| * | | rasterizer_cache: Remove files and includesReinUsesLisp2020-06-072-5/+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-074-55/+52
| | | | | | | | | | | | | | | | Trivial port the generic shader cache to Vulkan.
* | | | texture_cache: Implement rendering to 3D texturesReinUsesLisp2020-06-083-39/+79
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #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
* | | 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.
* | | maxwell_to_vk: Add R16UI image formatReinUsesLisp2020-06-022-71/+74
| |/ |/| | | | | - Used by Octopath Traveler
* | Merge pull request #3996 from ReinUsesLisp/front-facesbunnei2020-06-011-2/+1
|\ \ | | | | | | fixed_pipeline_state,gl_rasterizer: Swap negative viewport checks for front faces
| * | 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 #3982 from ReinUsesLisp/membar-ctsbunnei2020-05-301-3/+4
|\ \ \ \ | |_|_|/ |/| | | shader/other: Implement MEMBAR.CTS
| * | | shader/other: Implement MEMBAR.CTSReinUsesLisp2020-05-271-3/+4
| | | | | | | | | | | | | | | | | | | | This silences an assertion we were hitting and uses workgroup memory barriers when the game requests it.
* | | | Merge pull request #3991 from ReinUsesLisp/depth-samplingbunnei2020-05-291-16/+13
|\ \ \ \ | | | | | | | | | | texture_cache: Implement depth stencil texture swizzles
| * | | | texture_cache: Implement depth stencil texture swizzlesReinUsesLisp2020-05-261-16/+13
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 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 #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-261-0/+17
|\ \ \ \ | |_|/ / |/| | | shader/other: Implement BAR.SYNC 0x0
| * | | shader/other: Implement BAR.SYNC 0x0ReinUsesLisp2020-05-221-0/+17
| |/ / | | | | | | | | | | | | 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 #3978 from ReinUsesLisp/write-rzbunnei2020-05-261-3/+4
|\ \ \ | | | | | | | | shader_decompiler: Visit source nodes even when they assign to RZ
| * | | shader_decompiler: Visit source nodes even when they assign to RZReinUsesLisp2020-05-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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-242-4/+3
|\ \ \ | | | | | | | | Correct a series of crashes and intructions on Async GPU and Vulkan Pipeline
| * | | 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-101-2/+2
| | | |
* | | | Merge pull request #3979 from ReinUsesLisp/thread-groupbunnei2020-05-241-0/+23
|\ \ \ \ | | | | | | | | | | shader/other: Implement thread comparisons (NV_shader_thread_group)
| * | | | shader/other: Implement thread comparisons (NV_shader_thread_group)ReinUsesLisp2020-05-221-0/+23
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Use boost::intrusive::set for cachingReinUsesLisp2020-05-212-0/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | 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.
* | | 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-131-1/+26
|\ \ \ | |_|/ |/| | shader_ir: Add separate instructions for ordered and unordered comparisons and fix NE on GLSL
| * | shader_ir: Separate float-point comparisons in ordered and unorderedReinUsesLisp2020-05-091-1/+26
| | | | | | | | | | | | | | | 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-092-0/+2
|\ \ \ | | | | | | | | texture: Implement R8G8UI
| * | | texture: Implement R8G8UIMorph2020-04-302-0/+2
| | | | | | | | | | | | | | | | - 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-087-0/+83
|\ \ \ \ \ | |_|_|_|/ |/| | | | video_core: Implement viewport swizzles with NV_viewport_swizzle
| * | | | vk_graphics_pipeline: Implement viewport swizzles with NV_viewport_swizzleReinUsesLisp2020-05-047-0/+83
| | | | |
* | | | | 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 #3808 from ReinUsesLisp/wait-for-idlebunnei2020-05-035-3/+34
|\ \ \ \ | | | | | | | | | | {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
| * | | | {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registersReinUsesLisp2020-04-285-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0230-58/+3
|\ \ \ \ \ | | | | | | | | | | | | vulkan: Remove unnecessary includes
| * | | | | vulkan: Remove unnecessary includesLioncash2020-04-2930-58/+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-023-45/+44
|\ \ \ \ | |_|_|/ |/| | | shader/texture: Support multiple unknown sampler properties
| * | | shader_ir: Turn classes into data structuresReinUsesLisp2020-04-233-45/+44
| | | |
* | | | Merge pull request #3807 from ReinUsesLisp/fix-depth-clampbunnei2020-04-303-3/+3
|\ \ \ \ | | | | | | | | | | maxwell_3d: Fix depth clamping register
| * | | | maxwell_3d: Fix depth clamping registerReinUsesLisp2020-04-283-3/+3
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-301-0/+11
|\ \ \ \ | | | | | | | | | | shader: Implement P2R CC, IADD Rd.CC and IADD.X
| * | | | shader/arithmetic_integer: Implement CC for IADDReinUsesLisp2020-04-261-0/+11
| | | | |
* | | | | Merge pull request #3805 from ReinUsesLisp/preserve-contentsbunnei2020-04-301-2/+2
|\ \ \ \ \ | |_|_|_|/ |/| | | | texture_cache: Reintroduce preserve_contents accurately
| * | | | texture_cache: Reintroduce preserve_contents accuratelyReinUsesLisp2020-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #3784 from ReinUsesLisp/shader-memory-utilbunnei2020-04-282-63/+14
|\ \ \ \ \ | |_|_|/ / |/| | | | shader/memory_util: Deduplicate code
| * | | | shader/memory_util: Deduplicate codeReinUsesLisp2020-04-262-63/+14
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 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 #3753 from ReinUsesLisp/ac-vulkanRodrigo Locatti2020-04-263-7/+43
|\ \ \ \ | |_|_|/ |/| | | {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-221-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Fix -Werror=conversion error.Markus Wick2020-04-241-1/+1
| |_|/ |/| |
* | | Merge pull request #3677 from FernandoS27/better-syncbunnei2020-04-238-5/+290
|\ \ \ | | | | | | | | Introduce Predictive Flushing and Improve ASYNC GPU
| * | | Async GPU: Correct flushing behavior to be similar to old async GPU behavior.Fernando Sahmkow2020-04-221-0/+4
| | | |
| * | | ShaderCache/PipelineCache: Cache null shaders.Fernando Sahmkow2020-04-222-4/+15
| | | |
| * | | Address Feedback.Fernando Sahmkow2020-04-223-3/+3
| | | |
| * | | vk_fence_manager: Initial implementationReinUsesLisp2020-04-226-12/+219
| | | |
| * | | OpenGL: Guarantee writes to Buffers.Fernando Sahmkow2020-04-221-2/+0
| | | |
| * | | GPU: Implement Flush Requests for Async mode.Fernando Sahmkow2020-04-221-0/+4
| | | |
| * | | FenceManager: Manage syncpoints and rename fences to semaphores.Fernando Sahmkow2020-04-222-3/+16
| | | |
| * | | Rasterizer: Document SignalFence & ReleaseFences and setup skeletons on Vulkan.Fernando Sahmkow2020-04-222-0/+27
| | | |
| * | | ThreadManager: Sync async reads on accurate gpu.Fernando Sahmkow2020-04-222-0/+5
| | | |
| * | | BufferCache: Implement OnCPUWrite and SyncGuestHostFernando Sahmkow2020-04-221-2/+2
| | | |
| * | | GPU: Refactor synchronization on Async GPUFernando Sahmkow2020-04-222-0/+16
| | |/ | |/|
* | | 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-2211-74/+373
|\ \ \ | |/ / |/| | renderer_vulkan: Integrate Nvidia Nsight Aftermath on Windows
| * | renderer_vulkan: Integrate Nvidia Nsight Aftermath on WindowsReinUsesLisp2020-04-148-19/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #3718 from ReinUsesLisp/better-pipeline-stateRodrigo Locatti2020-04-215-478/+530
|\ \ \ | | | | | | | | 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-195-100/+84
| | |/ | |/| | | | | | | Reduce FixedPipelineState's size from 1384 to 664 bytes
* | | 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 #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)
* / / 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 #3600 from ReinUsesLisp/no-pointer-buf-cacheFernando Sahmkow2020-04-177-51/+42
|\ \ | | | | | | buffer_cache: Return handles instead of pointer to handles
| * | buffer_cache: Return handles instead of pointer to handlesReinUsesLisp2020-04-167-51/+42
| |/ | | | | | | | | | | | | | | | | | | | | 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.
* | video_core: Amend doxygen comment referencesLioncash2020-04-161-1/+1
| | | | | | | | Fixes broken documentation references.
* | Merge pull request #3612 from ReinUsesLisp/redFernando Sahmkow2020-04-151-25/+40
|\ \ | | | | | | shader/memory: Implement RED.E.ADD and minor changes to ATOM
| * | shader/memory: Implement RED.E.ADDReinUsesLisp2020-04-061-25/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | 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.
* | | | 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.
* | / vk_rasterizer: Default to 1 viewports with a size of 0ReinUsesLisp2020-04-141-3/+6
| |/ |/| | | | | Silence validation layer errors.
* | Merge pull request #3636 from ReinUsesLisp/drop-vk-hppRodrigo Locatti2020-04-1350-2271/+2881
|\ \ | | | | | | renderer_vulkan: Drop Vulkan-Hpp
| * | renderer_vulkan: Drop Vulkan-HppReinUsesLisp2020-04-1150-2271/+2881
| | |
* | | texture_cache: Remove preserve_contentsReinUsesLisp2020-04-111-2/+2
|/ / | | | | | | | | | | | | 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 #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
| | |
* | | VkRasterizer: Eliminate Legacy code.Fernando Sahmkow2020-04-091-1/+0
| | |
* | | Memory: Address Feedback.Fernando Sahmkow2020-04-081-2/+2
| | |
* | | Shader/Pipeline Cache: Use VAddr instead of physical memory for addressing.Fernando Sahmkow2020-04-063-26/+22
| | |
* | | Query Cache: Use VAddr instead of physical memory for adressing.Fernando Sahmkow2020-04-061-2/+2
| | |
* | | Buffer Cache: Use vAddr instead of physical memory.Fernando Sahmkow2020-04-063-8/+8
| | |
* | | Texture Cache: Use vAddr instead of physical memory for caching.Fernando Sahmkow2020-04-061-4/+3
| | |
* | | GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddrFernando Sahmkow2020-04-062-13/+21
|/ /
* | Merge pull request #3513 from ReinUsesLisp/native-astcFernando Sahmkow2020-04-062-33/+46
|\ \ | | | | | | video_core: Use native ASTC when available
| * | vk_device: Add missing ASTC queriesReinUsesLisp2020-04-011-14/+29
| | |
| * | video_core: Use native ASTC when availableReinUsesLisp2020-04-012-19/+17
| | |
* | | Merge pull request #3592 from ReinUsesLisp/ipaFernando Sahmkow2020-04-061-10/+7
|\ \ \ | |_|/ |/| | shader_decompiler: Remove FragCoord.w hack and change IPA implementation
| * | shader_decompiler: Remove FragCoord.w hack and change IPA implementationReinUsesLisp2020-04-021-10/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #3552 from jroweboy/single-contextRodrigo Locatti2020-04-022-2/+3
|\ \ | |/ |/| Refactor Context management (Fixes renderdoc on opengl issues)
| * Frontend/GPU: Refactor context managementJames Rowe2020-03-252-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #3506 from namkazt/patch-9Rodrigo Locatti2020-03-311-6/+25
|\ \ \ | |/ / |/| | shader_decode: Implement partial ATOM/ATOMS instr
| * | vk_decompiler: add atomic op and handler function.Nguyen Dac Nam2020-03-301-6/+25
| | |
* | | Merge pull request #3566 from ReinUsesLisp/vk-wrapper-part1Rodrigo Locatti2020-03-312-0/+887
|\ \ \ | |/ / |/| | 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-272-0/+90
| | |
| * | renderer_vulkan/wrapper: Add Vulakn wrapper and a span helperReinUsesLisp2020-03-271-0/+83
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / maxwell_to_vk: implement signedscaled vertex formatsDan2020-03-271-0/+20
|/
* 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
|
* Merge pull request #3510 from FernandoS27/dirty-writeMat M2020-03-171-2/+0
|\ | | | | DirtyFlags: relax need to set render_targets as dirty
| * DirtyFlags: relax need to set render_targets as dirty Fernando Sahmkow2020-03-141-2/+0
| | | | | | | | | | The texture cache already takes care of setting a render target to dirty when invalidated.
* | 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 #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-162-0/+2
|\ \ \ | | | | | | | | video_core: Implement RGBA16_SNORM
| * | | video_core: Implement RGBA16_SNORMReinUsesLisp2020-03-132-0/+2
| | | | | | | | | | | | | | | | Implement RGBA16_SNORM with the current API. Nothing special here.
* | | | 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
| | |_|/ | |/| |
* | | | vk_shader_decompiler: fix linux buildmakigumo2020-03-151-1/+1
| |_|/ |/| |
* | | vk/gl_shader_decompiler: Silence assertion on computeReinUsesLisp2020-03-131-3/+6
| | |
* | | vk_shader_decompiler: Fix default varying regressionReinUsesLisp2020-03-131-2/+6
| | |
* | | 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
| | |
* | | vk_shader_decompiler: Use registry for specializationReinUsesLisp2020-03-134-31/+37
| | |
* | | Merge branch 'master' into shader-purgeRodrigo Locatti2020-03-132-2/+10
|\| |
| * | 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
| | | |
* | | | video_core: Rename "const buffer locker" to "registry"ReinUsesLisp2020-03-092-4/+4
|/ / /
* | | Merge pull request #3301 from ReinUsesLisp/state-trackerRodrigo Locatti2020-03-0914-118/+270
|\ \ \ | |_|/ |/| | video_core: Remove gl_state and use a state tracker based on dirty flags
| * | dirty_flags: Deduplicate code between OpenGL and VulkanReinUsesLisp2020-02-281-39/+2
| | |
| * | vk_rasterizer: Pass Maxwell registers to dynamic updatesReinUsesLisp2020-02-282-26/+21
| | |
| * | state_tracker: Remove type traits with named structuresReinUsesLisp2020-02-282-10/+12
| | |
| * | 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-289-52/+196
| | | | | | | | | | | | Add support for render targets and viewports.
| * | maxwell_3d: Flatten cull and front face registersReinUsesLisp2020-02-284-21/+20
| | |
| * | gl_rasterizer: Remove dirty flagsReinUsesLisp2020-02-282-32/+1
| | |
* | | 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-056-54/+99
|\ \ \ | | | | | | | | 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).
* | | | Merge pull request #3455 from ReinUsesLisp/attr-scaledbunnei2020-03-042-4/+16
|\ \ \ \ | |_|_|/ |/| | | video_core: Implement more scaled attribute formats
| * | | video_core: Implement more scaler attribute formatsReinUsesLisp2020-02-242-4/+16
| |/ / | | | | | | | | | | | | While changing this, fix assert in vk_shader_decompiler. We now know scaled formats are expected to be float in shaders attributes.
* | / frontend: qt: bootmanager: Vulkan: Restore support for VK backend.bunnei2020-02-262-9/+14
| |/ |/|
* | Merge pull request #3417 from ReinUsesLisp/r32ibunnei2020-02-252-0/+2
|\ \ | | | | | | texture: Implement R32I
| * | texture: Implement R32IReinUsesLisp2020-02-152-0/+2
| | |
* | | Merge pull request #3425 from ReinUsesLisp/layered-framebufferbunnei2020-02-243-10/+21
|\ \ \ | |_|/ |/| | texture_cache: Implement layered framebuffer attachments
| * | texture_cache: Implement layered framebuffer attachmentsReinUsesLisp2020-02-163-10/+21
| |/ | | | | | | | | | | 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 #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 #3414 from ReinUsesLisp/maxwell-3d-drawbunnei2020-02-192-14/+1
|\ \ | | | | | | maxwell_3d: Unify draw methods
| * | maxwell_3d: Unify draw methodsReinUsesLisp2020-02-142-14/+1
| |/ | | | | | | | | Pass instanced state of a draw invocation as an argument instead of having two separate virtual methods.
* | 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.
* / vk_query_cache: Implement generic query cache on VulkanReinUsesLisp2020-02-147-3/+283
|/
* vk_rasterizer: Use noexcept variants of std::bitsetReinUsesLisp2020-02-041-4/+5
| | | | Removes bounds checking from "texceptions" instances.
* Merge pull request #3337 from ReinUsesLisp/vulkan-stagedbunnei2020-02-032-2/+269
|\ | | | | yuzu: Implement Vulkan frontend
| * yuzu: Implement Vulkan frontendReinUsesLisp2020-01-291-0/+265
| | | | | | | | | | 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
| |
* | Merge pull request #3282 from FernandoS27/indexed-samplersbunnei2020-02-021-0/+19
|\ \ | | | | | | Partially implement Indexed samplers in general and specific code in GLSL
| * | Shader_IR: Address feedback.Fernando Sahmkow2020-01-251-2/+3
| | |
| * | Shader_IR: Correct Custom Variable assignment.Fernando Sahmkow2020-01-241-0/+2
| | |
| * | Shader_IR: Implement Injectable Custom Variables to the IR.Fernando Sahmkow2020-01-241-0/+16
| | |
* | | shader/memory: Implement ATOM.ADDReinUsesLisp2020-01-261-33/+33
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | 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.
* | 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 #3330 from ReinUsesLisp/vk-blit-screenFernando Sahmkow2020-01-214-6/+752
|\ | | | | vk_blit_screen: Initial implementation
| * vk_blit_screen: Address feedbackReinUsesLisp2020-01-204-22/+25
| |
| * vk_blit_screen: Initial implementationReinUsesLisp2020-01-202-0/+743
| | | | | | | | | | 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-201-2/+1
|\ \ \ | |_|/ |/| | vk_graphics_pipeline: Set front facing properly
| * | vk_graphics_pipeline: Set front facing properlyReinUsesLisp2020-01-181-2/+1
| | | | | | | | | | | | | | | | | | 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-203-1/+1464
|\ \ \ | |_|/ |/| | vk_rasterizer: Implement Vulkan's rasterizer
| * | vk_rasterizer: Address feedbackReinUsesLisp2020-01-182-25/+32
| | |
| * | vk_rasterizer: Implement Vulkan's rasterizerReinUsesLisp2020-01-172-1/+1385
| | | | | | | | | | | | | | | | | | 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-171-0/+72
| |/
* | Merge pull request #3312 from ReinUsesLisp/atoms-u32bunnei2020-01-181-0/+7
|\ \ | |/ |/| shader/memory: Implement ATOMS.ADD.U32
| * shader/memory: Implement ATOMS.ADD.U32ReinUsesLisp2020-01-161-0/+7
| |
* | Merge pull request #3300 from ReinUsesLisp/vk-texture-cachebunnei2020-01-173-0/+715
|\ \ | |/ |/| 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-143-0/+729
| | | | | | | | | | It currently ignores PBO linearizations since these should be dropped as soon as possible on OpenGL.
* | 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-082-0/+414
| | | | | | | | | | | | | | | | | | | | | | 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-082-0/+51
|/
* 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-073-0/+393
| | | | | | | | | 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-073-0/+217
| | | | This abstraction represents a Vulkan compute pipeline.
* vk_pipeline_cache: Add file and define descriptor update template fillerReinUsesLisp2020-01-072-0/+65
| | | | | 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-071-0/+13
|
* Merge pull request #3276 from ReinUsesLisp/pipeline-reqsbunnei2020-01-064-0/+340
|\ | | | | vk_update_descriptor/vk_renderpass_cache: Add pipeline cache dependencies
| * vk_renderpass_cache: Initial implementationReinUsesLisp2020-01-062-0/+197
| | | | | | | | | | 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-062-0/+143
| | | | | | | | | | | | | | | | | | 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 #3264 from ReinUsesLisp/vk-descriptor-poolFernando Sahmkow2020-01-052-0/+145
|\ | | | | 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-012-0/+145
| | | | | | | | | | | | | | | | | | | | 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-041-0/+8
|\ \ | |/ |/| Shader_IR: add the ability to amend code in the shader ir.
| * Shader_IR: Address FeedbackFernando Sahmkow2020-01-041-14/+4
| |
| * Shader_IR: add the ability to amend code in the shader ir.Fernando Sahmkow2019-12-301-0/+18
| | | | | | | | | | | | | | 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.
* | Merge pull request #3248 from ReinUsesLisp/vk-imageFernando Sahmkow2019-12-302-0/+190
|\ \ | | | | | | 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-252-0/+190
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | 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-252-0/+210
|/ | | | | | | 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.
* 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-232-0/+526
| | | | | | | | | | | | | 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.
* 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 #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.
* | | 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 #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.
* | 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
|/
* shader: Implement MEMBAR.GLReinUsesLisp2019-12-101-0/+14
| | | | Implement using memoryBarrier in GLSL and OpMemoryBarrier on SPIR-V.
* 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-101-0/+1
|
* 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.
* 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.
* 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.
* Merge pull request #3109 from FernandoS27/new-instrbunnei2019-12-071-0/+8
|\ | | | | Implement FLO & TXD Instructions on GPU Shaders
| * Shader_IR: Implement TXD instruction.Fernando Sahmkow2019-11-141-0/+6
| |
| * Shader_IR: Implement FLO instruction.Fernando Sahmkow2019-11-141-0/+2
| |
* | core/memory: Migrate over GetPointer()Lioncash2019-11-271-3/+3
| | | | | | | | | | 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-272-2/+9
| | | | | | | | | | | | | | | | | | | | 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.
* | video_core: Unify ProgramType and ShaderStage into ShaderTypeReinUsesLisp2019-11-234-22/+25
| |
* | texture_cache: Drop abstracted ComponentTypeReinUsesLisp2019-11-142-74/+71
|/ | | | | | | | | 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.
* shader_ir/warp: Implement FSWZADDReinUsesLisp2019-11-081-0/+6
|
* gl_shader_decompiler: Reimplement shuffles with platform agnostic intrinsicsReinUsesLisp2019-11-081-40/+3
|
* Shader_IR: Implement Fast BRX and allow multi-branches in the CFG.Fernando Sahmkow2019-10-251-0/+7
|
* Merge pull request #2983 from lioncash/fallthroughFernando Sahmkow2019-10-221-0/+3
|\ | | | | 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.
* | 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.
* Shader_Ir: Address Feedback and clang format.Fernando Sahmkow2019-10-051-25/+18
|
* 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-051-7/+5
|
* vk_shader_compiler: Don't enclose branches with if(true) to avoid crashing AMDFernando Sahmkow2019-10-051-16/+33
|
* vk_shader_compiler: Correct SPIR-V AST DecompilingFernando Sahmkow2019-10-051-4/+11
|
* Shader_IR: allow else derivation to be optional.Fernando Sahmkow2019-10-051-2/+4
|
* vk_shader_compiler: Implement the decompiler in SPIR-VFernando Sahmkow2019-10-051-22/+276
|
* Merge pull request #2869 from ReinUsesLisp/suldbunnei2019-09-241-10/+5
|\ | | | | shader/image: Implement SULD and fix SUATOM
| * gl_shader_decompiler: Use uint for images and fix SUATOMReinUsesLisp2019-09-211-12/+0
| | | | | | | | | | | | 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-211-0/+7
| | | | | | | | | | * Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array.
* | video_core: Implement RGBX16F PixelFormatFearlessTobi2019-09-221-0/+1
|/
* shader_ir/warp: Implement SHFLReinUsesLisp2019-09-171-0/+50
|
* 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-111-0/+42
|/
* shader_ir: Implement VOTEReinUsesLisp2019-08-211-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Shader_Ir: Implement F16 Variants of F2F, F2I, I2F.Fernando Sahmkow2019-07-201-0/+18
| | | | | This commit takes care of implementing the F16 Variants of the conversion instructions and makes sure conversions are done.
* shader/half_set_predicate: Fix HSETP2 implementationReinUsesLisp2019-07-201-13/+4
|
* Merge pull request #2695 from ReinUsesLisp/layer-viewportFernando Sahmkow2019-07-151-8/+6
|\ | | | | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders
| * gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shadersReinUsesLisp2019-07-081-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 #2609 from FernandoS27/new-scanbunnei2019-07-111-0/+9
|\ \ | | | | | | Implement a New Shader Scanner, Decompile Flow Stack and implement BRX BRA.CC
| * | shader_ir: Implement BRX & BRA.CCFernando Sahmkow2019-07-091-0/+9
| |/
* | 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.
* | 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-071-2/+2
|/
* shader: Decode SUST and implement backing image functionalityReinUsesLisp2019-06-211-0/+7
|
* Merge pull request #2538 from ReinUsesLisp/ssy-pbkZach Hilman2019-06-161-12/+37
|\ | | | | shader: Split SSY and PBK stack
| * shader: Split SSY and PBK stackReinUsesLisp2019-06-071-12/+37
| | | | | | | | | | | | | | | | | | | | | | 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 #2514 from ReinUsesLisp/opengl-compatZach Hilman2019-06-071-1/+1
|\ \ | |/ |/| video_core: Drop OpenGL core in favor of OpenGL compatibility
| * maxwell_to_gl: Use GL_CLAMP to emulate Clamp wrap modeReinUsesLisp2019-05-301-1/+1
| |
* | shader: Use shared_ptr to store nodes and move initialization to fileReinUsesLisp2019-06-061-25/+25
| | | | | | | | | | | | | | | | | | 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.
* | shader: Implement S2R Tid{XYZ} and CtaId{XYZ}ReinUsesLisp2019-05-201-0/+18
|/
* Merge pull request #2441 from ReinUsesLisp/al2pbunnei2019-05-191-4/+3
|\ | | | | shader: Implement AL2P and ALD.PHYS
| * shader: Remove unused AbufNode Ipa modeReinUsesLisp2019-05-031-4/+3
| |
* | Merge pull request #2461 from lioncash/unused-varMat M2019-05-141-1/+0
|\ \ | | | | | | video_core: Remove a few unused variables and functions
| * | renderer_vulkan/vk_shader_decompiler: Remove unused variable from DeclareInternalFlags()Lioncash2019-05-101-1/+0
| |/
* | Merge pull request #2413 from FernandoS27/opt-gpuRodrigo Locatti2019-05-141-3/+4
|\ \ | |/ |/| Rasterizer Cache: refactor flushing & optimize memory usage of surfaces
| * Rasterizer Cache: Use a temporal storage for Surfaces loading/flushing.Fernando Sahmkow2019-04-211-1/+0
| | | | | | | | | | 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-201-2/+4
| | | | | | | | | | | | 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 #2322 from ReinUsesLisp/wswitchbunnei2019-04-291-4/+6
|\ \ | | | | | | video_core: Silent -Wswitch warnings
| * | video_core: Silent -Wswitch warningsReinUsesLisp2019-04-181-4/+6
| | |
* | | Merge pull request #2409 from ReinUsesLisp/half-floatsbunnei2019-04-201-5/+20
|\ \ \ | |_|/ |/| | 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-161-5/+7
| | | | | | | | | | | | | | | | | | | | | 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.
| * | shader_ir/decode: Implement half float saturationReinUsesLisp2019-04-161-0/+6
| |/
* | Merge pull request #2318 from ReinUsesLisp/sampler-cachebunnei2019-04-182-58/+18
|\ \ | | | | | | gl_sampler_cache: Port sampler cache to OpenGL
| * | video_core: Abstract vk_sampler_cache into a templated classReinUsesLisp2019-04-022-58/+18
| | |
* | | shader_ir: Implement STG, keep track of global memory usage and flushReinUsesLisp2019-04-141-6/+8
| |/ |/|
* | 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-102-0/+125
| |
* | video_core/engines: Remove unnecessary inclusions where applicableLioncash2019-04-061-0/+1
| | | | | | | | | | | | 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 #2302 from ReinUsesLisp/vk-swapchainbunnei2019-04-032-0/+302
|\ \ | |/ |/| vk_swapchain: Implement a swapchain manager
| * vk_swapchain: Implement a swapchain managerReinUsesLisp2019-03-292-0/+302
| |
* | Merge pull request #2297 from lioncash/reorderbunnei2019-03-311-2/+2
|\ \ | |/ |/| video_core: Amend constructor initializer list order where applicable
| * video_core: Amend constructor initializer list order where applicableLioncash2019-03-271-2/+2
| | | | | | | | | | | | | | Specifies the members in the same order that initialization would take place in. This also silences -Wreorder warnings.
* | video_core: Add missing override specifiersLioncash2019-03-272-2/+2
|/ | | | | | Ensures that the signatures will always match with the base class. Also silences a few compilation warnings.
* gpu: Move GPUVAddr definition to common_types.bunnei2019-03-212-4/+2
|
* gpu: Use host address for caching instead of guest address.bunnei2019-03-152-17/+41
|
* 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-132-0/+137
|
* Merge pull request #2191 from ReinUsesLisp/maxwell-to-vkbunnei2019-03-083-3/+551
|\ | | | | maxwell_to_vk: Initial implementation
| * maxwell_to_vk: Initial implementationReinUsesLisp2019-03-043-3/+551
| |
* | video_core/engines: Remove unnecessary includesLioncash2019-03-061-1/+1
|/ | | | | | | | | 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.
* vk_buffer_cache: Fix clang-formatReinUsesLisp2019-03-021-3/+3
|
* vk_buffer_cache: Implement a buffer cacheReinUsesLisp2019-03-012-0/+203
| | | | | 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-284-7/+169
|\ | | | | 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-242-0/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| |
* | 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.
* Merge pull request #2146 from ReinUsesLisp/vulkan-schedulerbunnei2019-02-242-0/+129
|\ | | | | vk_scheduler: Implement a scheduler
| * vk_scheduler: Implement a schedulerReinUsesLisp2019-02-222-0/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | 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.
* vk_memory_manager: Implement memory managerReinUsesLisp2019-02-192-0/+340
| | | | | A memory manager object handles the memory allocations for a device. It allocates chunks of Vulkan memory objects and then suballocates.
* 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-142-0/+40
| | | | | VKResource is an interface that gets signaled by a fence when it is free to be reused.
* vk_device: Abstract device handling into a classReinUsesLisp2019-02-132-0/+347
| | | | | | | 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-121-0/+45
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).