mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 13:48:30 +09:00
[Feat] (MG_Backend/DirectGLES): support Flywheel indirect rendering
- Advertise ARB_gpu_shader5 / ARB_multi_bind / ARB_shading_language_420pack / ARB_vertex_attrib_binding / ARB_shader_image_size so LWJGL reports SUPPORTS_INDIRECT. - New LowerDrawParametersPass demotes DrawIndex/BaseInstance/BaseVertex builtins to Private globals (mg_DrawID/mg_BaseInstance/mg_BaseVertex) for the ESSL transpile; SPIRV-Cross otherwise throws for ES profiles. The program manager promotes the emitted globals to uniforms and feeds them per (sub-)draw. - Indirect draws now execute natively on the GPU (glDrawElementsIndirect / glDrawArraysIndirect per command) when an indirect buffer is bound, so compute-written command fields (Flywheel culling updates instanceCount) are honored; detects GL_EXT_base_instance and falls back to the CPU loop when the command's baseInstance cannot be consumed natively. - Sync SSBO binding points for graphics draws, not just compute (Flywheel vertex shaders read instance data from SSBOs). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -187,6 +187,7 @@ set(SOURCE_FILES
|
||||
MobileGL/MG_Util/ShaderTranspiler/SpirvPasses/EliminateFloatEqualsZeroPass.cpp
|
||||
MobileGL/MG_Util/ShaderTranspiler/SpirvPasses/RenameSamplerFunctionParameterPass.cpp
|
||||
MobileGL/MG_Util/ShaderTranspiler/SpirvPasses/DecomposeWorkgroupVec3Pass.cpp
|
||||
MobileGL/MG_Util/ShaderTranspiler/SpirvPasses/LowerDrawParametersPass.cpp
|
||||
|
||||
MobileGL/MG_Util/BackendLoaders/OpenGL/Loader.cpp
|
||||
MobileGL/MG_Util/BackendLoaders/Vulkan/Loader.cpp
|
||||
|
||||
Reference in New Issue
Block a user