Skip to content

SDSL rewrite#3134

Open
xen2 wants to merge 1092 commits intostride3d:masterfrom
xen2:sdsl-rewrite
Open

SDSL rewrite#3134
xen2 wants to merge 1092 commits intostride3d:masterfrom
xen2:sdsl-rewrite

Conversation

@xen2
Copy link
Copy Markdown
Member

@xen2 xen2 commented Apr 14, 2026

PR Details

WIP (created as non-draft for CI testing)

Related Issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

xen2 added 30 commits February 16, 2026 10:23
…6c00fd9'

git-subtree-dir: sources/shaders
git-subtree-mainline: 74399a3
git-subtree-split: ea933b4
…e. input[2] * 0.5f (typically used in tessellation stage)
xen2 added 21 commits April 9, 2026 12:01
- Replace legacy Stride.props imports with Stride.Build.Sdk imports
- Replace $(StrideSdkTargets) with explicit SDK path
- Migrate Stride.Shaders.Tests to Stride.Build.Sdk.Tests
- Restore Stride.Graphics.targets (removed OpenGL, Android defaults to Vulkan)
The serializer was previously generated as a side-effect of the now-removed
PermutationParameterKey<object[]> GenericArguments key. Also remove
OpenGL references from TesselationTest (OpenGL removed in sdsl-rewrite).
Samplers declared without explicit parameters (e.g. "stage SamplerState Sampler;")
are dynamic and should be settable at runtime via Parameters.Set(). Previously
the SDSL compiler emitted a SamplerStateSDSL decoration with default values
(Linear/Clamp), making the sampler immutable and ignoring runtime overrides.
When a generic shader (e.g. LightSpotGroup<N>) is instantiated, the
SpirvContext is copied and ProcessNameAndTypes creates fresh StructType
objects. These are content-identical but reference-different from the
original, causing SpirvContext.Types dictionary lookups to fail.

Three changes:
- Add value equality (Equals/GetHashCode) to StructType, comparing by
  Name + SequenceEqual(Members), matching the FunctionType pattern
- Add IShaderImporter.ResolveStructType to resolve OpImportStructSDSL
  placeholders to real struct types (with members) from the owning
  shader's cached buffer
- Redirect ApplicationCache to build path during asset compilation so
  shader caches are per-project, not global to the compiler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants