Shader packs for material shaders and variants #26
No assignees
Labels
No labels
area/build
area/content
area/editor
area/engine
area/graphics
area/platform
area/repo-wide
area/tests
area/tools
bug
optional
roadmap
size/L
size/M
size/S
No project
No milestone
Blocks
Depends on
#27 Shader hot reload
UnflavoredMeson/Primal_Plus_Plus
#32 Vulkan content, uploads and descriptors
UnflavoredMeson/Primal_Plus_Plus
#25 Single sources for shader constants, bindings and layouts
UnflavoredMeson/Primal_Plus_Plus
Reference
No Branch/Tag specified
Notifications
1 participant
Due date
No due date set.
Reference
UnflavoredMeson/Primal_Plus_Plus#26
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Material shaders come in variants (vertex formats, features) and both backends need their own byte code. A pack compiled at build time holds them all, so assets don't carry one backend's byte code only (the fork's editor stored DXIL only and Vulkan couldn't run its materials).
Decided
*.shaders) lists groups (stage, file, entry point) and variants (key +-Ddefines).PrimalShaderCompiler --pack <manifest> <pack>compiles it at build time with the same up-to-date check.primal.shader_pack(Engine/Content/ShaderPack.ixx);content::add_shader_pack(blob, size, platform, groups).content::shader_variant_key()(vertex shaders: the elements type; other stages:u32_invalid_id).-Zi(source + lines for RenderDoc, not-fspv-debug=vulkan*, which crashes DXC 1.10); DXIL PDBs go tox64/Debug/shaders/d3d12/pdb/.Read first
UnflavoredMeson/Primal#17(items 5-7) andUnflavoredMeson/Primal#35.EngineTest/TestShader.hlslonmaster.Steps
--packto the compiler and EngineTest's manifest to both builds.Done when
Claude can help with
Learn