Similarly to how the subImage calls were corrected. glTexImage and the
family of related functions apply to a single texture target. This
means we need a different TexImage call for each cube face. This is
distinct from TexStorage calls which take a Cube map directly.
Note this is mostly a refactoring change. But it does increase code
consistency and should allow for more efficient code reuse.
Bug: angleproject:3356
Change-Id: I252f8983cdda3a8f0223c44cbbe8d8e2dd319a88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558673
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Texture "types" are the same as texture "targets" except for cube maps.
Cube map targets specify a single face. Cube map types specify a whole
cube map. The subImage functions should take a target instead of a
type. We were using both in different places. This CL corrects all uses
in subImage calls to "target". It also adds a helper for getting a
target texture from a target. And clarifies the naming of the texture
query methods.
Bug: angleproject:3356
Change-Id: I06eb5c5666eec9b8934becf2ba57a066d5cdabde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558672
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This adds entrypoints for two new extensions that will be useful for
importing external Vulkan objects into ANGLE.
Bug: angleproject:3289
Change-Id: I206dc76eda5c6c8d836db7c6413c5544326aa722
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552024
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This extension is a subset of GL_ARB_provoking_vertex without the
QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION query.
Bug: angleproject:2829
Change-Id: I907a4d16b7b13d3bbfb948842091eedd7b6a8b77
Reviewed-on: https://chromium-review.googlesource.com/c/1410289
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This improves performance slightly in vertex array format checks.
Instead of needing to switch on GLenum values we can use packed arrays
and tables to determine the values we need.
Does not significantly affect performance but will enable future work.
Bug: angleproject:3074
Change-Id: I6f4821a463e9b41fe3f8c8967eb3ed4c1d6b84be
Reviewed-on: https://chromium-review.googlesource.com/c/1393903
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The packing and unpacking take a few extra instructions. But it
completely obviates the need for any switches in the validation code.
Speed is slightly faster or the similar depending on the back-end.
Also add gl_angle_ext.xml to GL entry point generator inputs. This was
missing and would cause the code generation to miss certain changes.
Bug: angleproject:2985
Change-Id: I1ea41a71db71135000166ead8305ec42d22ff7b3
Reviewed-on: https://chromium-review.googlesource.com/c/1351729
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
We can just expose OES_texture_storage_multisample_2d_array instead.
The compiler was already changed to accept
OES_texture_storage_multisample_2d_array, and now the change is made
also at the API level.
Out-of-bounds access guarantees provided by ANGLE were the only big
difference between the ANGLE spec and the OES spec, so it's simpler
to just expose the native extension. Safe out-of-bounds accesses can
be guaranteed without having them in the extension spec.
This also adds missing texStorage3DMultisample entry point to the proc
table, which will enable running dEQP tests.
BUG=angleproject:2775
TEST=angle_end2end_tests
Change-Id: Idf376ee877a3374a33de177df023f0531ec8f01d
Reviewed-on: https://chromium-review.googlesource.com/1196722
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
This adds the entry point but does not implement it yet.
The entry point and enums are also added to the gl2ext_angle.h
header file.
BUG=angleproject:2775
TEST=angle_end2end_tests
Change-Id: I24c231c52e7cbb13637880b21044e655935b51e8
Reviewed-on: https://chromium-review.googlesource.com/1188575
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
- Fixed wrong face parameter for glGetMaterial*.
- Enabled GL_LINE_SMOOTH capability in state only (no rendering yet)
- Enabled logical operation capability in state only (no rendering yet)
- Fixed wrong handling of GL_RGB/ALPHA_SCALE and
GL_POINT_COORD_REPLACE_OES
Test: Enable and pass Gets() GLES1 conformance test
BUG=angleproject:2306
Change-Id: Ib5c50a2055129b76ad24053baf0dac24dcc00761
Reviewed-on: https://chromium-review.googlesource.com/1176161
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
This is a reland of 4004ae0e03
Fix: Put the missing early-out in ValidatePointParameterCommon
Original change's description:
> GLES1: Point rasterization (partial implementation)
>
> - Not included: Smooth points
>
> - GL_OES_point_sprite
> - Update test expectations. Note: due to different random sampling,
> edge cases were hit in UserClip. Disabling that test for now.
>
> BUG=angleproject:2306
>
> Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa
> Reviewed-on: https://chromium-review.googlesource.com/1101910
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Lingfeng Yang <lfy@google.com>
Bug: angleproject:2306
Change-Id: Id8e71352a77ff0ce71cb604965effbfb8aca613e
Reviewed-on: https://chromium-review.googlesource.com/1108458
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
This reverts commit 4004ae0e03.
Crash in PointParameterTest.NegativeEnum/ES1_OPENGL.
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac%20FYI%20GPU%20ASAN%20Release/1178
angle_end2end_tests on Intel GPU on Mac on Mac-10.12.6
angle_end2end_tests on ATI GPU on Mac Retina on Mac-10.12.6
Original change's description:
> GLES1: Point rasterization (partial implementation)
>
> - Not included: Smooth points
>
> - GL_OES_point_sprite
> - Update test expectations. Note: due to different random sampling,
> edge cases were hit in UserClip. Disabling that test for now.
>
> BUG=angleproject:2306
>
> Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa
> Reviewed-on: https://chromium-review.googlesource.com/1101910
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Lingfeng Yang <lfy@google.com>
TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,lfy@google.com
Change-Id: I776ce0506d349382b3af035c962aa2c3f6826b99
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2306
Bug: angleproject:2680
Reviewed-on: https://chromium-review.googlesource.com/1108457
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
- Not included: Smooth points
- GL_OES_point_sprite
- Update test expectations. Note: due to different random sampling,
edge cases were hit in UserClip. Disabling that test for now.
BUG=angleproject:2306
Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa
Reviewed-on: https://chromium-review.googlesource.com/1101910
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
This is a reland of 4a09c1a245
Entry points have been autogenerated again.
Original change's description:
> GLES1: Entry points for lighting and materials
>
> - glLight*/glMaterial and their queries
> - Use new packed enums in these entry points, except for lightmodel
> which stays GLenum to be consistent with other generic glGet's
> - State.cpp: New glGet* queries related to light model and
> light/normal rescale enablement
> - GLES1State.cpp: Functions to get/set lighting/material state
> - Validation for lighting/materials
>
> + Add a few convenience methods to random_utils for sampling
> non-negative floats and a sampler for random booleans
>
> BUG=angleproject:2306
>
> Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e
> Reviewed-on: https://chromium-review.googlesource.com/1065502
> Commit-Queue: Lingfeng Yang <lfy@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Bug: angleproject:2306
Change-Id: I434273acd5200dd9f4925e239a032cc8db31a434
Reviewed-on: https://chromium-review.googlesource.com/1072849
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
This reverts commit 4a09c1a245.
Reason for revert: Seems to break the build
Original change's description:
> GLES1: Entry points for lighting and materials
>
> - glLight*/glMaterial and their queries
> - Use new packed enums in these entry points, except for lightmodel
> which stays GLenum to be consistent with other generic glGet's
> - State.cpp: New glGet* queries related to light model and
> light/normal rescale enablement
> - GLES1State.cpp: Functions to get/set lighting/material state
> - Validation for lighting/materials
>
> + Add a few convenience methods to random_utils for sampling
> non-negative floats and a sampler for random booleans
>
> BUG=angleproject:2306
>
> Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e
> Reviewed-on: https://chromium-review.googlesource.com/1065502
> Commit-Queue: Lingfeng Yang <lfy@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,lfy@google.com
Change-Id: Ifabd708ded87c7484ad6d466508e2c2d6ea2557c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2306
Reviewed-on: https://chromium-review.googlesource.com/1071828
Reviewed-by: Lingfeng Yang <lfy@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
- glLight*/glMaterial and their queries
- Use new packed enums in these entry points, except for lightmodel
which stays GLenum to be consistent with other generic glGet's
- State.cpp: New glGet* queries related to light model and
light/normal rescale enablement
- GLES1State.cpp: Functions to get/set lighting/material state
- Validation for lighting/materials
+ Add a few convenience methods to random_utils for sampling
non-negative floats and a sampler for random booleans
BUG=angleproject:2306
Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e
Reviewed-on: https://chromium-review.googlesource.com/1065502
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
(It's not called MatrixMode because that collides with the MatrixMode
entry point name)
BUG=angleproject:2306
Change-Id: I9a192701f6248f1e7d4f202c7d1ddfcdbe1b0089
Reviewed-on: https://chromium-review.googlesource.com/990585
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch uses a packed internal enum ShaderType everywhere we
need a shader type instead of the GLenum value of the shader type.
This patch also uses program::getAttachedShader(type) everywhere
we need to get gl::Shader from a program in ANGLE.
BUG=angleproject:2169
Change-Id: I28a7fa1cfe35622c57a486932911110688eaadec
Reviewed-on: https://chromium-review.googlesource.com/972844
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
- Move the entry points common to GLES1/2 to GLES2 since GLES2 is the
primary use case and we want to isolate the GLES1-only bits.
- Update entry points with all the wanted extensions for Android.
- Auto-generate GLES1-specific entry points and use them as a macro in
Context.h.
- Move all GLES1-specific renderer implementations to ContextGLES1.cpp
+ Fix getting pointer params in generate_entry_points.py
BUG=angleproject:2306
Change-Id: If32bfd2b63657acecaec6adb10cabf39f06c4832
Reviewed-on: https://chromium-review.googlesource.com/959630
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
In OpenGL there are two enum "sets" used by the API that are very
similar: texture types (or bind point) and texture targets. They only
differ in that texture types have GL_TEXTURE_CUBEMAP and target have
GL_TEXTURE_CUBEMAP_[POSITIVE|NEGATIVE]_[X|Y|Z].
This is a problem because in ANGLE we use GLenum to pass around both
types of data, making it difficult to know which of type and target a
variable is.
In addition these enums are placed somewhat randomly in the space of
OpenGL enums, making it slow to have a mapping from texture types to
some data. Such a mapping is in hot-code with gl::State::mTextures.
This commit stack makes the texture types and target enums be
translated to internal packed enums right at the OpenGL entry point
and used throughout ANGLE to have type safety and performance gains.
This is the first of two commit which does the refactor for all of the
validation and stops inside gl::Context. This was the best place to
split patches without having many conversions from packed enums to GL
enums.
BUG=angleproject:2169
Change-Id: Ib43da7e71c253bd9fe210fb0ec0de61bc286e6d3
Reviewed-on: https://chromium-review.googlesource.com/758835
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
For testing this also converts two unimportant GLenums, gl::BufferUsage
and gl::CullModeFace.
BUG=angleproject:2169
Change-Id: If1e86a97d0fed3fd567303aca6506ec579503076
Reviewed-on: https://chromium-review.googlesource.com/688000
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>