commit | 3a4f401b6f7f2ac2ad23f668c19b306caf8a5346 | [log] [tgz] |
---|---|---|
author | Chia-I Wu <olv@google.com> | Wed Oct 03 11:10:12 2018 -0700 |
committer | Chia-I Wu <olv@google.com> | Thu Oct 04 12:26:22 2018 -0700 |
tree | 6e105d5dbb0dd8a7c10c903c14c3c9e9bcfd3bd0 | |
parent | 9bdd64de4681b01a9d026f9ca0960e089a8f3ef6 [diff] |
renderengine: clamp XYZ to [0.0, 1.0] in shaders texture2D can return strange negative values for some YUV textures. That should be a driver bug. But with scRGB and floating-point formats, we cannot be sure that colors will always stay non-negative after conversion to XYZ. We need to clamp XYZ to [0.0, 1.0] such that the following color processing behaves as expected. Bug: 116864006 Test: manual Change-Id: I8f432c63b800edc11ce3d86536192a5547144ca5