xref: /aosp_15_r20/external/skia/tests/sksl/wgsl/CastMat4x4ToMat4x3.wgsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1diagnostic(off, derivative_uniformity);
2diagnostic(off, chromium.unreachable_code);
3struct FSOut {
4  @location(0) sk_FragColor: vec4<f32>,
5};
6fn _skslMain(_stageOut: ptr<function, FSOut>) {
7  {
8    const a: mat4x3<f32> = mat4x3<f32>(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
9    const _skTemp0 = mat4x4<f32>(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
10    const b: mat4x3<f32> = mat4x3<f32>(_skTemp0[0][0], _skTemp0[0][1], _skTemp0[0][2], _skTemp0[1][0], _skTemp0[1][1], _skTemp0[1][2], _skTemp0[2][0], _skTemp0[2][1], _skTemp0[2][2], _skTemp0[3][0], _skTemp0[3][1], _skTemp0[3][2]);
11    (*_stageOut).sk_FragColor.x = f32(select(1, 0, all(a[0] == b[0])));
12  }
13}
14@fragment fn main() -> FSOut {
15  var _stageOut: FSOut;
16  _skslMain(&_stageOut);
17  return _stageOut;
18}
19