Commit Graph
148 Commits
Author SHA1 Message Date
Austin Eng 1bf18ce9e2 Implement GL_ANGLE_multi_draw
This patch adds entrypoints glMultiDrawArraysANGLE,
glMultiDrawElementsANGLE, glMultiDrawArraysInstancedANGLE,
annd glMultiDrawElementsInstancedANGLE

Bug: chromium:890539

Change-Id: Ic9c374c53892460f44ca6e73a253b78473ac2dff
Reviewed-on: https://chromium-review.googlesource.com/c/1282268
Reviewed-by: Kai Ninomiya <[email protected]>
Commit-Queue: Austin Eng <[email protected]>
2018-11-06 18:04:07 +00:00
Geoff Lang 6ba22ee137 GL: Implement EGL_ANDROID_get_frame_timestamps.
BUG=angleproject:2936

Change-Id: I758d797d185b2de330cce3401bfeef76c7df590e
Reviewed-on: https://chromium-review.googlesource.com/c/1302836
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-11-02 16:43:05 +00:00
Yizhou Jiang c0b6c639b1 Implement GetTexLevelParameter api of texture multisample extension
This patch adds GetTexLevelParameterivANGLE and GetTexLevelParameterfvANGLE.

TEST=TextureMultisampleTest.GetTexLevelParameter*
TEST=NegativeTextureMultisampleTest.Negtive*

BUG=angleproject:2275

Change-Id: Id702ba31df36ab65f46b697d480b5bf01b87e360
Reviewed-on: https://chromium-review.googlesource.com/c/1295830
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Yizhou Jiang <[email protected]>
2018-11-02 02:51:57 +00:00
Jamie Madill 3402d52309 Try to reduce variance in angle_perftests.
This change does a few things:

- make perf test runner script print % variation instead of stddev

This makes it a bit more clear how much variance there is.

- stabilize CPU in the render perf tests

Setting a thread affinity and priority should stop from switching cores
during the run. Hopefully can prevent background noise from changing
the test results.

- warm up the benchmark with a few iterations

This should hopefully make the test results a bit more stable.

- output a new normalized perf result value

The new result is normalized against the number of iterations. So it
should hopefully be stable even if the number of iterations is changed.

- increases the iteration count in the draw call perf tests.

These tests were completely dominated by SwapBuffers time. Increasing
the iterations per step means we actually are bottlenecked on CPU time
instead.

Bug: angleproject:2923
Change-Id: I5ee347cf93df239ac33b83dc5effe4c21e066736
Reviewed-on: https://chromium-review.googlesource.com/c/1303679
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-10-30 20:27:07 +00:00
Jamie Madill 77abad8d9c Remove Context::gatherParams.
This won't be used in the future. It saves a few instructions on each
entry point.

Also refactors a bit of touched code. Also adds in a missed entry
point: "glTexStorage2DMultisampleANGLE".

Removes related code and moves remaining helper code in params.h into a
new file entry_point_utils.h.

In total this patch series reduces overhead by up to 5%.

Bug: angleproject:2933
Change-Id: Ifb49564597cde6ba82dfc3e185227619fdc62612
Reviewed-on: https://chromium-review.googlesource.com/c/1299478
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-10-29 20:09:19 +00:00
Geoff Lang fefaba5bfd Regenerate hashes for the builtin symbol table.
BUG=chromium:890539

Change-Id: Ia5bdf652dc37a466560071b4fe2cdc7d89ff941f
Reviewed-on: https://chromium-review.googlesource.com/c/1302837
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Austin Eng <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-10-27 00:16:39 +00:00
Jamie Madill e357535f7f Fix entry points.
A race broke the ANGLE tree due to an entry point formatting change.

Bug: angleproject:2890
Bug: angleproject:2928
Change-Id: I08cc4e13c9d5bd1888c0d891113d3042759d43dc
Reviewed-on: https://chromium-review.googlesource.com/c/1302534
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-10-26 19:09:38 +00:00
Till Rathmann b854363004 Support GL_OES_texture_border_clamp
Added support for GL_TEXTURE_BORDER_COLOR and GL_CLAMP_TO_BORDER in
OpenGL/OpenGLES, Direct3D9 and Direct3D11 backends.
For integer textures in OpenGLES3 contexts these additional entry points
are available now:

void glTexParameterIivOES(enum target, enum pname, const int *params);
void glTexParameterIuivOES(enum target, enum pname, const uint *params);

void glGetTexParameterIivOES(enum target, enum pname, int *params);
void glGetTexParameterIuivOES(enum target, enum pname, uint *params);

void glSamplerParameterIivOES(uint sampler, enum pname, const int *params);
void glSamplerParameterIuivOES(uint sampler, enum pname, const uint *params);

void glGetSamplerParameterIivOES(uint sampler, enum pname, int *params);
void glGetSamplerParameterIuivOES(uint sampler, enum pname, uint *params);

BUG=angleproject:2890
TEST=angle_end2end_tests.TextureBorderClamp*

Change-Id: Iee3eeb399d8d7851b3b30694ad8f21a2111f5828
Reviewed-on: https://chromium-review.googlesource.com/c/1257824
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-10-26 18:45:54 +00:00
Shahbaz Youssefi a390ebd9e7 Add compiler printf attribute to relevant functions
Relands 27a472c60 with reinterpret_cast changed to C-style cast to
support types that are pointers on some platforms and integers on
others.

This commit includes fixes to undefined behavior caught by this
attribute.  The following changes have been made:

- 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined
  behavior with p.  Additionally, %p already prints 0x with both gcc and
  clang.  This results in a small output change:

    void *x = (void *)0x1234;
    void *y = (void *)0x1234567890abcdef;

    printf("|%0.8p|\n", x);
    printf("|%0.8p|\n", y);

    printf("|%016" PRIxPTR "|\n", (uintptr_t)x);
    printf("|%016" PRIxPTR "|\n", (uintptr_t)y);

  prints:

    |0x00001234|
    |0x1234567890abcdef|
    |0x0000000000001234|
    |0x1234567890abcdef|

- %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is
  changed to %llu and the relevant argument is cast to unsigned long
  long.  This is due to these types being typedefs to unknown types (on
  Linux for example, these are unsigned long, and my guess would be
  unsigned long long on Windows where long is 32 bits).
- %llu is used for GLuint64, which could be unsigned long (as is on
  Linux).  Those arguments are cast to unsigned long long.
- %p is used for some EGLNative types, but those types may not be a
  pointer.  Those arguments are cast to uintptr_t and printed as above.

Bug: angleproject:2928
Change-Id: Idf9f705c3d00f69e41e7603453016276a2e13a64
Reviewed-on: https://chromium-review.googlesource.com/c/1300913
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2018-10-26 18:18:21 +00:00
Jamie Madill e9503ae90a Revert "Add compiler printf attribute to relevant functions"
This reverts commit 27a472c601.

Reason for revert: Causing failures on 32-bit Linux configs:

https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8931673733828416640/+/steps/compile/0/stdout

../../third_party/angle/src/libGLESv2/entry_points_egl.cpp:257:11: error: reinterpret_cast from 'EGLNativeWindowType' (aka 'unsigned long') to 'uintptr_t' (aka 'unsigned int') is not allowed
          reinterpret_cast<uintptr_t>(win), reinterpret_cast<uintptr_t>(attrib_list));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/angle/src/common/debug.h:230:112: note: expanded from macro 'EVENT'
#define EVENT(message, ...) gl::ScopedPerfEventHelper scopedPerfEventHelper("%s" message "\n", __FUNCTION__, ##__VA_ARGS__);
                                                                                                               ^~~~~~~~~~~
../../third_party/angle/src/libGLESv2/entry_points_egl.cpp:314:11: error: reinterpret_cast from 'EGLNativePixmapType' (aka 'unsigned long') to 'uintptr_t' (aka 'unsigned int') is not allowed
          reinterpret_cast<uintptr_t>(pixmap), reinterpret_cast<uintptr_t>(attrib_list));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Original change's description:
> Add compiler printf attribute to relevant functions
> 
> This commit includes fixes to undefined behavior caught by this
> attribute.  The following changes have been made:
> 
> - 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined behavior with
>   p.  Additionally, %p already prints 0x with both gcc and clang.  This
>   results in a small output change:
> 
>     void *x = (void *)0x1234;
>     void *y = (void *)0x1234567890abcdef;
> 
>     printf("|%0.8p|\n", x);
>     printf("|%0.8p|\n", y);
> 
>     printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(x));
>     printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(y));
> 
>   prints:
> 
>     |0x00001234|
>     |0x1234567890abcdef|
>     |0x0000000000001234|
>     |0x1234567890abcdef|
> 
> - %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is
>   changed to %llu and the relevant argument is cast to unsigned long
>   long.  This is due to these types being typedefs to unknown types (on
>   Linux for example, these are unsigned long, and my guess would be
>   unsigned long long on Windows where long is 32 bits).
> - %llu is used for GLuint64, which could be unsigned long (as is on
>   Linux).  Those arguments are cast to unsigned long long.
> - %p is used for some EGLNative types, but those types may not be a
>   pointer.  Those arguments are cast to uintptr_t and printed as above.
> 
> Bug: angleproject:2928
> Change-Id: I63e9e998c72701ce8582f1ebf25d6374be9090e4
> Reviewed-on: https://chromium-review.googlesource.com/c/1289232
> Commit-Queue: Shahbaz Youssefi <[email protected]>
> Reviewed-by: Yuly Novikov <[email protected]>

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

Change-Id: I4f3cea64977bee9f889db6c995371bd2bbc6d81b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2928
Reviewed-on: https://chromium-review.googlesource.com/c/1299480
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-10-25 17:55:19 +00:00
Shahbaz Youssefi 27a472c601 Add compiler printf attribute to relevant functions
This commit includes fixes to undefined behavior caught by this
attribute.  The following changes have been made:

- 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined behavior with
  p.  Additionally, %p already prints 0x with both gcc and clang.  This
  results in a small output change:

    void *x = (void *)0x1234;
    void *y = (void *)0x1234567890abcdef;

    printf("|%0.8p|\n", x);
    printf("|%0.8p|\n", y);

    printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(x));
    printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(y));

  prints:

    |0x00001234|
    |0x1234567890abcdef|
    |0x0000000000001234|
    |0x1234567890abcdef|

- %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is
  changed to %llu and the relevant argument is cast to unsigned long
  long.  This is due to these types being typedefs to unknown types (on
  Linux for example, these are unsigned long, and my guess would be
  unsigned long long on Windows where long is 32 bits).
- %llu is used for GLuint64, which could be unsigned long (as is on
  Linux).  Those arguments are cast to unsigned long long.
- %p is used for some EGLNative types, but those types may not be a
  pointer.  Those arguments are cast to uintptr_t and printed as above.

Bug: angleproject:2928
Change-Id: I63e9e998c72701ce8582f1ebf25d6374be9090e4
Reviewed-on: https://chromium-review.googlesource.com/c/1289232
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-10-25 15:58:11 +00:00
Yizhou Jiang 7818a85c33 Implement GL_ANGLE_texture_multisample API part
Support GL_ANGLE_texture_multisample extension.
This patch adds enums of multisampled texture and texStorage2DMultisampleANGLE
API.

TEST=angle_end2end_tests.exe --gtest_filter=TextureMultisampleTest*
TEST=angle_end2end_tests.exe --gtest_filter=NegativeTextureMultisampleTest.Negtive*

BUG=angleproject:2275

Change-Id: I2cab997edc33aa2d0be6082381545335423f64e0
Reviewed-on: https://chromium-review.googlesource.com/c/804613
Commit-Queue: Yizhou Jiang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-10-22 02:53:04 +00:00
Yizhou Jiang c4533eae08 Enable ANGLE_texture_multisample in glsl in es 3.0
Enable gsampler2dMS, texelFetch, textureSize in glslang in
es 3.0 if ANGLE_texture_multisample is supported.

Bug: angleproject:2275
TEST=SamplerMultisampleEXTTest.TextureMultisampleEXTEnabled

Change-Id: Ibfa367970db3ae790f3822e57eb50090843dc6db
Reviewed-on: https://chromium-review.googlesource.com/c/867521
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Yizhou Jiang <[email protected]>
2018-10-12 01:40:05 +00:00
Olli Etuaho f2ed299569 Add support for EXT_texture_compression_bptc
After validation, the enums are simply forwarded to the native
drivers. The BPTC formats are supported on both OpenGL and D3D.

The included test coverage covers the API quite well, but only has
basic coverage for correct decoding of texture data. More coverage for
texture data could be added later.

BUG=angleproject:2869
TEST=angle_end2end_tests

Change-Id: I3de37972dcf13c6fa3fc1bc429a2627523a4a082
Reviewed-on: https://chromium-review.googlesource.com/c/1261675
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-10-11 22:25:21 +00:00
Olli Etuaho 0ca0975339 Add GLES3 support for EXT_blend_func_extended
This adds GLES3 API support for EXT_blend_func_extended. The patch
includes the API entrypoints, validation and also implementation on
the desktop GL backend.

Instead of having built-in fragment color variables, ESSL 3.00 has
custom output variables, which can now be bound to either primary or
secondary output color locations. The "index" set to a custom output
variable determines whether it's used a primary or secondary blending
source color.

The shader layout qualifier takes precedence over the bind call. This
is not specified in the EXT spec, but is specified in desktop OpenGL
specs.

BUG=angleproject:1085
TEST=angle_end2end_tests

Change-Id: Ia24e8e5dadcc165e5e8fbd7c653c7fab6217db88
Reviewed-on: https://chromium-review.googlesource.com/c/1249361
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-10-05 09:12:42 +00:00
Brandon Jones 4e6f2aeac2 Implement ANGLE_copy_texture_3d Extension
Adds copyTexture3DANGLE and copySubTexture3DANGLE that adds copy
operations on volumetric textures.

Bug: angleproject:2762
Test: angle_end2end_tests

Change-Id: I0076989c2b7ed69abfc73143c325065bdb06a360
Reviewed-on: https://chromium-review.googlesource.com/c/1207216
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-10-04 12:06:13 +00:00
Jamie Madill 115e8a2625 Vulkan: Store "is packed" in buffer formats.
This more easily allows us to compute the format alignment for use with
the vertex input stage.

Bug: angleproject:2797
Change-Id: If15281ce18fbed743b6a0c843cece4626bc4ce72
Reviewed-on: https://chromium-review.googlesource.com/1245841
Reviewed-by: Frank Henigman <[email protected]>
Reviewed-by: Jie A Chen <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-27 02:06:13 +00:00
jchen10 547edfe22c Fix angle::Format::ID in gen_dxgi_format_table.py
The dxgi_format_map_autogen.cpp was updated, but the generating script
was missed to submit in https://crrev.com/c/1142299.

Bug: angleproject:2729

Change-Id: I8d726854581d27881a737f12457482ac955e6312
Reviewed-on: https://chromium-review.googlesource.com/1242853
Commit-Queue: Jie A Chen <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-09-26 02:15:51 +00:00
Jamie Madill 8a5619147a Pack SamplerState into small struct.
Is much faster for completeness cache checks in syncProgramTextures.

Bug: angleproject:2763
Change-Id: Iffdacbb8a4f6640caa5051643c379a7b4c3311b6
Reviewed-on: https://chromium-review.googlesource.com/1171508
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-13 22:03:11 +00:00
Frank Henigman 6c6be2cef6 Vulkan: add S8_UINT texture fallbacks.
Add two fallbacks for S8_UINT.  Enable tests.

BUG=angleproject:2655

Change-Id: If7df23745a8de8a01d86ab6efa3bca67b5227d76
Reviewed-on: https://chromium-review.googlesource.com/1217282
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Frank Henigman <[email protected]>
2018-09-12 19:45:47 +00:00
Frank Henigman 3b1fe64f21 Vulkan: allow a list of fallback formats.
Allow a list of fallback formats as well as a single one in the format
map.  The first supported format is used.  No functional change.

BUG=angleproject:2655

Change-Id: Ica312b7899471a7a65184a6921713b79da056f31
Reviewed-on: https://chromium-review.googlesource.com/1214847
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2018-09-11 21:49:00 +00:00
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