Commit Graph
127 Commits
Author SHA1 Message Date
Olli Etuaho dff32a0da1 Support multisample arrays in shader programs
The added tests check that using textureSize() and texelFetch() on
textures with a fixed point format return expected results. texelFetch
is also covered for integer format textures.

dEQP GLES 3.1 tests also cover a variety of multisampled array texture
formats.

BUG=angleproject:2775
TEST=angle_end2end_tests, angle_deqp_gles31_tests

Change-Id: I99b422e24b39e3563ed72f0fb85c9c1907df807d
Reviewed-on: https://chromium-review.googlesource.com/1196521
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-09-06 15:44:35 +00:00
Jamie Madill 7359954301 Update update_canary_angle script.
Make it search in any output directory.

Bug: None
Change-Id: I4ea3ee70bbf051e534e97a972fcb6bbcb5ceeecc
Reviewed-on: https://chromium-review.googlesource.com/1208512
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-05 20:32:50 +00:00
Tobin Ehlis 3a181e3e53 Roll VK deps forward as of 8/31/2018
Roll Vulkan ANGLE dependencies forward as of 8/31/2018. This grabs some
new validation checks including point-related checks that may be
interesting for bug 2727.

One of these checks, related to PointSize, is firing so I've added some
code in the VK debug callback to suppress those error messages for now
and filed a separate bug (2796) to fix that issue in the renderer.

Had to overhaul the json gen script as validation changed how these are
generated. They now use a base template with some strings replaced to
account for platform and Vulkan header version. Offloaded all of that
work to our existing json generate script which was previously more of
an intelligent copy but now had some further intelligence for
transforming from input template into final json files.

Had to also roll glslang forward to meet shader validation dependency.

Bug: angleproject:2727
Change-Id: I929619cd258cddd6bc9c6743600e072c46736f5c
Reviewed-on: https://chromium-review.googlesource.com/1194617
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Tobin Ehlis <[email protected]>
2018-08-31 17:06:59 +00:00
Geoff Lang b02fc662fa Lock around all EGL and GL calls with a global mutex.
BUG=angleproject:2464

Change-Id: I0231cc84777272f9cf26298c6a137f1ad3fd51d6
Reviewed-on: https://chromium-review.googlesource.com/1183441
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-08-31 16:11:58 +00:00
Olli Etuaho 064458a8f8 Remove separate ANGLE_texture_multisample_array
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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-08-31 14:04:58 +00:00
Olli Etuaho f0d0408a35 Use OES_texture_storage_multisample_2d_array
There's an OES extension for multisample texture arrays,
OES_texture_storage_multisample_2d_array. Change references from
ANGLE_texture_multisample_array to the native extension in the shader
compiler.

ANGLE still needs to have robust behavior for out-of-range texel
fetches that's not found in the original extension, but this does not
need to be spelled out in the extension spec.

BUG=angleproject:2775
TEST=angle_unittests

Change-Id: Ie80ae767cc92ccaf7389af28789f45547f86978f
Reviewed-on: https://chromium-review.googlesource.com/1193266
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-08-30 09:44:05 +00:00
Frank Henigman a7f97a27eb Gyp is dead. Long live gn.
Remove the gyp build.  The .gypi files were not renamed so that diff and
rebase would work on this change.  They will be renamed in a separate
change.

BUG=angleproject:1569

Change-Id: If8a217027633293664b820104f91a4ca5889b24e
Reviewed-on: https://chromium-review.googlesource.com/1187380
Commit-Queue: Frank Henigman <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-08-29 19:26:38 +00:00
Olli Etuaho d310a4342c Add validation and negative tests for multisample arrays
This adds errors for binding and allocating multisample array
textures. New tests in TextureMultisampleTest.cpp check that the
errors are generated as specified.

Tests for querying supported sample counts are also improved and
extended for multisample array textures.

BUG=angleproject:2775
TEST=angle_end2end_tests

Change-Id: I6a0fe7ae04bb3d0072f6cbe09026b05e2bc47325
Reviewed-on: https://chromium-review.googlesource.com/1188576
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-08-28 20:48:02 +00:00
Olli Etuaho 89664843c6 Add glTexStorage3DMultisampleANGLE entry point
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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-08-27 14:59:00 +00:00
Olli Etuaho 8ca6080591 Add 2D MS array sampler support to compiler
This also places textureSize(gsampler2DMS) correctly in the ESSL 3.10
builtins instead of ESSL 3.00 builtins.

BUG=angleproject:2775
TEST=angle_unittests

Change-Id: Ieb0f7a7424a5558a5569af6d4fcbcc9b12ec9840
Reviewed-on: https://chromium-review.googlesource.com/1186466
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-08-24 09:38:34 +00:00
Lingfeng Yang 6e5bf36ff5 GLES1: Fixes for Gets() test
- 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 <[email protected]>
Commit-Queue: Lingfeng Yang <[email protected]>
2018-08-16 15:43:07 +00:00
Jamie Madill cc1dc5ee4c Add a perf test for draw calls with texture changes.
This perf test highlights the performance hotspots with
State::syncProgramTextures.

Also includes a fix to the perf test runner script.

Bug: angleproject:2763
Change-Id: I69ffa0cc0d5e023944495b7a1c844770a54f7ddc
Reviewed-on: https://chromium-review.googlesource.com/1166041
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-08-08 19:46:00 +00:00
Frank Henigman 67c388e6c0 Vulkan: support GL_FIXED vertex data.
Override fixed to float, generate code, enable tests.

BUG=angleproject:2405

Change-Id: Ic3e9a31eaf22372023b94081b0f4a83770dcabbe
Reviewed-on: https://chromium-review.googlesource.com/1144455
Commit-Queue: Frank Henigman <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-07-30 18:54:13 +00:00
Jamie Madill b436aac31d Vulkan: Support inverted blit for depth/stencil.
Depth/stencil formats are packed tightly when reading back Images with
vkCmdCopyImageToBuffer. Same for the reverse. Thus we need to take this
into account when doing our blitWithReadback implementation.

This splits the depth/stencil blit into two separate steps. Fixes all
the remaining blit failures in BlitFramebufferANGLETest.

Bug: angleproject:2673
Change-Id: Ie9f43f782a82b5a0746d00122b24f81088d57c4c
Reviewed-on: https://chromium-review.googlesource.com/1140740
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-07-23 20:23:54 +00:00
Jamie Madill db9c69edeb Make PackPixels take an angle::Format.
This removes the format type parameter from places where it isn't
needed. It also removes the 'write color' functions map. This map was
redundant with the angle::Format write function.

Bug: angleproject:2729
Change-Id: I24e4548a89342237d7ed25180fea156fba51ccab
Reviewed-on: https://chromium-review.googlesource.com/1142300
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-07-23 20:07:44 +00:00
Jamie Madill ba365939b9 Rename angle::Format::ID to angle::FormatID.
This allow for predeclaring the enum. It solves some include dependency
issues.

Bug: angleproject:2729
Change-Id: Ibbbab0796e466c62848404ba277c5f454fd9ac62
Reviewed-on: https://chromium-review.googlesource.com/1142299
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-07-20 16:59:17 +00:00
Geoff Lang 38971fd135 Vulkan: Support multiple depth stencil formats for backbuffers.
Since the backbuffer's depth stencil is always emualted, it can support any
depth stencil format.

BUG=angleproject:2692

Change-Id: I29df62bb322c1ac4e9fcd54e4cbc4c219cf12e83
Reviewed-on: https://chromium-review.googlesource.com/1119075
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-07-18 18:13:34 +00:00
Jamie Madill 799e075abe Replace D24_UNORM with a packed version.
Adding an explicit X8 channel packs the format into 32 bits. This gives
the correct 4-byte alignment instead of a mysterious 3-byte version.

Bug: angleproject:2729
Change-Id: Id38f74db4ba61c500baeb6526a9d14e1d31d4363
Reviewed-on: https://chromium-review.googlesource.com/1140739
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-07-18 16:32:13 +00:00
Frank Henigman 419acc8f4f Vulkan: Convert streamed vertex data as needed.
Add two members to vk::Format:
- vertex data copy function
- flag indicating if the function converts or not
Use the function when streaming vertex data so it gets converted if needed.
Add fallbacks for integer formats.  These formats will now work everywhere,
as long as they are in client memory, not a buffer object.
Adjust test expectations accordingly.

BUG=angleproject:2405

Change-Id: I677221219d933c35740633a0ab7694293e218177
Reviewed-on: https://chromium-review.googlesource.com/1084328
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-07-16 15:47:20 +00:00
Frank Henigman d9618bf4fc Vulkan: prepare for buffer format fallbacks.
Generate code for buffer fallbacks as well as texture fallbacks.
No functional change.

BUG=angleproject:2405

Change-Id: I9f30a2cbb3cd9ba1d18474f99cba434b030b0232
Reviewed-on: https://chromium-review.googlesource.com/1113026
Commit-Queue: Frank Henigman <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-07-13 19:45:23 +00:00
Frank Henigman 569b9cb983 Fix run_code_generation.py hash calculation.
Open files with mode 'r' instead of 'rb' so the hash calculation
produces the same results on Linux and Windows.
Recalculate the hashes and proc_table_autogen.cpp which was out of date.

BUG=angleproject:2711

Change-Id: I31562c96ce36e6df009c44c565fe9a3f1b5ba6c4
Reviewed-on: https://chromium-review.googlesource.com/1128549
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Frank Henigman <[email protected]>
2018-07-10 22:25:05 +00:00
Geoff Lang cb8a921b7a Vulkan: Support RGB/BGR backbuffers emulated on RGBA/BGRA.
BUG=angleproject:2692
BUG=angleproject:2523
BUG=angleproject:2715
BUG=angleproject:2716

Change-Id: I538b385f8b66fb97e176953b0fc4a6299849c005
Reviewed-on: https://chromium-review.googlesource.com/1118713
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Luc Ferron <[email protected]>
2018-07-10 20:28:29 +00:00
Geoff Lang b1cc789c70 Finish populating the new_hashes map after finding a dirty input.
any_input_dirty would return early when finding a dirty input and not finish
filling the new_hashes map.  This would require multiple runs of the code
generation script to fully generate all the outputs.

BUG=angleproject:2695

Change-Id: Ie62190efe2765df432b0a535fb8d33ed2ffa66a7
Reviewed-on: https://chromium-review.googlesource.com/1127439
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-07-05 21:13:22 +00:00
Geoff Lang 9a25780193 Write relative paths with forward slashes to the code generation hashes.
This should avoid generating diffs when running the code generation with
different source directories or on different platforms.

BUG=angleproject:2695

Change-Id: I67776883bdbeb867a49bea00f16998c04f7857b4
Reviewed-on: https://chromium-review.googlesource.com/1127355
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-07-05 21:07:02 +00:00
Geoff Lang 5695a5b24c Allow the run_code_generation.py script to be run from any directory.
BUG=angleproject:2695

Change-Id: I9a083bf67b17ca0dc1ee213b75caa4ecece62f00
Reviewed-on: https://chromium-review.googlesource.com/1127354
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-07-05 20:53:02 +00:00
Geoff Lang be7e455c89 Vulkan: Regenerate builtin shaders.
BUG=angleproject:2691

Change-Id: Iafb1b4828fa0d54974bfb9d11a436ccaa910b942
Reviewed-on: https://chromium-review.googlesource.com/1127356
Reviewed-by: Jamie Madill <[email protected]>
2018-07-05 18:54:17 +00:00
Jamie Madill a72f400c5f run_code_generation: Compare hashes instead of mtime.
Using mtime is fundamentally flawed when working with git. Replace
these flaky checks with hash comparisons. The hashes are stored in an
autogenerated json file that will be stored in the repository.

This makes the run_code_generation script robust against any and all
input changes. It also removes the need to track script outputs as
dependencies.

Bug: angleproject:2697
Change-Id: I60f2a87a8680b1f775ad678b05112f5b16c7dde7
Reviewed-on: https://chromium-review.googlesource.com/1120159
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-06-29 21:30:39 +00:00
jchen10 82af620e05 ParallelCompile: Add entry points.
Add the extension text, entry points and validations.

BUG=chromium:849576
TEST=angle_end2end_tests

Change-Id: I4c06ee30e4f4fe9bb1c1fecada747b9c78fed0ea
Reviewed-on: https://chromium-review.googlesource.com/1103789
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jie A Chen <[email protected]>
2018-06-27 02:07:17 +00:00
jchen10 16f391d445 ParallelCompile: Update gl.xml
Updated from https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/gl.xml.

BUG=chromium:849576

Change-Id: I92520d53844f7fff7e68ca49207151d4fa69c79e
Reviewed-on: https://chromium-review.googlesource.com/1111469
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-06-22 14:18:03 +00:00
Lingfeng Yang 9c4c0926ac Reland "GLES1: Point rasterization (partial implementation)"
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 <[email protected]>
> Commit-Queue: Lingfeng Yang <[email protected]>

Bug: angleproject:2306
Change-Id: Id8e71352a77ff0ce71cb604965effbfb8aca613e
Reviewed-on: https://chromium-review.googlesource.com/1108458
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Lingfeng Yang <[email protected]>
2018-06-20 19:42:32 +00:00
Frank Henigman a58d69e90b Revert "GLES1: Point rasterization (partial implementation)"
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 <[email protected]>
> Commit-Queue: Lingfeng Yang <[email protected]>

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

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 <[email protected]>
Reviewed-by: Lingfeng Yang <[email protected]>
Commit-Queue: Frank Henigman <[email protected]>
2018-06-20 18:12:00 +00:00
Lingfeng Yang 4004ae0e03 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 <[email protected]>
Commit-Queue: Lingfeng Yang <[email protected]>
2018-06-19 21:26:41 +00:00
Frank Henigman 388f991ce8 Vulkan: fix third_party path.
run_code_generation.py stopped working, likely as a result of the big Vulkan repo reorganization.
I fixed a path, regenerated everything (by temporarily hacking the script so it thought everything
was dirty), and nothing changed except one comment.

BUG=angleproject:2558

Change-Id: I5ac4c040ac1ec207098172303cc2f2507cccdecb
Reviewed-on: https://chromium-review.googlesource.com/1103281
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tobin Ehlis <[email protected]>
2018-06-18 19:31:17 +00:00
Lingfeng Yang 74be296b0c GLES1: Texture environments setup
- Revise entry point definitions to use packed enums

BUG=angleproject:2306

Change-Id: I06ad95f475d1dbaf07ec24ff2544503c4a44e826
Reviewed-on: https://chromium-review.googlesource.com/1090996
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Lingfeng Yang <[email protected]>
2018-06-07 18:36:35 +00:00
Lingfeng Yang a0cfa873bc GLES1: Shade model API
+ add sample

BUG=angleproject:2306

Change-Id: Ie0c391618ec2b771cc99b96db02b9008a86272b9
Reviewed-on: https://chromium-review.googlesource.com/1079992
Commit-Queue: Lingfeng Yang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-06-01 00:21:59 +00:00
Lingfeng Yang d0febe7aa2 Reland "GLES1: Entry points for lighting and materials"
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 <[email protected]>
> Reviewed-by: Geoff Lang <[email protected]>

Bug: angleproject:2306
Change-Id: I434273acd5200dd9f4925e239a032cc8db31a434
Reviewed-on: https://chromium-review.googlesource.com/1072849
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Lingfeng Yang <[email protected]>
2018-05-25 17:07:04 +00:00
Jiawei Shao 5f9482f4c5 ES31: Implement FramebufferTextureEXT entry point
This patch adds the entry point and related validation for
FramebufferTextureEXT defined in OpenGL ES 3.1 extension
EXT_geometry_shader.

BUG=angleproject:1941
TEST=angle_end2end_tests

Change-Id: Id6804e0b3971f52273562ce1a325d8377926a558
Reviewed-on: https://chromium-review.googlesource.com/1069842
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-05-25 13:58:04 +00:00
Jamie Madill 493f95710e Add PrimitiveMode packed GLenum.
Bug: angleproject:2574
Change-Id: I3d7bd7ca0d69a364a611dc04799ea34906fc4a6c
Reviewed-on: https://chromium-review.googlesource.com/1067114
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-05-25 00:48:54 +00:00
Brandon Jones 795ab71993 Use os.path.join instead of slashes
Minor change to replace some forward slashes in a file path with
os.path.join to ensure cross platform compatibility.

Bug: angleproject:1395
Change-Id: Ib6b64a9f0b16ef69c9f973a682c329c157ee5622
Reviewed-on: https://chromium-review.googlesource.com/1072867
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-05-24 23:14:12 +00:00
Jamie Madill d4703d5058 Move packed enum code to common/
This makes it accessible in the utilities files.

Bug: angleproject:2574
Bug: angleproject:2169
Change-Id: I0fdd34b4233e72b7534cb2b09f451539c1a394cd
Reviewed-on: https://chromium-review.googlesource.com/1067110
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-05-24 22:49:25 +00:00
Jamie Madill 1c597eea31 Fix run_code_generation for huge diffs.
This uses the --full argument to work around max path limitations
on Windows. Also includes a couple minor changes for generators
to generate already-formatted code.

Bug: angleproject:2578
Change-Id: I1e400b02e828bfdca21cacb73c649f41226bef55
Reviewed-on: https://chromium-review.googlesource.com/1072161
Reviewed-by: Lingfeng Yang <[email protected]>
Reviewed-by: Luc Ferron <[email protected]>
Reviewed-by: Brandon1 Jones <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-05-24 22:03:19 +00:00
Brandon Jones ba16270867 Fix entry point generation on non-Windows
In "Implement EGL_ANGLE_explicit_context", backslashes were introduced in
a file path, which broke generation on non-Windows machines. This fixes
the issue.

Bug:angleproject:1395
Change-Id: I188c42c2a92afec37d7cb7dac5bffd7e855a0d2b
Reviewed-on: https://chromium-review.googlesource.com/1072509
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-05-24 21:02:09 +00:00
Lingfeng Yang 668e507f99 Revert "GLES1: Entry points for lighting and materials"
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 <[email protected]>
> Reviewed-by: Geoff Lang <[email protected]>

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

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 <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-05-24 17:40:40 +00:00
Lingfeng Yang 4a09c1a245 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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-05-24 17:04:40 +00:00
Brandon Jones 2b0cdcc1b4 Implement EGL_ANGLE_explicit_context
Implementation of EGL_ANGLE_explicit_context. Includes new libGLESv2 entry
points and exports, libANGLE entry points, extension declarations for
eglGetProcAddress, and unit tests. Autogeneration scripts have been
modified to produce entry points, exports, eglGetProcAddress function
table, extension function pointers, and function declarations.

Bug:angleproject:1395
Change-Id: I1b79c6069bbed05beb4700a32139a64ddc465c4c
Reviewed-on: https://chromium-review.googlesource.com/1039865
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-05-24 16:39:29 +00:00
Brandon Jones 41e59f55a4 Autogenerate libGLESv2.cpp and .def
Add generation of libGLESv2.cpp and libGLESv2.def to generate_entry_points.py

Bug: angleproject:2476
Change-Id: I86c7fb31f73ccbbbc32b28acca179b11527dff9e
Reviewed-on: https://chromium-review.googlesource.com/1040647
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-05-04 03:23:49 +00:00
Corentin Wallez ad3ae90a00 Use packed enums for QueryType.
BUG=angleproject:2169

Change-Id: I129a9d8e295859daa071a298dab9fe1895315cc0
Reviewed-on: https://chromium-review.googlesource.com/957318
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2018-05-02 18:33:46 +00:00
Jamie Madill d47044ad53 Vulkan: Add framework for internal shaders.
Vulkan intenal shaders are stored in a ShaderLibrary, and this is
owned by the RendererVk. This way the shaders are reused between all
the different Contexts. They are initialized lazily to keep init time
low. They also have an associated Serial (called a ProgramSerial) so
they can be identified in a PipelineDesc (used by the Pipeline cache).

We use a python script to build and invoke the glslang validator, that
also produces SPIR-V binary code snippets. These snippets are gathered
into an auto-generated file that is exposed via an auto-generated
header file. The InternalShaderID enum class gives access to the
internal shaders that are shared through the Vulkan back-end.

This also adds simple clear shaders to be used in masked color clears.
The patch doesn't add any functionality but it is split off from the
color clear functionality to keep the code size down.

Bug: angleproject:2339
Bug: angleproject:2455
Change-Id: Ie83043eda217c9f013817b198c92a3b7ba0878b4
Reviewed-on: https://chromium-review.googlesource.com/1031372
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-05-01 20:39:47 +00:00
Jamie Madill 0ade8e88d8 Use time tolerance in run_code_generation check.
The mtime values I was seeing on my file system were sometimes
floating point numbers that were very very close but not exactly
the same. This might be due to numerical errors. Increasing the
tolerance to something still very small, precision is less than
a second. It will lead to fewer rebuilds of non-dirty files.

Bug: angleproject:2455
Change-Id: I95dc3214ee91af7a70a20cc625405e0e2bc18698
Reviewed-on: https://chromium-review.googlesource.com/1032855
Reviewed-by: Luc Ferron <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-04-30 14:55:45 +00:00
Geoff Lang 8ceea819c6 Refactor packed enum generation to support EGL enums.
Convert the very simple EGL texture type enum.

BUG=angleproject:1618

Change-Id: Ieea382a282a8f2544f2982627e8445e6e5cea826
Reviewed-on: https://chromium-review.googlesource.com/1019386
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-04-20 17:58:27 +00:00