Class DirectX12ShaderCodeWrapper
- Namespace
- ShadowDusk.Core
- Assembly
- ShadowDusk.Core.dll
Wraps raw SM6 DXIL bytecode in the small header MonoGame 3.8.5's real DirectX12 writer
prepends before the per-shader ShaderCode field (see
plan/PHASE-54-appendix/dx12-dxil-container-research.md — read from MonoGame's own
source, not reverse-engineered). MonoGame's native DX12 Shader_Create looks for the
magic marker as the first 4 bytes and, if present, consumes the next two ints
as maxSamplerSlot/maxTextureSlot before treating the remainder as the raw
shader bytecode handed straight to ID3D12Device::CreatePipelineState.
public static class DirectX12ShaderCodeWrapper
- Inheritance
-
DirectX12ShaderCodeWrapper
- Inherited Members
Methods
Wrap(ReadOnlySpan<byte>, IReadOnlyList<TextureReflection>, IReadOnlyList<SamplerReflection>)
public static byte[] Wrap(ReadOnlySpan<byte> dxil, IReadOnlyList<TextureReflection> textures, IReadOnlyList<SamplerReflection> samplers)
Parameters
dxilReadOnlySpan<byte>texturesIReadOnlyList<TextureReflection>samplersIReadOnlyList<SamplerReflection>
Returns
- byte[]