Clamp float values to correct range before conversion to normalized
Per Vulkan spec 2.9.2, when converting from a floating point value to
unsigned normalized, we must first clamp to [0,1]. When converting from
a floating point value to signed normalized, we must first clamp to
[-1,1]. This wasn't done to clear values.
Test: dEQP-VK.rasterization.provoking_vertex.*
Bug: b/140203285
Change-Id: I3f8c421b187b6a7e8bcb22d45142dc1664221605
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35668Tested-by:
Chris Forbes <chrisforbes@google.com>
Presubmit-Ready: Chris Forbes <chrisforbes@google.com>
Reviewed-by:
Ben Clayton <bclayton@google.com>
Showing
Please
register
or
sign in
to comment