Home | History | Annotate | Download | only in test
      1 #include "shared.rsh"
      2 #pragma rs_fp_relaxed
      3 
      4 uchar4 u4 = 4;
      5 int4 gi4 = {2, 2, 2, 2};
      6 
      7 void int4_test() {
      8     bool failed = false;
      9     int4 i4 = {u4.x, u4.y, u4.z, u4.w};
     10     i4 *= gi4;
     11 
     12     rsDebug("i4.x", i4.x);
     13     rsDebug("i4.y", i4.y);
     14     rsDebug("i4.z", i4.z);
     15     rsDebug("i4.w", i4.w);
     16 
     17     _RS_ASSERT(i4.x == 8);
     18     _RS_ASSERT(i4.y == 8);
     19     _RS_ASSERT(i4.z == 8);
     20     _RS_ASSERT(i4.w == 8);
     21 
     22     if (failed) {
     23         rsSendToClientBlocking(RS_MSG_TEST_FAILED);
     24     }
     25     else {
     26         rsSendToClientBlocking(RS_MSG_TEST_PASSED);
     27     }
     28 }
     29 
     30