summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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 #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).