67eb4f0c0662 — Leonard Ritter 2 months ago
* testing for new gpu instructions
1 files changed, 7 insertions(+), 0 deletions(-)

M testing/test_compute.sc
M testing/test_compute.sc +7 -0
@@ 3,6 3,7 @@ 
 using import ..tukan.gpucall
 using import glsl
 using import glm
+using import testing
 
 shared tmp : vec3
 

          
@@ 18,3 19,9 @@ fn testfunc (x y)
 print (testfunc 2.0 3.0)
 print (testfunc 0.1 0.2)
 
+test ((gpucall bitcount 5) == (bitcount 5))
+test ((gpucall findlsb 32768) == (findlsb 32768))
+test ((gpucall bitreverse 0b10010110) == (bitreverse 0b10010110))
+test (all? ((gpucall findmsb (vectorof i32 1 3 5 9)) == (vectorof i32 0 1 2 3)))
+test ((gpucall findmsb 6) == (findmsb 6))
+