mirror of
https://github.com/libretro/parallel-gx1.git
synced 2026-11-11 23:42:40 -10:00
A generator can now build its stage through rslc's builder instead of writing GLSL for the backend to parse: AbstractGfx::CreateShaderFromBuild takes a build function, and each backend asks rslc for its own destination from the built stage - SPIR-V for Vulkan, DXBC at the device's feature level for D3D11 and D3D12, GLSL or GLSL ES at the context's version for OpenGL, MSL for Metal. VideoCommon/ShaderBuild carries the per-backend resource layout the shader headers' macros gave, and builds a stage in the worker's shader arena, again from the start where the arena has to grow. The framebuffer utility stages move first: the screen quad, texture copy, clear and EFB poke vertex stages, the passthrough geometry stages, and the texture copy, color and multisample resolve pixel stages. Each compiles to the same SPIR-V and DXBC words as its GLSL did; the text writers are gone. rslc prints OpenGL's GLSL without bindings, so the OpenGL backend binds blocks, samplers, attributes and outputs by name for every program.