summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-11-14texture_cache: Drop abstracted ComponentTypeReinUsesLisp2-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.
2019-11-08shader_ir/warp: Implement FSWZADDReinUsesLisp1-0/+6
2019-11-08gl_shader_decompiler: Reimplement shuffles with platform agnostic intrinsicsReinUsesLisp1-40/+3
2019-10-25Shader_IR: Implement Fast BRX and allow multi-branches in the CFG.Fernando Sahmkow1-0/+7
2019-10-18vk_shader_decompiler: Mark operator() function parameters as const referencesLioncash1-21/+23
These parameters aren't actually modified in any way, so they can be made const references.
2019-10-16vk_shader_decompiler: Resolve fallthrough within ExprDecompiler's ExprCondCode operator()Lioncash1-0/+3
This would previously result in NeverExecute and UnusedIndex being treated as regular predicates.
2019-10-05Shader_Ir: Address Feedback and clang format.Fernando Sahmkow1-25/+18
2019-10-05vk_shader_decompiler: Correct Branches inside conditionals.Fernando Sahmkow1-1/+11
2019-10-05vk_shader_decompiler: Clean code and be const correct.Fernando Sahmkow1-7/+5
2019-10-05vk_shader_compiler: Don't enclose branches with if(true) to avoid crashing AMDFernando Sahmkow1-16/+33
2019-10-05vk_shader_compiler: Correct SPIR-V AST DecompilingFernando Sahmkow1-4/+11
2019-10-05Shader_IR: allow else derivation to be optional.Fernando Sahmkow1-2/+4
2019-10-05vk_shader_compiler: Implement the decompiler in SPIR-VFernando Sahmkow1-22/+276
2019-09-22video_core: Implement RGBX16F PixelFormatFearlessTobi1-0/+1
2019-09-21gl_shader_decompiler: Use uint for images and fix SUATOMReinUsesLisp1-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.
2019-09-21shader/image: Implement SULD and remove irrelevant codeReinUsesLisp1-0/+7
* Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array.
2019-09-17shader_ir/warp: Implement SHFLReinUsesLisp1-0/+50
2019-09-13vk_device: Add miscellaneous features and minor style changesReinUsesLisp3-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
2019-09-11shader/image: Implement SUATOM and fix SUSTReinUsesLisp1-0/+42
2019-08-21shader_ir: Implement VOTEReinUsesLisp1-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.
2019-07-20Shader_Ir: Implement F16 Variants of F2F, F2I, I2F.Fernando Sahmkow1-0/+18
This commit takes care of implementing the F16 Variants of the conversion instructions and makes sure conversions are done.
2019-07-20shader/half_set_predicate: Fix HSETP2 implementationReinUsesLisp1-13/+4
2019-07-09shader_ir: Implement BRX & BRA.CCFernando Sahmkow1-0/+9
2019-07-08gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shadersReinUsesLisp1-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.
2019-07-07vk_sampler_cache: Remove unused includesLioncash1-3/+0
These are no longer used within this header, so they can be removed.
2019-07-07video_core: Add missing override specifiersLioncash1-2/+2
2019-07-07vk_scheduler: Drop execution context in favor of viewsReinUsesLisp6-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.
2019-06-21shader: Decode SUST and implement backing image functionalityReinUsesLisp1-0/+7
2019-06-07shader: Split SSY and PBK stackReinUsesLisp1-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;
2019-06-06shader: Use shared_ptr to store nodes and move initialization to fileReinUsesLisp1-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.
2019-05-30maxwell_to_gl: Use GL_CLAMP to emulate Clamp wrap modeReinUsesLisp1-1/+1
2019-05-26vk_device: Let formats array type be deducedReinUsesLisp1-33/+33
2019-05-26vk_shader_decompiler: Misc fixesReinUsesLisp2-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.
2019-05-26vk_device: Enable features when available and misc changesReinUsesLisp2-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.
2019-05-20shader: Implement S2R Tid{XYZ} and CtaId{XYZ}ReinUsesLisp1-0/+18
2019-05-10renderer_vulkan/vk_shader_decompiler: Remove unused variable from DeclareInternalFlags()Lioncash1-1/+0
2019-05-03shader: Remove unused AbufNode Ipa modeReinUsesLisp1-4/+3
2019-04-21Rasterizer Cache: Use a temporal storage for Surfaces loading/flushing.Fernando Sahmkow1-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.
2019-04-20RasterizerCache Redesign: Flush Fernando Sahmkow1-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.
2019-04-18video_core: Silent -Wswitch warningsReinUsesLisp1-4/+6
2019-04-16vk_shader_decompiler: Add missing operationsReinUsesLisp1-0/+7
2019-04-16shader_ir/decode: Fix half float pre-operations and remove MetaHalfArithmeticReinUsesLisp1-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.
2019-04-16shader_ir/decode: Implement half float saturationReinUsesLisp1-0/+6
2019-04-14shader_ir: Implement STG, keep track of global memory usage and flushReinUsesLisp1-6/+8
2019-04-10vk_shader_decompiler: Implement flow primitivesReinUsesLisp1-5/+82
2019-04-10vk_shader_decompiler: Implement most common texture primitivesReinUsesLisp1-8/+65
2019-04-10vk_shader_decompiler: Implement texture decompilation helper functionsReinUsesLisp1-0/+32
2019-04-10vk_shader_decompiler: Implement Assign and LogicalAssignReinUsesLisp1-2/+64
2019-04-10vk_shader_decompiler: Implement non-OperationCode visitsReinUsesLisp1-7/+129
2019-04-10vk_shader_decompiler: Implement OperationCode decompilation interfaceReinUsesLisp1-1/+411
2019-04-10vk_shader_decompiler: Implement VisitReinUsesLisp1-1/+50
2019-04-10vk_shader_decompiler: Implement labels tree and flowReinUsesLisp1-0/+71
2019-04-10vk_shader_decompiler: Implement declarationsReinUsesLisp1-3/+457
2019-04-10vk_shader_decompiler: Declare and stub interface for a SPIR-V decompilerReinUsesLisp2-0/+125
2019-04-06video_core/engines: Remove unnecessary inclusions where applicableLioncash1-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
2019-04-02video_core: Abstract vk_sampler_cache into a templated classReinUsesLisp2-58/+18
2019-03-29vk_swapchain: Implement a swapchain managerReinUsesLisp2-0/+302
2019-03-27video_core: Amend constructor initializer list order where applicableLioncash1-2/+2
Specifies the members in the same order that initialization would take place in. This also silences -Wreorder warnings.
2019-03-27video_core: Add missing override specifiersLioncash2-2/+2
Ensures that the signatures will always match with the base class. Also silences a few compilation warnings.
2019-03-21gpu: Move GPUVAddr definition to common_types.bunnei2-4/+2
2019-03-15gpu: Use host address for caching instead of guest address.bunnei2-17/+41
2019-03-13vk_sampler_cache: Use operator== instead of memcmpMat M1-1/+1
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
2019-03-13vk_sampler_cache: Implement a sampler cacheReinUsesLisp2-0/+137
2019-03-06video_core/engines: Remove unnecessary includesLioncash1-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.
2019-03-04maxwell_to_vk: Initial implementationReinUsesLisp3-3/+551
2019-03-02vk_buffer_cache: Fix clang-formatReinUsesLisp1-3/+3
2019-03-01vk_buffer_cache: Implement a buffer cacheReinUsesLisp2-0/+203
This buffer cache is just like OpenGL's buffer cache with some minor style changes. It uses VKStreamBuffer.
2019-02-27vk_memory_manager: Reorder constructor initializer list in terms of member declaration orderLioncash1-1/+1
Reorders members in the order that they would actually be initialized in. Silences a -Wreorder warning.
2019-02-26vk_stream_buffer: Remove copy code pathReinUsesLisp2-53/+18
2019-02-24vk_stream_buffer: Implement a stream bufferReinUsesLisp2-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.
2019-02-24vk_resource_manager: Minor VKFenceWatch changesReinUsesLisp2-7/+7
2019-02-24vk_memory_manager: Fixup commit interval allocationReinUsesLisp1-2/+1
VKMemoryCommitImpl was using as the end of its interval "begin + end". That ended up wasting memory.
2019-02-22vk_scheduler: Implement a schedulerReinUsesLisp2-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.
2019-02-19vk_memory_manager: Implement memory managerReinUsesLisp2-0/+340
A memory manager object handles the memory allocations for a device. It allocates chunks of Vulkan memory objects and then suballocates.
2019-02-14vk_resource_manager: Implement a command buffer pool with VKFencedPoolReinUsesLisp2-1/+59
2019-02-14vk_resource_manager: Add VKFencedPool interfaceReinUsesLisp2-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.
2019-02-14vk_resource_manager: Implement VKResourceManager and fence allocatorReinUsesLisp2-0/+85
CommitFence iterates a pool of fences until one is found. If all fences are being used at the same time, allocate more.
2019-02-14vk_resource_manager: Implement VKFenceWatchReinUsesLisp2-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.
2019-02-14vk_resource_manager: Implement VKFenceReinUsesLisp2-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.
2019-02-14vk_resource_manager: Add VKResource interfaceReinUsesLisp2-0/+40
VKResource is an interface that gets signaled by a fence when it is free to be reused.
2019-02-13vk_device: Abstract device handling into a classReinUsesLisp2-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).
2019-02-12renderer_vulkan: Add declarations fileReinUsesLisp1-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).