Remove getData from BufferImpl.

We only ever call this method inside the D3D Renderer, so we can
downcast to BufferD3D and call getData on the D3D-specific type.

Leave a FIXME for handling index range validation, which will
need a CPU-side data cache.

Change-Id: Iaf71bc8055869a8561777b6b36f67e376a1d0b81
Reviewed-on: https://chromium-review.googlesource.com/224654
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Fixed some configuration data not being added to 64-bit builds.

The Debug and Release configurations are 32-bit only.  The Debug_Base and
Release_Base configurations should be used in these cases.

In the future we should not rely on defines being placed in these
configurations because if ANGLE is included in another project, they may
not have the same configuration names and the defines will not be added.
To combat this, always make sure that there are appropriate #ifdef's in
the headers and don't add defines that would result in poor performance if
they do not exist.

BUG=angle:772

Change-Id: I2b26ffb934f8b3d5e6e556a1e87c1c5ee209c430
Reviewed-on: https://chromium-review.googlesource.com/225051
Tested-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Fix precision tracking for built-in function return values

Previously, the type of the return value of all function calls was set to
the type of the return value in the function signature. This did not
carry precision information.

This patch changes this so that the return value precision is set
correctly for built-in functions. For single-argument math functions, it
mostly depends on that addUnaryMath sets the type of the return value to
be the same as the type of the operand. The type is replaced but the
precision information from the operand type is retained when needed. For
multi-argument math functions, precision is determined based on all the
nodes in the aggregate after the type has been set. For texture
functions, the precision is set according the sampler type as per ESSL
1.0 spec. For textureSize, the precision is always highp as per ESSL 3.0
spec.

BUG=angle:787

Change-Id: I48448e3ffe38656b91177dee9b60dd07a03cd095
Reviewed-on: https://chromium-review.googlesource.com/224951
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Only use the Windows 8.1 SDK for WinRT configurations.

BUG=angle:772
BUG=395405

Change-Id: If26a0ec34e6bfd0e22d20803a0bb3ac2000a8e34
Reviewed-on: https://chromium-review.googlesource.com/225531
Reviewed-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Fix build failure on WinRT due to missing Sleep definition.

Change-Id: I9032484dde6e690fcd175d6d76192724e5bc0357
Reviewed-on: https://chromium-review.googlesource.com/225893
Reviewed-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Fixed D3DDisassemble function dynamic GetProcAddress failure on WinRT

Change-Id: I32a345803c9183e0b9b77d529027711f8c8e1ad8
Reviewed-on: https://chromium-review.googlesource.com/225847
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Rename ANGLE_ENABLE_PERF -> ANGLE_ENABLE_DEBUG_ANNOTATIONS

Change-Id: I701cd5ee749797428171e9c58a46fce626b9a969
Reviewed-on: https://chromium-review.googlesource.com/223590
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Rename ANGLE_ENABLE_TRACE -> ANGLE_ENABLE_DEBUG_TRACE

Change-Id: Ib70c456c8d01161e370b9165ff4daa2f0f90c840
Reviewed-on: https://chromium-review.googlesource.com/223591
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Add ANGLE_ENABLE_DEBUG_TRACE_TO_DEBUGGER, to output trace to debugger window

Change-Id: I7be71c41b0ec3a77f508c90c2de3331c9522a11b
Reviewed-on: https://chromium-review.googlesource.com/223592
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Fix an issue with separate invariant statement.

Basically we end up with an extra "invariant xxx ;;" on GL backend.

This is not handled correctly by Mac drivers and also out shader translator.

BUG=angle:776
TEST=webgl conformance on mac/windows

Change-Id: If32867efba64ab0d3e6e690155790b90d736439f
Reviewed-on: https://chromium-review.googlesource.com/225780
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Updated mipmap generation to return Error objects.

BUG=angle:520

Change-Id: Ic4e57148d031d6c452b3054efad98f6e730c7691
Reviewed-on: https://chromium-review.googlesource.com/221394
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Updated Image11 to use gl::Errors for staging texture manipulation.

BUG=angle:520

Change-Id: I5792b139ddd69c2cabc3b901a7067438c1ee363b
Reviewed-on: https://chromium-review.googlesource.com/221395
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Moving Uniform handling into ProgramD3D.

Moves the last references to HLSLBlockEncoder out of ProgramBinary. Only one reference to ShaderD3D remains.

BUG=angle:731
Change-Id: Ie23e24e09fbed4c8c5fab3bab814b7092a383c7f
Reviewed-on: https://chromium-review.googlesource.com/220940
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Brandon Jones <bajones@chromium.org>
Remove ShGetVariableInfo() and related code.

BUG=angle:775
TEST=chromium builds and runs fine

Change-Id: Ic62d3a3c9a8f034880b77a96f7f1c6be2691985e
Reviewed-on: https://chromium-review.googlesource.com/226004
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Use D3D11 Debug Annotations when D3D9 is unavailable

Change-Id: I37ac5fe7f0b2fe5e71bd7f0afca55e9894f3463c
Reviewed-on: https://chromium-review.googlesource.com/224512
Tested-by: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Updated Image9 to use gl::Errors for staging texture manipulation.

BUG=angle:520

Change-Id: I527a2bcadbf1abb05bd461d35ddbd7e28d487639
Reviewed-on: https://chromium-review.googlesource.com/221396
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Changes gl::RenderbufferStorage to rx::RenderbufferImpl

BUG=angle:782

Also eliminates Colorbuffer/DepthStencilBuffer and related friends
and adds the RenderbufferD3D implementation of RenderbufferImpl.

Change-Id: Ibe72c9589b3c238b952744e7cfd70d97ec898eb9
Reviewed-on: https://chromium-review.googlesource.com/222925
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Reject shaders of a version that the compiler doesn't support.

For example, WebGL 1.0 compiler should not compile WebGL 2.0 shaders.

BUG=angle:
TEST=815

Change-Id: Iaec66fa5127426778aff6e3891e2c214048d7457
Reviewed-on: https://chromium-review.googlesource.com/226380
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Changed feature macros to reduce accidental enabling/disabling

Change-Id: Ieb1a0c55f412f2a1bb858522b2dfaa7a60aa7ddb
Reviewed-on: https://chromium-review.googlesource.com/226304
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Brandon Jones <bajones@chromium.org>
Fix angle_unittests failures.

BUG=angle:815
TEST=angle_unittests

Change-Id: I4d59f227b7c72f4f456d0a60d8507d097ef05dec
Reviewed-on: https://chromium-review.googlesource.com/226463
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>