aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Clayton <bclayton@google.com>2020-01-29 17:23:02 +0000
committerBen Clayton <bclayton@google.com>2020-01-31 09:46:38 +0000
commit25ab572b95738c74f79911ca01e9a5c4d56eeab1 (patch)
treeb80ca3dd2d3249b4076d2d0c936e4aab690d39cb /tests
parent2348e55c1200390dcff9701d4cab1677f049ac2d (diff)
downloadamber-25ab572b95738c74f79911ca01e9a5c4d56eeab1.tar.gz
Debugger: Add basic debugger test scripts.
One for SPIR-V debugging, one for HLSL debugging using `OpenCL.DebugInfo.100`.
Diffstat (limited to 'tests')
-rw-r--r--tests/cases/debugger_hlsl_line_stepping.amber354
-rw-r--r--tests/cases/debugger_spirv_line_stepping.amber173
-rwxr-xr-xtests/run_tests.py9
3 files changed, 536 insertions, 0 deletions
diff --git a/tests/cases/debugger_hlsl_line_stepping.amber b/tests/cases/debugger_hlsl_line_stepping.amber
new file mode 100644
index 0000000..c7e04c9
--- /dev/null
+++ b/tests/cases/debugger_hlsl_line_stepping.amber
@@ -0,0 +1,354 @@
+#!amber
+# Copyright 2020 The Amber Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SET ENGINE_DATA fence_timeout_ms 1000000
+
+SHADER vertex vtex_shader SPIRV-ASM
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos SPIR-V Tools Assembler; 0
+; Bound: 28
+; Schema: 0
+ OpCapability Shader
+ %DbgExt = OpExtInstImport "OpenCL.DebugInfo.100"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Vertex %main "main" %pos %color %gl_Position %out_var_COLOR
+ %src = OpString "simple_vs.hlsl"
+ %code = OpString "
+struct VS_OUTPUT {
+ float4 pos : SV_POSITION;
+ float4 color : COLOR;
+};
+
+VS_OUTPUT main(float4 pos : POSITION,
+ float4 color : COLOR) {
+ VS_OUTPUT vout;
+ vout.pos = pos;
+ vout.color = color;
+ return vout;
+}
+"
+ OpSource HLSL 600 %src "
+struct VS_OUTPUT {
+ float4 pos : SV_POSITION;
+ float4 color : COLOR;
+};
+
+VS_OUTPUT main(float4 pos : POSITION,
+ float4 color : COLOR) {
+ VS_OUTPUT vout;
+ vout.pos = pos;
+ vout.color = color;
+ return vout;
+}
+"
+ OpName %out_var_COLOR "out.var.COLOR"
+ OpName %main "main"
+ OpName %VS_OUTPUT "VS_OUTPUT"
+ OpMemberName %VS_OUTPUT 0 "pos"
+ OpMemberName %VS_OUTPUT 1 "color"
+ OpName %pos "pos"
+ OpName %color "color"
+ OpName %vout "vout"
+ OpDecorate %gl_Position BuiltIn Position
+ OpDecorate %pos Location 0
+ OpDecorate %color Location 1
+ OpDecorate %out_var_COLOR Location 0
+ %int = OpTypeInt 32 1
+ %int_0 = OpConstant %int 0
+ %int_1 = OpConstant %int 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %void = OpTypeVoid
+ %16 = OpTypeFunction %void
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %VS_OUTPUT = OpTypeStruct %v4float %v4float
+ %18 = OpTypeFunction %VS_OUTPUT %_ptr_Function_v4float %_ptr_Function_v4float
+%_ptr_Function_VS_OUTPUT = OpTypePointer Function %VS_OUTPUT
+
+; Compilation Unit
+%dbg_src = OpExtInst %void %DbgExt DebugSource %src %code
+%comp_unit = OpExtInst %void %DbgExt DebugCompilationUnit 2 4 %dbg_src HLSL
+
+; Type names
+%VS_OUTPUT_name = OpString "struct VS_OUTPUT"
+%float_name = OpString "float"
+%VS_OUTPUT_pos_name = OpString "pos"
+%VS_OUTPUT_color_name = OpString "color"
+%VS_OUTPUT_linkage_name = OpString "VS_OUTPUT"
+%main_name = OpString "main"
+%main_linkage_name = OpString "VS_OUTPUT_main_v4f_v4f"
+%pos_name = OpString "pos"
+%color_name = OpString "color"
+%vout_name = OpString "vout"
+
+; Type sizes in bit unit. For example, 128 means "128 bits"
+%int_32 = OpConstant %int 32
+%int_128 = OpConstant %int 128
+
+; Type information
+; %VS_OUTPUT_info and %VS_OUTPUT_pos_info have cycling reference
+%VS_OUTPUT_info = OpExtInst %void %DbgExt DebugTypeComposite %VS_OUTPUT_name Structure %dbg_src 1 1 %comp_unit %VS_OUTPUT_linkage_name %int_128 FlagIsPublic %VS_OUTPUT_pos_info %VS_OUTPUT_color_info
+%float_info = OpExtInst %void %DbgExt DebugTypeBasic %float_name %int_32 Float
+%v4float_info = OpExtInst %void %DbgExt DebugTypeVector %float_info 4
+%VS_OUTPUT_pos_info = OpExtInst %void %DbgExt DebugTypeMember %VS_OUTPUT_pos_name %v4float_info %dbg_src 2 3 %VS_OUTPUT_info %int_0 %int_128 FlagIsPublic
+%VS_OUTPUT_color_info = OpExtInst %void %DbgExt DebugTypeMember %VS_OUTPUT_color_name %v4float_info %dbg_src 3 3 %VS_OUTPUT_info %int_128 %int_128 FlagIsPublic
+%main_type = OpExtInst %void %DbgExt DebugTypeFunction FlagIsPublic %VS_OUTPUT_info %v4float_info %v4float_info
+
+; DebugExpression without any information
+%null_expr = OpExtInst %void %DbgExt DebugExpression
+
+; Lexical scope for main
+%main_lex_scope = OpExtInst %void %DbgExt DebugLexicalBlock %dbg_src 6 1 %comp_unit
+
+; Function information
+%main_func = OpExtInst %void %DbgExt DebugFunction %main_name %main_type %dbg_src 6 1 %main_lex_scope %main_linkage_name FlagIsPublic 7 %src_main
+
+; Local variable information
+%pos_info = OpExtInst %void %DbgExt DebugLocalVariable %pos_name %v4float_info %dbg_src 6 16 %main_lex_scope FlagIsLocal 0
+%color_info = OpExtInst %void %DbgExt DebugLocalVariable %color_name %v4float_info %dbg_src 7 16 %main_lex_scope FlagIsLocal 1
+%vout_info = OpExtInst %void %DbgExt DebugLocalVariable %vout_name %VS_OUTPUT_info %dbg_src 8 3 %main_lex_scope FlagIsLocal
+
+ %pos = OpVariable %_ptr_Input_v4float Input
+
+; Declaration of "float4 pos : POSITION" argument of main()
+%pos_decl = OpExtInst %void %DbgExt DebugDeclare %pos_info %pos %null_expr
+
+ %color = OpVariable %_ptr_Input_v4float Input
+
+; Declaration of "float4 color : COLOR" argument of main()
+%color_decl = OpExtInst %void %DbgExt DebugDeclare %color_info %color %null_expr
+
+%gl_Position = OpVariable %_ptr_Output_v4float Output
+%out_var_COLOR = OpVariable %_ptr_Output_v4float Output
+ %main = OpFunction %void None %16
+ %20 = OpLabel
+
+; Start the scope of function "main()"
+%main_scope = OpExtInst %void %DbgExt DebugScope %main_lex_scope
+
+ %vout = OpVariable %_ptr_Function_VS_OUTPUT Function
+
+; Declaration of "VS_OUTPUT vout" local variable in main()
+%vout_decl = OpExtInst %void %DbgExt DebugDeclare %vout_info %vout %null_expr
+
+ OpLine %src 9 3
+ %21 = OpLoad %v4float %pos
+ %22 = OpAccessChain %_ptr_Function_v4float %vout %int_0
+
+; Tracking value of "float4 pos : SV_POSITION" member of "vout"
+%vout_pos_value = OpExtInst %void %DbgExt DebugValue %vout_info %22 %null_expr %int_0
+
+ OpStore %22 %21
+ OpLine %src 10 3
+ %23 = OpLoad %v4float %color
+ %24 = OpAccessChain %_ptr_Function_v4float %vout %int_1
+
+; Tracking value of "float4 color : COLOR" member of "vout"
+%vout_color_value = OpExtInst %void %DbgExt DebugValue %vout_info %24 %null_expr %int_1
+
+ OpStore %24 %23
+ OpLine %src 11 3
+ %25 = OpLoad %VS_OUTPUT %vout
+ %26 = OpCompositeExtract %v4float %25 0
+ OpStore %gl_Position %26
+ %27 = OpCompositeExtract %v4float %25 1
+ OpStore %out_var_COLOR %27
+ OpLine %src 12 3
+ OpReturn
+
+; End the scope of function "main()"
+%main_scope_end = OpExtInst %void %DbgExt DebugNoScope
+
+ OpFunctionEnd
+END
+
+SHADER fragment frag_shader SPIRV-ASM
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos SPIR-V Tools Assembler; 0
+; Bound: 14
+; Schema: 0
+ OpCapability Shader
+ %DbgExt = OpExtInstImport "OpenCL.DebugInfo.100"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main" %color %out_var_SV_TARGET
+ OpExecutionMode %main OriginUpperLeft
+ %src = OpString "simple_ps.hlsl"
+ %code = OpString "#line 1 \"simple_ps.hlsl\"
+float4 main(float4 color : COLOR) : SV_TARGET {
+ return color;
+}
+"
+ OpSource HLSL 600 %src "#line 1 \"simple_ps.hlsl\"
+float4 main(float4 color : COLOR) : SV_TARGET {
+ return color;
+}
+"
+ OpName %out_var_SV_TARGET "out.var.SV_TARGET"
+ OpName %main "main"
+ OpName %color "color"
+ OpDecorate %color Location 0
+ OpDecorate %out_var_SV_TARGET Location 0
+ %int = OpTypeInt 32 1
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %void = OpTypeVoid
+ %9 = OpTypeFunction %void
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %11 = OpTypeFunction %v4float %_ptr_Function_v4float
+
+; Compilation Unit
+%dbg_src = OpExtInst %void %DbgExt DebugSource %src %code
+%comp_unit = OpExtInst %void %DbgExt DebugCompilationUnit 2 4 %dbg_src HLSL
+
+; Type names
+%float_name = OpString "float"
+%main_name = OpString "main"
+%main_linkage_name = OpString "v4f_main_v4f"
+%color_name = OpString "color : COLOR"
+
+; Type sizes in bit unit. For example, 128 means "128 bits"
+%int_32 = OpConstant %int 32
+%int_128 = OpConstant %int 128
+
+; Type information
+%float_info = OpExtInst %void %DbgExt DebugTypeBasic %float_name %int_32 Float
+%v4float_info = OpExtInst %void %DbgExt DebugTypeVector %float_info 4
+%main_type = OpExtInst %void %DbgExt DebugTypeFunction FlagIsPublic %v4float_info %v4float_info
+
+; DebugExpression without any information
+%null_expr = OpExtInst %void %DbgExt DebugExpression
+
+; Lexical scope for main
+%main_lex_scope = OpExtInst %void %DbgExt DebugLexicalBlock %dbg_src 1 1 %comp_unit
+
+; Function information
+%main_func = OpExtInst %void %DbgExt DebugFunction %main_name %main_type %dbg_src 1 1 %main_lex_scope %main_linkage_name FlagIsPublic 1 %src_main
+
+; Local variable information
+%color_info = OpExtInst %void %DbgExt DebugLocalVariable %color_name %v4float_info %dbg_src 1 13 %main_lex_scope FlagIsLocal 0
+
+ OpLine %src 1 28
+ %color = OpVariable %_ptr_Input_v4float Input
+
+; Declaration of "float4 color : COLOR" argument of main()
+%color_decl = OpExtInst %void %DbgExt DebugDeclare %color_info %color %null_expr
+
+ OpLine %src 1 37
+%out_var_SV_TARGET = OpVariable %_ptr_Output_v4float Output
+ OpLine %src 1 1
+ %main = OpFunction %void None %9
+ %12 = OpLabel
+
+; Start the scope of function "main()"
+%main_scope = OpExtInst %void %DbgExt DebugScope %main_lex_scope
+
+ OpLine %src 2 10
+ %13 = OpLoad %v4float %color
+ OpLine %src 2 3
+ OpStore %out_var_SV_TARGET %13
+ OpReturn
+
+; End the scope of function "main()"
+%main_scope_end = OpExtInst %void %DbgExt DebugNoScope
+
+ OpFunctionEnd
+END
+
+BUFFER position_buf DATA_TYPE R8G8_SNORM DATA
+# Full frame
+-128 -128
+ 127 127
+-128 127
+-128 -128
+ 127 127
+ 127 -128
+END
+
+BUFFER vert_color DATA_TYPE R8G8B8A8_UNORM DATA
+255 0 0 255
+255 0 0 255
+255 0 0 255
+255 0 0 255
+255 0 0 255
+255 0 0 255
+
+ 0 255 0 255
+ 0 255 0 255
+ 0 255 0 255
+ 0 255 0 255
+ 0 255 0 255
+ 0 255 0 255
+
+ 0 0 255 255
+ 0 0 255 255
+ 0 0 255 255
+ 0 0 255 255
+ 0 0 255 255
+ 0 0 255 255
+
+127 127 127 255
+127 127 127 255
+127 127 127 255
+127 127 127 255
+127 127 127 255
+127 127 127 255
+END
+
+BUFFER framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics pipeline
+ ATTACH vtex_shader
+ ATTACH frag_shader
+
+ VERTEX_DATA position_buf LOCATION 0
+ VERTEX_DATA vert_color LOCATION 1
+
+ BIND BUFFER framebuffer AS color LOCATION 0
+END
+
+CLEAR pipeline
+
+DEBUG pipeline DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
+ THREAD VERTEX_INDEX 2
+ EXPECT LOCATION "simple_vs.hlsl" 9 " VS_OUTPUT vout;"
+ EXPECT LOCAL "pos.x" EQ -1.007874
+ EXPECT LOCAL "pos.y" EQ 1.000000
+ EXPECT LOCAL "pos.z" EQ 0.000000
+ EXPECT LOCAL "color.x" EQ 1.000000
+ EXPECT LOCAL "color.y" EQ 0.000000
+ EXPECT LOCAL "color.z" EQ 0.000000
+ STEP_IN
+ EXPECT LOCATION "simple_vs.hlsl" 10 " vout.pos = pos;"
+ STEP_IN
+ EXPECT LOCAL "vout.pos.x" EQ -1.007874
+ EXPECT LOCAL "vout.pos.y" EQ 1.000000
+ EXPECT LOCAL "vout.pos.z" EQ 0.000000
+ EXPECT LOCATION "simple_vs.hlsl" 11 " vout.color = color;"
+ STEP_IN
+ EXPECT LOCAL "vout.color.x" EQ 1.000000
+ EXPECT LOCAL "vout.color.y" EQ 0.000000
+ EXPECT LOCAL "vout.color.z" EQ 0.000000
+ EXPECT LOCATION "simple_vs.hlsl" 12 " return vout;"
+ CONTINUE
+ END
+END
+
+EXPECT framebuffer IDX 0 0 SIZE 250 250 EQ_RGB 255 0 0
diff --git a/tests/cases/debugger_spirv_line_stepping.amber b/tests/cases/debugger_spirv_line_stepping.amber
new file mode 100644
index 0000000..e65773f
--- /dev/null
+++ b/tests/cases/debugger_spirv_line_stepping.amber
@@ -0,0 +1,173 @@
+#!amber
+# Copyright 2020 The Amber Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SET ENGINE_DATA fence_timeout_ms 1000000
+
+# #version 450
+# layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+# layout(binding = 0, std430) buffer InBuffer
+# {
+# int Data[];
+# } In;
+# layout(binding = 1, std430) buffer OutBuffer
+# {
+# int Data[];
+# } Out;
+# void main()
+# {
+# Out.Data[gl_GlobalInvocationID.x] = In.Data[gl_GlobalInvocationID.x];
+# }
+SHADER compute mah_shader SPIRV-ASM
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %1 "main" %2
+ OpExecutionMode %1 LocalSize 4 1 1
+ OpDecorate %3 ArrayStride 4
+ OpMemberDecorate %4 0 Offset 0
+ OpDecorate %4 BufferBlock
+ OpDecorate %5 DescriptorSet 0
+ OpDecorate %5 Binding 1
+ OpDecorate %2 BuiltIn GlobalInvocationId
+ OpDecorate %6 DescriptorSet 0
+ OpDecorate %6 Binding 0
+ %7 = OpTypeVoid
+ %8 = OpTypeFunction %7
+ %9 = OpTypeInt 32 1
+%10 = OpTypeInt 32 0
+ %3 = OpTypeRuntimeArray %9
+ %4 = OpTypeStruct %3
+%11 = OpTypePointer Uniform %4
+ %5 = OpVariable %11 Uniform
+%12 = OpConstant %9 0
+%13 = OpConstant %10 0
+%14 = OpTypeVector %10 3
+%15 = OpTypePointer Input %14
+ %2 = OpVariable %15 Input
+%16 = OpTypePointer Input %10
+ %6 = OpVariable %11 Uniform
+%17 = OpTypePointer Uniform %9
+ %1 = OpFunction %7 None %8
+%18 = OpLabel
+%19 = OpAccessChain %16 %2 %13
+%20 = OpLoad %10 %19
+%21 = OpAccessChain %17 %6 %12 %20
+%22 = OpLoad %9 %21
+%23 = OpAccessChain %17 %5 %12 %20
+ OpStore %23 %22
+ OpReturn
+ OpFunctionEnd
+END
+
+BUFFER buf_in DATA_TYPE uint32 DATA
+ 20 30 40 50 60
+END
+
+BUFFER buf_out DATA_TYPE uint32 DATA
+ 99 99 99 99 99
+END
+
+PIPELINE compute pipeline
+ ATTACH mah_shader
+
+ BIND BUFFER buf_in AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER buf_out AS storage DESCRIPTOR_SET 0 BINDING 1
+END
+
+# Only one workgroup. Having only one invocation execute ensures
+# there are no race conditions.
+DEBUG pipeline 1 1 1
+ THREAD GLOBAL_INVOCATION_ID 2 0 0
+ EXPECT LOCATION "ComputeShader0.spvasm" 1 "OpCapability Shader"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 2 "OpMemoryModel Logical GLSL450"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 3 "OpEntryPoint GLCompute %1 \"main\" %2"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 4 "OpExecutionMode %1 LocalSize 4 1 1"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 5 "OpDecorate %3 ArrayStride 4"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 6 "OpMemberDecorate %4 0 Offset 0"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 7 "OpDecorate %4 BufferBlock"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 8 "OpDecorate %5 DescriptorSet 0"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 9 "OpDecorate %5 Binding 1"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 10 "OpDecorate %2 BuiltIn GlobalInvocationId"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 11 "OpDecorate %6 DescriptorSet 0"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 12 "OpDecorate %6 Binding 0"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 13 "%7 = OpTypeVoid"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 14 "%8 = OpTypeFunction %7"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 15 "%9 = OpTypeInt 32 1"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 16 "%10 = OpTypeInt 32 0"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 17 "%3 = OpTypeRuntimeArray %9"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 18 "%4 = OpTypeStruct %3"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 19 "%11 = OpTypePointer Uniform %4"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 20 "%5 = OpVariable %11 Uniform"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 21 "%12 = OpConstant %9 0"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 22 "%13 = OpConstant %10 0"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 23 "%14 = OpTypeVector %10 3"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 24 "%15 = OpTypePointer Input %14"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 25 "%2 = OpVariable %15 Input"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 26 "%16 = OpTypePointer Input %10"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 27 "%6 = OpVariable %11 Uniform"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 28 "%17 = OpTypePointer Uniform %9"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 29 "%1 = OpFunction %7 None %8"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 30 "%18 = OpLabel"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 31 "%19 = OpAccessChain %16 %2 %13"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 32 "%20 = OpLoad %10 %19"
+ STEP_IN
+ EXPECT LOCAL "%20" EQ 2
+ EXPECT LOCATION "ComputeShader0.spvasm" 33 "%21 = OpAccessChain %17 %6 %12 %20"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 34 "%22 = OpLoad %9 %21"
+ STEP_IN
+ EXPECT LOCAL "%22" EQ 40
+ EXPECT LOCATION "ComputeShader0.spvasm" 35 "%23 = OpAccessChain %17 %5 %12 %20"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 36 "OpStore %23 %22"
+ STEP_IN
+ EXPECT LOCATION "ComputeShader0.spvasm" 37 "OpReturn"
+ CONTINUE
+ END
+END
+
+EXPECT buf_in IDX 0 EQ 20 30 40 50 60
+EXPECT buf_out IDX 0 EQ 20 30 40 50 99
+
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 2484be1..dff50d2 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -54,6 +54,12 @@ SUPPRESSIONS = {
]
}
+SUPPRESSIONS_DEBUGGER = [
+ # Debugger functionality is not ready for testing (yet)
+ "debugger_hlsl_line_stepping.amber",
+ "debugger_spirv_line_stepping.amber",
+]
+
SUPPRESSIONS_SWIFTSHADER = [
# Incorrect rendering: github.com/google/amber/issues/727
"draw_array_instanced.vkscript",
@@ -183,6 +189,9 @@ class TestCase:
if not self.use_opencl and is_opencl_test:
return True
+ if base in SUPPRESSIONS_DEBUGGER:
+ return True
+
if system in SUPPRESSIONS.keys():
is_system_suppressed = base in SUPPRESSIONS[system]
return is_system_suppressed