aboutsummaryrefslogtreecommitdiff
path: root/src/video_core
AgeCommit message (Collapse)Author
2020-04-18fixed_pipeline_state: Hash and compare the whole structureReinUsesLisp
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.
2020-04-18fixed_pipeline_state: Pack blending stateReinUsesLisp
Reduce FixedPipelineState's size to 364 bytes.
2020-04-18fixed_pipeline_state: Pack rasterizer stateReinUsesLisp
Reduce FixedPipelineState's size to 600 bytes.
2020-04-18fixed_pipeline_state: Pack depth stencil stateReinUsesLisp
Reduce FixedPipelineState's size to 632 bytes.
2020-04-18fixed_pipeline_state: Pack attribute stateReinUsesLisp
Reduce FixedPipelineState's size from 1384 to 664 bytes
2020-04-18Merge pull request #3716 from bunnei/fix-another-impl-fallthroughMat M
video_core: gl_shader_decompiler: Fix implicit fallthrough errors.
2020-04-18video_core: gl_shader_decompiler: Fix implicit fallthrough errors.bunnei
2020-04-17gl_shader_decompiler: Avoid copies where applicableLioncash
Avoids unnecessary reference count increments where applicable and also avoids reallocating a vector. Unlikely to make a huge difference, but given how trivial of an amendment it is, why not?
2020-04-17video_code: Fix implicit switch fallthrough.Markus Wick
Since yesterday, this breaks the build on linux. So let's fix it.
2020-04-17vk_stream_buffer: Fix out of memory on boot on recent Nvidia driversReinUsesLisp
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
2020-04-17Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL"Rodrigo Locatti
2020-04-17Merge pull request #3666 from bunnei/new-vmmbunnei
Implement a new virtual memory manager
2020-04-17Merge pull request #3682 from lioncash/uambunnei
gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator
2020-04-17video_core: memory_manager: Updates for Common::PageTable changes.bunnei
2020-04-17core: memory: Move to Core::Memory namespace.bunnei
- helpful to disambiguate Kernel::Memory namespace.
2020-04-16General: Resolve warnings related to missing declarationsLioncash
2020-04-16decode/memory: Resolve unused variable warningLioncash
Only the first element of the returned pair is ever used.
2020-04-16decode/texture: Resolve unused variable warnings.Lioncash
Some variables aren't used, so we can remove these. Unfortunately, diagnostics are still reported on structured bindings even when annotated with [[maybe_unused]], so we need to unpack the elements that we want to use manually.
2020-04-16decode/texture: Collapse loop down into std::generateLioncash
Same behavior, less code.
2020-04-16decode/texture: Eliminate trivial missing field initializer warningsLioncash
We can just specify the initializers.
2020-04-16Merge pull request #3673 from lioncash/extrabunnei
CMakeLists: Specify -Wextra on linux builds
2020-04-16maxwell_3d: Initialize format attributes constant as oneReinUsesLisp
nouveau expects this to be true but it doesn't set it.
2020-04-16vk_compute_pass: Implement indexed quadsReinUsesLisp
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)
2020-04-16Merge pull request #3600 from ReinUsesLisp/no-pointer-buf-cacheFernando Sahmkow
buffer_cache: Return handles instead of pointer to handles
2020-04-16buffer_cache: Return handles instead of pointer to handlesReinUsesLisp
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.
2020-04-16Merge pull request #3689 from lioncash/unused-varRodrigo Locatti
decode/shift: Remove unused variable within Shift()
2020-04-16Merge pull request #3688 from lioncash/nequalRodrigo Locatti
surface_view: Add missing operator!= to ViewParams
2020-04-16Merge pull request #3680 from lioncash/staticRodrigo Locatti
gl_device: Mark stage_swizzle as constexpr
2020-04-16Merge pull request #3687 from lioncash/constnessRodrigo Locatti
surface_base: Make IsInside() a const member function
2020-04-16Merge pull request #3685 from lioncash/copiesRodrigo Locatti
control_flow: Make use of std::move in TryInspectAddress()
2020-04-16decode/shift: Remove unused variable within Shift()Lioncash
Removes a redundant variable that is already satisfied by the IsFull() utility function.
2020-04-16surface_view: Add missing operator!= to ViewParamsLioncash
Provides logical symmetry to the interface.
2020-04-15surface_base: Make IsInside() a const member functionLioncash
This doesn't modify internal state, so this can be made const.
2020-04-15Merge pull request #3683 from lioncash/docsbunnei
video_core: Amend doxygen comment references
2020-04-15texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indicesLioncash
Previously these were all using the red component to derive the indices, which is definitely not intentional.
2020-04-15control_flow: Make use of std::move in TryInspectAddress()Lioncash
Eliminates redundant atomic reference count increments and decrements.
2020-04-15video_core: Amend doxygen comment referencesLioncash
Fixes broken documentation references.
2020-04-15decode/image: Fix typo in assert in GetComponentSize()Lioncash
2020-04-15gl_query_cache: Resolve use-after-move in CachedQuery move assignment operatorLioncash
Avoids potential invalid junk data from being read.
2020-04-15decoder/image: Fix incorrect G24R8 component sizes in GetComponentSize()Lioncash
The components' sizes were mismatched. This corrects that.
2020-04-15gl_device: Mark stage_swizzle as constexprLioncash
Previously this was mutable even though it shouldn't be.
2020-04-15track: Eliminate redundant copiesLioncash
Two variables can be references, while two others can be std::moved. Makes for 4 less atomic reference count increments and decrements.
2020-04-15CMakeLists: Specify -Wextra on linux buildsLioncash
Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
2020-04-15Merge pull request #3649 from FernandoS27/3d-fixRodrigo Locatti
Texture Cache: Read current data when flushing a 3D segment.
2020-04-15Merge pull request #3612 from ReinUsesLisp/redFernando Sahmkow
shader/memory: Implement RED.E.ADD and minor changes to ATOM
2020-04-15CMakeLists: Make -Wreorder a compile-time errorLioncash
This can result in silent logic bugs within code, and given the amount of times these kind of warnings are caused, they should be flagged at compile-time so no new code is submitted with them.
2020-04-15Merge pull request #3662 from ReinUsesLisp/constant-attrsMat M
gl_rasterizer: Implement constant vertex attributes
2020-04-15Texture Cache: Read current data when flushing a 3D segment.Fernando Sahmkow
This PR corrects flushing of 3D segments when data of other segments is mixed, this aims to preserve the data in place.
2020-04-15Merge pull request #3668 from ReinUsesLisp/vtx-format-16uiMat M
maxwell_to_vk: Add uint16 vertex formats
2020-04-15Merge pull request #3656 from ReinUsesLisp/glsl-full-decompileMat M
gl_shader_cache: Use CompileDepth::FullDecompile on GLSL