1cb93a386Sopenharmony_ciuniform half4 colorGreen, colorRed; 2cb93a386Sopenharmony_ci 3cb93a386Sopenharmony_cibool test_float() { 4cb93a386Sopenharmony_ci bool ok = true; 5cb93a386Sopenharmony_ci 6cb93a386Sopenharmony_ci ok = ok && ((float3x3(2) + 4) == float3x3(6, 4, 4, 4, 6, 4, 4, 4, 6)); 7cb93a386Sopenharmony_ci ok = ok && ((float3x3(2) - 4) == float3x3(-2, -4, -4, -4, -2, -4, -4, -4, -2)); 8cb93a386Sopenharmony_ci ok = ok && ((float3x3(2) * 4) == float3x3(8)); 9cb93a386Sopenharmony_ci ok = ok && ((float3x3(2) / 4) == float3x3(0.5)); 10cb93a386Sopenharmony_ci 11cb93a386Sopenharmony_ci ok = ok && (4 + (float3x3(2)) == float3x3(6, 4, 4, 4, 6, 4, 4, 4, 6)); 12cb93a386Sopenharmony_ci ok = ok && (4 - (float3x3(2)) == float3x3(2, 4, 4, 4, 2, 4, 4, 4, 2)); 13cb93a386Sopenharmony_ci ok = ok && (4 * (float3x3(2)) == float3x3(8)); 14cb93a386Sopenharmony_ci ok = ok && (4 / (float2x2(2, 2, 2, 2)) == float2x2(2, 2, 2, 2)); 15cb93a386Sopenharmony_ci 16cb93a386Sopenharmony_ci return ok; 17cb93a386Sopenharmony_ci} 18cb93a386Sopenharmony_ci 19cb93a386Sopenharmony_cibool test_half() { 20cb93a386Sopenharmony_ci bool ok = true; 21cb93a386Sopenharmony_ci 22cb93a386Sopenharmony_ci ok = ok && ((half3x3(2) + 4) == half3x3(6, 4, 4, 4, 6, 4, 4, 4, 6)); 23cb93a386Sopenharmony_ci ok = ok && ((half3x3(2) - 4) == half3x3(-2, -4, -4, -4, -2, -4, -4, -4, -2)); 24cb93a386Sopenharmony_ci ok = ok && ((half3x3(2) * 4) == half3x3(8)); 25cb93a386Sopenharmony_ci ok = ok && ((half3x3(2) / 4) == half3x3(0.5)); 26cb93a386Sopenharmony_ci 27cb93a386Sopenharmony_ci ok = ok && (4 + (half3x3(2)) == half3x3(6, 4, 4, 4, 6, 4, 4, 4, 6)); 28cb93a386Sopenharmony_ci ok = ok && (4 - (half3x3(2)) == half3x3(2, 4, 4, 4, 2, 4, 4, 4, 2)); 29cb93a386Sopenharmony_ci ok = ok && (4 * (half3x3(2)) == half3x3(8)); 30cb93a386Sopenharmony_ci ok = ok && (4 / (half2x2(2, 2, 2, 2)) == half2x2(2, 2, 2, 2)); 31cb93a386Sopenharmony_ci 32cb93a386Sopenharmony_ci return ok; 33cb93a386Sopenharmony_ci} 34cb93a386Sopenharmony_ci 35cb93a386Sopenharmony_cihalf4 main(float2 coords) { 36cb93a386Sopenharmony_ci return test_float() && test_half() ? colorGreen : colorRed; 37cb93a386Sopenharmony_ci} 38