Commit Graph
77 Commits
Author SHA1 Message Date
Lingfeng Yang 010744365b GLES1: gl(Enable|Disable)ClientState
+ Introduce the GL_OES_point_size_array extension for point size array
support.

BUG=angleproject:2306

Change-Id: Ib1a60b7dcd0497eb807f0d3c80bc95b4748d9a96
Reviewed-on: https://chromium-review.googlesource.com/1014282
Commit-Queue: Lingfeng Yang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2018-04-17 15:15:57 +00:00
Courtney Goeltzenleuchter ed8d5ec733 Add json build file generation
gen_angle_gn_info_json.py can be used to generate a json description
of the build for given targets. This information can then be used
to generate build files for other tool chains (e.g. Android blueprint)

Bug: angleproject:2418
Change-Id: Ief8f43e30ae1f469e3fcfa795306675e29a90a2f
Reviewed-on: https://chromium-review.googlesource.com/967225
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-04-12 22:19:56 +00:00
Brandon Jones 416aaf95d4 Autogenerate ANGLE extension entry points
Modify autogeneration script to pull data from gl_ext.xml and generate
entry_points_gles_2_0_ext_autogen.cpp/h as a replacement for
entry_points_gles_2_0_ext.cpp/h

Bug:angleproject:2263
Bug:angleproject:1309
Change-Id: Ie21079f8ec5f85c657b891f6d6d59306a4c3b5fe
Reviewed-on: https://chromium-review.googlesource.com/1005409
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-04-12 17:22:07 +00:00
Olli Etuaho 5fec7ab262 Identify functions by unique id in BuiltInFunctionEmulator
Now that unique ids of all builtins are compile-time constants, we can
use them to look up functions in BuiltInFunctionEmulator. This is
simpler than using a custom struct with the name and parameters for
identifying functions.

This requires that we store a reference to a TFunction in those
TIntermUnary nodes that were created based on a function.

This decreases shader_translator binary size by about 6 KB on Windows.

BUG=angleproject:2267
BUG=chromium:823856
TEST=angle_unittests

Change-Id: Idd5a00c772c6f26dd36fdbbfbe161d22ab27c2fe
Reviewed-on: https://chromium-review.googlesource.com/995372
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-04-05 14:14:47 +00:00
Lingfeng Yang 00af463e03 GLES1: Add MatrixType packed enum to entry points
(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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2018-04-04 20:11:13 +00:00
Olli Etuaho 89398b6534 Avoid mangled name comparisons of 3-parameter functions
The hash values used for looking up built-ins now encode whether the
mangled name contains arrays, structs or interface blocks in its
parameters list. This is written in the most significant bit of the
hash value.

We check this bit at the start of built-in lookup and if the bit is
set we exit early. After that we know that the lookup name doesn't
contain array, struct or interface block parameters.

When we find a hash that matches a hash of a built-in function, we now
know 3 things:
1) the length of the mangled name matches
2) the open parentheses in the mangled name matches
3) the lookup doesn't contain array, struct or block parameters.

Additionally, we have an if statement checking whether the function
name matches. Collisions are only possible with functions that
1) have the same name
2) have the same number of parameters

With these preconditions we can check beforehand whether collisions
are possible for 3-parameter functions. If there are no collisions, we
don't need to compare the full mangled name. This is similar to what
was already being done with functions that had 0 to 2 parameters.

This reduces shader_translator binary size by around 4 KB on Windows.

Besides increased complexity, the tradeoff is that an exhaustive
search of hash values for possible 3-parameter combinations is costly,
so the gen_builtin_functions.py code generation script now takes
around one minute to run on a high-end workstation. Due to this, the
script now exits early if it detects it has already been run with the
same inputs based on a hash value stored in
builtin_symbols_hash_autogen.txt.

BUG=angleproject:2267
BUG=chromium:823856
TEST=angle_unittests

Change-Id: I3ff8c6eb85b90d3c4971ac8d73ee171a07a7e55f
Reviewed-on: https://chromium-review.googlesource.com/973372
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-04-03 17:35:57 +00:00
Lingfeng Yang 13b708f2ca GLES1: glAlphaFunc
BUG=angleproject:2306

Change-Id: I0bf229d3ab8a4a1217c12b434dcd8fa67d7cbadc
Reviewed-on: https://chromium-review.googlesource.com/973897
Commit-Queue: Lingfeng Yang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-03-27 16:45:28 +00:00
Jiawei Shao 385b3e03cc Use packed enums on shader types in ANGLE renderer
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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2018-03-27 13:15:13 +00:00
Olli Etuaho c26214de3f Move AST utilities to a subdirectory
Move AST related utilities to compiler/translator/tree_util.

BUG=angleproject:2409
TEST=angle_unittests

Change-Id: I7567c2f6f2710292029263257c7ac26e2a144ac8
Reviewed-on: https://chromium-review.googlesource.com/966032
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-03-22 12:06:15 +00:00
Lingfeng Yang a0648780be GLES1: Revise entry points
- 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Lingfeng Yang <[email protected]>
2018-03-20 20:58:29 +00:00
Olli Etuaho b391ec4083 Generate code for looking up built-ins
Instead of storing built-ins in a std::unordered_map, we now generate
a series of switch statements using the hash value of the look-up
string. This works similarly to earlier implementation of looking up
unmangled built-ins.

Those built-ins that need to be initialized at run-time are stored as
member variables of TSymbolTable.

This increases compiler init performance significantly, as well as
increasing compiler perf test scores around 1-2%. Binary size is
larger than before though.

BUG=angleproject:2267
TEST=angle_unittests

Change-Id: If1dcd36f0d2b30c2ed315cdcf6e831ae9fe70c94
Reviewed-on: https://chromium-review.googlesource.com/960031
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-03-20 09:59:54 +00:00
Olli Etuaho 2bfe9f6b93 Use function id to group functions in ParseContext
This way we can do numeric comparisons instead of string comparisons.

The effect on compiler perf test scores is fairly marginal, but
this reduces binary size by a few kilobytes, and there may be a larger
effect on shaders calling a lot of texture functions.

BUG=angleproject:2267
TEST=angle_unittests

Change-Id: I077db97b16b16b70b7e18ee037e06d7450d08dc9
Reviewed-on: https://chromium-review.googlesource.com/947952
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-03-14 08:32:15 +00:00
Luc Ferron 4ea3b4505a run_code_generation.py: Add gen_load_functions_table.py to the list
Bug:angleproject:2358

Change-Id: I93bdbbe65ac8109a5a506d88202715c51918613b
Reviewed-on: https://chromium-review.googlesource.com/960574
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-03-13 16:57:27 +00:00
Olli Etuaho 391bda23b5 Generate code for initializing built-in variables
gen_builtin_symbols.py now generates code for initializing built-in
variable symbols as well. Some of the variable symbols are static, but
some of them also get initialized dynamically based on values in
ShBuiltInResources.

The static symbols have get functions in a header file so they can be
referenced from AST traversers as well without doing a lookup.

BUG=angleproject:2267
TEST=angle_unittests, angle_end2end_tests

Change-Id: Ida7f3aeb06d2bce0f737f1483b1bd5833aeddd2e
Reviewed-on: https://chromium-review.googlesource.com/911768
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-03-12 08:02:05 +00:00
Olli Etuaho 7618eaf9ad Fix incorrect path in run_code_generation.py
Adding missing "src".

BUG=angleproject:2267
TEST=python scripts/run_code_generation.py

Change-Id: I89d981c8f09e6d0839d0b796a2ea14a8466f98a7
Reviewed-on: https://chromium-review.googlesource.com/952925
Reviewed-by: Olli Etuaho <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-03-07 10:06:49 +00:00
Olli Etuaho 065aa863f7 Generate code for unmangled name lookup
Instead of using an std::map at each symbol table level, use the
gen_builtin_symbols.py script to build a function to query unmangled
names.

BUG=angleproject:2267
TEST=angle_unittests

Change-Id: I4f1cf1df1f50fe9d909f3249150ee002ee6efb61
Reviewed-on: https://chromium-review.googlesource.com/931885
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-03-07 08:39:29 +00:00
Corentin Wallez f0e89be699 Use packed enums for the texture types and targets, part 1
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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-03-05 19:39:15 +00:00
Olli Etuaho 140152e712 Statically allocate built-in function symbols
A script gen_builtin_symbols.py now generates code for initializing
built-in function symbols. The TFunction objects are initialized at
C++ compile time.

The source file used for the functions is in a format that's similar
to how functions are given out in the GLSL spec, so it is easy to
maintain.

The function symbols are still inserted to the symbol table levels
same as before. Getting rid of inserting the symbols at runtime is
intended to be done as follow-up.

This speeds up angle_unittests on Linux in release mode by a bit less
than half, and in debug mode by more than half.

BUG=angleproject:2267
TEST=angle_unittests

Change-Id: I11c9de98c74d28e7e8cdf024516e2f6ee30ca33e
Reviewed-on: https://chromium-review.googlesource.com/924155
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-03-05 16:18:59 +00:00
Luc Ferron 0aa1ffe330 Vulkan: Autogen mandatory texture caps
* This commit includes a JS file to execute on the spec and
generate the JSON output of all the mandatory texture caps.

Bug: angleproject:2348

Change-Id: I57e969915bdd0e7104e00a73fd3743ff1ecf0a6d
Reviewed-on: https://chromium-review.googlesource.com/911615
Commit-Queue: Luc Ferron <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-02-14 20:45:37 +00:00
Tobin Ehlis b9d1daa06d Add Vulkan mock_icd to the build
Bug: angleproject:2159

Add Vulkan mock_icd from validation layer source to the standard Vulkan
build. This can act as a NULL driver for Vulkan. Once the mock is built
set VK_ICD_FILENAMES env variable to
"<build_out_dir>/angledata/VkICD_mock_icd.json" to point loader to the
mock driver and make sure the built mock icd library resides in the
system's shared object search path.

Change-Id: Iea86325cf076df75fa82a4974c8a3a6249cdf8e0
Reviewed-on: https://chromium-review.googlesource.com/850892
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-02-07 17:40:24 +00:00
Geoff Lang 2aaa7b4e10 Add GLES1 targets and stub entry points.
* Create a new libGLESv1_CM target.
 * Merge all autogenerated extension entry points into one file.
 * Allow creation of ES1 contexts.

BUG=angleproject:2306

Change-Id: I446258363a96a3c37d657089dd7c1cff0fa3cf78
Reviewed-on: https://chromium-review.googlesource.com/865718
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-01-16 19:01:00 +00:00
Frank Henigman dda048cdc9 Make scripts executable by python2.
Add #!/usr/bin/python2 and the executable permission bit to all scripts
where missing.

BUG=angleproject:2209

Change-Id: Ib33017c17e579c371b89bbfbdb7136b870027dc5
Reviewed-on: https://chromium-review.googlesource.com/862987
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Frank Henigman <[email protected]>
2018-01-12 19:10:44 +00:00
Frank Henigman 1ea85a1316 Add #! line to scripts/bootstrap.py.
Indicate scripts/bootstrap.py should be run by python2.

[email protected]
BUG=angleproject:2209

Change-Id: I2ccfee1407cd4ce457aa28a374ac202b8281d40b
Reviewed-on: https://chromium-review.googlesource.com/862618
Reviewed-by: Frank Henigman <[email protected]>
Commit-Queue: Frank Henigman <[email protected]>
2018-01-11 23:11:32 +00:00
Jamie Madill fa920ebbca Entry Points: Auto-generate extensions EPs.
This is partially complete - it is missing the auto-gen for custom
ANGLE and Chromium extensions that aren't present in gl.xml. We
can upstream some of these extensions, but will also need to make
custom handling for some extensions that are too volatile or under-
specced to upstream to Khronos.

This also tweaks some of the Context method names to match what the
auto-generator expects. It also updates some TexStorage entry points.

Also includes a specialized error return value for glTestFenceNV.

Also removes the TexImage3DOES entry point which was neither used
nor accessible to the application.

Bug: angleproject:2263
Change-Id: I3667c22b1b15f84ab4c7dfecb5745aaf73d11e76
Reviewed-on: https://chromium-review.googlesource.com/846420
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2018-01-04 17:51:19 +00:00
Jamie Madill c8c9a24a11 Entry Points: Refactor generator script.
This cleans up some of the organization of the python generator. It
will make the extension entry point generation simpler.

It also changes the header guards to use more underscores, which
produces a small diff. Also updates the copyright year in a few
generated files.

Bug: angleproject:2263
Change-Id: I42f061c24a6cfcd8328c56c57eaed9ca6c7bb293
Reviewed-on: https://chromium-review.googlesource.com/846306
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-01-02 20:29:21 +00:00
Jamie Madill ffa2cd04b6 Entry Points: Speed up auto-gen.
This refactors the auto-generation script to use a simpler XML
iteration. It will only query the Xpath once per script, instead
of once per entry point. This speeds up execution significantly.

Also this change sorts the entry points alphabetically instead
of having them appear in the order they appear in the XML. This
gives a more consistent ordering.

Bug: angleproject:1309
Change-Id: Ifa1110af786b91ad0e6ff1cd3707e17666d398a5
Reviewed-on: https://chromium-review.googlesource.com/846419
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-01-02 17:30:50 +00:00
Jamie Madill 8a57b468e2 Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)"
Second re-land fixes git.bat access on developer machines.

Re-landing with upstream fixes to the layers so they no longer
need to copy the parameter validation errors to the current
working directory of the layer generation. Also includes fixes
for the GCC build.

This hasn't been updated in a while, so there are many changes.
It should also include better validation for memory barriers.

Also includes updated builds for SPIRV Tools and glslang.
A few pull requests need to land before landing this in ANGLE.

This second step re-enables Vulkan and includes the updated build.

Includes a workaround for parameter_validation.h no longer being
auto-generated, and the stale file clobbering the build.

Also includes a fix for an incorrect memory barrier.

Bug: angleproject:2237
Change-Id: Ic1a3ad7458bb743d7279a1af9334693ab6cb59d6
Reviewed-on: https://chromium-review.googlesource.com/845859
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-12-28 22:36:37 +00:00
Zhenyao Mo 06f8637740 Revert "Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)""
This reverts commit 755a9317ff.

Reason for revert: Broke local win build. crbug.com/797253

Original change's description:
> Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)"
> 
> Re-landing with upstream fixes to the layers so they no longer
> need to copy the parameter validation errors to the current
> working directory of the layer generation. Also includes fixes
> for the GCC build.
> 
> This hasn't been updated in a while, so there are many changes.
> It should also include better validation for memory barriers.
> 
> Also includes updated builds for SPIRV Tools and glslang.
> A few pull requests need to land before landing this in ANGLE.
> 
> This second step re-enables Vulkan and includes the updated build.
> 
> Includes a workaround for parameter_validation.h no longer being
> auto-generated, and the stale file clobbering the build.
> 
> Also includes a fix for an incorrect memory barrier.
> 
> Bug: angleproject:2237
> Change-Id: I1ed87ecfa84f51ee1edf6a8581d9b3c8f9a6f26e
> Reviewed-on: https://chromium-review.googlesource.com/834429
> Commit-Queue: Jamie Madill <[email protected]>
> Reviewed-by: Jamie Madill <[email protected]>

[email protected],[email protected]

Change-Id: I605d72207d64c7d0853678595e255b74ad69d887
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2237
Reviewed-on: https://chromium-review.googlesource.com/842918
Reviewed-by: Zhenyao Mo <[email protected]>
Commit-Queue: Zhenyao Mo <[email protected]>
2017-12-22 19:29:22 +00:00
Jamie Madill 755a9317ff Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)"
Re-landing with upstream fixes to the layers so they no longer
need to copy the parameter validation errors to the current
working directory of the layer generation. Also includes fixes
for the GCC build.

This hasn't been updated in a while, so there are many changes.
It should also include better validation for memory barriers.

Also includes updated builds for SPIRV Tools and glslang.
A few pull requests need to land before landing this in ANGLE.

This second step re-enables Vulkan and includes the updated build.

Includes a workaround for parameter_validation.h no longer being
auto-generated, and the stale file clobbering the build.

Also includes a fix for an incorrect memory barrier.

Bug: angleproject:2237
Change-Id: I1ed87ecfa84f51ee1edf6a8581d9b3c8f9a6f26e
Reviewed-on: https://chromium-review.googlesource.com/834429
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-12-21 21:09:37 +00:00
Jamie Madill 647dca7672 Revert "Vulkan: Roll loader/validation layers SDK. (2/2)"
This reverts commit f15f9cec31.

Reason for revert:
Causing a compile failure on the Fuchsia config, due to a path
difference. Will fix upstream and re-land, since it's breaking the
auto-roller.

https://chromium-review.googlesource.com/c/chromium/src/+/829878

FAILED: clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan/parameter_validation.cpp 
python ../../third_party/vulkan-validation-layers/src/scripts/lvl_genvk.py -o clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan -registry ../../third_party/vulkan-validation-layers/src/scripts/vk.xml parameter_validation.cpp -quiet
Error: Could not find vk_validation_error_messages.h
[906/1359] ACTION //third_party/angle/src/vulkan_support:vulkan_gen_object_tracker_cpp(//build/toolchain/linux:clang_x64)
FAILED: clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan/object_tracker.cpp 
python ../../third_party/vulkan-validation-layers/src/scripts/lvl_genvk.py -o clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan -registry ../../third_party/vulkan-validation-layers/src/scripts/vk.xml object_tracker.cpp -quiet
Error: Could not find vk_validation_error_messages.h

Original change's description:
> Vulkan: Roll loader/validation layers SDK. (2/2)
> 
> This hasn't been updated in a while, so there are many changes.
> It should also include better validation for memory barriers.
> 
> Also includes updated builds for SPIRV Tools and glslang.
> A few pull requests need to land before landing this in ANGLE.
> 
> This second step re-enables Vulkan and includes the updated build.
> 
> Includes a workaround for parameter_validation.h no longer being
> auto-generated, and the stale file clobbering the build.
> 
> Also includes a fix for an incorrect memory barrier.
> 
> Bug: angleproject:2237
> Change-Id: Iae611764870281ed6aa7b187ec0c4e44226c722a
> Reviewed-on: https://chromium-review.googlesource.com/759197
> Commit-Queue: Jamie Madill <[email protected]>
> Reviewed-by: Frank Henigman <[email protected]>

[email protected],[email protected],[email protected]

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: angleproject:2237
Change-Id: I9bc60860668c1da773b6e2fdb83ecc20215e9125
Reviewed-on: https://chromium-review.googlesource.com/830926
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-12-15 22:13:06 +00:00
Jamie Madill f15f9cec31 Vulkan: Roll loader/validation layers SDK. (2/2)
This hasn't been updated in a while, so there are many changes.
It should also include better validation for memory barriers.

Also includes updated builds for SPIRV Tools and glslang.
A few pull requests need to land before landing this in ANGLE.

This second step re-enables Vulkan and includes the updated build.

Includes a workaround for parameter_validation.h no longer being
auto-generated, and the stale file clobbering the build.

Also includes a fix for an incorrect memory barrier.

Bug: angleproject:2237
Change-Id: Iae611764870281ed6aa7b187ec0c4e44226c722a
Reviewed-on: https://chromium-review.googlesource.com/759197
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
2017-12-14 16:52:01 +00:00
Jiajia Qin ed2e6aa554 GLES31: Use more compact entry point style.
This migrates to the new generation style used in GLES2 and GLES3.

BUG=angleproject:2254

Change-Id: I10afa1f006ff68e8bafda2bd45dd9a048f8f7dff
Reviewed-on: https://chromium-review.googlesource.com/787172
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-11-24 16:01:04 +00:00
Jiajia Qin cb59a9097a GLES31: Auto-generate entry points source.
BUG=angleproject:2254

Change-Id: If9071066571f09902657528053e4af68b7dcdd2d
Reviewed-on: https://chromium-review.googlesource.com/781105
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-11-24 15:04:34 +00:00
Jamie Madill 5ad52994ba Add generator for EGL proc table.
This should improve ANGLE startup time by avoiding creating a large
std::map filled with the entry points.

BUG=chromium:781460

Change-Id: I20cfdb10b99844d0f60759dda73b729991dc60fe
Reviewed-on: https://chromium-review.googlesource.com/768209
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-11-14 19:46:54 +00:00
Corentin Wallez 336129f66f Use a packed enum for buffer targets.
BUG=angleproject:2169

Change-Id: I4e08973d0e16404b7b8ee2f119e29ac502e28669
Reviewed-on: https://chromium-review.googlesource.com/723865
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-11-10 23:18:12 +00:00
Jamie Madill a8b73ed051 Add a meta-script to run code generators.
This script calls all the various GL and back-end python scripts to
generate our internal format tables and entry points, etc. It uses
a GYP-like scheme of inputs/outputs to check modified time before
running the generators. It also will automatically call 'git cl
format' if any generator was called.

Also updates the copyright in a couple of touched files.

BUG=angleproject:2207

Change-Id: I4187a7622accc1c97a8d779b8f87fe00b74855ea
Reviewed-on: https://chromium-review.googlesource.com/742372
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-11-02 14:36:54 +00:00
Jeff Gilbert 1b605ee345 Use "python2" instead of undifferentiated "python".
BUG=angleproject:2209

Change-Id: I5a7a667d90160fe68a9dcf7bff5fc2dc62795270
Reviewed-on: https://chromium-review.googlesource.com/745861
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2017-10-31 15:36:15 +00:00
Jamie Madill 54118be673 Add script to generate GN/MSVS projects.
BUG=angleproject:1569

Change-Id: I0e47720d17cd1a29603e471482cac31d4c281ee5
Reviewed-on: https://chromium-review.googlesource.com/735059
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-10-24 14:40:37 +00:00
Jamie Madill 29ddcc992f Add an auto-generated dispatch table for GL bindings.
This will more easily allow us to extend our implementation to make a
NULL or "stub" set of bindings. It also exposes a lot more function
permutations via extension variations.

It might improve the loading speed for bindings obtained via
extensions. Instead of generating a list every time an extension is
checked, we use a single std::set for a fast query. However because
more extensions are checked for more entry points, it might not make
a huge difference.

This also fixes an issue where the "real" ANGLE GL headers were being
propagated to the entry point dispatch table definitions, instead of
being in a totally isolated file. This patch adds the missing typedefs
to our proxy headers.

It also fixes the naming of a few entry points which was inconsistent
with the spec. It also makes an XML adjustment to GL_NV_path_rendering
to accomodate a hole in the spec where glLoadMatrixfEXT was not ever
defined in OpenGL ES. A spec oddity with the TexStorage extension is
not resolved - in this case, some methods are only exposed if other
extensions are present, but this information is missing from gl.xml.

BUG=angleproject:2188

Change-Id: I0fd61dd32de6fadd55fa6bd79295833392d51104
Reviewed-on: https://chromium-review.googlesource.com/726949
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2017-10-22 02:16:59 +00:00
Corentin Wallez 2e568cfbe3 Add generator for packed GL enums.
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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-10-16 23:38:37 +00:00
Jamie Madill b8bbbf9ec6 Vulkan: Use environment override to load layers.
Instead of using a compile-time define, use an OS call to override
the environment variable the loader uses to look for layers. This
should allow us to have a run-time override mechanism, so we can
more easily use ANGLE with RenderDoc and other tools that hook
into the layers for debugging and profiling purposes.

This should also allow the developer to install and use their own
layers with ANGLE if desired.

This patch removes the angle_loader.h generation since it is no
longer necessary.

It also fixes an unrelated loader warning that occured when releasing
the current pipeline object.

BUG=angleproject:1898

Change-Id: Ic4a5120a6b73745397451ef9e3897e157da1feda
Reviewed-on: https://chromium-review.googlesource.com/671490
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-09-19 19:40:36 +00:00
Jamie Madill 851edac785 GLES3: Use more compact entry point style.
This migrates to the new generation style used in GLES2.

BUG=angleproject:1309

Change-Id: I43e9d33a0d7c5b1786452895855ff2bfbf82f139
Reviewed-on: https://chromium-review.googlesource.com/638311
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-08-31 21:25:42 +00:00
Jamie Madill fa08cae7ca Make perf_test_runner Python 2.7 and 3 compatible.
BUG=None

Change-Id: I915c99f21dc879a8e63955cd6a3dd892d05bbf5f
Reviewed-on: https://chromium-review.googlesource.com/646590
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-08-31 19:22:38 +00:00
Jamie Madill 57ae8c16c7 GLES3: Auto-generate entry points source.
Lots of incidental fixes to formatting and naming.
Adds specific default return type overloads for ClientWaitSync and
GetUniformBlockIndex.

BUG=angleproject:1309

Change-Id: Id67cbc0b19fc2cb94c859ab8390f1ff36b1bbd25
Reviewed-on: https://chromium-review.googlesource.com/637203
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-08-30 20:21:01 +00:00
Jamie Madill 2e29b13da2 Fix some default return values in auto-gen.
We don't generally test for the default return values of function
calls that have validation errors, but the auto-gen script might
not have been returning things correctly. For GLint values, default to
returning -1 instead of zero.

BUG=angleproject:1309

Change-Id: I736b5a7ef9b50ca1509087fe933c4a4e526531d8
Reviewed-on: https://chromium-review.googlesource.com/636522
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-08-29 17:50:16 +00:00
Jamie Madill ff161f83ce Fix EP generation event output format for uint.
This should be %u not %d.

BUG=angleproject:1309

Change-Id: I1fe1b8df9ea4f9123fc05e9ff58afa1f7723692c
Reviewed-on: https://chromium-review.googlesource.com/636521
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-08-28 21:20:32 +00:00
Jamie Madill 16daadba8a GLES3: Auto-generate entry point header.
BUG=angleproject:1309

Change-Id: I40e3580c99df44338dfd1d06677e80fd0c57853e
Reviewed-on: https://chromium-review.googlesource.com/636520
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-08-28 19:04:07 +00:00
Jamie Madill 9696d073c9 Clean up the ES3 entry points for auto-generation.
Removes some unnecessary includes, and moves some validatoinfunctions
to the ES3-only file.

BUG=angleproject:1309

Change-Id: I3b274014c48f6f39b5e67223987c91fbc5b4d390
Reviewed-on: https://chromium-review.googlesource.com/636519
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-08-28 19:03:31 +00:00
Jamie Madill 41013bdd15 Perf script runner Python 3 compatibility.
No code changes in ANGLE, just a perf test runner fix.

BUG=angleproject:1155

Change-Id: If49c58da26f9224e09f292689b2d74f7e129a844
Reviewed-on: https://chromium-review.googlesource.com/633786
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-08-24 18:40:54 +00:00
Yuly Novikov c4d18aac0a Use ErrorStream everywhere
Eliminates one more usage of FormatString and its static initializer.

Add more ErrorStream types
and replace gl::Error and egl::Error with them.

BUG=angleproject:1644

Change-Id: Ib498d0ae4b81a332ec71aed7cf709993b154e6bb
Reviewed-on: https://chromium-review.googlesource.com/505429
Commit-Queue: Yuly Novikov <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-06-07 20:48:52 +00:00