Граф коммитов

5786 Коммитов

Автор SHA1 Сообщение Дата
Olli Etuaho 115056012f D3D11 Texture refactoring: Add ANGLEFormat enumeration to C++ code
Texture formats that are internal to ANGLE can now be uniquely identified
using the ANGLEFormat enum.

GetANGLEFormatInfo returns a structure with the DXGI texture formats
associated with the ANGLE format.

For starters, the ANGLEFormat enum is used when building texture info
structures queried from GetTextureFormatInfo.

BUG=angleproject:1244
TEST=angle_end2end_tests

Change-Id: I58a2027a1d9b7a5621f943cc5ceeb88a858009e3
Reviewed-on: https://chromium-review.googlesource.com/328254
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-25 14:24:40 +00:00
Jamie Madill 1fbc59fe2e D3D11: Enable dirty bits for Framebuffer11.
This patch works using a notification scheme - whenever a Texture or
Renderbuffer changes in such a way as to recreate its RenderTarget, we
pass a signal to the Framebuffer to invalidate some internal state.
Everything is entirely tracked in the Renderer11 layer, and the GL
layer is left untouched.

A RenderTarget11 now tracks points to which it is bound, and the
Framebuffer11 is mostly responsible for managing those links.

The three locations where we notify a Framebuffer when its bound
RenderTargets might be dirty are:

 1) RenderTarget11::~RenderTarget
 2) EGLImageD3D::copyToLocalRendertarget
 3) TextureStorage11_2D::useLevelZeroWorkaroundTexture

This patch gives about a 10% score increase in the D3D11 draw call
benchmark on my system.

BUG=angleproject:1260

Change-Id: Ide38aeadff4a2681bf5bd685e8ca3c9e2612a380
Reviewed-on: https://chromium-review.googlesource.com/327255
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-25 04:18:00 +00:00
Jamie Madill d834e3dc0d D3D11: Fix Array texture depth-stencil attachments.
We were missing support for these layer depth-stencil attachments.
This fixes running a WebGL test for this feature.

BUG=angleproject:1260
BUG=angleproject:1315

Change-Id: Ida7d44ba1fe65d5da95d2db721e497bfa685db77
Reviewed-on: https://chromium-review.googlesource.com/327402
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-24 20:11:12 +00:00
Olli Etuaho f434906cbe Group D3D11 DXGI format info under a struct
This patch refactors how DXGI format info is stored. The goal is to
make it easier to make changes that affect both swizzle formats and
regular texture formats, and make it easier to pass the format sets
around.

BUG=angleproject:1244
TEST=angle_end2end_tests

Change-Id: I1cc220bccbbdde9200a41829fdc37c8ec123c6a1
Reviewed-on: https://chromium-review.googlesource.com/329072
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-24 17:16:43 +00:00
Olli Etuaho 6151af8cb2 Remove renderFormat from TextureFormat structure
The renderFormat is only ever needed in renderer11_utils when
determining which multisample sample counts a format supports.
Determine the renderFormat in the context where it is needed instead
of storing it in the TextureFormat structure. Extra fallbacks can
also be removed from the code.

The D3D11FormatTablesTest is restructured so that it doesn't need to
use the renderFormat field.

This refactoring is done to make it simpler to expand usage of the
ANGLE format enumeration in the C++ code.

BUG=angleproject:1244
TEST=angle_end2end_tests,
     dEQP-GLES3.functional.fbo.* (no regressions)

Change-Id: I980152eb2f3fdaaa1cc5b08e3c9b695c1625e9e5
Reviewed-on: https://chromium-review.googlesource.com/328680
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-23 10:34:50 +00:00
Olli Etuaho 8fd2ca41cb Fix MSVS 2013 build
Implicit conversion from int to boolean was generating a warning on
MSVS 2013.

Still useful to keep support around at least while build instructions
recommend using MSVS 2013.

Change-Id: I6975198f4bc6740a745454375f422d9c67ffaea5
Reviewed-on: https://chromium-review.googlesource.com/329070
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
2016-02-23 09:25:34 +00:00
Jamie Madill ad9f24e1a2 Don't always sync all dirty object state on update.
This leads to a problem where we're synching objects out of order. For
instance, when we call SetImage, we need to sync the pack state. But
SetImage can affect the FBO state, so we need to sync the FBO only
after we've finished with SetImage.

Fix this by using a mask of dirty objects to sync instead of all of
them, always. This also has the side effect of deferring some syncs
that don't have to be processed immediately.

BUG=angleproject:1260

Change-Id: I5678d8f967930d11b42a4309d209215be2bae963
Reviewed-on: https://chromium-review.googlesource.com/327259
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-23 01:44:21 +00:00
Tibor den Ouden 662986f2ee Implement dynamic cast to TIntermBranch * on TIntermNode
On the TIntermNode class there is no Derived *getAsDerived() for
TIntermBranch. This is needed for the shader debugger to determine
the node type.

BUG=angleproject:1320

Change-Id: I9ce07017ccdb206c06c296b003b31eab6c65653c
Reviewed-on: https://chromium-review.googlesource.com/328281
Tryjob-Request: Tibor Ouden, den <tibordenouden@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-23 01:41:32 +00:00
John Bauman 24a504ecb8 Clear SRV cache on keyed mutex texture unbind from TextureStorage11
If the calling code releases the keyed mutex after the unbind then D3D will
unbind the SRV or RTV from the pipeline without notifying the cache. This
allows the SRV to be destroyed, which means that a subsequently-created SRV
could have the same address. This would cause the new SRV to not be correctly
bound to the pipeline if its slot is the same as the unbound SRV.

BUG=588000
Change-Id: I0ad1ba3706a6bcc1fee50745e6148c9b23e578f6
Reviewed-on: https://chromium-review.googlesource.com/328400
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: John Bauman <jbauman@chromium.org>
2016-02-23 00:58:16 +00:00
Jamie Madill 73a8496999 Refactor more Texture entry points to a consistent style.
TexImage, SubImage and the Compressed variants were all taking a GL
Context as the first parameter, which is a layering violation and
also caused problems with reworking how the sync works. Fix this
by refactoring them in the same style as the CopyTex* entry points.

BUG=angleproject:1260
BUG=angleproject:747

Change-Id: Ibe5e87d0ebc790e2dcadb8ba153cf40fec73d1f6
Reviewed-on: https://chromium-review.googlesource.com/327258
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-23 00:15:40 +00:00
Corentin Wallez 6ad306cb43 dEQP: search for the data directory relative to the exe path.
BUG=580045

Change-Id: I58bfa9ab6766eaae756b3c0f4d28f545e86d543b
Reviewed-on: https://chromium-review.googlesource.com/327306
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2016-02-22 23:29:28 +00:00
Olli Etuaho 8a854d68fc Replace GetDXGIFormatInfo with a GetDXGIFormatSizeInfo where possible
It's not always clear which format should be passed to GetDXGIFormatInfo,
since a resource is associated with multiple formats. In some cases, one
of the formats is typeless and one of them is typed, which would return
different type information depending on which one is used. In some cases,
one of the formats may even be a depth format while another is not.
GetDXGIFormatSizeInfo will return correct data no matter which format
associated with a certain resource is passed to it.

Remaining uses of GetDXGIFormatInfo will need to be addressed separately,
either making sure that they always use the format that makes sense in a
given context, or plumbing in the required information in some other way.

BUG=angleproject:1244
TEST=angle_end2end_tests

Change-Id: If3cb03ab68d27743b1fdeb539234ec621dfa3c04
Reviewed-on: https://chromium-review.googlesource.com/328230
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-22 22:50:49 +00:00
Frank Henigman 8322cb91aa Corrections to GLES sRGB formats.
This stops Mesa from complaining when using GLES 3.0 in the back end.

BUG=angleproject:1301

Change-Id: Ib9c0397586a11c407c6aa9ad1544e12b43dd08a7
Reviewed-on: https://chromium-review.googlesource.com/324031
Tryjob-Request: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2016-02-22 21:56:22 +00:00
Olli Etuaho 6253415f35 Mark sampler metadata clean when it is updated
This was accidentally left out of the patch:

"Pass texture base level to shaders on D3D11"

TEST=angle_end2end_tests
     angle_perftests on d3d11
BUG=587846

Change-Id: I5d801288303cf0e0a3d52c1314aca95c47f02e25
Reviewed-on: https://chromium-review.googlesource.com/328960
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-22 13:40:37 +00:00
Olli Etuaho 6ee394a193 Add initializer function to more texture formats
All GL RGB formats that ANGLE stores as RGBA formats under the covers
need to have their alpha channel set to 1. See GLES 3.0.4 table 3.24
for the relevant spec. In some cases, this is handled by the
dataInitializerFunction associated with the format. Previously, some
texture formats had the function set correctly, but not all.

Associating formats with the datainitializerFormat is now a
responsibility of the gen_texture_format_table.py script. The new
automation there makes sure that all GL RGB formats emulated with
RGBA formats get a data initializer function.

Tests are added in end2end_tests for most of the RGB formats.

BUG=angleproject:1318
TEST=angle_end2end_tests

Change-Id: Iad860357f33d87c625445ea6c58a53af47e0b547
Reviewed-on: https://chromium-review.googlesource.com/328253
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-22 11:02:56 +00:00
Nico Weber 7a533f74f0 Add a few missing newlines at eof.
Change-Id: Ie4b0811be8fe2d075a8854f1b9d318f7cb747cd1
Reviewed-on: https://chromium-review.googlesource.com/320930
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-19 21:40:13 +00:00
Olli Etuaho ea6b6376c5 Remove AnyDevice from gen_texture_format_table
This makes the generated code easier to read.

BUG=angleproject:1318
BUG=angleproject:1244
TEST=angle_end2end_tests

Change-Id: I6f232f3b8959cf8c72efb1e68b3fae6358b7b698
Reviewed-on: https://chromium-review.googlesource.com/328252
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-18 19:59:42 +00:00
Olli Etuaho a615852dd8 Split texture_format_data.json into two files
After this change, texture_format_map.json maps the GL internal formats
to an enumeration of formats that is internal to ANGLE.

Each ANGLE format specifies a unique combination of DXGI formats and
what type of data the format contains. In the future, the ANGLE format
could be used instead of DXGI format inside C++ code to identify which
type of data a resource contains. This becomes useful when a GL format is
associated with multiple DXGI formats, which may have different type
information (for example depth vs. red, integer vs. float).

texture_format_data.json is changed to only store data on these ANGLE
formats.

BUG=angleproject:1318
BUG=angleproject:1244
TEST=gen_texture_format_table.py (no changes in autogenerated file)

Change-Id: I729c4a4d6fc66ee61598ef2d879e6785c85d40ab
Reviewed-on: https://chromium-review.googlesource.com/328251
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-18 18:18:38 +00:00
Olli Etuaho cbed3f5b74 Sort texture formats in gen_texture_format_table.py better
Sort the formats in a meaningful way, so that even if the structure of
the source files change, the order can be maintained. This makes it
easier to review further changes that affect the autogenerated texture
format table.

BUG=angleproject:1318
BUG=angleproject:1244
TEST=angle_end2end_tests

Change-Id: Id3602a809137da43431144a31e36d4a0ed2e596e
Reviewed-on: https://chromium-review.googlesource.com/328250
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-18 16:57:52 +00:00
Olli Etuaho f8bf583b8c Pass integer texture format bit count to shaders on D3D11
This will be needed in the future when integer texture wrap mode support
will be added by sampling integer textures through FLOAT/UNORM/SNORM
SRVs.

The bit count needs to be passed for 8-, 10- and 16-bit textures. 32-bit
integer textures are the ones left over. Only passing the bit counts for
the absolute minimum number of formats avoids unnecessary driver constant
buffer updates.

BUG=angleproject:1244
BUG=angleproject:1095
TEST=angle_end2end_tests

Change-Id: I28a84588842b2eb9a1661454437d21c22ce794b7
Reviewed-on: https://chromium-review.googlesource.com/326944
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-18 11:53:09 +00:00
Olli Etuaho 72e6606d68 Add more const qualifiers in TextureStorage11
This makes the code easier to follow.

BUG=angleproject:1244
TEST=angle_end2end_tests

Change-Id: I7787b04217a6771629e69f6f67586f62ce5cfccf
Reviewed-on: https://chromium-review.googlesource.com/327053
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-18 11:52:01 +00:00
Geoff Lang b9ada71de8 Sync the D3D11 rasterizer state if pointDrawMode or multisample changes.
When drawing points, culling is disabled to make sure the generated point
sprites are not culled. Since there are no dirty bits for pointDrawMode or
multiSample, they were not being checked to ensure the rasterizer state was
correct.

BUG=586531

Change-Id: I8fe60dd8d5bbc79b1bce2c0aa62c40cee560fe24
Reviewed-on: https://chromium-review.googlesource.com/327862
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2016-02-17 20:52:42 +00:00
Olli Etuaho bce743aba4 Use texture base level to implement textureSize on D3D11 HLSL
HLSL GetDimensions call doesn't take the texture base level into account,
so ANGLE needs to use the texture base level passed in uniforms to
emulate ESSL textureSize() which does take it into account.

After this change the relevant dEQP tests pass on NVIDIA, Intel is still
suffering from an issue where a wrong value is returned when the lod
is > 0 (tested on Intel HD Graphics 4600). AMD is also suffering from an
unknown issue.

BUG=angleproject:596
TEST=dEQP-GLES3.functional.shaders.texture_functions.texturesize.*
     (all pass on NVIDIA now), angle_end2end_tests

Change-Id: I13e33d126008ecdf2b89461a3fb5040949cf19e2
Reviewed-on: https://chromium-review.googlesource.com/322123
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-15 15:54:17 +00:00
Olli Etuaho 618bebcde4 Pass texture base level to shaders on D3D11
The base level is passed to shaders in an array included in the driver
uniform block. This is done on feature levels above 9_3, which treat
samplers as indices to sampler arrays in shaders.

A separate uniform block couldn't be used for the sampler metadata,
since that would bring the number of available uniform blocks down to
below minimum level defined by GLES 3.0.

BUG=angleproject:596
TEST=angle_end2end_tests

Change-Id: Ie040521402f9996d51a978aeeba9222e9dd761ce
Reviewed-on: https://chromium-review.googlesource.com/326290
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-15 11:45:52 +00:00
Jamie Madill d14e3c45c5 Initialize TextureState::usage.
This was probably omittted some time ago, and was showing up as
garbage in the debugger in some cases.

BUG=angleproject:1260

Change-Id: Ifca5243d0c94e7659a2245e327a72eed9dd918ab
Reviewed-on: https://chromium-review.googlesource.com/327401
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-13 00:35:22 +00:00
Ian Ewell 89f2845cd1 Context virtualization for D3D11 queries
Queries in D3D11 are now virtualized such that they work as expected with
multiple contexts. Timer queries now only time the operations that their
context is responsible for and the operations of other contexts are
ignored.

BUG=angleproject:657

Change-Id: I667de594bdb5831d126d5801c0e692ded4c88bf4
Reviewed-on: https://chromium-review.googlesource.com/327150
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Ian Ewell <ewell@google.com>
2016-02-12 19:54:46 +00:00
Jamie Madill dc10797822 Clean up the style in TextureStorage11.
This is a pure refactoring change, and should behave identically.

BUG=angleproject:1260

Change-Id: I44f5ef2f1444ffd8f8dd6ce55c266ec95781a6d8
Reviewed-on: https://chromium-review.googlesource.com/327266
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-12 18:49:55 +00:00
Cooper Partin 8613f49468 Fixed clang build for InputLayoutCache.
Change-Id: I0757874fad5f665cf4629092ad2d0d5982ca4856
Reviewed-on: https://chromium-review.googlesource.com/327301
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-11 19:53:41 +00:00
Cooper Partin 534bf87b8a Implemented instanced rendering for emulated point sprites
Non-instanced PointSprite emulation for lower feature levels is
implemented using D3D DrawIndexedInstanced and an instanced vertex
buffer containing a pointsprite quad.

GL instanced rendering using glDrawArraysInstanced and
glDrawElementsInstanced with pointsprite emulation is performed using
a for-loop.  The loop iterates over each instance to render and adjusts
the buffer offsets accordingly. This is not performant and is only used
and required by this chosen pointsprite emulation method.

Indexed instanced (glDrawElementsInstanced), uses the same offset loop
because the vertex buffer containing the data to be rendered has already
been expanded using getEmulatedIndexedBuffer().  Expanding the buffer
makes the two rendering operations similar enough to share code.

BUG=angleproject:1279
TEST=angle_end2end_tests

Change-Id: If46cc9f158e29f5518c70ad630b3228f474a9f8b
Reviewed-on: https://chromium-review.googlesource.com/321407
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2016-02-11 18:09:06 +00:00
Jamie Madill cfd6b2b6e9 D3D11: Add a test to cover a clear RTV driver bug.
See dEQP-GLES3.functional.fbo.color.repeated_clear.sample.tex2d.rgba8

This test uses ClearRenderTargetView to clear various FBO textures,
but it does not seem to work correctly on my Nvidia configuration.
It has been reported to Nvidia. It also seems to fail on Intel.

Current GPU: NVIDIA GeForce GTX 660
Current Driver: 10.18.13.5598 (9-13-2015)
Works on Desktop OpenGL back-end, also on AMD R5230

BUG=angleproject:1305

Change-Id: I4b53b7376faf71f234d05c90f4fb55462de23e36
Reviewed-on: https://chromium-review.googlesource.com/314304
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-11 17:14:50 +00:00
Olli Etuaho ee991799fc Fix texture swizzle cache initialization
Texture swizzle cache needs to be initialized so that the keys do not
represent a valid swizzle state before any swizzled textures have been
cached.

BUG=angleproject:1095
TEST=dEQP-GLES3.functional.texture.swizzle.* (all pass)

Change-Id: I66c10ed49134875d29b07852488a41a776e8fb67
Reviewed-on: https://chromium-review.googlesource.com/326971
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-11 10:39:49 +00:00
John Bauman 0ecb18b9b9 Avoid a copy in TextureStorage11::setData
This is essentially a reland of 9cf9bcbeca

This code always allocates a new memory buffer for the texture memory,
picks a load function to copy/convert the input data into it, and the
uploads.

In the case where the input format matches the upload format we should
be able to skip the allocation and copy and be much happier.

Change-Id: If4281aeb4cd7bbbebba60122a10610a916833052
Reviewed-on: https://chromium-review.googlesource.com/326852
Tryjob-Request: John Bauman <jbauman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: John Bauman <jbauman@chromium.org>
2016-02-11 00:28:24 +00:00
Kenneth Russell 0dcaaf7765 Re-enable win_angle_x64_dbg_ng as a trybot target.
BUG=chromium:585270

Change-Id: I94b78d21aa700fbc7549f9f30534ba9f414780a3
Reviewed-on: https://chromium-review.googlesource.com/326924
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-02-10 19:06:16 +00:00
Kenneth Russell 3271328ca5 Revert "Re-enable win_angle_x64_dbg_ng as a trybot target."
This reverts commit b36b491c00.

Forgot to restart the tryserver.chromium.angle waterfall to add this bot, and now waterfall restarts are broken: http://crbug.com/585632 .

Change-Id: Id25ac99a54013a9dd1406d4680717bef12a75940
Reviewed-on: https://chromium-review.googlesource.com/327033
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2016-02-09 23:52:35 +00:00
Kenneth Russell b36b491c00 Re-enable win_angle_x64_dbg_ng as a trybot target.
BUG=chromium:585270

Change-Id: I9d95667d676f54bfe8901a428a6cb5eddf927819
Reviewed-on: https://chromium-review.googlesource.com/326830
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2016-02-09 23:45:35 +00:00
Ian Ewell 536ebf4dde Increase the timeout on Timer queries tests.
On Mac, the timer queries tests have flakiness as the tests may timeout
before the query result is available. The time to wait before throwing a
timeout error in the tests was therefore increased by a factor of 20.

BUG=585498

Change-Id: I55047ee7759e6d2dde69294df451202dfb498034
Reviewed-on: https://chromium-review.googlesource.com/327031
Commit-Queue: Ian Ewell <ewell@google.com>
Reviewed-by: Ian Ewell <ewell@google.com>
2016-02-09 18:36:26 +00:00
Ian Ewell 292f005f3e Fix context virtualization for timer queries
In the current implementation of query virtualization, queries are
paused/resumed during draw calls. Timer queries however are affected by
every OpenGL call, so virtualization and context switches for timer
queries must happen every time there is a context switch. Thus the logic
for context-switching queries was moved to a new function in the GL state
manager that is called everytime a makeCurrent call on the context is
made. Since queries may be made after a context is made current, the state
manager needs to keep track of any new queries that are started in a
context, so an additional delegate function was added to the state manager
that is called every time a glBeginQuery() call is made that adds the
query object to a set. All the queries in that set are paused when a
context switch is made and the queries in the new context are then loaded
and resumed.

BUG=angleproject:1307

Change-Id: I4e596d83739274cb2e14152a39e86e0e51b0f95c
Reviewed-on: https://chromium-review.googlesource.com/325811
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Ian Ewell <ewell@google.com>
2016-02-09 18:07:43 +00:00
Corentin Wallez a78d12c5e4 Make the dEQP GTEST initialization failures red on swarming.
On swarming the dEQP GTEST initialization failures would show as green
because the FAIL GTEST macro was called outside of a test. Use exit(-1)
instead that shows up as red on the bots.

BUG=580045

Change-Id: Icf82a8593a11fe7e992778ffd8c682f6738c39a6
Reviewed-on: https://chromium-review.googlesource.com/326690
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-02-09 16:06:55 +00:00
Corentin Wallez 3f16afd389 Add in GN the data dependencies required by the dEQP tests.
BUG=580045

Change-Id: I3424568c6b200d6b6eb9921c6c09a3b3c974d710
Reviewed-on: https://chromium-review.googlesource.com/326320
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2016-02-09 16:05:15 +00:00
Jamie Madill 39046169da CollectVariables: Don't include block name in field name.
The spec mandates that the instance name of a block determines how the
active uniform name for this field is reported. However, our handling
of this was a bit bugged. We would include the proper prefix on the
compiler-side, but this mangled the hashing, and was also not strictly
needed. We now also expose the instance name, so we can determine the
proper prefix for variable linking on the GL-side of things. This also
is consistent with how we handle other spec issues, where the GL-side
handles the GL-API specific functionality.

This also allows us to fix name hashing of instanced uniform blocks,
which was previously broken because we would hash the full name of the
active uniform, instead of just the field.

BUG=angleproject:1306

Change-Id: I06ace6dbc3f75fdd8129677360dcc142aa89136e
Reviewed-on: https://chromium-review.googlesource.com/326681
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-09 14:59:53 +00:00
Olli Etuaho 15e890e601 Remove unused texture format source files
These files are not included in the build, they have been replaced by
autogenerated files.

TEST=build on Windows

Change-Id: I6b8448d6f2426bc05c01b7ec6db605e6047ee207
Reviewed-on: https://chromium-review.googlesource.com/326660
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-02-09 08:44:41 +00:00
Geoff Lang ded2e2ee78 Remove unreferenced member of Renderer11, mDepthStencilInitialized.
BUG=angleproject:1260

Change-Id: I3773297a4e517e2fca7072f56f3bdbec0a561d9a
Reviewed-on: https://chromium-review.googlesource.com/326851
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-02-09 00:44:25 +00:00
Corentin Wallez 1eabcf41ef Replace '> >' with '>>'
BUG=angleproject:1308

Change-Id: I00bd2ea939b633817662205eb7879efb7f99965f
Reviewed-on: https://chromium-review.googlesource.com/326400
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2016-02-08 21:59:46 +00:00
Austin Kinross 2a63b3f860 Re-land "Implement EGL_experimental_present_path_angle"
- Re-land with clang fix.

This allows ANGLE to render directly onto a D3D swapchain in the correct
orientation when using the D3D11 renderer.

The trick is to add an extra uniform to each shader which takes either
the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this
value to -1.0. When rendering to the default framebuffer, ANGLE sets
this value to +1.0. ANGLE multiplies vertex positions by this value in
the VS to invert rendering when appropriate. It also corrects other
state (e.g. viewport/scissor rect) and shader built-in values
(e.g. gl_FragCoord).

This saves a substantial amount of GPU time and lowers power
consumption. For example, the old method (where ANGLE renders all
content onto an offscreen texture, and then copies/inverts this onto the
swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame
on a Lumia 630.

Verification:
+ dEQP GL ES2 tests pass when "present path fast" is enabled
+ all ANGLE_end2end_tests pass when "present path fast" is enabled

BUG=angleproject:1219

Change-Id: I56b339897828753a616d7bae837a2f354dba9c63
Reviewed-on: https://chromium-review.googlesource.com/326730
Tryjob-Request: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-02-08 21:05:16 +00:00
Jamie Madill c9bdeff4e4 D3D11: Refactor RenderTarget apply into StateManager11.
This is a refactoring patch only, and doesn't change the behaviour.
The intent is to make it easy to turn on the Framebuffer dirty bits
in a subsequent patch, once we can cleanly handle textures and
renderbuffers getting recreated.

BUG=angleproject:1260

Change-Id: Iaa5cfe222b020724e088eee5f1ae909b6f981a08
Reviewed-on: https://chromium-review.googlesource.com/325423
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-08 18:51:50 +00:00
Corentin Wallez 570f67d7b8 Download GN in the gclient hooks.
Recently git cl format has started requiring GN and would fail when run
in the ANGLE standalone repository because the binary was not present.

BUG=

Change-Id: I0482db6fd6a868dc02ef6e395e6ff4817623c291
Reviewed-on: https://chromium-review.googlesource.com/326420
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2016-02-08 18:41:52 +00:00
Jamie Madill d1c46228ef Revert "Implement EGL_experimental_present_path_angle"
Compile failure on Clang/Win:

The reason for reverting is: FAILED: ninja -t msvc -e environment.x86 --
"..\..\third_party/llvm-build/Release+Asserts/bin/clang-cl" -m32 /nologo
/showIncludes /FC
@obj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj.rsp
/c ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp
/Foobj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj
/Fdobj\gpu\angle_end2end_tests.cc.pdb 
In file included from
..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp:7:
In file included from
..\..\third_party\angle\src\tests\test_utils/ANGLETest.h:13:
..\..\testing\gtest\include\gtest/gtest.h(1392,16) :  error: comparison of
integers of different signs: 'const int' and 'const unsigned int'
[-Werror,-Wsign-compare]
  if (expected == actual) {
      ~~~~~~~~ ^  ~~~~~~
..\..\testing\gtest\include\gtest/gtest.h(1422,12) :  note: in instantiation of
function template specialization 'testing::internal::CmpHelperEQ<int, unsigned
int>' requested here
    return CmpHelperEQ(expected_expression, actual_expression, expected,
           ^
..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp(281,9) :
 note: in instantiation of function template specialization
'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here
        ASSERT_EQ(mWindowWidth * 4, mappedSubresource.RowPitch);
        ^
..\..\testing\gtest\include\gtest/gtest.h(1960,32) :  note: expanded from macro
'ASSERT_EQ'
# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
                               ^
..\..\testing\gtest\include\gtest/gtest.h(1943,67) :  note: expanded from macro
'GTEST_ASSERT_EQ'
                      EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
                                                                  ^

BUG=angleproject:1219

This reverts commit 6b3c1db517.

Change-Id: Ia67ab82dd13295dc03235d57fa417c73f20a49e6
Reviewed-on: https://chromium-review.googlesource.com/326680
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-02-08 14:51:45 +00:00
Jamie Madill c674abeb87 Refactor InputLayoutCache::applyVertexBuffers.
The redesigned code places the internal buffers and input elements for
instance point sprite emulation (FL9_3) at the start of the arrays,
instead of swapping with the first non-instanced element. This makes
the tracking logic of the caching somewhat cleaner.

This facilitates the work of implementing instancing-on-instancing for
FL9_3 conformance.

BUG=angleproject:1279

Change-Id: Ifb030816a313b1e8b916c57ef05915914443312a
Reviewed-on: https://chromium-review.googlesource.com/325090
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-06 01:36:46 +00:00
Jamie Madill 3a9132642c Revert "Avoid a copy in TextureStorage11::setData"
Fails on the Windows builders:

https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Builder/builds/42201

e:\b\build\slave\gpu_win_builder\build\src\third_party\angle\src\libangle\renderer\d3d\d3d11\load_functions_table_autogen.cpp(787) : error C2440: 'return' : cannot convert from 'const std::map<GLenum,rx::LoadImageFunction,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' to 'const std::map<GLenum,rx::d3d11::LoadImageFunctionInfo,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &'
        with
        [
            _Kty=GLuint
,            _Ty=rx::LoadImageFunction
        ]
        and
        [
            _Kty=GLuint
,            _Ty=rx::d3d11::LoadImageFunctionInfo
        ]
        Reason: cannot convert from 'const std::map<GLenum,rx::LoadImageFunction,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' to 'const std::map<GLenum,rx::d3d11::LoadImageFunctionInfo,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>'
        with
        [
            _Kty=GLuint
,            _Ty=rx::LoadImageFunction
        ]
        and
        [
            _Kty=GLuint
,            _Ty=rx::d3d11::LoadImageFunctionInfo
        ]
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

This reverts commit 52d3e43b66.

Change-Id: I83774ea09ccbb2b92ff609714e1c7201beb775bc
Reviewed-on: https://chromium-review.googlesource.com/326540
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-02-06 01:35:19 +00:00
Jamie Madill b0c14b79dd D3D11: Fix 3D ReadPixels with PBOs.
Pass the FBO attachment to the Buffer packing method so we can
retrieve the layer of the attachment when doing an asynchronous
readback. Also take advantage of the TextureHelper11 class to
remove some redundant code.

BUG=angleproject:1290

Change-Id: I26bb21a03e0ff7a42aab4eee75f3c3d12915f398
Reviewed-on: https://chromium-review.googlesource.com/324021
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-02-05 23:59:26 +00:00