OSDN Git Service

drm_hwcomposer: name the texture samplers individually and unroll loop
authorHaixia Shi <hshi@chromium.org>
Tue, 13 Oct 2015 20:52:55 +0000 (13:52 -0700)
committerHaixia Shi <hshi@google.com>
Wed, 14 Oct 2015 04:05:32 +0000 (04:05 +0000)
commit806b395c7ad59387773f31ffb5eb7c2f340bd794
treeccf5a141ddd3f3e48ca9905cfc070c425a177d13
parentf95a1f03c188a9c6b51e849c1a959131f59e53da
drm_hwcomposer: name the texture samplers individually and unroll loop

Per GLSL spec: when aggregated into arrays within a shader, samplers can
only be indexed with a "dynamically uniform integra expression", other-
wise results are undefined.

The current fragment shader is not spec compliant because it evaluates
the sampler array in a non-uniform flow control, where the loop may exit
early in a "break" statement depending on the per-pixel alpha value.

BUG=24718688
BUG=chrome-os-partner:46348
TEST=follow bug report and verify GLWorker composites 5 layers correctly

Change-Id: I3a4c4b5aa847a1b5ec32f58f0e8c0b349289f5f5
glworker.cpp