Commit 251bc28f by Ben Clayton

SpirvShader: Implement GLSLstd450Degrees

Bug: b/126873455 Tests: dEQP-VK.glsl.builtin.precision.degrees.* Change-Id: I4997c83f73a87957239e38fb14aef803b74ba911 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28650Tested-by: 's avatarBen Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent a15fcf44
......@@ -3275,6 +3275,15 @@ namespace sw
}
break;
}
case GLSLstd450Degrees:
{
auto radians = GenericValue(this, routine, insn.word(5));
for (auto i = 0u; i < type.sizeInComponents; i++)
{
dst.move(i, radians.Float(i) * SIMD::Float(180.0f / PI));
}
break;
}
default:
UNIMPLEMENTED("Unhandled ExtInst %d", extInstIndex);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment