Attempt an Mac build fix

BUG=
TEST=mac bots build on GPU.FYI

Change-Id: I3dd2b07702e8c0a40d64ab973eb969ba50954640
Reviewed-on: https://chromium-review.googlesource.com/199611
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
Revert "Fix binary serialization to use explicit size and type."

This reverts commit 261988513e89479a0d121d045a8d89b64dc68214.

Change-Id: I959ca14fcbb257f12005f7f0b64a600e906a118c
Reviewed-on: https://chromium-review.googlesource.com/199630
Tested-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Remove gl::Varying::elementIndex.

We only assigned to elementIndex, and never referenced the value
at any point in our code.

BUG=angle:466

Change-Id: I541a353110bcd1863b07b21bcf21fad38be19ca1
Reviewed-on: https://chromium-review.googlesource.com/199735
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Split register allocation of varyings from the translator.

The translator gl::Varying struct does not need to know about register
allocation. We can put that entirely in the API library. This makes
exposing Varying variables with the new translator types cleaner.

BUG=angle:466

Change-Id: Ib85ac27de003913a01f76d5f4dc52454530859e6
Reviewed-on: https://chromium-review.googlesource.com/199736
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Optimize Texture*::updateStorage by iterating over fewer levels.

Only update the storage on levels that exist.  Especially helps for cube
maps which have 90 images that would be iterated over in all cases.  Added
an additional early-out check if the image is dirty for cube maps to match
the other texture types.

BUG=260069

Change-Id: I3d298f4f9ebdc23136a31138a3ef8364667fa78c
Reviewed-on: https://chromium-review.googlesource.com/199344
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Minimize the API calls done by InputLayoutCache::applyVertexBuffers.

Reduce the number of IASetInputLayout calls to 1 in all cases and set the
fewest number of buffers at once.

BUG=260069

Change-Id: I059337fc6601ecefd801ef37546935becaa0d355
Reviewed-on: https://chromium-review.googlesource.com/199345
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Remove references to software rendering in Renderer9.

BUG=angle:641

Change-Id: I3724c2504d43eae0528e8c72eb51e96c9d7c7a71
Reviewed-on: https://chromium-review.googlesource.com/198377
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Track if uniform data has been updated to avoid extra Map calls.

Compare all uniform data to the values currently stored in the uniform and
only mark the uniform as dirty if the data is new.  This saves lots of
buffer map calls when the same data is set on a uniform many times.

BUG=260069

Change-Id: Ic4df8a276a81b074211712ff50e5cc4d0d9bb612
Reviewed-on: https://chromium-review.googlesource.com/199346
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Fix code style violation in compiler/preprocessor

BUG=angle:650
TEST=no behavior change

Change-Id: Ib52f15f6471fc7897b66d11baee11216cf08158a
Reviewed-on: https://chromium-review.googlesource.com/199591
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
Add READ/DRAW_FRAMEBUFFER_BINDING_ANGLE to getQueryParameterInfo

Change-Id: I3e7f5cb0b4d2829eef86b878ffede0ac86279f57
Reviewed-on: https://chromium-review.googlesource.com/199684
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Use lowercase d3d header includes to fix ANGLE compilation on case sensitive OSes

The actual D3D header filenames are all lowercase.

Change-Id: I8f78d618d44360d34b5b01eb5a1972b35f2f15b7
Reviewed-on: https://chromium-review.googlesource.com/199692
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Refactor BeginQuery validation out of gl::Context.

Part of our effort to relocate all validation logic to a preliminary
pass outside of our state tracking or rendering layers.

BUG=angle:571

Change-Id: I5241daef6249910a781e78fd066debe0ab1d3f2b
Reviewed-on: https://chromium-review.googlesource.com/199348
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Move validation of EndQuery out of gl::Context.

BUG=angle:571

Change-Id: I8913eb1b565a4282d9d84d06933e8b854453f17d
Reviewed-on: https://chromium-review.googlesource.com/199349
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Optimize texture application in draw calls.

Gather all bound textures and samplers first and then pass them to
generateSwizzles and applyTextures to reduce redundant get calls.

BUG=260069

Change-Id: I5b10dddb01a6bfd756c58b76218838cfc1fd59b6
Reviewed-on: https://chromium-review.googlesource.com/199343
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Fix binary serialization to use explicit size and type.

Loading program binaries across different architectures would cause
runtime errors due to use of size_t.

Also fix the ANGLE major and minor version that were clobbered in an
earlier commit.

BUG=angle:647
BUG=371435

Change-Id: I9473cc7e119592fce336aa47881839543e337b69
Reviewed-on: https://chromium-review.googlesource.com/199633
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Handle interface blocks in getVariableInfo and
getUserDefinedVariableInfo.

BUG=angle:654

Change-Id: I07a230bbf2387e85168c50cb3719c669a7890f8a
Reviewed-on: https://chromium-review.googlesource.com/199687
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Don't discard serials of zero from the set of bound framebuffer serials.

A serial of zero is a valid texture serial but it was used by
RenderbufferStorage to denote a non-texture binding. Added a isTexture
method to Renderbuffers and RenderbufferStorage
has been updated to return -1 as the current texture serial to avoid
collisions.

BUG=angle:633

Change-Id: Ie27e4b185ac09b48b593ae0dea02aeff5950a44f
Reviewed-on: https://chromium-review.googlesource.com/200123
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Explicitly set the swap effect.

swapChainDesc.SwapEffect wasn't being set. The whole structure was initialized
to 0 and DXGI_SWAP_EFFECT_DISCARD has value 0 so this should have no effect.
Also sorted the field initialization in the order they're declared.

BUG=373360

Change-Id: If0113e7468c0bad024a07fec6ad9e223e19494b5
Reviewed-on: https://chromium-review.googlesource.com/200046
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Adds resource string generation to ANGLE

This will avoid Chrome source having to be updated each time that ANGLE's
ShBuiltInResources changes.

BUG=374942

Change-Id: If54dba8351de9b261ff269e885f231547c08ff0a
Reviewed-on: https://chromium-review.googlesource.com/200171
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Fix build on Windows 8.1 SDK.

The Windows 8.1 SDK includes a new DLL compiler DLL, and is useful
to test against, so we should fix the few deprecated functions and
warnings.

BUG=angle:649

Change-Id: I28bcf49564f3f7d7403d939d61dd78d3972281ba
Reviewed-on: https://chromium-review.googlesource.com/199341
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>