This change deprecates rr::RcpSqrt_pp with rr::RcpSqrt. As with Rcp, RcpSqrt computes the result using Newton-Rhapson if it's faster and the initial approximation intrinsic is available on the current target. Currently, only LLVM on Intel will use NR for RelaxedPrecision. Note that passing in Precision::Relaxed will produce a faster, but less precise reciprocal sqrt. Also made it so that SprivShader instruction GLSLstd450InverseSqrt now invokes RcpSqrt(x, Precision::Full) instead of performing 1/sqrt(x). Note that the Vulkan spec states that inversesqrt()'s precision is 2 ULP, and sqrt()'s precision is inherited from 1.0 / inversesqrt(); however, our rr::Sqrt is implemented in terms of x86's sqrt intrinsic on x86, or as calls to sqrt from Math.h. Bug: b/169760262 Change-Id: I65ba9a64d1db934c523dda11c1a2c186059d220b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51268 Commit-Queue: Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:Nicolas Capens <nicolascapens@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| BUILD.gn | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| ComputeProgram.cpp | Loading commit data... | |
| ComputeProgram.hpp | Loading commit data... | |
| Constants.cpp | Loading commit data... | |
| Constants.hpp | Loading commit data... | |
| PixelProgram.cpp | Loading commit data... | |
| PixelProgram.hpp | Loading commit data... | |
| PixelRoutine.cpp | Loading commit data... | |
| PixelRoutine.hpp | Loading commit data... | |
| SamplerCore.cpp | Loading commit data... | |
| SamplerCore.hpp | Loading commit data... | |
| SetupRoutine.cpp | Loading commit data... | |
| SetupRoutine.hpp | Loading commit data... | |
| ShaderCore.cpp | Loading commit data... | |
| ShaderCore.hpp | Loading commit data... | |
| SpirvID.hpp | Loading commit data... | |
| SpirvShader.cpp | Loading commit data... | |
| SpirvShader.hpp | Loading commit data... | |
| SpirvShaderArithmetic.cpp | Loading commit data... | |
| SpirvShaderControlFlow.cpp | Loading commit data... | |
| SpirvShaderDebug.hpp | Loading commit data... | |
| SpirvShaderDebugger.cpp | Loading commit data... | |
| SpirvShaderEnumNames.cpp | Loading commit data... | |
| SpirvShaderGLSLstd450.cpp | Loading commit data... | |
| SpirvShaderGroup.cpp | Loading commit data... | |
| SpirvShaderImage.cpp | Loading commit data... | |
| SpirvShaderInstructions.cpp | Loading commit data... | |
| SpirvShaderInstructions.inl | Loading commit data... | |
| SpirvShaderMemory.cpp | Loading commit data... | |
| SpirvShaderSampling.cpp | Loading commit data... | |
| SpirvShaderSpec.cpp | Loading commit data... | |
| VertexProgram.cpp | Loading commit data... | |
| VertexProgram.hpp | Loading commit data... | |
| VertexRoutine.cpp | Loading commit data... | |
| VertexRoutine.hpp | Loading commit data... |