Restrict use of TexStorage more in CopyImage.

We were being too permissive in some copyImage methods when checking
if we can create a render target or not. This would lead us to trying
to use an inconsistent TexStorage in some cases.

Note that we do need to create inconsistent TexStorage in cases where
we are doing a FBO copy *from* a mipmap-incomplete texture attachment.

BUG=angle:780

Change-Id: I5a849b5d8c53713e38cb5f5052a8bb88b3f56260
Reviewed-on: https://chromium-review.googlesource.com/224480
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Make commitRegion a base method of TextureD3D.

Use a helper method isValidIndex to preserve ASSERT checks.

Refactoring patch only.

BUG=angle:741

Change-Id: Ie19fa21db51cd0239a3b391de362584a9fbab2df
Reviewed-on: https://chromium-review.googlesource.com/222268
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Make ShBuiltInResources comparable with memcmp

Chromium builds a std::map with ShBuiltInResources as part of the key.
Comparator for == and < are needed for the map implementation.

Currently Chromium uses memcmp as the comparator. Padding
in ShBuiltInResources causes uninitialized reads.

Fix this by clearing the padding with memset during ShBuiltInResources
initialization.

Change-Id: I78aa3c59ce165503831aa2a67c96cf8af316c152
Reviewed-on: https://chromium-review.googlesource.com/223431
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
Use windows_sdk_path for the 8.0 SDK path and windows_8_1_sdk_path for 8.1.

Change-Id: I0cb4262552852ccbc772ca828a0faa7d3e63784b
Reviewed-on: https://chromium-review.googlesource.com/224483
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Always include precision in interm output if it's available

This helps with debugging precision propagation issues.

BUG=angle:787

Change-Id: Ia969481c8d933455cdafef4ae25c6ab3946bc1c2
Reviewed-on: https://chromium-review.googlesource.com/224281
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>