Commit Graph

2918 Commits

Author SHA1 Message Date
Zephyron fc88c06769 feat(renderer): Enhance shader compilation and pipeline caching
This update further improves shader management and pipeline handling:

- Add advanced heuristics for smarter async shader compilation in both OpenGL
  and Vulkan renderers, with better detection of UI and critical shaders
- Implement thread pool for prioritized shader compilation with proper progress
  tracking and reporting
- Add predictive shader loading system to preload related shaders based on
  pipeline transitions
- Implement pipeline deduplication through Clone() method to reduce memory
  usage and improve performance
- Add memory optimizations for shader translation and SPIR-V generation
- Enhance error handling and logging for shader operations
- Introduce batch loading and directory-based shader preloading capabilities

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-01 20:59:03 +10:00
Zephyron edfb500ee7 build: fix linux compilation
- Removes unnecessary \ from Copyright Line Causing Linux Builds To Fail

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-03-28 14:54:54 +10:00
Zephyron 1fd5fefcb1 WIP: Enhance shader compilation performance and control
This commit adds new settings and optimizations for shader compilation:

- Add new settings:
  - use_enhanced_shader_building: Enable enhanced shader compilation
  - shader_compilation_priority: Control shader compilation priority

- Improve shader compilation performance:
  - Optimize worker thread allocation based on CPU cores
  - Add smarter async shader compilation heuristics
  - Prioritize vertex and fragment shader compilation
  - Add performance tracking and logging

- Add performance monitoring:
  - Track shader compilation times
  - Log slow shader compilations
  - Monitor async shader compilation statistics

This is a work in progress commit. Further optimizations and refinements
will be needed based on testing and feedback.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-03-27 20:56:23 +10:00
Zephyron 9ae0eeeb87 Revert incorrect copyright attribution for non-contributed files
- In commit b3facaa6bb, the copyright header was
  updated to include "Citron Homebrew Project" across multiple files, regardless
  of whether any contributions were made.

- This commit removes the incorrect attribution and reverts the copyright header
  to its previous state.

- Copyright attribution should only be added when meaningful contributions have
  been made to the file.

- This commit ensures proper compliance with copyright standards and maintains
  correct attribution to the respective contributors.

- Special thanks to Tachi for pointing out the need for these corrections and
  ensuring that proper attribution practices are followed.
2025-01-14 15:33:24 +10:00
Zephyron 468ace6b0b
core: Update copyright headers
- Update copyright headers to include Citron Homebrew Project
- Add 2025 to copyright years
2024-12-31 17:36:08 +10:00
Zephyron b3facaa6bb
chore: update project references and add Citron copyright
- Replaced all references to the old project name with Citron.
- Added Citron copyright information alongside existing notices in all files.
2024-12-31 17:07:49 +10:00
liamwhite b2e129eaa5
vk_rasterizer: flip scissor y on lower left origin mode (#13122) 2024-02-27 15:40:33 +01:00
Liam a0e254e7c4 renderer_opengl: declare geometry stream support in profile 2024-02-26 11:18:30 -05:00
FearlessTobi 310c1f50be scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
2024-02-19 16:00:46 +01:00
Liam 78aac6b403 gpu: dependency-inject scaling/antialiasing filter state for capture layers 2024-02-09 09:20:53 -05:00
Liam 0cb413c3d3 nvnflinger/gpu: implement applet capture 2024-02-09 09:20:53 -05:00
Liam 962c82540c nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
Liam 0cbb555e9a video_core: defensively program around unmapped device pointers 2024-02-09 09:20:53 -05:00
Fernando Sahmkow 0d5a3abeae Buffer Cache: Refactor to use Range sets instead 2024-02-05 11:06:52 +01:00
Fernando Sahmkow 4841dc0b74 VideoCore: Move Slot Vector to Common 2024-02-04 20:01:47 +01:00
Liam a595e9e8a7 nvnflinger/gpu: implement layer stack composition 2024-01-31 11:27:21 -05:00
Liam 10cf058518 renderer_opengl: implement layer stack composition 2024-01-31 11:27:21 -05:00
Liam d4de04584f renderer_opengl: split up blit screen resources into antialias and window adapt passes 2024-01-31 11:27:21 -05:00
Liam dd2918efd8 renderer_opengl: move out ownership of FSR resources 2024-01-31 11:27:21 -05:00
Liam b78900e956 renderer_opengl: move out FSR shader source construction 2024-01-31 11:27:20 -05:00
Liam 60ee29aac3 renderer_opengl: split out FXAA 2024-01-31 11:27:20 -05:00
Liam b90eff4bc6 renderer_opengl: split out SMAA 2024-01-31 11:27:20 -05:00
Liam 2b1dd3bef5 renderer_opengl: isolate core presentation code 2024-01-31 11:27:20 -05:00
Liam 453091f611 video_core: consistently account for resolution scaling when rendering 2024-01-31 11:27:20 -05:00
Liam 80de01a5b4 video_core: simplify accelerated surface fetch and crop handling between APIs 2024-01-31 11:27:20 -05:00
Fernando Sahmkow 23430e6772 Core: Eliminate core/memory dependancies. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 590d9b7e1d Core: Clang format and other small issues. 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 34a8d0cc8e SMMU: Implement physical memory mirroring 2024-01-18 21:12:30 -05:00
Fernando Sahmkow 0a2536a0df SMMU: Initial adaptation to video_core. 2024-01-18 21:12:30 -05:00
liamwhite 92a331af76
Merge pull request #12437 from ameerj/gl-amd-fixes
OpenGL: Fixes and workaround updates for AMD
2024-01-04 15:53:44 -05:00
liamwhite ad049f13aa
Merge pull request #12415 from ameerj/ogl-draw-auto
gl_rasterizer: Implement DrawTransformFeedback macro
2023-12-26 11:45:25 -05:00
liamwhite 91290b9be4
Merge pull request #12412 from ameerj/gl-query-prims
OpenGL: Add GL_PRIMITIVES_GENERATED and GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN queries
2023-12-22 11:42:05 -05:00
Liam 9e9aed41be shader_recompiler: use float image operations on load/store when required 2023-12-21 14:34:46 -05:00
Ameer J b4b301d22e gl_device: Remove AMD blacklists that are no longer applicable 2023-12-20 18:19:15 -05:00
Fernando S 9e5b4052ed
Merge pull request #12403 from liamwhite/clipdistance
shader_recompiler: use minimal clip distance array
2023-12-20 18:45:20 +01:00
Ameer J 61e8c5f798 gl_rasterizer: Less spammy log for unimplemented resets 2023-12-20 11:51:44 -05:00
Ameer J bbc0ed118d gl_rasterizer: Implement DrawTransformFeedback macro 2023-12-19 19:54:57 -05:00
Ameer J db8a601cf8 OpenGL: Add GL_PRIMITIVES_GENERATED and GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN queries 2023-12-19 17:32:31 -05:00
Ameer J 1bb76201e6 gl_rasterizer: Silence spammy logs 2023-12-19 17:13:23 -05:00
Ameer J 372bca5945 gl_buffer_cache: Reintroduce NV_vertex_buffer_unified_memory
Workaround Nvidia drivers complaining when a buffer is bound as both a vertex buffer and transform feedback buffer
2023-12-19 17:13:23 -05:00
Liam 94244437de shader_recompiler: ignore clip distances beyond driver support level 2023-12-18 22:25:14 -05:00
Ameer J 2b0cf73bf0 gl_buffer_cache: Fix tfb binding typo 2023-12-16 12:48:21 -05:00
Liam f05cb69d4f renderer_opengl: remove srgb conversion logic 2023-12-03 17:08:25 -05:00
Liam 382cf087a0 renderer_vulkan: do not recreate swapchain for srgb 2023-12-03 16:43:54 -05:00
liamwhite 5fb1a83e4c
Merge pull request #12094 from ameerj/gl-buffer-cache-batch-vtx
gl_buffer_cache: Batch vertex/tfb buffer binding
2023-12-03 16:27:22 -05:00
liamwhite 1c21d6c2c2
Merge pull request #12056 from ameerj/opengl-neglect
OpenGL: Implement async downloads in buffer and texture caches
2023-12-01 09:16:56 -05:00
liamwhite df49795bcb
Merge pull request #12154 from liamwhite/more-drivers
vulkan_device: add names for more driverID enumeration values
2023-11-29 12:33:34 -05:00
Ameer J 1d11fe00a3
Merge branch 'master' into ssbo-align 2023-11-26 21:08:53 -05:00
Fernando S f21340f7aa
Merge pull request #11535 from GPUCode/upload_cmdbuf
renderer_vulkan: Introduce separate cmd buffer for uploads
2023-11-26 18:33:05 +01:00
Liam dee792937f vulkan_device: add names for more driverID enumeration values 2023-11-24 12:00:41 -05:00