summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--slang.h33
-rw-r--r--source/slang/compiler.cpp26
-rw-r--r--source/slang/emit.cpp16
-rw-r--r--source/slang/lower.cpp43
-rw-r--r--source/slang/reflection.cpp142
-rw-r--r--source/slang/type-layout.h6
-rw-r--r--tests/reflection/arrays.hlsl.expected6
-rw-r--r--tests/reflection/gh-55.glsl.expected6
-rw-r--r--tests/reflection/global-uniforms.hlsl.expected6
-rw-r--r--tests/reflection/image-types.glsl6
-rw-r--r--tests/reflection/image-types.glsl.expected6
-rw-r--r--tests/reflection/multi-file-extra.hlsl4
-rw-r--r--tests/reflection/multi-file.hlsl4
-rw-r--r--tests/reflection/multi-file.hlsl.expected10
-rw-r--r--tests/reflection/reflect-imported-code.hlsl.expected6
-rw-r--r--tests/reflection/reflection0.hlsl.expected6
-rw-r--r--tests/reflection/resource-in-cbuffer.hlsl.expected6
-rw-r--r--tests/reflection/sample-rate-input.glsl15
-rw-r--r--tests/reflection/sample-rate-input.glsl.expected55
-rw-r--r--tests/reflection/std430-layout.glsl1
-rw-r--r--tests/reflection/std430-layout.glsl.expected6
21 files changed, 390 insertions, 19 deletions
diff --git a/slang.h b/slang.h
index f5da206ce..14efc26c7 100644
--- a/slang.h
+++ b/slang.h
@@ -514,6 +514,16 @@ extern "C"
// Entry Point Reflection
+ SLANG_API char const* spReflectionEntryPoint_getName(
+ SlangReflectionEntryPoint* entryPoint);
+
+ SLANG_API unsigned spReflectionEntryPoint_getParameterCount(
+ SlangReflectionEntryPoint* entryPoint);
+
+ SLANG_API SlangReflectionVariableLayout* spReflectionEntryPoint_getParameterByIndex(
+ SlangReflectionEntryPoint* entryPoint,
+ unsigned index);
+
SLANG_API SlangStage spReflectionEntryPoint_getStage(SlangReflectionEntryPoint* entryPoint);
SLANG_API void spReflectionEntryPoint_getComputeThreadGroupSize(
@@ -521,6 +531,9 @@ extern "C"
SlangUInt axisCount,
SlangUInt* outSizeAlongAxis);
+ SLANG_API int spReflectionEntryPoint_usesAnySampleRateInput(
+ SlangReflectionEntryPoint* entryPoint);
+
// Shader Reflection
SLANG_API unsigned spReflection_GetParameterCount(SlangReflection* reflection);
@@ -857,6 +870,21 @@ namespace slang
struct EntryPointReflection
{
+ char const* getName()
+ {
+ return spReflectionEntryPoint_getName((SlangReflectionEntryPoint*) this);
+ }
+
+ unsigned getParameterCount()
+ {
+ return spReflectionEntryPoint_getParameterCount((SlangReflectionEntryPoint*) this);
+ }
+
+ VariableLayoutReflection* getParameterByIndex(unsigned index)
+ {
+ return (VariableLayoutReflection*) spReflectionEntryPoint_getParameterByIndex((SlangReflectionEntryPoint*) this, index);
+ }
+
SlangStage getStage()
{
return spReflectionEntryPoint_getStage((SlangReflectionEntryPoint*) this);
@@ -868,6 +896,11 @@ namespace slang
{
return spReflectionEntryPoint_getComputeThreadGroupSize((SlangReflectionEntryPoint*) this, axisCount, outSizeAlongAxis);
}
+
+ bool usesAnySampleRateInput()
+ {
+ return 0 != spReflectionEntryPoint_usesAnySampleRateInput((SlangReflectionEntryPoint*) this);
+ }
};
struct ShaderReflection
diff --git a/source/slang/compiler.cpp b/source/slang/compiler.cpp
index 3155bb75a..7df978707 100644
--- a/source/slang/compiler.cpp
+++ b/source/slang/compiler.cpp
@@ -565,13 +565,31 @@ namespace Slang
void generateOutput(
CompileRequest* compileRequest)
{
- // Allow for an "extra" target to verride things first.
+ // Start of with per-translation-unit and per-entry-point lowering
+ for( auto translationUnit : compileRequest->translationUnits )
+ {
+ CompileResult translationUnitResult = emitTranslationUnit(translationUnit.Ptr());
+ translationUnit->result = translationUnitResult;
+ }
+
+
+ // Allow for an "extra" target to verride things before we finish.
switch (compileRequest->extraTarget)
{
case CodeGenTarget::ReflectionJSON:
{
String reflectionJSON = emitReflectionJSON(compileRequest->layout.Ptr());
+ // Clobber existing output so we don't have to deal with it
+ for( auto translationUnit : compileRequest->translationUnits )
+ {
+ translationUnit->result = CompileResult();
+ }
+ for( auto entryPoint : compileRequest->entryPoints )
+ {
+ entryPoint->result = CompileResult();
+ }
+
// HACK(tfoley): just print it out since that is what people probably expect.
// TODO: need a way to control where output gets routed across all possible targets.
fprintf(stdout, "%s", reflectionJSON.begin());
@@ -584,12 +602,6 @@ namespace Slang
break;
}
- // For most targets, we will do things per-translation-unit
- for( auto translationUnit : compileRequest->translationUnits )
- {
- CompileResult translationUnitResult = emitTranslationUnit(translationUnit.Ptr());
- translationUnit->result = translationUnitResult;
- }
}
}
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp
index 0c39a98bd..03cc7d8aa 100644
--- a/source/slang/emit.cpp
+++ b/source/slang/emit.cpp
@@ -2833,7 +2833,10 @@ struct EmitVisitor
// Emit a single `regsiter` semantic, as appropriate for a given resource-type-specific layout info
void emitHLSLRegisterSemantic(
- VarLayout::ResourceInfo const& info)
+ VarLayout::ResourceInfo const& info,
+
+ // Keyword to use in the uniform case (`register` for globals, `packoffset` inside a `cbuffer`)
+ char const* uniformSemanticSpelling = "register")
{
if( info.kind == LayoutResourceKind::Uniform )
{
@@ -2845,7 +2848,9 @@ struct EmitVisitor
// units, and then a "component" within that register, based on 4-byte
// offsets from there. We cannot support more fine-grained offsets than that.
- Emit(": packoffset(c");
+ Emit(": ");
+ Emit(uniformSemanticSpelling);
+ Emit("(c");
// Size of a logical `c` register in bytes
auto registerSize = 16;
@@ -2907,7 +2912,8 @@ struct EmitVisitor
// Emit all the `register` semantics that are appropriate for a particular variable layout
void emitHLSLRegisterSemantics(
- RefPtr<VarLayout> layout)
+ RefPtr<VarLayout> layout,
+ char const* uniformSemanticSpelling = "register")
{
if (!layout) return;
@@ -2922,7 +2928,7 @@ struct EmitVisitor
for( auto rr : layout->resourceInfos )
{
- emitHLSLRegisterSemantic(rr);
+ emitHLSLRegisterSemantic(rr, uniformSemanticSpelling);
}
}
@@ -3026,7 +3032,7 @@ struct EmitVisitor
offsetResource.space += cbufferResource->space;
}
- emitHLSLRegisterSemantic(offsetResource);
+ emitHLSLRegisterSemantic(offsetResource, "packoffset");
}
Emit(";\n");
diff --git a/source/slang/lower.cpp b/source/slang/lower.cpp
index ecf23d9ed..02da47ccb 100644
--- a/source/slang/lower.cpp
+++ b/source/slang/lower.cpp
@@ -210,7 +210,8 @@ struct SharedLoweringContext
{
CompileRequest* compileRequest;
- ProgramLayout* programLayout;
+ ProgramLayout* programLayout;
+ EntryPointLayout* entryPointLayout;
// The target we are going to generate code for.
//
@@ -607,6 +608,8 @@ struct LoweringVisitor
RefPtr<ExpressionSyntaxNode> visitVarExpressionSyntaxNode(
VarExpressionSyntaxNode* expr)
{
+ doSampleRateInputCheck(expr->name);
+
// If the expression didn't get resolved, we can leave it as-is
if (!expr->declRef)
return expr;
@@ -1019,6 +1022,12 @@ struct LoweringVisitor
RefPtr<UnparsedStmt> loweredStmt = new UnparsedStmt();
lowerStmtFields(loweredStmt, stmt);
+ for (auto token : stmt->tokens)
+ {
+ if (token.Type == TokenType::Identifier)
+ doSampleRateInputCheck(token.Content);
+ }
+
loweredStmt->tokens = stmt->tokens;
addStmt(loweredStmt);
@@ -2052,9 +2061,39 @@ struct LoweringVisitor
return SourceLanguage::Unknown;
}
+ void setSampleRateFlag()
+ {
+ shared->entryPointLayout->flags |= EntryPointLayout::Flag::usesAnySampleRateInput;
+ }
+
+ void doSampleRateInputCheck(VarDeclBase* decl)
+ {
+ if (decl->HasModifier<HLSLSampleModifier>())
+ {
+ setSampleRateFlag();
+ }
+ }
+
+ void doSampleRateInputCheck(String const& name)
+ {
+ if (name == "gl_SampleIndex")
+ {
+ setSampleRateFlag();
+ }
+ }
+
RefPtr<VarDeclBase> visitVariable(
Variable* decl)
{
+ // Global variable? Check if it is a sample-rate input.
+ if (dynamic_cast<ProgramSyntaxNode*>(decl->ParentDecl))
+ {
+ if (decl->HasModifier<InModifier>())
+ {
+ doSampleRateInputCheck(decl);
+ }
+ }
+
auto loweredDecl = lowerVarDeclCommon(decl, getClass<Variable>());
if(!loweredDecl)
return nullptr;
@@ -2905,6 +2944,8 @@ LoweredEntryPoint lowerEntryPoint(
bool isRewrite = isRewriteRequest(translationUnit->sourceLanguage, target);
sharedContext.isRewrite = isRewrite;
+ sharedContext.entryPointLayout = visitor.findEntryPointLayout(entryPoint);
+
LoweredEntryPoint result;
if (isRewrite)
{
diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp
index 08621d9a3..1beacc21b 100644
--- a/source/slang/reflection.cpp
+++ b/source/slang/reflection.cpp
@@ -651,8 +651,71 @@ SLANG_API unsigned spReflectionParameter_GetBindingSpace(SlangReflectionParamete
return 0;
}
+// Helpers for getting parameter count
+
+namespace Slang
+{
+ static unsigned getParameterCount(RefPtr<TypeLayout> typeLayout)
+ {
+ if(auto parameterBlockLayout = typeLayout.As<ParameterBlockTypeLayout>())
+ {
+ typeLayout = parameterBlockLayout->elementTypeLayout;
+ }
+
+ if(auto structLayout = typeLayout.As<StructTypeLayout>())
+ {
+ return (unsigned) structLayout->fields.Count();
+ }
+
+ return 0;
+ }
+
+ static VarLayout* getParameterByIndex(RefPtr<TypeLayout> typeLayout, unsigned index)
+ {
+ if(auto parameterBlockLayout = typeLayout.As<ParameterBlockTypeLayout>())
+ {
+ typeLayout = parameterBlockLayout->elementTypeLayout;
+ }
+
+ if(auto structLayout = typeLayout.As<StructTypeLayout>())
+ {
+ return structLayout->fields[index];
+ }
+
+ return 0;
+ }
+}
+
// Entry Point Reflection
+SLANG_API char const* spReflectionEntryPoint_getName(
+ SlangReflectionEntryPoint* inEntryPoint)
+{
+ auto entryPointLayout = convert(inEntryPoint);
+ if(!entryPointLayout) return 0;
+
+ return entryPointLayout->entryPoint->getName().begin();
+}
+
+SLANG_API unsigned spReflectionEntryPoint_getParameterCount(
+ SlangReflectionEntryPoint* inEntryPoint)
+{
+ auto entryPointLayout = convert(inEntryPoint);
+ if(!entryPointLayout) return 0;
+
+ return getParameterCount(entryPointLayout);
+}
+
+SLANG_API SlangReflectionVariableLayout* spReflectionEntryPoint_getParameterByIndex(
+ SlangReflectionEntryPoint* inEntryPoint,
+ unsigned index)
+{
+ auto entryPointLayout = convert(inEntryPoint);
+ if(!entryPointLayout) return 0;
+
+ return convert(getParameterByIndex(entryPointLayout, index));
+}
+
SLANG_API SlangStage spReflectionEntryPoint_getStage(SlangReflectionEntryPoint* inEntryPoint)
{
auto entryPointLayout = convert(inEntryPoint);
@@ -688,6 +751,18 @@ SLANG_API void spReflectionEntryPoint_getComputeThreadGroupSize(
}
}
+SLANG_API int spReflectionEntryPoint_usesAnySampleRateInput(
+ SlangReflectionEntryPoint* inEntryPoint)
+{
+ auto entryPointLayout = convert(inEntryPoint);
+ if(!entryPointLayout)
+ return 0;
+
+ if (entryPointLayout->profile.GetStage() != Stage::Fragment)
+ return 0;
+
+ return (entryPointLayout->flags & EntryPointLayout::Flag::usesAnySampleRateInput) != 0;
+}
// Shader Reflection
@@ -1395,6 +1470,54 @@ Range<T> range(T end)
return Range<T>(T(0), end);
}
+static void emitReflectionEntryPointJSON(
+ PrettyWriter& writer,
+ slang::EntryPointReflection* entryPoint)
+{
+ write(writer, "{\n");
+ indent(writer);
+
+ emitReflectionNameInfoJSON(writer, entryPoint->getName());
+
+ switch (entryPoint->getStage())
+ {
+ case SLANG_STAGE_VERTEX: write(writer, ",\n\"stage:\": \"vertex\""); break;
+ case SLANG_STAGE_HULL: write(writer, ",\n\"stage:\": \"hull\""); break;
+ case SLANG_STAGE_DOMAIN: write(writer, ",\n\"stage:\": \"domain\""); break;
+ case SLANG_STAGE_GEOMETRY: write(writer, ",\n\"stage:\": \"geometry\""); break;
+ case SLANG_STAGE_FRAGMENT: write(writer, ",\n\"stage:\": \"fragment\""); break;
+ case SLANG_STAGE_COMPUTE: write(writer, ",\n\"stage:\": \"compute\""); break;
+ default:
+ break;
+ }
+
+ auto parameterCount = entryPoint->getParameterCount();
+ if (parameterCount)
+ {
+ write(writer, ",\n\"parameters\": [\n");
+ indent(writer);
+
+ for( auto pp : range(parameterCount) )
+ {
+ if(pp != 0) write(writer, ",\n");
+
+ auto parameter = entryPoint->getParameterByIndex(pp);
+ emitReflectionParamJSON(writer, parameter);
+ }
+
+ dedent(writer);
+ write(writer, "\n]");
+ }
+
+ if (entryPoint->usesAnySampleRateInput())
+ {
+ write(writer, ",\n\"usesAnySampleRateInput\": true");
+ }
+
+ dedent(writer);
+ write(writer, "\n}");
+}
+
static void emitReflectionJSON(
PrettyWriter& writer,
slang::ShaderReflection* programReflection)
@@ -1415,6 +1538,25 @@ static void emitReflectionJSON(
dedent(writer);
write(writer, "\n]");
+
+ auto entryPointCount = programReflection->getEntryPointCount();
+ if (entryPointCount)
+ {
+ write(writer, ",\n\"entryPoints\": [\n");
+ indent(writer);
+
+ for (auto ee : range(entryPointCount))
+ {
+ if (ee != 0) write(writer, ",\n");
+
+ auto entryPoint = programReflection->getEntryPointByIndex(ee);
+ emitReflectionEntryPointJSON(writer, entryPoint);
+ }
+
+ dedent(writer);
+ write(writer, "\n]");
+ }
+
dedent(writer);
write(writer, "\n}\n");
}
diff --git a/source/slang/type-layout.h b/source/slang/type-layout.h
index 1a63a4883..add9930ae 100644
--- a/source/slang/type-layout.h
+++ b/source/slang/type-layout.h
@@ -352,6 +352,12 @@ public:
// Layout for any results of the entry point
RefPtr<VarLayout> resultLayout;
+
+ enum Flag : unsigned
+ {
+ usesAnySampleRateInput = 0x1,
+ };
+ unsigned flags = 0;
};
// Layout information for the global scope of a program
diff --git a/tests/reflection/arrays.hlsl.expected b/tests/reflection/arrays.hlsl.expected
index 052bd3927..b586e362a 100644
--- a/tests/reflection/arrays.hlsl.expected
+++ b/tests/reflection/arrays.hlsl.expected
@@ -98,6 +98,12 @@ standard output = {
"kind": "samplerState"
}
}
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment"
+ }
]
}
}
diff --git a/tests/reflection/gh-55.glsl.expected b/tests/reflection/gh-55.glsl.expected
index 8cdebdcd8..993984d93 100644
--- a/tests/reflection/gh-55.glsl.expected
+++ b/tests/reflection/gh-55.glsl.expected
@@ -40,6 +40,12 @@ standard output = {
}
}
}
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment"
+ }
]
}
}
diff --git a/tests/reflection/global-uniforms.hlsl.expected b/tests/reflection/global-uniforms.hlsl.expected
index b40b2d69c..e36665673 100644
--- a/tests/reflection/global-uniforms.hlsl.expected
+++ b/tests/reflection/global-uniforms.hlsl.expected
@@ -67,6 +67,12 @@ standard output = {
}
}
}
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment"
+ }
]
}
}
diff --git a/tests/reflection/image-types.glsl b/tests/reflection/image-types.glsl
index 21cd2b629..73ecdaa82 100644
--- a/tests/reflection/image-types.glsl
+++ b/tests/reflection/image-types.glsl
@@ -2,9 +2,11 @@
// Confirm that we expose GLSL `image` types through reflection
-uniform imageBuffer iBuffer;
+layout(rgba32f)
+uniform writeonly imageBuffer iBuffer;
-uniform image2D i2D;
+layout(rgba32f)
+uniform writeonly image2D i2D;
void main()
{}
diff --git a/tests/reflection/image-types.glsl.expected b/tests/reflection/image-types.glsl.expected
index 19d28f329..dfe477287 100644
--- a/tests/reflection/image-types.glsl.expected
+++ b/tests/reflection/image-types.glsl.expected
@@ -22,6 +22,12 @@ standard output = {
"access": "readWrite"
}
}
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment"
+ }
]
}
}
diff --git a/tests/reflection/multi-file-extra.hlsl b/tests/reflection/multi-file-extra.hlsl
index 569ec2ce9..a5da70635 100644
--- a/tests/reflection/multi-file-extra.hlsl
+++ b/tests/reflection/multi-file-extra.hlsl
@@ -18,7 +18,7 @@ float4 use(float val) { return val; };
float4 use(float2 val) { return float4(val,0.0,0.0); };
float4 use(float3 val) { return float4(val,0.0); };
float4 use(float4 val) { return val; };
-float4 use(Texture2D t, SamplerState s) { return t.Sample(s, 0.0); }
+float4 use(Texture2D t, SamplerState s) { return t.SampleLevel(s, 0.0, 0.0); }
// Start with some parameters that will appear in both shaders
Texture2D sharedT;
@@ -51,7 +51,7 @@ Texture2D sharedTV;
Texture2D sharedTF;
-float4 main() : SV_Target
+float4 mainVS() : SV_Position
{
// Go ahead and use everything here, just to make sure things got placed correctly
return use(sharedT, sharedS)
diff --git a/tests/reflection/multi-file.hlsl b/tests/reflection/multi-file.hlsl
index b263a6b71..7f79f08c9 100644
--- a/tests/reflection/multi-file.hlsl
+++ b/tests/reflection/multi-file.hlsl
@@ -1,4 +1,4 @@
-//TEST:SIMPLE:-profile ps_4_0 -target reflection-json Tests/bindings/multi-file-extra.hlsl
+//TEST:SIMPLE:-profile ps_4_0 -entry mainFS -target reflection-json tests/reflection/multi-file-extra.hlsl -profile vs_4_0 -entry mainVS
// Here we are testing the case where multiple translation units are provided
// at once, so that we want combined reflection information for the resulting
@@ -44,7 +44,7 @@ Texture2D sharedTV;
Texture2D sharedTF;
-float4 main() : SV_Position
+float4 mainFS() : SV_Target
{
// Go ahead and use everything here, just to make sure things got placed correctly
return use(sharedT, sharedS)
diff --git a/tests/reflection/multi-file.hlsl.expected b/tests/reflection/multi-file.hlsl.expected
index 38d028ffe..4ad95fb35 100644
--- a/tests/reflection/multi-file.hlsl.expected
+++ b/tests/reflection/multi-file.hlsl.expected
@@ -233,6 +233,16 @@ standard output = {
}
}
}
+ ],
+ "entryPoints": [
+ {
+ "name": "mainFS",
+ "stage:": "fragment"
+ },
+ {
+ "name": "mainVS",
+ "stage:": "vertex"
+ }
]
}
}
diff --git a/tests/reflection/reflect-imported-code.hlsl.expected b/tests/reflection/reflect-imported-code.hlsl.expected
index 1190ab550..78e7ce195 100644
--- a/tests/reflection/reflect-imported-code.hlsl.expected
+++ b/tests/reflection/reflect-imported-code.hlsl.expected
@@ -74,6 +74,12 @@ standard output = {
}
}
}
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment"
+ }
]
}
}
diff --git a/tests/reflection/reflection0.hlsl.expected b/tests/reflection/reflection0.hlsl.expected
index 3b74988b2..e4d6070ca 100644
--- a/tests/reflection/reflection0.hlsl.expected
+++ b/tests/reflection/reflection0.hlsl.expected
@@ -39,6 +39,12 @@ standard output = {
}
}
}
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment"
+ }
]
}
}
diff --git a/tests/reflection/resource-in-cbuffer.hlsl.expected b/tests/reflection/resource-in-cbuffer.hlsl.expected
index faae1c8b7..261fe2587 100644
--- a/tests/reflection/resource-in-cbuffer.hlsl.expected
+++ b/tests/reflection/resource-in-cbuffer.hlsl.expected
@@ -55,6 +55,12 @@ standard output = {
}
}
}
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment"
+ }
]
}
}
diff --git a/tests/reflection/sample-rate-input.glsl b/tests/reflection/sample-rate-input.glsl
new file mode 100644
index 000000000..66763f45d
--- /dev/null
+++ b/tests/reflection/sample-rate-input.glsl
@@ -0,0 +1,15 @@
+//TEST(smoke):SIMPLE:-profile ps_4_0 -no-checking -target reflection-json
+
+// Check that we report sample-rate entry point input correctly
+
+uniform texture2D t;
+uniform sampler s;
+
+sample in vec2 uv;
+
+out vec4 c;
+
+void main()
+{
+ c = texture(sampler2D(t,s), uv);
+}
diff --git a/tests/reflection/sample-rate-input.glsl.expected b/tests/reflection/sample-rate-input.glsl.expected
new file mode 100644
index 000000000..5800a3630
--- /dev/null
+++ b/tests/reflection/sample-rate-input.glsl.expected
@@ -0,0 +1,55 @@
+result code = 0
+standard error = {
+}
+standard output = {
+{
+ "parameters": [
+ {
+ "name": "t",
+ "binding": {"kind": "descriptorTableSlot", "index": 0},
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ }
+ },
+ {
+ "name": "s",
+ "binding": {"kind": "descriptorTableSlot", "index": 1},
+ "type": {
+ "kind": "samplerState"
+ }
+ },
+ {
+ "name": "uv",
+ "binding": {"kind": "vertexInput", "index": 0},
+ "type": {
+ "kind": "vector",
+ "elementCount": 2,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ },
+ {
+ "name": "c",
+ "binding": {"kind": "fragmentOutput", "index": 0},
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment",
+ "usesAnySampleRateInput": true
+ }
+ ]
+}
+}
diff --git a/tests/reflection/std430-layout.glsl b/tests/reflection/std430-layout.glsl
index 5d4dee88f..0e61556fc 100644
--- a/tests/reflection/std430-layout.glsl
+++ b/tests/reflection/std430-layout.glsl
@@ -1,3 +1,4 @@
+#version 450
//TEST(smoke):SIMPLE:-profile ps_4_0 -target reflection-json
// Confirm fix for GitHub issue #55
diff --git a/tests/reflection/std430-layout.glsl.expected b/tests/reflection/std430-layout.glsl.expected
index 701a36909..bd04c417f 100644
--- a/tests/reflection/std430-layout.glsl.expected
+++ b/tests/reflection/std430-layout.glsl.expected
@@ -102,6 +102,12 @@ standard output = {
}
}
}
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment"
+ }
]
}
}