Move positive test to the correct location
diff --git a/Test/baseResults/spv.debugPrintf.frag.out b/Test/baseResults/spv.debugPrintf.frag.out index 428e598..cd86b0e 100644 --- a/Test/baseResults/spv.debugPrintf.frag.out +++ b/Test/baseResults/spv.debugPrintf.frag.out
@@ -1,7 +1,7 @@ spv.debugPrintf.frag // Module Version 10000 // Generated by (magic number): 8000b -// Id's are bound by 17 +// Id's are bound by 20 Capability Shader Extension "SPV_KHR_non_semantic_info" @@ -13,6 +13,7 @@ 6: String "ASDF \ ? \ %d %d %d" 13: String "ABAZ" 15: String "B#$B1Z" + 17: String "macro expanded: %d" Source GLSL 450 SourceExtension "GL_EXT_debug_printf" Name 4 "main" @@ -22,10 +23,12 @@ 8: 7(int) Constant 1 9: 7(int) Constant 2 10: 7(int) Constant 3 + 18: 7(int) Constant 4 4(main): 2 Function None 3 5: Label 12: 2 ExtInst 11(NonSemantic.DebugPrintf) 1(DebugPrintf) 6 8 9 10 14: 2 ExtInst 11(NonSemantic.DebugPrintf) 1(DebugPrintf) 13 16: 2 ExtInst 11(NonSemantic.DebugPrintf) 1(DebugPrintf) 15 + 19: 2 ExtInst 11(NonSemantic.DebugPrintf) 1(DebugPrintf) 17 18 Return FunctionEnd
diff --git a/Test/baseResults/spv.debugPrintf_Error.frag.out b/Test/baseResults/spv.debugPrintf_Error.frag.out index 21e1bb8..3e384be 100644 --- a/Test/baseResults/spv.debugPrintf_Error.frag.out +++ b/Test/baseResults/spv.debugPrintf_Error.frag.out
@@ -1,10 +1,10 @@ spv.debugPrintf_Error.frag -ERROR: 0:9: 'string' : Expected hex value in escape sequence -ERROR: 0:12: 'string' : Invalid escape sequence -ERROR: 0:19: 'debugPrintfEXT' : first argument must be a string literal -ERROR: 0:22: 'debugPrintfEXT' : first argument must be a string literal -ERROR: 0:26: 'debugPrintfEXT' : first argument must be a string literal -ERROR: 0:29: 'debugPrintfEXT' : first argument must be a string literal +ERROR: 0:7: 'string' : Expected hex value in escape sequence +ERROR: 0:10: 'string' : Invalid escape sequence +ERROR: 0:14: 'debugPrintfEXT' : first argument must be a string literal +ERROR: 0:17: 'debugPrintfEXT' : first argument must be a string literal +ERROR: 0:21: 'debugPrintfEXT' : first argument must be a string literal +ERROR: 0:24: 'debugPrintfEXT' : first argument must be a string literal ERROR: 6 compilation errors. No code generated.
diff --git a/Test/spv.debugPrintf.frag b/Test/spv.debugPrintf.frag index 3dff629..c4fd86b 100644 --- a/Test/spv.debugPrintf.frag +++ b/Test/spv.debugPrintf.frag
@@ -1,6 +1,9 @@ #version 450 #extension GL_EXT_debug_printf : enable +// a macro that expands to a string literal token is still a string literal +#define FMT "macro expanded: %d" + void main() { debugPrintfEXT("ASDF \\ \? \x5C %d %d %d", 1, 2, 3); @@ -10,4 +13,6 @@ // B#${bell, aka \a}B1Z debugPrintfEXT("\102\043\44\7\1021Z"); + + debugPrintfEXT(FMT, 4); }
diff --git a/Test/spv.debugPrintf_Error.frag b/Test/spv.debugPrintf_Error.frag index abc97f7..bf089e8 100644 --- a/Test/spv.debugPrintf_Error.frag +++ b/Test/spv.debugPrintf_Error.frag
@@ -1,8 +1,6 @@ #version 450 #extension GL_EXT_debug_printf : enable -#define FMT "this one is fine: %d" - void main() { // invalid hex sequence @@ -11,9 +9,6 @@ // not an octal sequence debugPrintfEXT("\8"); - // a macro that expands to a string literal token is still a string literal - debugPrintfEXT(FMT, 1); - // the format must be a string literal, not just any constant expression const int notAString = 1; debugPrintfEXT(notAString, 2);