Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/command-line-slangc-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,7 @@ A capability describes an optional feature that a target may or may not support.
* `texture_querylod`
* `texture_querylevels`
* `texture_shadowlod`
* `texture_shadowgrad`
* `atomic_glsl_float1`
* `atomic_glsl_float2`
* `atomic_glsl_halfvec`
Expand Down
4 changes: 4 additions & 0 deletions docs/user-guide/a3-02-reference-capability-atoms.md
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,10 @@ Compound Capabilities
`texture_querylod`
> Capabilities required to query texture LOD info

`texture_shadowgrad`
> Capabilities required for shadow texture sampling with bias and gradients.
> New in HLSL SM6.8 but existed in older GLSL and SPIRV targets.

`texture_shadowlod`
> Capabilities required to query shadow texture lod info

Expand Down
82 changes: 6 additions & 76 deletions source/slang/glsl.meta.slang
Original file line number Diff line number Diff line change
Expand Up @@ -1327,44 +1327,9 @@ public typealias usamplerCube = SamplerCube<uint4>;
public typealias isamplerCube = SamplerCube<int4>;
public typealias samplerCube = SamplerCube<float4>;

__generic<let sampleCount:int=0, let format:int=0>
public typealias sampler1DShadow = _Texture<
float,
__Shape1D,
0, // isArray
0, // isMS
sampleCount,
0, // access
1, // isShadow
1, // isCombined
format
>;

__generic<let sampleCount:int=0, let format:int=0>
public typealias sampler2DShadow = _Texture<
float,
__Shape2D,
0, // isArray
0, // isMS
sampleCount,
0, // access
1, // isShadow
1, // isCombined
format
>;

__generic<let sampleCount:int=0, let format:int=0>
public typealias samplerCubeShadow = _Texture<
float,
__ShapeCube,
0, // isArray
0, // isMS
sampleCount,
0, // access
1, // isShadow
1, // isCombined
format
>;
public typealias sampler1DShadow = Sampler1DShadow;
public typealias sampler2DShadow = Sampler2DShadow;
public typealias samplerCubeShadow = SamplerCubeShadow;

public typealias usampler1DArray = Sampler1DArray<uint4>;
public typealias isampler1DArray = Sampler1DArray<int4>;
Expand All @@ -1378,44 +1343,9 @@ public typealias usamplerCubeArray = SamplerCubeArray<uint4>;
public typealias isamplerCubeArray = SamplerCubeArray<int4>;
public typealias samplerCubeArray = SamplerCubeArray<float4>;

__generic<let sampleCount:int=0, let format:int=0>
public typealias sampler1DArrayShadow = _Texture<
float,
__Shape1D,
1, // isArray
0, // isMS
sampleCount,
0, // access
1, // isShadow
1, // isCombined
format
>;

__generic<let sampleCount:int=0, let format:int=0>
public typealias sampler2DArrayShadow = _Texture<
float,
__Shape2D,
1, // isArray
0, // isMS
sampleCount,
0, // access
1, // isShadow
1, // isCombined
format
>;

__generic<let sampleCount:int=0, let format:int=0>
public typealias samplerCubeArrayShadow = _Texture<
float,
__ShapeCube,
1, // isArray
0, // isMS
sampleCount,
0, // access
1, // isShadow
1, // isCombined
format
>;
public typealias sampler1DArrayShadow = Sampler1DArrayShadow;
public typealias sampler2DArrayShadow = Sampler2DArrayShadow;
public typealias samplerCubeArrayShadow = SamplerCubeArrayShadow;

public typealias sampler2DMS = Sampler2DMS<float4>;
public typealias isampler2DMS = Sampler2DMS<int4>;
Expand Down
Loading