feat(render): shader ABI v2 - AtmosphericFrame gains clock/wind blocks; caster pass binds it (Campaign VM VM6a)
AtmosphericFrame (set 3/binding 5) grows additively from 160 to 192 bytes: two appended vec4 members, uAtmosphereClockWind and uAtmosphereWindAmplitude, carry the foliage-wind clock/weather and amplitude inputs VM6b's shader displacement will read. RenderPackShaderAbi renames the old constant to AtmosphericFrameSizeBytesV1 (160), adds AtmosphericFrameSizeBytesV2 (192), keeps AtmosphericFrameSizeBytes pointing at the current (v2) size, and adds ShaderAbiVersion = 2. RenderPackSpirvValidator.ValidateAtmosphericFrame accepts either the v1 (seven-member, 160-byte) or v2 (nine-member, 192-byte) shape and rejects anything else naming both — this is why the frozen external sample packs under samples/*/Shaders/*.spv, whose GLSL sources are not in this tree, need no rebuild: a v1 shader bound to the 192-byte buffer still reads correctly, since a bound range only needs to be >= the block's own declared size. DirectionalSunShadowRenderer's caster pass now binds AtmosphericFrame too (both the multiview and per-cascade sites), through a new AtmosphericFrameBufferBinding the graph owns and supplies via DirectionalSunShadowRenderInput. AtmosphericPostProcessGraph.RenderDirectionalShadows builds its own 192-byte ring allocation for this, separate from the world receiver's frame block, because the caster pass runs before RenderPostProcess constructs that block within the same frame. The four world caster pipeline variants (opaque/cutout, base/multiview) are now allowed to declare binding 5 in the validator; terrain casters are untouched. This commit is plumbing only: the two new members are always written but never read by any shader yet (zero placeholders), so pack-on and pack-off output are both pixel-identical to before. VM6b wires the real weather-driven values and the shader-side displacement. App hermetic filter: 5972/5974 (2 pre-existing failures unrelated to this change, confirmed against the unmodified baseline). Core.Tests hermetic: 4697/4697. RenderPackValidator.Tests: 30/30. VulkanShaderManifestTests (retail oracle set): 7/7, byte-identical. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
a0157693ec
commit
0930c35d1d
17 changed files with 340 additions and 32 deletions
|
|
@ -7,11 +7,18 @@ namespace AcDream.RenderPackValidator.Tests;
|
|||
public sealed class RenderPackValidatorCommandTests
|
||||
{
|
||||
[Fact]
|
||||
public void PublicShaderAbiConstantsDescribeV1()
|
||||
public void PublicShaderAbiConstantsDescribeTheCurrentAbi()
|
||||
{
|
||||
Assert.Equal(3, RenderPackShaderAbi.UniformDescriptorSet);
|
||||
Assert.Equal(5, RenderPackShaderAbi.AtmosphericFrameBinding);
|
||||
Assert.Equal(160, RenderPackShaderAbi.AtmosphericFrameSizeBytes);
|
||||
// Campaign VM VM6: the host always allocates/binds the current (v2)
|
||||
// size; a v1-shaped shader — e.g. the frozen external sample packs
|
||||
// this project validates — still reads correctly against it (a bound
|
||||
// range only needs to be >= the block's own declared size).
|
||||
Assert.Equal(160, RenderPackShaderAbi.AtmosphericFrameSizeBytesV1);
|
||||
Assert.Equal(192, RenderPackShaderAbi.AtmosphericFrameSizeBytesV2);
|
||||
Assert.Equal(192, RenderPackShaderAbi.AtmosphericFrameSizeBytes);
|
||||
Assert.Equal(2, RenderPackShaderAbi.ShaderAbiVersion);
|
||||
Assert.Equal(6, RenderPackShaderAbi.DirectionalShadowBinding);
|
||||
Assert.Equal(336, RenderPackShaderAbi.DirectionalShadowSizeBytes);
|
||||
Assert.Equal(7, RenderPackShaderAbi.PackPassBinding);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue