mojoshader_assembler.c
changeset 548 b37cdacb50d5
parent 544 f829f48e5214
child 549 13714d3b3fa2
equal deleted inserted replaced
547:90ea52905fca 548:b37cdacb50d5
  1030             swizzle |= (val << (i * 2));
  1030             swizzle |= (val << (i * 2));
  1031         } // for
  1031         } // for
  1032 
  1032 
  1033         if (saw_xyzw && saw_rgba)
  1033         if (saw_xyzw && saw_rgba)
  1034             invalid_swizzle = 1;
  1034             invalid_swizzle = 1;
       
  1035         else if (saw_rgba && !shader_is_pixel(ctx))
       
  1036             invalid_swizzle = 1;
  1035     } // else
  1037     } // else
  1036 
  1038 
  1037     if (invalid_swizzle)
  1039     if (invalid_swizzle)
  1038         fail(ctx, "Invalid swizzle");
  1040         fail(ctx, "Invalid swizzle");
  1039 
  1041