Use NV_draw_buffers to implement EXT_draw_buffers
commit0decd4403598013cb4313b120ad09b3674d7c4c7
authoroetuaho <oetuaho@nvidia.com>
Mon, 13 Oct 2014 08:40:46 +0000 (13 01:40 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 13 Oct 2014 08:41:10 +0000 (13 08:41 +0000)
tree0fd2acb0b1c7c0a1aff453a79c2bcc3d64bc188c
parent7e4038a9fef3214a7b45189dd87652fda15936eb
Use NV_draw_buffers to implement EXT_draw_buffers

NV_draw_buffers can be used in combination with GLES3.0 to emulate
EXT_draw_buffers. When GLES3.0 and NV_draw_buffers are present, but
native EXT_draw_buffers is not, the extension directive in shaders is
changed in ANGLE to make ESSL 1.00 shaders able to refer to
glFragData[n>0], and DrawBuffersEXT calls are directed to GLES3.0 core
DrawBuffers.

This enables the WEBGL_draw_buffers extension on Tegra K1. Performance
benefits are in the 5-25% range in demos that are able to render both
with and without the WebGL extension.

BUG=421882
TEST=WebGL conformance tests, gpu_unittests

Review URL: https://codereview.chromium.org/640283003

Cr-Commit-Position: refs/heads/master@{#299272}
gpu/command_buffer/service/feature_info.cc
gpu/command_buffer/service/feature_info.h
gpu/command_buffer/service/feature_info_unittest.cc
gpu/command_buffer/service/gles2_cmd_decoder.cc
gpu/command_buffer/service/test_helper.cc
ui/gl/generate_bindings.py