summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* renderer_vulkan: Move device abstraction to vulkan_commonReinUsesLisp2021-01-041-1/+1
|
* renderer_vulkan: Rename VKDevice to DeviceReinUsesLisp2021-01-031-1/+1
| | | | | | | 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.
* vulkan_common: Rename renderer_vulkan/wrapper.h to vulkan_common/vulkan_wrapper.hReinUsesLisp2020-12-311-1/+1
| | | | Allows sharing Vulkan wrapper code between different rendering backends.
* video_core: Rewrite the texture cacheReinUsesLisp2020-12-301-13/+15
| | | | | | | | | | | | | | The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
* video_core: Remove unnecessary enum class casting in logging messagesLioncash2020-12-071-1/+1
| | | | | | | 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.
* video_core: Resolve more variable shadowing scenarios pt.3Lioncash2020-12-051-10/+9
| | | | | Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
* vk_shader_decompiler: Implement force early fragment testsReinUsesLisp2020-11-261-0/+1
| | | | | | | | 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.
* Refactor MaxwellToSpirvComparison. Use Common::BitCastameerj2020-11-251-2/+2
| | | | Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
* Address PR feedback from Reinameerj2020-11-251-6/+4
|
* vulkan_renderer: Alpha Test Culling Implementationameerj2020-11-251-0/+8
| | | | Used by various textures in many titles, e.g. SSBU menu.
* vk_graphics_pipeline: Manage primitive topology as fixed stateReinUsesLisp2020-10-131-2/+1
| | | | | | | | | 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.
* video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-061-52/+40
| | | | | | | | | 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.
* Remove unneeded newlines, optional Registry in shader paramsameerj2020-08-161-1/+1
| | | | Addressing feedback from Rodrigo
* Address feedback, add shader compile notifier, update setting textameerj2020-08-161-12/+11
|
* Vk Async Worker directly emplace in cacheameerj2020-08-161-5/+13
|
* Address feedback. Bruteforce delete duplicatesameerj2020-08-161-7/+9
|
* Vk Async pipeline compilationameerj2020-08-161-4/+20
|
* vulkan: Silence more -Wmissing-field-initializer warningsLioncash2020-08-031-0/+5
|
* vk_pipeline_cache: Make use of designated initializers where applicableLioncash2020-07-171-31/+35
|
* vk_pipeline_cache: Avoid hashing and comparing dynamic state when possibleReinUsesLisp2020-06-271-3/+4
| | | | | | 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-271-3/+3
|
* fixed_pipeline_state: Add requirements for VK_EXT_extended_dynamic_stateReinUsesLisp2020-06-271-1/+1
| | | | | | | 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.
* Merge pull request #3986 from ReinUsesLisp/shader-cachebunnei2020-06-131-34/+38
|\ | | | | shader_cache: Implement a generic runtime shader cache
| * rasterizer_cache: Remove files and includesReinUsesLisp2020-06-071-4/+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-071-30/+35
| | | | | | | | Trivial port the generic shader cache to Vulkan.
* | vk_rasterizer: Implement storage texelsReinUsesLisp2020-06-021-6/+10
|/ | | | | | This is the equivalent of an image buffer on OpenGL. - Used by Octopath Traveler
* Merge pull request #3930 from ReinUsesLisp/animal-bordersbunnei2020-06-011-1/+3
|\ | | | | vk_rasterizer: Implement constant attributes
| * vk_rasterizer: Implement constant attributesReinUsesLisp2020-05-131-1/+3
| | | | | | | | | | | | | | | | | | | | 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
* | VkPipelineCache: Use a null shader on invalid address.Fernando Sahmkow2020-05-101-2/+1
|/
* Merge pull request #3732 from lioncash/headerbunnei2020-05-021-1/+0
|\ | | | | vulkan: Remove unnecessary includes
| * vulkan: Remove unnecessary includesLioncash2020-04-291-1/+0
| | | | | | | | | | | | | | 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 #3693 from ReinUsesLisp/clean-samplersbunnei2020-05-021-2/+2
|\ \ | |/ |/| shader/texture: Support multiple unknown sampler properties
| * shader_ir: Turn classes into data structuresReinUsesLisp2020-04-231-2/+2
| |
* | Merge pull request #3784 from ReinUsesLisp/shader-memory-utilbunnei2020-04-281-59/+10
|\ \ | | | | | | shader/memory_util: Deduplicate code
| * | shader/memory_util: Deduplicate codeReinUsesLisp2020-04-261-59/+10
| |/ | | | | | | | | | | | | | | 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.
* / vk_pipeline_cache: Unify pipeline cache keys into a single operationReinUsesLisp2020-04-231-0/+18
|/ | | | | This allows us to call Common::CityHash and std::memcmp only once for GraphicsPipelineCacheKey. While we are at it, do the same for compute.
* Merge pull request #3677 from FernandoS27/better-syncbunnei2020-04-231-4/+12
|\ | | | | Introduce Predictive Flushing and Improve ASYNC GPU
| * ShaderCache/PipelineCache: Cache null shaders.Fernando Sahmkow2020-04-221-4/+12
| |
* | 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.
* fixed_pipeline_state: Pack rasterizer stateReinUsesLisp2020-04-191-3/+3
| | | | Reduce FixedPipelineState's size to 600 bytes.
* fixed_pipeline_state: Pack attribute stateReinUsesLisp2020-04-191-1/+1
| | | | Reduce FixedPipelineState's size from 1384 to 664 bytes
* renderer_vulkan: Drop Vulkan-HppReinUsesLisp2020-04-111-36/+57
|
* Shader/Pipeline Cache: Use VAddr instead of physical memory for addressing.Fernando Sahmkow2020-04-061-18/+20
|
* vk_pipeline_cache: Remove unused variableReinUsesLisp2020-03-191-1/+0
|
* vk_rasterizer: Reimplement clears with vkCmdClearAttachmentsReinUsesLisp2020-03-151-2/+3
|
* vk_shader_decompiler: Use registry for specializationReinUsesLisp2020-03-131-10/+7
|
* video_core: Rename "const buffer locker" to "registry"ReinUsesLisp2020-03-091-2/+2
|
* Merge pull request #3301 from ReinUsesLisp/state-trackerRodrigo Locatti2020-03-091-5/+0
|\ | | | | video_core: Remove gl_state and use a state tracker based on dirty flags
| * gl_rasterizer: Remove dirty flagsReinUsesLisp2020-02-281-5/+0
| |
* | vk_shader_decompiler: Implement indexed texturesReinUsesLisp2020-02-241-35/+64
|/ | | | | | | 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).
* vk_shader_decompiler: Disable default values on unwritten render targetsReinUsesLisp2020-01-241-3/+0
| | | | | | | | | 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.
* vk_pipeline_cache: Initial implementationReinUsesLisp2020-01-071-0/+352
| | | | | Given a pipeline key, this cache returns a pipeline abstraction (for graphics or compute).
* vk_pipeline_cache: Add file and define descriptor update template fillerReinUsesLisp2020-01-071-0/+43
This function allows us to share code between compute and graphics pipelines compilation.