2 Replies Latest reply on Sep 22, 2009 11:46 AM by AIF Bob

    Checking booleans in pixel bender causes crash!

    mr_malee Level 1

      The following basic kernel crashes pixel bender 1.5.1 build 02

       

       

      <languageVersion : 1.0;>

       

      kernel BoolTest
      <   namespace : "Your Namespace";
          vendor : "Your Vendor";
          version : 1;
          description : "your description";
      >
      {
          input image4 src;
          output pixel4 dst;

       

          void
          evaluatePixel()
          {
              float4 f1 = float4(1.0, 1.0, 1.0, 1.0);
              float4 f2 = float4(0.5, 0.5, 0.5, 0.5);
             
              bool4 b1 = equal(f1, f2);      
             
              //crashes pixel bender toolkit upon run
             
              if (b1 == true) {
              }
             
              //doesn't crash the toolkit
             
              bool4 b2 = bool4(true, true, true, true);
             
              if (b1 == b2) {
              }
             
              dst = sampleNearest(src,outCoord());
          }
      }

       

       

      any ideas? is it even possible to check if a bool4 is true with a single "true / false" flag?