//TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl //TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly // not testing hlsl due to missing impl //DISABLE_TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL // not testing cuda due to missing impl //DISABLE_TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA // not testing cpp due to missing impl //DISABLE_TEST:SIMPLE(filecheck=CHECK_CPP): -allow-glsl -stage compute -entry computeMain -target cpp -DTARGET_CPP //TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl //TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly #version 430 //TEST_INPUT:ubuffer(data=[0 0], stride=4):out,name=outputBuffer buffer MyBlockName2 { uint data[]; } outputBuffer; layout(local_size_x = 32) in; __generic bool test1Logical() { return true & subgroupClusteredAnd(T(1), 1) == T(1) & subgroupClusteredOr(T(1), 1) == T(1) & subgroupClusteredXor(T(1), 1) == T(1) ; } __generic bool testVLogical() { typealias gvec = vector; return true & subgroupClusteredAnd(gvec(T(1)), 1) == gvec(T(1)) & subgroupClusteredOr(gvec(T(1)), 1) == gvec(T(1)) & subgroupClusteredXor(gvec(T(1)), 1) == gvec(T(1)) ; } bool testLogical() { return true & test1Logical() & testVLogical() & testVLogical() & testVLogical() & test1Logical() & testVLogical() & testVLogical() & testVLogical() & test1Logical() & testVLogical() & testVLogical() & testVLogical() & test1Logical() & testVLogical() & testVLogical() & testVLogical() & test1Logical() & testVLogical() & testVLogical() & testVLogical() & test1Logical() & testVLogical() & testVLogical() & testVLogical() & test1Logical() & testVLogical() & testVLogical() & testVLogical() & test1Logical() & testVLogical() & testVLogical() & testVLogical() & test1Logical() & testVLogical() & testVLogical() & testVLogical() ; } __generic bool test1Arithmetic() { return true & subgroupClusteredAdd(T(1), 1) == T(1) & subgroupClusteredMul(T(1), 1) == T(1) & subgroupClusteredMin(T(1), 1) == T(1) & subgroupClusteredMax(T(1), 1) == T(1) ; } __generic bool testVArithmetic() { typealias gvec = vector; return true & subgroupClusteredAdd(gvec(T(1)), 1) == gvec(T(1)) & subgroupClusteredMul(gvec(T(1)), 1) == gvec(T(1)) & subgroupClusteredMin(gvec(T(1)), 1) == gvec(T(1)) & subgroupClusteredMax(gvec(T(1)), 1) == gvec(T(1)) ; } bool testArithmetic() { return true & test1Arithmetic() & testVArithmetic() & testVArithmetic() & testVArithmetic() & test1Arithmetic() // WARNING: intel GPU's lack FP64 support & testVArithmetic() & testVArithmetic() & testVArithmetic() & test1Arithmetic() & testVArithmetic() & testVArithmetic() & testVArithmetic() & test1Arithmetic() & testVArithmetic() & testVArithmetic() & testVArithmetic() & test1Arithmetic() & testVArithmetic() & testVArithmetic() & testVArithmetic() & test1Arithmetic() & testVArithmetic() & testVArithmetic() & testVArithmetic() & test1Arithmetic() & testVArithmetic() & testVArithmetic() & testVArithmetic() & test1Arithmetic() & testVArithmetic() & testVArithmetic() & testVArithmetic() & test1Arithmetic() & testVArithmetic() & testVArithmetic() & testVArithmetic() & test1Arithmetic() & testVArithmetic() & testVArithmetic() & testVArithmetic() & test1Arithmetic() & testVArithmetic() & testVArithmetic() & testVArithmetic() ; } void computeMain() { outputBuffer.data[0] = true & testLogical() ; outputBuffer.data[1] = true & testArithmetic() ; // CHECK_GLSL: void main( // CHECK_SPV: OpEntryPoint // CHECK_HLSL: void computeMain( // CHECK_CUDA: void computeMain( // CHECK_CPP: void _computeMain( // BUF: 1 // BUF-NEXT: 1 }