Commit Graph
5234 Commits
Author SHA1 Message Date
Corentin Wallez d63243f5be renderergl_utils: Require explicit location qualifier for OpenGLES3
BUG=525930

Change-Id: I591308078c5a392a527291419567a11241a8be17
Reviewed-on: https://chromium-review.googlesource.com/309636
Tested-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tryjob-Request: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-11-06 15:43:53 +00:00
Corentin Wallez 121ea58437 DisplayGLX: validate configs against the backing context's config
This is a step required before adding an ANGLE extension that will
allow passing the Visual ID to use for the context at display creation
time: the configs will have to be compatible with it even if the visual
has non-standard sizes.

BUG=522149

Change-Id: I85e8ee3b9072934c665bddfa2b461d26f8903ff3
Reviewed-on: https://chromium-review.googlesource.com/311220
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-11-06 15:43:10 +00:00
Geoff Lang 91dbc188c5 Enable needed extensions in generated GLSL shaders and call them when possible.
reland: use the defined preprocessor function.

BUG=angleproject:1044

Change-Id: I6171708a2d55ec085ba2c598a1a863779842da6c
Reviewed-on: https://chromium-review.googlesource.com/311270
Tryjob-Request: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-11-06 15:21:12 +00:00
Olli Etuaho 15200047d2 Fix issues in comma operator parsing
Always qualify comma operator result with EvqTemporary in ESSL3, as
specified.

Also, it is possible that in the future some expressions are qualified
as EvqConst but they'd still have side effects, in which case discarding
them when they're the left operand of the comma operator would be wrong.
This would be the case if ANGLE allowed "(a = b).length()" for example.
For this reason it is better to check whether the left node has side
effects, rather than check its const qualification, and only discard it
if it doesn't.

Also, Intermediate::addComma() never returns null, so there's no need to
check the result.

BUG=angleproject:1201
TEST=WebGL conformance tests
     conformance/glsl/misc/sequence-operator-returns-constant.html
     conformance2/glsl3/sequence-operator-returns-non-constant.html

Change-Id: Ibfbd92baa4910b14c0dc8f8a3c3008440d191cd6
Reviewed-on: https://chromium-review.googlesource.com/311171
Reviewed-by: Jamie Madill <[email protected]>
Tryjob-Request: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
2015-11-06 08:58:50 +00:00
Olli Etuaho 0b2d2dcf95 Move comma operator parsing to ParseContext
This change is pure refactoring. It will help with fixing comma operator
return value qualifier bug.

BUG=angleproject:911
BUG=angleproject:1201

Change-Id: I481c337adbaf789cc959c8a1106f99ad7275e1e5
Reviewed-on: https://chromium-review.googlesource.com/311170
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
2015-11-06 08:51:03 +00:00
Olli Etuaho cdeafd2050 Fix missing init when parsing storage qualifier fails
When parsing a storage qualifier results in an error, the parser should
not leave the type uninitialized. Otherwise after recovering from the
error the parsed value could contain uninitialized memory, which could
cause flaky asserts in further parsing.

TEST=dEQP-GLES2.functional.shaders.functions.*
BUG=angleproject:1200

Change-Id: Ia3add76df243898e35fee97d01555b953cff8379
Reviewed-on: https://chromium-review.googlesource.com/311140
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-11-06 07:03:02 +00:00
Geoff Lang bf8a72f69d When doing a LUMA blit, render to an intermediate texture.
Instead of rendering the swizzled result to the destination texture,
render to another intermediate texture and then CopyTexImage it into the
destination texture.  Rendering to arbitrary mip levels of the destination
texture is not always supported but CopyTexImage-ing is.

BUG=angleproject:1113

Change-Id: I352a1fcc769ce92268744d3e7a6265dd2bfddb37
Reviewed-on: https://chromium-review.googlesource.com/310570
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-11-05 21:58:52 +00:00
Geoff Lang e7fcf1e3a9 Revert "Enable needed extensions in generated GLSL shaders and call them when possible."
This reverts commit 233b334213.

Change-Id: Id99024b736324ad030ce63c5d0baae32b6d7f54b
Reviewed-on: https://chromium-review.googlesource.com/311181
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-11-05 21:24:06 +00:00
Shannon Woods 21f76c200c Add magic newlines to markdown files.
Change-Id: I225ecab48a7d3d0a04390c5535cf5b65709fd758
Reviewed-on: https://chromium-review.googlesource.com/311072
Reviewed-by: Shannon Woods <[email protected]>
Tested-by: Shannon Woods <[email protected]>
2015-11-05 20:56:07 +00:00
Shannon Woods c5d2136aae Fixing formatting try three.
Change-Id: I226d35e777e1388e01189dac0f7189e2cbf3d35a
Reviewed-on: https://chromium-review.googlesource.com/311061
Reviewed-by: Shannon Woods <[email protected]>
Tested-by: Shannon Woods <[email protected]>
2015-11-05 20:44:55 +00:00
Shannon Woods 2e01d54064 More formatting fixes.
Change-Id: I8ff32a61362e5329c922ec696ba69480145f316a
Reviewed-on: https://chromium-review.googlesource.com/311081
Reviewed-by: Shannon Woods <[email protected]>
Tested-by: Shannon Woods <[email protected]>
2015-11-05 20:41:43 +00:00
Shannon Woods 64b886097e Fix .md file formatting
Change-Id: Ie9240f9b03ad8ab106659d2dc369893bfc2b652f
Reviewed-on: https://chromium-review.googlesource.com/311071
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Shannon Woods <[email protected]>
2015-11-05 20:32:50 +00:00
Geoff Lang 233b334213 Enable needed extensions in generated GLSL shaders and call them when possible.
BUG=angleproject:1044

Change-Id: Ife94d2258fb912974aa97484a0e30f289dd96734
Reviewed-on: https://chromium-review.googlesource.com/278324
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-11-05 20:23:10 +00:00
Jamie Madill 5b58cae2f4 Revert "In D3D, cache static vertex buffers to prevent wasteful recreation"
Perf bisect traced performance regression to this CL:

8.1% regression in angle_perftests/DrawCallPerf_d3d9_null/score
6.2% regression in angle_perftests/DrawCallPerf_d3d11_null/score

BUG=angleproject:197

This reverts commit 868651d334.

Change-Id: Iaba7eb4e574eb886496361e61fd5fe78ca14dcb8
Reviewed-on: https://chromium-review.googlesource.com/311150
Tryjob-Request: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-05 19:43:03 +00:00
Dian Xiang ff2ab571b0 Using dirty bits notification for blend state
BUG=angleproject:1161

Dirty bit notifications are used in GL for state tracking, but not D3D.
Before, D3D would use memcmp to check a change in state for every call.
This showed up as a hot spot in the perf test runs. Hence, switching D3D
over to the dirty bit system similar to GL backend will help.

Change-Id: I482edc852f1dcc888af3038ff3a61916496a02bc
Reviewed-on: https://chromium-review.googlesource.com/305295
Reviewed-by: Geoff Lang <[email protected]>
Tryjob-Request: Dian Xiang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-05 19:03:34 +00:00
Olli Etuaho b1edc4f55c Accept const array initialization in shader parsing
Array constructors are not folded, unlike all other constant expressions.
Change initializer parsing path so that it accepts constant initializers
whether they are folded or not.

Some parts need to be adapted to work with expressions that are qualified
as constant but that are not necessarily folded:

1. Identifier parsing
2. Indexing parsing
3. Field selection parsing
4. HLSL output for variable declarations
5. Determining unary operator result type
6. Determining binary operator result type
7. Determining built-in function call result type
8. Determining ternary operator result type

Corner cases that are not supported yet:

1. Using array constructors inside case labels
2. Using array constructors inside array size expressions
3. Detecting when a negative constant expression containing an array
   constructor is used to index an array

In these cases being able to constant fold the expression is essential to
validating that the code is correct, so they require a more sophisticated
solution. For now we keep the old code that rejects the shader if ANGLE
hasn't been able to constant fold the case label or array size. In case of
indexing an array with a negative constant expression containing an array
constructor, ANGLE will simply treat it as a non-constant expression.

BUG=541551
BUG=angleproject:1094
TEST=dEQP-GLES3.functional.shaders.constant_expressions.* (all pass),
     angle_unittests

Change-Id: I0cbc47afd1651a4dece3d68acf7ec72a01fdf047
Reviewed-on: https://chromium-review.googlesource.com/310231
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-11-05 15:58:14 +00:00
Frank Henigman 80dfe958ab build: ensure gyp_angle uses angle's gyp
Prepend to sys.path, instead of appending, so that gyp_angle imports
angle's gyp, instead of whatever may be installed on the system.

BUG=angleproject:1203

Change-Id: I9f3cfddb71fbd53f30ebf5792c31ba0a8947bddb
Reviewed-on: https://chromium-review.googlesource.com/311040
Reviewed-by: Geoff Lang <[email protected]>
Tryjob-Request: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-05 15:27:56 +00:00
Geoff Lang 41506d5d12 Update the gclient config instructions to not use relative paths.
As of https://codereview.chromium.org/1406053003 relative paths are no
longer valid for the solution name.  Update the docs to use the full
current directory instead.

BUG=angleproject:1204

Change-Id: I42b289fdad6d85901f431bb701f2a08e0ad0deb3
Reviewed-on: https://chromium-review.googlesource.com/311180
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-11-05 15:16:34 +00:00
Geoff Lang f85a843963 Update the testing documentation to include the trybots.
BUG=504872

Change-Id: I9cbbe92afc9df6a4cb8f3ddf0c547492c6765c8e
Reviewed-on: https://chromium-review.googlesource.com/310011
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-11-05 14:53:32 +00:00
Jamie Madill e79b1e142f D3D11: Restrict use of MAX_UINT element indexes.
We need to block the app from using MAX_UINT on D3D11 because we can't
disable primitive restart on this platform. Instead generate an
INVALID_OPERATION error, which is spec-compliant in ES3 because the
result is undefined behaviour. This is also compliant with WebGL which
explicitly defines an error here.

BUG=angleproject:597

Change-Id: I7ebc5371b63ff860dc6dddf79939e9629ebb2a3c
Reviewed-on: https://chromium-review.googlesource.com/309638
Reviewed-by: Corentin Wallez <[email protected]>
Tryjob-Request: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-05 13:26:37 +00:00
Corentin Wallez 72028778a0 DisplayGLX: on mesa only expose configs with the same depth-stencil
BUG=angleproject:1188

Change-Id: I19516cf3d037245144dfbe6fa2eed13a57aa6800
Reviewed-on: https://chromium-review.googlesource.com/309635
Reviewed-by: Jamie Madill <[email protected]>
Tryjob-Request: Corentin Wallez <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-11-04 21:42:53 +00:00
Corentin Wallez 0b2e74611a RendererGL: only support ES3 when GLSL packing builtins are available
BUG=angleproject:1188

Change-Id: I07638c52ef09ffc96d91eec25c32dd905207c49f
Reviewed-on: https://chromium-review.googlesource.com/309650
Tryjob-Request: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-11-04 21:38:12 +00:00
Jamie Madill f25855c923 Add a ValidationContext class helper.
This class is a wrapper around gl::Data, aka the metadata describing
a gl::Context. We can use it for unit-testing validation functions
by passing that through the validation methods instead of a Context,
and using mocks to expect certain errors.

BUG=angleproject:747
BUG=angleproject:597

Change-Id: I7bd85c7662860ba9a3a13406579a088d447e5631
Reviewed-on: https://chromium-review.googlesource.com/309637
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-04 21:25:07 +00:00
Olli Etuaho 82c29ed2d1 Move variable identifier parsing to ParseContext
This change is purely refactoring existing functionality to make it
easier to change variable identifier parsing.

BUG=angleproject:911
BUG=541551

Change-Id: I282fbb66d40cd71fa0f4804e4a8e893744cd6bfc
Reviewed-on: https://chromium-review.googlesource.com/309724
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2015-11-04 08:48:17 +00:00
Jamie Madill 08fc7732a3 Update dEQP failing test expectations.
BUG=angleproject:1088
BUG=angleproject:1095
BUG=angleproject:1097
BUG=angleproject:1101

Change-Id: I40f4d5960ef52bb1049336d23da4034a41f2fe63
Reviewed-on: https://chromium-review.googlesource.com/310480
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2015-11-03 16:02:58 +00:00
Olli Etuaho f0915a8985 Fix standalone build in MSVS 2013
Range-based for loop saves the end iterator by assigning it to a
variable, so the iterator class needs to have a copy constructor at
least on some C++ compiler implementations.

The issue got introduced by a chain of three commits, so it's better to
just fix the issue rather than revert them all.

TEST=build on Windows

Change-Id: Ib6d8d7e97559838eaac44279454197445535f256
Reviewed-on: https://chromium-review.googlesource.com/309723
Tryjob-Request: Olli Etuaho <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Olli Etuaho <[email protected]>
2015-11-03 11:49:08 +00:00
Corentin Wallez 2df979ed06 Revert "DisplayGLX: rework how glXCreateContextAttribsARB is called"
Breaks dEQP-GLES2.functional.texture.specification.basic_copyteximage2d.2d_alpha

BUG=angleproject:1188

This reverts commit 31e60cf221.

Change-Id: Icf1fcd984832a813536fe63e385b3cf9f667d66b
Reviewed-on: https://chromium-review.googlesource.com/309801
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-11-02 22:37:14 +00:00
Jamie Madill c7a92fdb77 D3D11: Fix provoking vertex for flat triangle strips.
Triangle strips alternate the provoking vertex based on the
primitive, so use the primitive ID in the GS to determine this.
This might interact poorly with primitive restart, so we might have
to use a slow path for that.

BUG=angleproject:754

Change-Id: I4f6f520887d4c4c52d2ad020e6db148607f68325
Reviewed-on: https://chromium-review.googlesource.com/309156
Tryjob-Request: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-02 22:31:56 +00:00
Corentin Wallez 31e60cf221 DisplayGLX: rework how glXCreateContextAttribsARB is called
This patch adds handling of the EGL ANGLE platform api version display
attributes for better testing.

It makes the code more resilient by ignoring X11 errors that could crash
our program in the call to glXCreateContextAttribsARB.

It also makes sure that we always choose the most recent OpenGL version
available on the system.

BUG=angleproject:1188

Change-Id: I26e1bf6733215db6f5841b54c471f644e2b15e89
Reviewed-on: https://chromium-review.googlesource.com/309633
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-11-02 21:34:33 +00:00
Jamie Madill 3e14e2b175 D3D11: Fix basic provoking vertex flat shading cases.
The enables geometry shaders that correct for the flat shading on
provoking vertexes. It does not fix it for triangle strips, or in
conjunction with primitive restart (which is not yet implemented
in D3D11).

Also ensure we do not regress with flat shading enabled and transform
feedback. In cases where we use flat shading, do a double draw call,
first with an untransformed vertex stream, and no geometry shader,
then with the geometry shader enabled.

This also fixes the dEQP fragment output tests with ints.

BUG=angleproject:754

Change-Id: Ib37e8ec32d19db17ea5d4dc88158cdae0c956bfc
Reviewed-on: https://chromium-review.googlesource.com/309155
Tryjob-Request: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-02 21:04:18 +00:00
Jamie Madill f4b2c4fdd8 Refactor DynamicHLSL geometry shader code more.
This refactor adds a typed iterator class for helping to iterate over
varying registers from packed varyings. We use the same iteration
logic in several places and it has a triple loop, so encapsulating
this into an iterator class keeps it cleaner.

The other change is to use std::stringstream in places where we would
return a std::string.

These refactorings will aid in subsequent work to implement provoking
vertex fixes and to refactor our varying packing algorithm.

BUG=angleproject:754

Change-Id: Id44a1f68ccd4edc3458f1cf514f5eab4b8cd4151
Reviewed-on: https://chromium-review.googlesource.com/309811
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-11-02 21:04:06 +00:00
Corentin Wallez 62c49f5d82 PbufferSurfaceGLX: avoid creating (0, 0)-sized pbuffers
It crashes on Mesa.

BUG=angleproject:1188

Change-Id: I1e1e3e696bfda0c127b683a620cbaf302087e43b
Reviewed-on: https://chromium-review.googlesource.com/309630
Tested-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-10-30 20:10:37 +00:00
Olli Etuaho 5d91dda9b5 Remove dynamic indexing of matrices and vectors in HLSL
Re-re-relanding after clang warning fix.

Re-re-landing with fix to setting qualifiers on generated nodes. The
previous version failed when a uniform was indexed, because it would
set the uniform qualifier on some of the generated nodes and that
interfered with the operation of UniformsHLSL.

Re-landing after fixing D3D9 specific issues.

HLSL doesn't support dynamic indexing of matrices and vectors, so replace
that with helper functions that unroll dynamic indexing into switch/case
and static indexing.

Both the indexed vector/matrix expression and the index may have side
effects, and these will be evaluated correctly. If necessary, index
expressions that have side effects will be written to a temporary
variable that will replace the index.

Besides dEQP tests, this change is tested by a WebGL 2 conformance test.

In the case that a dynamic index is out-of-range, the base ESSL 3.00 spec
allows undefined behavior. KHR_robust_buffer_access_behavior adds the
requirement that program termination should not occur and that
out-of-range reads must return either a value from the active program's
memory or zero, and out-of-range writes should only affect the active
program's memory or do nothing. This patch clamps out-of-range indices so
that either the first or last item of the matrix/vector is accessed.

The code is not transformed in case the it fits within the limited subset
of ESSL 1.00 given in Appendix A of the spec. If the code isn't within
the restricted subset, even ESSL 1.00 shaders may require this
workaround.

BUG=angleproject:1116
TEST=dEQP-GLES3.functional.shaders.indexing.* (all pass after change)
     WebGL 2 conformance tests (glsl3/vector-dynamic-indexing.html)

Change-Id: I9f6d7c7ecda8ac4dc3c30b39e15a9a0b5381c5a8
Reviewed-on: https://chromium-review.googlesource.com/310010
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-30 19:28:26 +00:00
Jamie Madill 4e31ad552b D3D11: Add dynamic geometry shaders.
The geometry shader we want will depend on our current draw mode, and
if we're using flat shading in the shader. Without flat shading, we'll
still be using them only for point sprites, but for other primitive
types with flat shading enabled, we'll be using them to correct the
provoking vertex order with D3D11.

Note: no new features in this CL, those are turned on in follow-ups.

BUG=angleproject:754

Change-Id: Iabf13ffd582f5a7200ee0df5aa9c3671aa7b6ed4
Reviewed-on: https://chromium-review.googlesource.com/309154
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-10-30 15:43:24 +00:00
Jamie Madill 76f8fa6631 Refactor Geometry Shader support to enable pass-through.
This should be a refactoring change only. The new code is exercised in
follow-up CLs.

BUG=angleproject:754

Change-Id: I99285e1e7772cae467013102f25c911ebc9f54a9
Reviewed-on: https://chromium-review.googlesource.com/309153
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-10-30 15:43:06 +00:00
Cooper Partin 1cc109039c Removed Sleep( ) workaround for Windows Store builds
Visual Studio SDKs now include the ability for Windows Store applications to
use the Sleep( ) function.

Change-Id: Iaf2a978e778f82e918ba14a58bbb1807cc1fbaf4
Reviewed-on: https://chromium-review.googlesource.com/309890
Tested-by: Cooper Partin <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-10-30 15:27:20 +00:00
Jamie Madill 0c1d44037b dEQP: Use full GTest name in non-standalone.
With crbug.com/509883 fixed, we can use the full test names.

BUG=509883
BUG=angleproject:1153

Change-Id: I62bf60fb5066de8c0cc118512ba0d9e9bbd94303
Reviewed-on: https://chromium-review.googlesource.com/309653
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2015-10-30 14:43:08 +00:00
Jamie Madill a5f64de714 Revert "Remove dynamic indexing of matrices and vectors in HLSL"
Failing build on Clang-win:

..\..\third_party\angle\src\compiler\translator\RemoveDynamicIndexing.cpp(128,43) :  error: expected '(' for function-style cast or type construction
        fieldType.setPrimarySize(unsigned char(indexedType.getRows()));
                                 ~~~~~~~~ ^

BUG=angleproject:1116

This reverts commit 7535b761dd.

Change-Id: I7b502e3dcd45e17b7ed88fec18be702614d9ac65
Reviewed-on: https://chromium-review.googlesource.com/309772
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-10-30 12:31:31 +00:00
Corentin Wallez 42e9e59997 ProgramBinaryTest: use override where applicable
BUG=None

Change-Id: Ibb3c6ea919c34e967aaa5d475d6e05249d2ee6aa
Reviewed-on: https://chromium-review.googlesource.com/309810
Tryjob-Request: Corentin Wallez <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-10-29 21:10:16 +00:00
Corentin Wallez 0984d111e2 Replace _countof with ArraySize
This macro only exists on MSVC

BUG=None

Change-Id: I23204d1307279840a7f85a005da9ed5c324e7dae
Reviewed-on: https://chromium-review.googlesource.com/309800
Tryjob-Request: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-10-29 18:47:09 +00:00
Corentin Wallez 1cf66a8d1e platform_glx: Add support for ARB_create_context_profile
BUG=angleproject:1188

Change-Id: I5a72ff3521c01b4da661a90f6d761da61b3aad60
Reviewed-on: https://chromium-review.googlesource.com/309631
Tryjob-Request: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-10-29 18:45:51 +00:00
Austin Kinross 868651d334 In D3D, cache static vertex buffers to prevent wasteful recreation
BUG=angleproject:197

Change-Id: I66cd10609b2edbcf12b99530eafe1727511fe515
Reviewed-on: https://chromium-review.googlesource.com/296503
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Austin Kinross <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-10-29 17:21:17 +00:00
Corentin Wallez 42590dd7c6 Fix a typo in DisplayWGL
BUG=None

Change-Id: Ib9d43ced80f38c61f5936fb027433d9f2b4c7f98
Reviewed-on: https://chromium-review.googlesource.com/309632
Tryjob-Request: Corentin Wallez <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-10-29 14:42:37 +00:00
Corentin Wallez b0228e1812 OSXWindow fix a use after free of the WindowDelegate
This use after free was triggered when a window was made key and
destroyed, then another window was made key. dedResignKey was called on
the former's WindowDelegate which had already been freed, causing a
crash.

BUG=angleproject:891

Change-Id: If47e88419f9a407a6a77c5cd9853b7b4860dc698
Reviewed-on: https://chromium-review.googlesource.com/305817
Tryjob-Request: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-10-29 14:16:47 +00:00
Cooper Partin 7c89d2489b Reland Fixed FL9_3 shaders that use glPointCoord without glPointSize.
This change fixes a Shader error on FL9_3 that reports
Vertex/Pixel Shader linkage signatures between stages
being incompatible when glPointCoord is used without glPointSize.

Change-Id: I107d06692c5375c07544038f5f4429c1e8d6e313
Reviewed-on: https://chromium-review.googlesource.com/305395
Tested-by: Cooper Partin <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-10-28 20:56:55 +00:00
Geoff Lang 60ad73dcd8 Add ASTC compressed texture format info to the GL layer.
BUG=angleproject:1185

Change-Id: Ie723687e0289812d6c2306589911b548ac321e22
Reviewed-on: https://chromium-review.googlesource.com/308491
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-10-28 15:10:24 +00:00
Jamie Madill d55d283c31 Add a test for flat shader 'provoking vertex'.
The provoking vertex, or leading vertex, is the vertex in a triangle
which produces the value that gets used for a flat-shaded triangle.
Flat shading means the same value gets used for the entire triangle.

It seems as though D3D and OpenGL have different definitions of which
vertex is the leading/provoking one; GL says it is the *last* vertex
of a primitive, while while D3D says it is the first.

Additional complexity comes about from triangle strips, which switch
winding order, and primitive restart, which defines new primitives in
the middle of prior primitives.

BUG=angleproject:754

Change-Id: If1217cba33dabf3b1e4ad13fd639d049cb16fe44
Reviewed-on: https://chromium-review.googlesource.com/309152
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-10-28 14:27:48 +00:00
Olli Etuaho f541f5296f Fix parsing integers larger than 0x7FFFFFFF
Parsing should accept all values between 0 and 0xFFFFFFFF as specified in
ESSL 3.00 section 4.1.3.

When a signed literal is parsed, it's interpreted as if it specifies the
bit pattern of a two's complement integer. For example, parsing
"0xFFFFFFFF" results in -1. Decimal literals behave the same way, so for
example parsing "3000000000" results in -1294967296.

This change affects parsing of literals in ESSL 1.00 as well. In ESSL
3.00, an out-of-range integer literal now generates a compiler error.

Unit tests are added based on examples in the ESSL 3.00 spec and one
example in GLSL 4.5 spec that ESSL should match.

BUG=541550
TEST=angle_unittests

Change-Id: I82f8ef5cfa2881019a3f80d77ff99707d61c000d
Reviewed-on: https://chromium-review.googlesource.com/305420
Reviewed-by: Zhenyao Mo <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2015-10-28 09:36:27 +00:00
Corentin Wallez e3f3cf7b70 DisplayGLX: make the dummy pbuffer of size (1, 1)
This works around a Mesa crasher bug.

BUG=angleproject:1188

Change-Id: Ief7e6e841715cc04dea696bc1919d7a2d6fbc78d
Reviewed-on: https://chromium-review.googlesource.com/309141
Tryjob-Request: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-10-27 19:23:33 +00:00
Corentin Wallez c8947ea2f2 FunctionsGLX: add glXGetCurrent(Drawable|Context) support
BUG=angleproject:1188

Change-Id: Ibf0fb4be3ec08cc43b2d9aba03a3d0fc12adce9d
Reviewed-on: https://chromium-review.googlesource.com/309140
Tryjob-Request: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-10-27 19:21:41 +00:00