summaryrefslogtreecommitdiff
path: root/src/video_core/shader (follow)
Commit message (Collapse)AuthorAgeFilesLines
* shader: Remove old shader managementGravatar ReinUsesLisp2021-07-2251-10654/+0
|
* Review 1Gravatar Kelebek12021-02-151-1/+1
|
* Implement texture offset support for TexelFetch and TextureGather and add ↵Gravatar Kelebek12021-02-152-2/+10
| | | | | | offsets for Tlds Formatting
* yuzu: Various frontend improvements to avoid crashes and improve experience ↵Gravatar bunnei2021-02-141-0/+1
| | | | on Linux.
* video_core: Reimplement the buffer cacheGravatar ReinUsesLisp2021-02-133-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Revert "Start of Integer flags implementation"Gravatar ReinUsesLisp2021-01-253-59/+3
| | | | | This reverts #4713. The implementation in that PR is not accurate. It does not reflect the behavior seen in hardware.
* video_core: Silence -Wmissing-field-initializers warningsGravatar ReinUsesLisp2021-01-241-0/+18
|
* shader_ir: Fix comment typoGravatar Levi Behunin2021-01-231-1/+1
|
* Merge remote-tracking branch 'upstream/master' into int-flagsGravatar Levi2021-01-1025-354/+354
|\
| * renderer_vulkan: Move device abstraction to vulkan_commonGravatar ReinUsesLisp2021-01-041-1/+1
| |
| * renderer_vulkan: Rename VKDevice to DeviceGravatar ReinUsesLisp2021-01-032-3/+3
| | | | | | | | | | | | | | 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.
| * half_set: Resolve -Wmaybe-uninitialized warningsGravatar Lioncash2020-12-301-7/+7
| |
| * video_core: Rewrite the texture cacheGravatar ReinUsesLisp2020-12-307-69/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Merge pull request #5164 from lioncash/containsGravatar Rodrigo Locatti2020-12-072-7/+7
| |\ | | | | | | video_core: Make use of ordered container contains() where applicable
| | * video_core: Make use of ordered container contains() where applicableGravatar Lioncash2020-12-072-7/+7
| | | | | | | | | | | | | | | | | | With C++20, we can use the more concise contains() member function instead of comparing the result of the find() call with the end iterator.
| * | ast: Improve string concat readability in operator()Gravatar Lioncash2020-12-071-5/+4
| |/ | | | | | | Provides an in-place format string to make it more pleasant to read.
| * Merge pull request #5159 from lioncash/move-amendGravatar Rodrigo Locatti2020-12-071-2/+2
| |\ | | | | | | shader_ir: std::move node within DeclareAmend()
| | * shader_ir: std::move node within DeclareAmend()Gravatar Lioncash2020-12-071-2/+2
| | | | | | | | | | | | | | | Same behavior, but elides an unnecessary atomic reference count increment and decrement.
| * | video_core: Remove unnecessary enum class casting in logging messagesGravatar Lioncash2020-12-0711-54/+44
| |/ | | | | | | | | | | | | 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.3Gravatar Lioncash2020-12-0512-48/+55
| | | | | | | | | | Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
| * video_core: Resolve more variable shadowing scenarios pt.2Gravatar Lioncash2020-12-053-13/+13
| | | | | | | | | | | | | | Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
| * node: Mark member functions as [[nodiscard]] where applicableGravatar Lioncash2020-12-031-29/+29
| | | | | | | | Prevents logic bugs from accidentally ignoring the return value.
| * node: Eliminate variable shadowingGravatar Lioncash2020-12-031-47/+49
| |
| * Merge pull request #3681 from lioncash/componentGravatar Rodrigo Locatti2020-11-241-2/+2
| |\ | | | | | | decoder/image: Fix incorrect G24R8 component sizes in GetComponentSize()
| | * decode/image: Fix typo in assert in GetComponentSize()Gravatar Lioncash2020-04-151-3/+3
| | |
| | * decoder/image: Fix incorrect G24R8 component sizes in GetComponentSize()Gravatar Lioncash2020-04-151-2/+2
| | | | | | | | | | | | The components' sizes were mismatched. This corrects that.
| * | async_shaders: emplace threads into the worker thread vectorGravatar Lioncash2020-11-201-2/+2
| | | | | | | | | | | | | | | Same behavior, but constructs the threads in place instead of moving them.
| * | async_shaders: Simplify implementation of GetCompletedWork()Gravatar Lioncash2020-11-201-2/+1
| | | | | | | | | | | | | | | This is equivalent to moving all the contents and then clearing the vector. This avoids a redundant allocation.
| * | async_shaders: Simplify moving data into the pending queueGravatar Lioncash2020-11-201-13/+8
| | |
| * | async_shaders: std::move data within QueueVulkanShader()Gravatar Lioncash2020-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | Same behavior, but avoids redundant copies. While we're at it, we can simplify the pushing of the parameters into the pending queue.
| * | Merge pull request #4854 from ReinUsesLisp/cube-array-shadowGravatar bunnei2020-11-051-1/+0
| |\ \ | | | | | | | | shader: Partially implement texture cube array shadow
| | * | shader: Partially implement texture cube array shadowGravatar ReinUsesLisp2020-10-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements texture cube arrays with shadow comparisons but doesn't fix the asserts related to it. Fixes out of bounds reads on swizzle constructors and makes them use bounds checked ::at instead of the unsafe operator[].
| * | | Merge pull request #4865 from ameerj/async-threadcountGravatar bunnei2020-11-011-8/+9
| |\ \ \ | | | | | | | | | | async_shaders: Increase Async worker thread count for >8 thread cpus
| | * | | async_shaders: Increase Async worker thread count for 8+ thread cpusGravatar ameerj2020-10-291-8/+9
| | |/ / | | | | | | | | | | | | Adds 1 async worker thread for every 2 available threads above 8
| * / / shader/arithmetic: Implement FCMP immediate + register variantGravatar ReinUsesLisp2020-10-281-1/+2
| |/ / | | | | | | | | | Trivially add the encoding for this.
| * | shader/texture: Implement CUBE texture type for TMML and fix arraysGravatar ReinUsesLisp2020-10-071-19/+22
| | | | | | | | | | | | | | | | | | | | | | | | TMML takes an array argument that has no known meaning, this one appears as the first component in gpr8 followed by s, t and r. Skip this component when arrays are being used. Also implement CUBE texture types. - Used by Pikmin 3: Deluxe Demo.
| * | Merge pull request #4703 from lioncash/desig7Gravatar bunnei2020-09-262-26/+26
| |\ \ | | | | | | | | shader/registry: Make use of designated initializers where applicable
| | * | shader/registry: Silence a -Wshadow warningGravatar Lioncash2020-09-232-5/+5
| | | |
| | * | shader/registry: Remove unnecessary namespace qualifiersGravatar Lioncash2020-09-231-5/+3
| | | | | | | | | | | | | | | | Using statements already make these unnecessary.
| | * | shader/registry: Make use of designated initializers where applicableGravatar Lioncash2020-09-231-17/+19
| | | | | | | | | | | | | | | | Same behavior, less repetition.
| * | | Merge pull request #4711 from lioncash/move5Gravatar bunnei2020-09-241-16/+19
| |\ \ \ | | | | | | | | | | arithmetic_integer_immediate: Make use of std::move where applicable
| | * | | arithmetic_integer_immediate: Make use of std::move where applicableGravatar Lioncash2020-09-241-16/+19
| | |/ / | | | | | | | | | | | | | | | | Same behavior, minus any redundant atomic reference count increments and decrements.
* | | | More forgetting... duhGravatar Levi Behunin2020-09-241-2/+2
| | | |
* | | | Forgot to apply suggestion here as wellGravatar Levi Behunin2020-09-241-1/+1
| | | |
* | | | Address CommentsGravatar Levi Behunin2020-09-243-25/+34
| | | |
* | | | Start of Integer flags implementationGravatar Levi Behunin2020-09-243-3/+50
|/ / /
* | | Merge pull request #4674 from ReinUsesLisp/timeline-semaphoresGravatar bunnei2020-09-231-0/+11
|\ \ \ | | | | | | | | renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore
| * | | renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreGravatar ReinUsesLisp2020-09-191-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reworks how host<->device synchronization works on the Vulkan backend. Instead of "protecting" resources with a fence and signalling these as free when the fence is known to be signalled by the host GPU, use timeline semaphores. Vulkan timeline semaphores allow use to work on a subset of D3D12 fences. As far as we are concerned, timeline semaphores are a value set by the host or the device that can be waited by either of them. Taking advantange of this, we can have a monolithically increasing atomic value for each submission to the graphics queue. Instead of protecting resources with a fence, we simply store the current logical tick (the atomic value stored in CPU memory). When we want to know if a resource is free, it can be compared to the current GPU tick. This greatly simplifies resource management code and the free status of resources should have less false negatives. To workaround bugs in validation layers, when these are attached there's a thread waiting for timeline semaphores.
* | | | control_flow: emplace elements in place within TryQuery()Gravatar Lioncash2020-09-221-6/+6
| | | | | | | | | | | | | | | | | | | | Places data structures where they'll eventually be moved to to avoid needing to even move them in the first place.
* | | | control_flow: Make use of std::move in InsertBranch()Gravatar Lioncash2020-09-221-7/+8
| |/ / |/| | | | | | | | Avoids unnecessary atomic increments and decrements.