1
0
Fork 0
forked from suyu/suyu
suyu/src/video_core
ReinUsesLisp 420cc13248 renderer_opengl: Add assembly program code paths
Add code required to use OpenGL assembly programs based on
NV_gpu_program5. Decompilation for ARB programs is intended to be added
in a follow up commit. This does **not** include ARB decompilation and
it's not in an usable state.

The intention behind assembly programs is to reduce shader stutter
significantly on drivers supporting NV_gpu_program5 (and other required
extensions). Currently only Nvidia's proprietary driver supports these
extensions.

Add a UI option hidden for now to avoid people enabling this option
accidentally.

This code path has some limitations that OpenGL compatibility doesn't
have:
- NV_shader_storage_buffer_object is limited to 16 entries for a single
OpenGL context state (I don't know if this is an intended limitation, an
specification issue or I am missing something). Currently causes issues
on The Legend of Zelda: Link's Awakening.
- NV_parameter_buffer_object can't bind buffers using an offset
different to zero. The used workaround is to copy to a temporary buffer
(this doesn't happen often so it's not an issue).

On the other hand, it has the following advantages:
- Shaders build a lot faster.
- We have control over how floating point rounding is done over
individual instructions (SPIR-V on Vulkan can't do this).
- Operations on shared memory can be unsigned and signed.
- Transform feedbacks are dynamic state (not yet implemented).
- Parameter buffers (uniform buffers) are per stage, matching NVN and
hardware's behavior.
- The API to bind and create assembly programs makes sense, unlike
ARB_separate_shader_objects.
2020-05-19 18:00:04 -03:00
..
buffer_cache Merge pull request #3808 from ReinUsesLisp/wait-for-idle 2020-05-03 02:43:18 -04:00
engines Merge pull request #3899 from ReinUsesLisp/float-comparisons 2020-05-13 09:51:14 -04:00
renderer_opengl renderer_opengl: Add assembly program code paths 2020-05-19 18:00:04 -03:00
renderer_vulkan vk_rasterizer: Match OpenGL's FlushAndInvalidate behavior 2020-05-15 20:40:08 -03:00
shader shader_ir: Separate float-point comparisons in ordered and unordered 2020-05-09 04:55:15 -03:00
texture_cache Merge pull request #3839 from Morph1984/r8g8ui 2020-05-09 05:28:55 -03:00
textures Clang Format and Documentation. 2020-04-28 14:02:51 -04:00
CMakeLists.txt Merge pull request #3815 from FernandoS27/command-list-2 2020-05-05 17:12:42 -04: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 DmaPusher: Remove dead code in step 2020-05-16 12:42:27 +10:00
dma_pusher.h DmaPusher: Remove dead code in step 2020-05-16 12:42:27 +10:00
fence_manager.h fixed_pipeline_state: explicitly use template keyword after 1f345ebe3a 2020-05-01 23:38:23 +00:00
gpu.cpp Update src/video_core/gpu.cpp 2020-05-05 15:39:44 -04:00
gpu.h texture: Implement R8G8UI 2020-04-30 13:19:36 -04:00
gpu_asynch.cpp OpenGL: Implement Fencing backend. 2020-04-22 11:36:10 -04:00
gpu_asynch.h OpenGL: Implement Fencing backend. 2020-04-22 11:36:10 -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 Async GPU: Correct flushing behavior to be similar to old async GPU behavior. 2020-04-22 11:36:26 -04:00
gpu_thread.h GPU: Implement Flush Requests for Async mode. 2020-04-22 11:36:17 -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 VideoCore/Engines: Refactor Engines CallMethod. 2020-04-27 21:47:58 -04: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 kernel: memory: Improve implementation of device shared memory. (#3707) 2020-04-23 11:37:12 -04:00
memory_manager.h video_core: memory_manager: Updates for Common::PageTable changes. 2020-04-17 00:59:34 -04:00
morton.cpp texture: Implement R8G8UI 2020-04-30 13:19:36 -04:00
morton.h renderer_opengl: Use block linear swizzling for CPU framebuffers 2019-08-21 02:17:14 -03:00
query_cache.h Address Feedback. 2020-04-22 11:36:24 -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: Add missing virtual destructor to RasterizerCacheObject 2018-11-08 00:31:39 -05:00
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 {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers 2020-04-28 02:18:12 -03:00
renderer_base.cpp video_core/engines: Remove unnecessary includes 2019-03-05 20:35:32 -05:00
renderer_base.h Frontend/GPU: Refactor context management 2020-03-24 21:03:42 -06:00
sampler_cache.cpp video_core: Abstract vk_sampler_cache into a templated class 2019-04-02 15:54:11 -03:00
sampler_cache.h video_core: Abstract vk_sampler_cache into a templated class 2019-04-02 15:54:11 -03:00
surface.cpp texture: Implement R8G8UI 2020-04-30 13:19:36 -04:00
surface.h texture: Implement R8G8UI 2020-04-30 13:19:36 -04: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