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>
This unifies the behavior across the compiler and rest of ANGLE - for
example, one can use #define ANGLE_TEST_CONFIG to disable UNIMPLEMENTED
asserts in both the compiler and the rest of ANGLE. Compiler traces from
asserts also go to the same TRACE_OUTPUT_FILE as other traces instead of
being directed through ParseContext.
The compiler build already includes the common sources, so no changes to
build config are needed.
The original version of this change was reverted due to release mode
build issues. This version adds UNUSED_ASSERTION_VARIABLE where needed.
TEST=angle_unittests, angle_end2end_tests,
dEQP-GLES3.functional.shaders.*
BUG=angleproject:983
Change-Id: I36929020a04251b8bc834fbb3c069e10128c3082
Reviewed-on: https://chromium-review.googlesource.com/267411
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
In some cases we would let the user change the attachments of the
default FBO. This hole in our validation would confound the dEQP
negative API tests (negative_api.buffer.framebuffer_*) and muck
up the remainder of the test run.
BUG=angleproject:901
Change-Id: I2b3c04752d1df3289d41c013cc936eda30e98aad
Reviewed-on: https://chromium-review.googlesource.com/266927
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
We were skipping some validation, which was confusing dEQP. We can
still no-op, but do this after all validation.
BUG=angleproject:901
Change-Id: I9888c1aca851519e9c7da210c983ba6012e95932
Reviewed-on: https://chromium-review.googlesource.com/266926
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
We were missing this in a few places, and this was giving runtime
errors in dEQP negative tests.
BUG=angleproject:901
Change-Id: I9de5b055dcfe4ad5c13c800a31b4a0b424863bee
Reviewed-on: https://chromium-review.googlesource.com/266888
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Causing compile warnings in Release:
1>compiler\translator\CallDAG.cpp(238): error C2220: warning treated as error - no 'object' file generated
1>compiler\translator\CallDAG.cpp(238): warning C4189: 'op' : local variable is initialized but not referenced
1>compiler\translator\IntermNode.cpp(1495): error C2220: warning treated as error - no 'object' file generated
1>compiler\translator\IntermNode.cpp(1495): warning C4189: 'replaced' : local variable is initialized but not referenced
1>compiler\translator\IntermNode.cpp(1517): warning C4189: 'replaced' : local variable is initialized but not referenced
This reverts commit 5271025865.
Change-Id: Icdf1c37eef22a13d083767609ab0b0285d3dc517
Reviewed-on: https://chromium-review.googlesource.com/267359
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
This unifies the behavior across the compiler and rest of ANGLE - for
example, one can use #define ANGLE_TEST_CONFIG to disable UNIMPLEMENTED
asserts in both the compiler and the rest of ANGLE. Compiler traces from
asserts also go to the same TRACE_OUTPUT_FILE as other traces instead of
being directed through ParseContext.
The compiler build already includes the common sources, so no changes to
build config are needed.
TEST=angle_unittests, angle_end2end_tests,
dEQP-GLES3.functional.shaders.*
BUG=angleproject:983
Change-Id: Ifca4d16f667b1e5cf9c2e7cc4139940091917a1c
Reviewed-on: https://chromium-review.googlesource.com/266993
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
This gives us the choice between D3D9 and D3D11. We can add more
platforms easily using the same patterns.
BUG=angleproject:901
Change-Id: Ia8dc77466bd32f0b8b0d638ae839f41288bfe25b
Reviewed-on: https://chromium-review.googlesource.com/266889
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Fix mixed up comments, remove unnecessary type conversions, clarify
variable names and improve formatting in a few places.
TEST=angle_unittests, WebGL conformance tests
BUG=angleproject:913
Change-Id: Ice8fe3682d8e97f42747752302a1fba116132df4
Reviewed-on: https://chromium-review.googlesource.com/266843
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
In HLSL output, user-defined functions that have an array as their return value
get changed so that they have the array as an out parameter instead.
Still missing: support for calling a function that has array as a return value
without assigning the array. Also support for assignments inside complex
expressions.
TEST=dEQP-GLES3.functional.shaders.arrays.return.*
BUG=angleproject:941
Change-Id: I79f5170139116a3dcfb2be2df5f0f79a3d955ca8
Reviewed-on: https://chromium-review.googlesource.com/266003
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Empty declarations in ESSL shaders currently result in errors on several
platforms. Prune empty declarations that are not struct or interface block
declarations from the AST.
TEST=WebGL conformance tests, angle_unittests, angle_end2end_tests
BUG=angleproject:980
Change-Id: I9e3abf8134e6dfed0253cc83f69ce0ee92b0e0e7
Reviewed-on: https://chromium-review.googlesource.com/266841
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
ESSL 3.00 definition of expressions does not include calling length on
anything other than array names, so enforce this restriction in the
parser.
TEST=WebGL 2 conformance tests
BUG=angleproject:972
Change-Id: I893d3c468ff21cb419b3239738f2a41834298cf2
Reviewed-on: https://chromium-review.googlesource.com/266992
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
array.length() should return a signed integer as specified in ESSL 3.00
section 4.1.9, not unsigned. Fix this and add a simple unit test - the
dEQP tests included in WebGL conformance are built in a way that they
don't catch the issue.
TEST=angle_unittests
BUG=angleproject:972
Change-Id: I1389f51751a6a25c1681f57ac3d2d52f31ecc8fb
Reviewed-on: https://chromium-review.googlesource.com/266991
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
The essl_to_hlsl and essl_to_glsl projects were exactly the same so it
doesn't make sense to keep both.
BUG=angleproject:981
Change-Id: Ibf034a71e94ba5002f9c40ac87720bf0de74ae18
Reviewed-on: https://chromium-review.googlesource.com/266872
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
There was no real reason to keep them in an angle directory and it makes
the generated projects nicer.
BUG=angleproject:981
Change-Id: I844e44dc5c2df51f5292cff4bdffe5e951745aae
Reviewed-on: https://chromium-review.googlesource.com/266871
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
It has very little to do with ANGLE and should not be in the repository.
BUG=angleproject:981
Change-Id: I7aa97b8f56b49beda591e90afcffcb27619beaec
Reviewed-on: https://chromium-review.googlesource.com/266870
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Chromium's Linux toolchain doesn't implement the return value of
std::vector::insert correctly, causing a build failure. Remove an
unnecessary assignment of the return value to fix this build regression.
The regression was caused by the commit:
"Put each array declarator into a separate declaration in HLSL output"
TEST=angle_unittests
Change-Id: I2959122d28e4c7e6d6a4d842a97a8f1fd4f27ca1
Reviewed-on: https://chromium-review.googlesource.com/266990
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>