forked from shader-slang/slang
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require GL_EXT_samplerless_texture_functions only if needed
This extension is only necessary when using texture functions on non-combined texture/samplers. Fixes shader-slang#5518
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//TEST:SIMPLE(filecheck=GLSL): -profile spirv_1_5+fragment -entry fragmentMain -target glsl | ||
|
||
// Ensure that the use of combined samplers does not needlessly require | ||
// GL_EXT_samplerless_texture_functions | ||
|
||
// GLSL-NOT: #extension GL_EXT_samplerless_texture_functions : require | ||
|
||
layout(binding=1) Sampler3D sampler; | ||
|
||
[shader("fragment")] | ||
float4 fragmentMain() : SV_Target | ||
{ | ||
int sizeX; | ||
int sizeY; | ||
int sizeZ; | ||
sampler.GetDimensions(sizeX, sizeY, sizeZ); | ||
return float4(sizeX, sizeY, sizeZ, 1.0); | ||
} |