3
0
Fork 0
forked from suyu/suyu
suyu/src/video_core
ReinUsesLisp d62f57cf5a fixed_pipeline_state: Hash and compare the whole structure
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-18 19:57:26 -03:00
..
buffer_cache buffer_cache: Return handles instead of pointer to handles 2020-04-16 02:33:34 -03:00
engines fixed_pipeline_state: Pack attribute state 2020-04-18 19:21:19 -03:00
renderer_opengl Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL" 2020-04-17 17:41:48 -03:00
renderer_vulkan fixed_pipeline_state: Hash and compare the whole structure 2020-04-18 19:57:26 -03:00
shader Merge pull request #3673 from lioncash/extra 2020-04-16 21:12:33 -04:00
texture_cache Merge pull request #3673 from lioncash/extra 2020-04-16 21:12:33 -04:00
textures Merge pull request #3631 from ReinUsesLisp/more-astc 2020-04-13 10:17:32 -04:00
CMakeLists.txt renderer_vulkan: Drop Vulkan-Hpp 2020-04-10 22:49:02 -03:00
dirty_flags.cpp DirtyFlags: relax need to set render_targets as dirty 2020-03-14 11:47:33 -04:00
dirty_flags.h DirtyFlags: relax need to set render_targets as dirty 2020-03-14 11:47:33 -04:00
dma_pusher.cpp video_core: Reintroduce dirty flags infrastructure 2020-02-28 17:56:41 -03:00
dma_pusher.h
gpu.cpp Frontend/GPU: Refactor context management 2020-03-24 21:03:42 -06:00
gpu.h GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
gpu_asynch.cpp CMakeLists: Make -Wreorder a compile-time error 2020-04-15 14:14:41 -04:00
gpu_asynch.h GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
gpu_synch.cpp GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
gpu_synch.h GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
gpu_thread.cpp GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
gpu_thread.h GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
guest_driver.cpp gl_shader_cache: Rework shader cache and remove post-specializations 2020-03-09 18:40:06 -03:00
guest_driver.h gl_shader_cache: Rework shader cache and remove post-specializations 2020-03-09 18:40:06 -03:00
macro_interpreter.cpp apply replay logic to all writes. remove replay from MacroInterpreter::Send (@fincs) 2020-03-22 22:25:44 +07:00
macro_interpreter.h video_core/macro_interpreter: Make definitions of most private enums/unions hidden 2019-10-17 17:55:46 -04:00
memory_manager.cpp video_core: memory_manager: Updates for Common::PageTable changes. 2020-04-17 00:59:34 -04:00
memory_manager.h video_core: memory_manager: Updates for Common::PageTable changes. 2020-04-17 00:59:34 -04:00
morton.cpp video_core: Implement RGBA16_SNORM 2020-03-12 21:42:33 -03:00
morton.h renderer_opengl: Use block linear swizzling for CPU framebuffers 2019-08-21 02:17:14 -03:00
query_cache.h Clang Format. 2020-04-06 09:23:08 -04:00
rasterizer_accelerated.cpp core: memory: Move to Core::Memory namespace. 2020-04-17 00:59:28 -04:00
rasterizer_accelerated.h core: memory: Move to Core::Memory namespace. 2020-04-17 00:59:28 -04:00
rasterizer_cache.cpp
rasterizer_cache.h Shader/Pipeline Cache: Use VAddr instead of physical memory for addressing. 2020-04-06 09:23:07 -04:00
rasterizer_interface.h GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
renderer_base.cpp
renderer_base.h Frontend/GPU: Refactor context management 2020-03-24 21:03:42 -06:00
sampler_cache.cpp
sampler_cache.h
surface.cpp video_core: Implement RGBA16_SNORM 2020-03-12 21:42:33 -03:00
surface.h video_core: Use native ASTC when available 2020-04-01 01:14:04 -03:00
video_core.cpp Address review and fix broken yuzu-tester build 2020-03-25 23:32:42 -06:00
video_core.h Frontend/GPU: Refactor context management 2020-03-24 21:03:42 -06:00