Also fixes the uniform count upper limit in glGetActiveUniformsiv,
as well as an assert hit with used but unbound uniform buffer.
BUG=angleproject:507
BUG=angleproject:962
Change-Id: I263b14df41d4e45a67304c1d145646398721cf0a
Reviewed-on: https://chromium-review.googlesource.com/263412
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
When running from within the chrome test harness, calls to CreateWindow*
in debug builds would return null when the title was an empty string.
Change-Id: I0d5dfb1eb824ff2a1470e7d66d850602e73988a0
Reviewed-on: https://chromium-review.googlesource.com/263430
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Many of the members of SurfaceImpl could be stored in egl::Surface
instead. This makes SurfaceImpl a pure interface and makes Surface
constructors much simpler.
BUG=angleproject:795
Change-Id: Ifa797b4bef84afe66f9fb3f3a6be260f726ca55c
Reviewed-on: https://chromium-review.googlesource.com/261358
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
This is disallowed in Chromium because it isn't currently portable.
We can put it back later if the rules change.
BUG=angleproject:956
Change-Id: I5be28590f494719b8cc995739dde26726283fced
Reviewed-on: https://chromium-review.googlesource.com/262777
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
*re-land with fix for Chromium compile*
This saves us from needing to replicate the same code in two places.
BUG=angleproject:956
Change-Id: I68dffee715df03bd25685e3ed5c0506ffc41c3b9
Reviewed-on: https://chromium-review.googlesource.com/263258
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
This class provides a simpler scheme for blocking default copy
and assignment operators. It also reduces the amount of code
needed since it's inherited to child classes. This also fixes
the conflict between our macro and the same-named macro in
Chromium code.
BUG=angleproject:956
Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f
Reviewed-on: https://chromium-review.googlesource.com/263257
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Implement drawRangeElements simply by calling drawElements internally. The
start and end parameters passed to the function will be checked against results
from index validation and an error is generated if indices fall outside the
claimed range.
Most dEQP-GLES3.functional.draw.draw_range_elements.* tests pass after this
change. The remaining failures seem to be related to instanced attributes.
BUG=angleproject:957
TEST=dEQP-GLES3.functional.draw.*
Change-Id: Id3923eb8114461b441e593357bc49babfd6b5c15
Reviewed-on: https://chromium-review.googlesource.com/262420
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Removing this allows many angle end2end tests to run without hitting any
UNIMPLEMENTEDs.
BUG=angleproject:882
Change-Id: Idb55fae7b6fc7b23bc85d0bf376499f28669d771
Reviewed-on: https://chromium-review.googlesource.com/263250
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
The fact that passing shaders to the platform compiler is deferred until
linking is performed allowed this bug to pass undetected in earlier manual
testing.
TEST=WebGL conformance tests
BUG=angleproject:941
Change-Id: Ic12b5d0c5547057551df90086453e897a161d559
Reviewed-on: https://chromium-review.googlesource.com/263221
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Nicolas Capens <capn@chromium.org>
The sampler state may have changed even if the texture is already bound.
BUG=angleproject:884
Change-Id: I591f493099397bb07608096cf30ff46ed5090224
Reviewed-on: https://chromium-review.googlesource.com/263147
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
This saves us from needing to replicate the same code in two places.
BUG=angleproject:956
Change-Id: Ibc80997eec184d0d5aa9c6c076c9d4507fbf8caa
Reviewed-on: https://chromium-review.googlesource.com/262776
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
The basic test we can use for perf testing internal classes with
mocks. The render tests are more specific to doing draw calls.
BUG=angleproject:956
Change-Id: Iade393facc30c8d7288b1b94a159ce3afe993021
Reviewed-on: https://chromium-review.googlesource.com/262775
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
This D3D-only class has one method, used to generate the D3D
IndexBuffer/VertexBuffer. This can help us mock up
IndexDataManager.
At a later point we can refactor the VertexFormat queries
from Renderer into a Caps struct that mirrors our Texure
Caps.
BUG=angleproject:956
Change-Id: Id8b1220a763873ee871ce92365bbee03633789c7
Reviewed-on: https://chromium-review.googlesource.com/262774
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
This value is now redundant - it is always the same as regular offset.
TEST=angle_end2end_tests
BUG=angleproject:956
Change-Id: If4b6c8bcbebf24fbf84723fe081fd058916cc504
Reviewed-on: https://chromium-review.googlesource.com/262423
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Recomputing the stream offset is relatively cheap now after recent changes.
Remove caching it to make the code less complex.
TEST=angle_end2end_tests
BUG=angleproject:956
Change-Id: Icb9cc4e4ffd685a78b7f8a45958992a471ebb0f5
Reviewed-on: https://chromium-review.googlesource.com/262422
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
This is now located in src/ and Chromium no longer refers to it.
BUG=None
Change-Id: I64fd302629ca28aa367d8714bfbac2657774fc3b
Reviewed-on: https://chromium-review.googlesource.com/262920
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
The overhead of the function call ended up being a hot spot for draw calls
since the attributes are iterated over many times in VertexDataManager.
BUG=angleproject:959
Change-Id: I9bbfcbd115661ad629db9ed93d683cd8d0dc9a78
Reviewed-on: https://chromium-review.googlesource.com/263102
Tested-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Caused a warning on 32-bit builds.
This reverts commit 20d78d241b.
Change-Id: I4d61024fb29978e7f1bacdd693fc6f1bc00bd0cc
Reviewed-on: https://chromium-review.googlesource.com/262918
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Also fixes the uniform count upper limit in glGetActiveUniformsiv.
BUG=angleproject:507
Change-Id: Icfc90ed64cf94b1bab2d4cc93a8fb5e11b28d666
Reviewed-on: https://chromium-review.googlesource.com/261874
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Intermediate should only have logic for creating node objects, validation
of parameter types belongs in ParseContext.
BUG=angleproject:952
TEST=angle_unittests, WebGL conformance tests
Change-Id: Ie90697641fabb2a837ccc4571a93616d63ea64e6
Reviewed-on: https://chromium-review.googlesource.com/262414
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
The overhead of the function call ended up being a hot spot for draw calls
since the attributes are iterated over many times in VertexDataManager.
BUG=angleproject:959
Change-Id: I6c11d4a5a22c314c69b3403dfdeb2d950b1c7639
Reviewed-on: https://chromium-review.googlesource.com/262336
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
The function call overhead of the constructors and assignement operators
ended up being a hotspot even though the functions didn't do any
significant work.
BUG=angleproject:959
Change-Id: I96769879dabdbba7a222f98d87c5be0a829cb7dd
Reviewed-on: https://chromium-review.googlesource.com/262335
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Use bitwise operations instead of division, which is expensive on multiple CPU
architectures.
BUG=angleproject:956
TEST=angle_end2end_tests
Change-Id: I57ab540d447c03dae5a96bafb4975fc37e310261
Reviewed-on: https://chromium-review.googlesource.com/262181
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
This should be faster, and also matches the C++ style rules better: static
variables should not have complex class types.
BUG=angleproject:956
TEST=angle_end2end_tests, WebGL conformance tests
Change-Id: I628db95febab309e241be216e2998305525da76e
Reviewed-on: https://chromium-review.googlesource.com/262421
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Causes failures in video related WebGL tests. Either there is a bug in the implementation or how chrome is using it.
This reverts commit b13daa8f79.
Change-Id: Ic0d74840c664bf4de18d85cc3ff7f7153936d9b0
Reviewed-on: https://chromium-review.googlesource.com/262715
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Remove extraneous semicolons and fix indentation in a couple of places.
TEST=angle_unittests
Change-Id: Iaa51eb50990c0435f41dfd346ec161216cd8d372
Reviewed-on: https://chromium-review.googlesource.com/261823
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
ESSL 1.00 spec section 5.9 says that equality operators don't operate on
structs containing sampler types. Section 5.7 also suggests this. ESSL
3.00 doesn't have a similar restriction.
ESSL 1.00 spec section 4.1.7 says that structs containing samplers can't
be used as l-values. This is interpreted to apply also in the case of
ESSL 3.00, which similarly disallows samplers as l-values, but doesn't
explicitly mention structs.
BUG=angleproject:954
TEST=angle_unittests, WebGL conformance tests
Change-Id: I73f74962a192e8d9449990ffa5f3d8c851491601
Reviewed-on: https://chromium-review.googlesource.com/261822
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This requires sorting all equality functions together so that struct
equality functions can have dependencies on array equality functions, but
support for array equality functions that have dependencies on struct
equality functions is also maintained.
There's no automated test coverage for this specifically. The change was
tested by manually inspecting shader output and ensuring that there were
no test regressions in tests listed below.
TEST=dEQP-GLES3.functional.shaders.*
BUG=angleproject:954
Change-Id: If7199ab2446804afae50f103bb625101172882b9
Reviewed-on: https://chromium-review.googlesource.com/261550
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
This requires adding functions to the shader source that can do the
comparison for a specific array size.
There's no automated test coverage specifically for this functionality,
since all deqp tests that cover this also require array constructors to
be supported. The change has been tested by manually inspecting shader
output. No regressions were seen in automated tests listed below.
TEST=dEQP-GLES3.functional.shaders.*, angle_unittests
BUG=angleproject:941
Change-Id: Ie2ca7c016a3f0bcb3392a96d6d20d6f803d28bf0
Reviewed-on: https://chromium-review.googlesource.com/261530
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Make sure that the computed index range is added to the cache of the main
buffer object, instead of just to the static buffer object created for the
buffer object. This applies to the code path used for D3D9. This way the
front-end code in ValidateDrawElements gets the index range from the cache
instead of having to iterate over all the indices used on every draw call.
BUG=chromium:461274
TEST=WebGL conformance tests, angle_end2end_tests
Change-Id: I07cf493d2771dab8e76d69bafda7ac49e5a04808
Reviewed-on: https://chromium-review.googlesource.com/262180
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>