Merge pull request #896 from KhronosGroup/spv-location
SPV: Give error on not assigning locations to I/O when generating SPIR-V.
This commit is contained in:
@@ -78,6 +78,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre
|
||||
Decorate 126(g_tTex_unused2) DescriptorSet 0
|
||||
Decorate 126(g_tTex_unused2) Binding 12
|
||||
Decorate 128(g_sSamp_unused2) DescriptorSet 0
|
||||
Decorate 137(FragColor) Location 0
|
||||
Decorate 141(g_tTex_unused3) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
@@ -72,6 +72,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre
|
||||
Decorate 126(g_tTex_unused2) DescriptorSet 0
|
||||
Decorate 126(g_tTex_unused2) Binding 12
|
||||
Decorate 128(g_sSamp_unused2) DescriptorSet 0
|
||||
Decorate 137(FragColor) Location 0
|
||||
Decorate 141(g_tTex_unused3) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
8
Test/baseResults/spv.noLocation.vert.out
Normal file
8
Test/baseResults/spv.noLocation.vert.out
Normal file
@@ -0,0 +1,8 @@
|
||||
spv.noLocation.vert
|
||||
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
|
||||
ERROR: spv.noLocation.vert:4: 'location' : SPIR-V requires location for user input/output
|
||||
ERROR: spv.noLocation.vert:8: 'location' : SPIR-V requires location for user input/output
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
||||
@@ -86,12 +86,19 @@ $EXE -i --hlsl-offsets -D -e main -H hlsl.hlslOffset.vert > $TARGETDIR/hlsl.hls
|
||||
diff -b $BASEDIR/hlsl.hlslOffset.vert.out $TARGETDIR/hlsl.hlslOffset.vert.out || HASERROR=1
|
||||
|
||||
#
|
||||
# Tesing --resource-set-binding
|
||||
# Testing --resource-set-binding
|
||||
#
|
||||
echo Configuring HLSL descriptor set and binding number manually
|
||||
$EXE -V -D -e main -H hlsl.multiDescriptorSet.frag --rsb frag t0 0 0 t1 1 0 s0 0 1 s1 1 1 b0 2 0 b1 2 1 b2 2 2 > $TARGETDIR/hlsl.multiDescriptorSet.frag.out
|
||||
diff -b $BASEDIR/hlsl.multiDescriptorSet.frag.out $TARGETDIR/hlsl.multiDescriptorSet.frag.out
|
||||
|
||||
#
|
||||
# Testing location error
|
||||
#
|
||||
echo Testing SPV no location
|
||||
$EXE -V -C spv.noLocation.vert > $TARGETDIR/spv.noLocation.vert.out
|
||||
diff -b $BASEDIR/spv.noLocation.vert.out $TARGETDIR/spv.noLocation.vert.out
|
||||
|
||||
#
|
||||
# Final checking
|
||||
#
|
||||
|
||||
14
Test/spv.noLocation.vert
Normal file
14
Test/spv.noLocation.vert
Normal file
@@ -0,0 +1,14 @@
|
||||
#version 450
|
||||
|
||||
layout(location = 1) in vec4 in1;
|
||||
in vec4 in2;
|
||||
layout(location = 3) in vec4 in3;
|
||||
|
||||
layout(location = 1) out vec4 out1;
|
||||
out vec4 out2;
|
||||
layout(location = 3) out vec4 out3;
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user