We pass integer uniforms as floating-point ones, which can cause an exception when converting them to fixed-point values. For example an integer value of -1 would be 0xFFFFFFFF which is Not-a-Number in IEEE-754 floating-point and can't be cast to an integer. In this case we don't actually care about the result because the fixed- point number is only used by the fixed-function pipeline. A safe but still fast way to compare floating-point numbers including NaNs is to treat them as one's complement integers, which can easily be converted into two's complement representation. Also rename bitCast<> to bit_cast<> to match the C++20 function. Change-Id: Id588d25ab70d31eda2800c24a8df539d6a3411d4 Reviewed-on: https://swiftshader-review.googlesource.com/c/21708Tested-by:Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| BUILD.gn | Loading commit data... | |
| Blitter.cpp | Loading commit data... | |
| Blitter.hpp | Loading commit data... | |
| Clipper.cpp | Loading commit data... | |
| Clipper.hpp | Loading commit data... | |
| Color.cpp | Loading commit data... | |
| Color.hpp | Loading commit data... | |
| Context.cpp | Loading commit data... | |
| Context.hpp | Loading commit data... | |
| ETC_Decoder.cpp | Loading commit data... | |
| ETC_Decoder.hpp | Loading commit data... | |
| LRUCache.hpp | Loading commit data... | |
| Matrix.cpp | Loading commit data... | |
| Matrix.hpp | Loading commit data... | |
| PixelProcessor.cpp | Loading commit data... | |
| PixelProcessor.hpp | Loading commit data... | |
| Plane.cpp | Loading commit data... | |
| Plane.hpp | Loading commit data... | |
| Point.cpp | Loading commit data... | |
| Point.hpp | Loading commit data... | |
| Polygon.hpp | Loading commit data... | |
| Primitive.hpp | Loading commit data... | |
| QuadRasterizer.cpp | Loading commit data... | |
| QuadRasterizer.hpp | Loading commit data... | |
| Rasterizer.hpp | Loading commit data... | |
| Renderer.cpp | Loading commit data... | |
| Renderer.hpp | Loading commit data... | |
| RoutineCache.hpp | Loading commit data... | |
| Sampler.cpp | Loading commit data... | |
| Sampler.hpp | Loading commit data... | |
| SetupProcessor.cpp | Loading commit data... | |
| SetupProcessor.hpp | Loading commit data... | |
| Stream.hpp | Loading commit data... | |
| Surface.cpp | Loading commit data... | |
| Surface.hpp | Loading commit data... | |
| TextureStage.cpp | Loading commit data... | |
| TextureStage.hpp | Loading commit data... | |
| Triangle.hpp | Loading commit data... | |
| Vector.cpp | Loading commit data... | |
| Vector.hpp | Loading commit data... | |
| Vertex.hpp | Loading commit data... | |
| VertexProcessor.cpp | Loading commit data... | |
| VertexProcessor.hpp | Loading commit data... |