*re-land with Linux fixes, and fix for locations*
This built-in uniform wasn't being collected in VariableInfo.cpp.
Also remove the existing workaround for D3D gl_DepthRange
collection.
BUG=angleproject:991
BUG=478570
Change-Id: Iba84651bfc58f82fd4ce039421874f561f83c348
Reviewed-on: https://chromium-review.googlesource.com/268840
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
We can use the flat FBO attachment types to update our data
instead of reallocating it. This also lets us delete the
DefaultFramebuffer class.
BUG=angleproject:963,angleproject:840
Change-Id: Ib8f20d8212d073fb5e248756321cb2e6b4e086dc
Reviewed-on: https://chromium-review.googlesource.com/263492
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This allows us to eradicate the GetAttachmentRenderTarget methods.
This improves potential performance, at the cost of exposing a
Renderer-specific function at the API object level.
BUG=angleproject:963
Change-Id: Ifc227b5f42e87bd4deb451d685618cf61fea39f1
Reviewed-on: https://chromium-review.googlesource.com/263491
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Build errors on Linux:
error: comparison of integers of different signs: 'const int' and 'const unsigned int'
BUG=angleproject:991
BUG=478570
This reverts commit f1ae954b66.
Change-Id: I217aba1b32dc0e70d6153337a1f0ccef0483a0e1
Reviewed-on: https://chromium-review.googlesource.com/268792
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
This built-in uniform wasn't being collected in VariableInfo.cpp.
Also remove the existing workaround for D3D gl_DepthRange
collection.
BUG=angleproject:991
BUG=478570
Change-Id: Ie254132e37c307323ba9e6e1705d138eea67b520
Reviewed-on: https://chromium-review.googlesource.com/268524
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Only __FILE__, __LINE__, __VERSION__ and GL_ES are reserved but it is
still not recommended to use a name with double underscores because it may
be used by the "underlying software layers".
Updated the tests to reflect that it is OK to define macros with double
underscores but it is not valid to make assumptions about their values.
Fixes:
dEQP-GLES2.functional.shaders.preprocessor.basic.identifier_with_double_underscore_vertex
dEQP-GLES2.functional.shaders.preprocessor.basic.identifier_with_double_underscore_fragment
BUG=angleproject:898
Change-Id: I77054d04c9935eedcdbb7304dc0c3b60b53994f9
Reviewed-on: https://chromium-review.googlesource.com/268434
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Define 'register' as an empty string if we're in a modern version
of C++.
BUG=255186
BUG=angleproject:463
Change-Id: Ied044fb87a9b05c91cb419c54295c39f0f0ab776
Reviewed-on: https://chromium-review.googlesource.com/268512
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Breaks some WebGL applications, holding off until a decision is made.
BUG=483252
BUG=angleproject:989
This reverts commit fa55bf1ed6.
Change-Id: Iebef439095a95741c8502716a4ce90c4785561eb
Reviewed-on: https://chromium-review.googlesource.com/268742
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Also return a different code for a NULL pointer, vs a failed call.
BUG=477701
Change-Id: Ib0584371d51b99760e80ce5481a1e72e1ec673e0
Reviewed-on: https://chromium-review.googlesource.com/267753
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
We don't need to pass attachment pointers, since they are now
value types, and no longer change their address.
BUG=angleproject:963
Change-Id: I02cdce0886512cc847930f61c5bfb62fc1d7cd1a
Reviewed-on: https://chromium-review.googlesource.com/265938
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
We would miss the definition for structs specfied in uniforms. Fix
this by always checking to add the constructor. Fixes the WebGL
test 'glsl/misc/struct-specifiers-in-uniforms'.
BUG=angleproject:818
BUG=433412
Change-Id: I411e4a4477f7ef34fceb9faa77489f77d8efdce8
Reviewed-on: https://chromium-review.googlesource.com/267797
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
The first fix was for all loops being considered discontinuous in
OutputHLSL because of a typo that produced a tautology.
The error was not detected by the unit tests because as an optimization we
do not generate Lod0 calls when they are not needed for the callee
function (which was correctly detected by the analysis in this case).
Fixed the unit tests by adding a call to a builtin gradient operation.
The second fix was for discard not being taken into account in the
analyses of the AST, which caused a WebGL test regression after the first
fix for conformance/glsl/bugs/conditional-discard-in-loop
BUG=angleproject:982
Change-Id: I1315eac1ad36f726be52d7fda5facf3104341b1f
Reviewed-on: https://chromium-review.googlesource.com/267814
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Calling glGetBufferParameteriv with GL_BUFFER_USAGE on a buffer that has never
had glBufferData called on it should return GL_STATIC_DRAW.
[ES 2.0.25 spec, table 6.3]
Fixes:
dEQP-GLES2.functional.state_query.buffer_object.buffer_usage_getbufferparameteri
Change-Id: I1bf1614b606d20338bb507861164c6ab0b64122f
Reviewed-on: https://chromium-review.googlesource.com/267816
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
This avoids creating a new Data object and copying it around.
Gives a noticable performance increase in the benchmark which
tests validation-only draw calls. Gives about a 8% increase
in the benchmark.
BUG=angleproject:959
Change-Id: Id3a7459753b1b466a06da89f3f8b03b2c2c7a5c1
Reviewed-on: https://chromium-review.googlesource.com/267752
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
This can give us much faster draw call validation, by saving us from
checking buffer sizes for non-enabled attribs. Also for checking if
vertex buffers are mapped. Gives >100% increase in the benchmark.
BUG=angleproject:959
Change-Id: I211c310385bdee46ed06f68ecd9c98385e1f8db9
Reviewed-on: https://chromium-review.googlesource.com/267751
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Instead of always warning on invalid pragmas, only warn when the pragma
type is not recognized and error when the syntax is invalid.
Fixes:
dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_debug_vertex
dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_debug_fragment
dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_token_vertex
dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_token_fragment
BUG=angleproject:989
Change-Id: Ibd584dc08a2436e163dfc52eeffdf2dac8a22cb8
Reviewed-on: https://chromium-review.googlesource.com/267639
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
The current code rejects any shaders that use more than the caps
allow, but a bug would crash us before the check. We don't support
aliasing in shaders that use a lot of uniforms because this
causes problems with the D3D back-end, currently. This changes the
crash in the dEQP aliasing tests to a link error.
See dEQP-GLES2.functional.attribute_location.bind_aliasing.*
BUG=angleproject:901
Change-Id: I6906d3345abe9f89cfa0aa6cec4be26b5b2851d0
Reviewed-on: https://chromium-review.googlesource.com/266928
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
The subclassing was not used by chromium and caused problems for users
that wanted to use a window owned by another thread as an EGL surface.
BUG=angleproject:961
Change-Id: I1d91323c758374de317179874320961385b10ae0
Reviewed-on: https://chromium-review.googlesource.com/266658
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: John Bauman <jbauman@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Binding to GL_FRAMEBUFFER is supposed to set the read and draw framebuffer
bindings instead of being a separate binding point.
BUG=angleproject:885
Change-Id: Ic6d9056a2f8bfa472587c5ed030c15fcc93574c7
Reviewed-on: https://chromium-review.googlesource.com/267460
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
*re-land with fix for Mac*
This prevents us from re-allocating FBO attachments every set.
This change requires quite a bit of refactoring.
BUG=angleproject:963
Change-Id: Ia1f83e3c427d446ddbe16c6703db136942149e91
Reviewed-on: https://chromium-review.googlesource.com/266691
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>