Some implementations need to query size information directly from their
native window instead of listening for size events and storing the result.
Also move mSwapInterval to SurfaceD3D since it doesn't need to be stored
in all cases and there is no query for it. It no longer requires that the
SurfaceImpl's derivation remembers to set mSwapInterval in
setSwapInterval too.
BUG=angle:658
Change-Id: I499c1b8b842254636fc25ff5f2a90107af8fe327
Reviewed-on: https://chromium-review.googlesource.com/242039
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
Tested-by: Geoff Lang <[email protected]>
The extension behavior was being shared between translation units,
this was causing states to be cached between shader compilers. This
has been fixed now by adding a new ResetExtensionBehavior() function.
A unit test has also been added for testing extensions when compiling
shaders. A test has been included which tests that the internal state
of the extension behavior is being reset properly.
BUG=453543
Change-Id: Icb2a07019b5db972dc75cdbbdece4b7e9757c682
Reviewed-on: https://chromium-review.googlesource.com/245522
Tested-by: David Yen <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
There are currently some failures on the Chromium GPU FYI bots. The
failing machine is using an Intel HD 3000, and the group of failing
tests are the TextureTest.CopySubImageFloat_* group. I'm unable
to repro these failures, but disable the tests until we can fix them.
Also clean up our method of determining Renderer properties in
ANGLETest.
BUG=angle:850
Change-Id: I444b9d3497ea635fbd8957ac243b16c822c19d06
Reviewed-on: https://chromium-review.googlesource.com/244781
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Nicolas Capens <[email protected]>
These corner case formats can come about from using floating
point textures and trying to copy between them. There currently
isn't a good alternative in WebGL 1 for copies.
BUG=angle:850
Change-Id: I3dc29e42b5ec7dcf071185bc09c6b3e9e3cb3207
Reviewed-on: https://chromium-review.googlesource.com/241048
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Also adds a few assert in SetData and various places to ensure that
images are not dirty before modifying the storage.
BUG=angle:873
Change-Id: I7cc922b33da0d79a1b5aefe216e9ccfaaf86a306
Reviewed-on: https://chromium-review.googlesource.com/241880
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Gregoire Payen de La Garanderie <[email protected]>
Some global initializers depend on other globals, for instance a
varying or attribute value. Since we use a static proxy variable for
these varyings, we need to initialize the global static after we
initialize the proxy in the shader preamble. This fixes a long-
standing compiler bug.
We should also add a WebGL test for this.
BUG=angle:878
Change-Id: I71db103a6b8c24fb862e0d8b32293da9bc2e8103
Reviewed-on: https://chromium-review.googlesource.com/243581
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
D3D11 Feature Level 9_3 can't disable mipmaps on a mipmapped
texture, and sample from level zero of it. A previous commit
added a workaround for this in ANGLE to Texture2Ds. This
commit fixes some minor issues in that commit, and extends
the workaround to apply to TextureCubes too.
Change-Id: Ic97321af6f8bbf7ad5d96e58655c342db3978a6a
Reviewed-on: https://chromium-review.googlesource.com/241944
Tested-by: Austin Kinross <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
This test flakes out on some Chromium bot configurations. It could
be that we need to redesign it to use mocks or something similar
to test reliably.
Change-Id: Ib323940d52db052e18d2352e45e029bbb1b64af0
Reviewed-on: https://chromium-review.googlesource.com/242023
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
The functions are emulated on HLSL, and use the native functions on
OpenGL 4.2+ and GLES3.0. Emulation for OpenGL versions <= 4.1 is not yet
implemented.
BUG=angle:865
Change-Id: I6803a1767dacdb3dca12f13924651fd38fcacb75
Reviewed-on: https://chromium-review.googlesource.com/240961
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
RapidJSON gives us the ability to use JSON in our performance
tests to specific the input. The license is very permissive
and according to the author the performance is excellent.
Chromium's JSON library unfortunately seems quite tied to the
"base" project.
BUG=angle:744
Change-Id: I64e72aad1ed6fa954acd851607032cb48a461348
Reviewed-on: https://chromium-review.googlesource.com/221374
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
In OpenGL ES, it is possible to sample from level 0 of a mipmapped
texture by setting GL_TEXTURE_MIN_FILTER to GL_NEAREST.
This is possible in D3D9 and D3D11 Feature Level 10_0+ via various
methods. It's not possible in D3D11 Feature Level 9_3, though.
This change works around this restriction by creating two copies of
each texture on 9_3. The textures are identical, except one has
mipmaps and one doesn't.
The D3D11 renderer figures out which texture to use at the right
time, and keeps the textures in sync with each other as necessary.
Note: each texture is only created when it's needed. It's possible
that only one (or even neither) D3D texture will be created for a
given GL texture.
Change-Id: I3c17137b4f63b9158b3abf067ad8e5d5c49d2191
Reviewed-on: https://chromium-review.googlesource.com/234522
Tested-by: Austin Kinross <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
The validation for sampler completeness had a lot of duplicated code.
The special cases have been merged into the base class by checking mTarget.
BUG=angle:681
Change-Id: I11d94c1432f8fc70a1edaaf8228bbc43c3c8fff3
Reviewed-on: https://chromium-review.googlesource.com/236932
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
Like D3D9, D3D11 Feature Level 9_3 doesn't support large or negative
viewports. We have to emulate these in the vertex shader.
BUG=angle:858
Change-Id: I2bd53e3921dc3590cc7193164d73596deafca9ea
Reviewed-on: https://chromium-review.googlesource.com/236040
Tested-by: Austin Kinross <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
D3D11 Feature Level 9_3 supports instancing, but slot 0 in the input
layout must not be instanced. D3D9 has a similar restriction, where
stream 0 must not be instanced. This restriction can be worked around
by remapping any non-instanced slot to slot 0. This works because
HLSL uses shader semantics to match the vertex inputs to the elements
in the input layout, rather than the slots.
BUG=angle:858
Change-Id: I67b2be9095afc206a4b9f107ed61356820551afe
Reviewed-on: https://chromium-review.googlesource.com/237270
Tested-by: Austin Kinross <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
ANGLE's testing code recently got enabled in Chromium's builds. While it
builds fine with cl.exe, it isn't quite standards-conformant and doesn't
build with clang. Fix this.
There were three issues:
1. ANGLE_TYPED_TEST_CASE() is a variadic macro that tries to use
__VA_ARGS__ as argument to a variadic template and then pass
that template to another macro. However, [cpp.replace] describes
that ANGLE_TYPED_TEST_CASE(Test, int, float) should be expanded
to TYPED_TEST_CASE(Test, ::testing::Types<int, float>) which
should be interpreted as a "call" of TYPED_TEST_CASE with the
3 macro arguments `Test`, `::testing::Types<int`, and `float>`.
As a fix, use a typedef for the variadic template and refer to
it through the typedef in the macro call.
2. `#version` was used on its own line in a substitution of the
SHADER_SOURCE macro. [cpp]p1 says that every line starting with
a `#` is a preprocessing directive, and [cpp.replace]p11 says
"If there are sequences of preprocessing tokens within the list
of arguments that would otherwise act as preprocessing directives,
the behavior is undefined" (with a footnote that this includes
non-directives -- # followed by unknown text). As a fix, merge the
`#version` line with the previous line. Now the line doesn't start
with `#` and things are fine.
3. Unqualified lookup usually doesn't look into dependent bases. If
this is desired, one usually has to make the call qualified, a
good explanation for this is at
http://eli.thegreenplace.net/2012/02/06/dependent-name-lookup-for-c-templates
cl.exe doesn't implement this rule, and clang tries to emulate
cl.exe's behavior to a certain extend when in Microsoft mode.
However, that seems to not work for member templates with explicit
types (filed http://llvm.org/PR22066 for this, but since it's not
needed to parse Microsoft headers and not standards-conformant,
I'm not sure if we'll fix that). As a fix, don't provide an explicit
type, the inferred type is the same. This is also consistent with
all the other tests in this file. (We might clean up -Wmicrosoft
warnings in the future; if so I'll add the explicit this->s that
are missing in this file when we do.)
BUG=chromium:445406
Change-Id: I77a2f3ab9601a1f0f39b56ed3d05217f123155b8
Reviewed-on: https://chromium-review.googlesource.com/238090
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
Tested-by: Geoff Lang <[email protected]>
This crash happened with certain bad shaders which used temporary
values as array (or other) index expresisons.
Fixes the crash covered in the WebGL test
"conformance/bugs/undefined-index-should-not-crash"
BUG=angle:857
Change-Id: I13e2ba6d5f1ab0846ac902021bc0b57cbb37d759
Reviewed-on: https://chromium-review.googlesource.com/237460
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>