Generate VS2013 public projects.

Allows us to support 64 bit builds in the packaged project files.

BUG=angle:714

Change-Id: I7e2f57ec87d1c46b348a4821821d1e21be671e49
Reviewed-on: https://chromium-review.googlesource.com/210825
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Fix incorrect validation of ES3 internal format/format/type combinations.

* Fix wrong internal format being passed to ValidateTexImageFormatCombination.
* Fix ValidateTexImageFormatCombination validating the format instead of
  internal format for general support.
* Fix support checks for format and type comparing with wrong format and
  type fields.
* Add an early-out in format and type check loop to reduce iterations.

BUG=angle:658

Change-Id: I05e1b9f58b2e5ac4b5e1c0fa5a45cf37fb6a4ccd
Reviewed-on: https://chromium-review.googlesource.com/210884
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Move implementation of hasMappedBuffer to State.

Refactoring patch only.

BUG=angle:571

Change-Id: Ib9f3145eaa457d94e488fd42eb4c4b9133768996
Reviewed-on: https://chromium-review.googlesource.com/210643
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Export shader variables from the translator DLL.

This will allow us to use these methods when compiling the translator
as a DLL.

BUG=angle:466,697

Change-Id: Ic9169fb7c69fe0bf5f98addfc128a30ee6b2159d
Reviewed-on: https://chromium-review.googlesource.com/208752
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Add compiler option SH_REGENERATE_STRUCT_NAMES.

BUG=angle:701
TEST=webgl conformance tests

Change-Id: I13b35900956e7d840d5891a5bab90a400347cd6f
Reviewed-on: https://chromium-review.googlesource.com/209229
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Fix GN build with missing ShaderVars.cpp.

Change-Id: I29be6cdda643f83a40a6adc9b76153667aafcc51
Reviewed-on: https://chromium-review.googlesource.com/211400
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Unifying the various texture interfaces where possible

Also fixed diamond inheritance pattern that was causing trouble
on Windows 8

BUG=angle:688, angle:720
Change-Id: I678826bd4f3927c68ca1eb2e018dbb5aad33a8cc
Reviewed-on: https://chromium-review.googlesource.com/211037
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
For SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS, assign precision to temp variables.

Otherwise on Windows or other platforms with GLES backend, using this workaround
will trigger shader compile failure.

For the moment, to simplify the workaround, for any missing precisions in float,
we always assign the highest available precion to it.

BUG=angle:695
TEST=webgl conformance tests

Change-Id: I810579442bc7fc61d6a52b76aff31a779046fa22
Reviewed-on: https://chromium-review.googlesource.com/211253
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Regenerate default projects for recently added shader translator changes.

Change-Id: Ic9b8758477d334a0dcd564f5f2548b5a64584fc7
Reviewed-on: https://chromium-review.googlesource.com/211444
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Fix application of vertex divisor for non-instanced draws in D3D9

BUG=398337

ANGLE_instanced_arrays defines the behavior of the non-instanced
draw calls (glDrawArrays, glDrawElements) such that they behave as
single-instance draws, so the vertex divisor should still apply. We
were handling this correctly in D3D11, but not D3D9.

This fixes a new WebGL conformance test:
https://www.khronos.org/registry/webgl/sdk/tests/conformance/extensions/angle-instanced-arrays.html

Change-Id: Ib50e189d866d6dc97612e46460db4ca1723b3662
Reviewed-on: https://chromium-review.googlesource.com/211445
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Revert "Fix application of vertex divisor for non-instanced draws in D3D9"

Other issues turn up on the FYI bots with this patch applied; reverting until this is investigated further.

This reverts commit 9f6907bfdd4cf95d20408831b1776a6efd221ab3.

Change-Id: Ib30c51b2c905e87973c73b06baa4b8ebba31d210
Reviewed-on: https://chromium-review.googlesource.com/211683
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Fix nameless struct handling.

BUG=401296

The addition of layout qualifier handling in es3 development inadvertently
broke handling of nameless structs.

Change-Id: I805bab7a981d1f7f6227ae043720296fc3454662
Reviewed-on: https://chromium-review.googlesource.com/211860
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Fix application of vertex divisor for non-instanced draws in D3D9

BUG=398337

*Re-land*

ANGLE_instanced_arrays defines the behavior of the non-instanced
draw calls (glDrawArrays, glDrawElements) such that they behave as
single-instance draws, so the vertex divisor should still apply. We
were handling this correctly in D3D11, but not D3D9.

This fixes a new WebGL conformance test:
https://www.khronos.org/registry/webgl/sdk/tests/conformance/extensions/angle-instanced-arrays.html

Change-Id: I5ed09d41229c8996a78a3b55893c6a655a423644
Reviewed-on: https://chromium-review.googlesource.com/211930
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Initialize TranslatedAttributes

BUG=398337

Uninitialized TranslatedAttributes were causing false positives
in checks for nonzero attrib divisor.

Change-Id: I44655d3fbe4f5478ca3757e05db38799d014e4c7
Reviewed-on: https://chromium-review.googlesource.com/211931
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Minor cleanup to Query constructor to normalize it with other interfaces

Change-Id: I562245cf6323edc7a127480e8de6ac16c6f97c03
Reviewed-on: https://chromium-review.googlesource.com/211641
Tested-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Amend comment about nameless structs & layout qualifiers

Change-Id: I1177c808bffd2beba7d52bd8f8869125a1624698
Reviewed-on: https://chromium-review.googlesource.com/212700
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Simplify the creation of OS-specific windows and timers in the samples.

BUG=angle:521

Change-Id: I9550269e9cd67fc24246853bec3c1f67cb16da2a
Reviewed-on: https://chromium-review.googlesource.com/211130
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Remove the gclient file, it should be generated now.

BUG=angle:713

Change-Id: Icd3e9c5212baf4c1dc781df6fef68c078b054e1a
Reviewed-on: https://chromium-review.googlesource.com/210883
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Fix swizzle formats being assigned incorrectly.

* Non-4 component formats cannot be used as swizzle formats.
* Unsized formats should not have swizzle formats.

BUG=angle:721

Change-Id: Ic4e2642f5dc4c9811768961fbab00f6edd200ce1
Reviewed-on: https://chromium-review.googlesource.com/211241
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Fix reversed shift in the huge SetData test.

BUG=angle:716

Change-Id: I1b621668b78373e0566f6eab6034993ec09aa4b9
Reviewed-on: https://chromium-review.googlesource.com/213221
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>