Skip to content

Commit

Permalink
debug_printf: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
exrook committed Oct 16, 2023
1 parent 72f4c6b commit d3dccb7
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/in/debug-printf.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(
)
1 change: 1 addition & 0 deletions tests/in/debug-printf.wgsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@compute @workgroup_size(1)
fn main() {
debugPrintf("%d", 42);
debugPrintf("%v4f", vec4(3.3));
Expand Down
Binary file added tests/in/spv/debug-printf.spv
Binary file not shown.
15 changes: 15 additions & 0 deletions tests/out/glsl/debug-printf.main.Compute.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#version 310 es
#extension GL_EXT_debug_printf : enable

precision highp float;
precision highp int;

layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;


void main() {
debugPrintfEXT("%d",42);
debugPrintfEXT("%v4f",vec4(3.3));
return;
}

2 changes: 1 addition & 1 deletion tests/out/hlsl/debug-printf.hlsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[numthreads(1, 1, 1)]
void main()
{
printf("%d",42);
printf("%v4f",(3.3).xxxx);
return;
}

4 changes: 4 additions & 0 deletions tests/out/hlsl/debug-printf.ron
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
fragment:[
],
compute:[
(
entry_point:"main",
target_profile:"cs_5_1",
),
],
)
3 changes: 2 additions & 1 deletion tests/out/spv/debug-printf.spvasm
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
; Generator: rspirv
; Bound: 18
OpCapability Shader
OpCapability Linkage
OpExtension "SPV_KHR_non_semantic_info"
%1 = OpExtInstImport "GLSL.std.450"
%15 = OpExtInstImport "NonSemantic.DebugPrintf"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %4 "main"
OpExecutionMode %4 LocalSize 1 1 1
%13 = OpString "%d"
%16 = OpString "%v4f"
%2 = OpTypeVoid
Expand Down
2 changes: 1 addition & 1 deletion tests/out/wgsl/debug-printf.wgsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@compute @workgroup_size(1, 1, 1)
fn main() {
debugPrintf("%d",42);
debugPrintf("%v4f",vec4(3.3));
return;
}

0 comments on commit d3dccb7

Please sign in to comment.