Commit Graph
301 Commits
Author SHA1 Message Date
Jerome Duval d2e8792981 Enable Haiku in platform-specific headers.
1. src/common/platform.h updated to define ANGLE_PLATFORM_POSIX on Haiku.
2. include/EGL/eglplatform.h updated to add stubs typedefs for
platform-specific primitives for Haiku.

Change-Id: I28775e909ad9cabec1c474ff4fe0a241eb05d6a1
Reviewed-on: https://chromium-review.googlesource.com/573022
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-07-17 17:47:55 +00:00
Martin Radev cf42a7e8c6 Add ANGLE_multiview end-points and tokens
The patch adds the new end-points and tokens introduced
by ANGLE_multiview without implementing them.

BUG=angleproject:2062

Change-Id: I9be175263ab54b4f6d7537f05505b87ad763ee2d
Reviewed-on: https://chromium-review.googlesource.com/570051
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Olli Etuaho <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2017-07-17 15:49:25 +00:00
Jiajia Qin bc58515eb6 ES31: Add 'buffer' qualifier support in shader
This change added 'buffer' qualifier support in shader which
corresponds to ESSL 3.1 spec, session 4.3.7 'Buffer Variables'.

BUG=angleproject:1951
TEST=angle_unittests:BufferVariablesTest

Change-Id: I2ecb5317d5ea9d378a60b03f86bdae04dbd89e9f
Reviewed-on: https://chromium-review.googlesource.com/534960
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-07-13 20:53:47 +00:00
Commit Bot 2c7c4268fd Merge "Select viewport index in the GLSL/ESSL vertex shader" 2017-07-12 07:53:34 +00:00
Jamie Madill 315ecd2074 Add entry points for EGL_ANGLE_program_cache_control.
This instruments the plumbing for the extension without adding any
functionality or exposing the extensions string.

The extension text is also updated to reflect the new entry point
design and naming. Also this corrects a few mistakes.

This will be followed up by the tests (which won't run) and then
the extension functionality in ANGLE.

BUG=angleproject:1897

Change-Id: I5b009e23bc27da06b067375525bd6fc574027702
2017-07-11 13:51:04 -04:00
Martin Radev c39a19aa93 Select viewport index in the GLSL/ESSL vertex shader
The patch enables viewport selection for multiview rendering in the
GLSL/ESSL vertex shader through the use of the GL_NV_viewport_array2
extension. The AST is modified only for GLSL and ESSL to include the
viewport selection expression after ViewID_OVR's initialization.

BUG=angleproject:2062
TEST=angle_unittests

Change-Id: Iee05bb5a4b687ed53ddbdd466f1572227b1f0cde
2017-07-11 18:32:28 +03:00
Sergey Ulanov 145e3cbbbb Enable Fuchsia in platform-specific headers.
Two simple fixes to make libANGLE compile for Fuchsia:
1. Added stubs typedefs for platform-specific primitives in
   EGL/eglplatform.h for Fuchsia.
2. src/common/platform.h updated to define ANGLE_PLATFORM_POSIX on
   Fuchsia.

Change-Id: I5f053de46632ac3f12bb93e57eeb94c3a34c867c
Reviewed-on: https://chromium-review.googlesource.com/563758
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2017-07-07 19:32:16 +00:00
Martin Radev 7ef89a4265 Expose ViewID_OVR impostor in the fragment shader
The OVR_multiview specification states that gl_ViewID_OVR is visible
at each pipeline stage. Previously to this patch the ViewID_OVR
impostor was declared only in the vertex shader and occurrences of
gl_ViewID_OVR in the fragment shader were not being handled. The
patch addresses the issue by declaring the ViewID_OVR variable as
a vertex output in the vertex shader and as a fragment input
in the fragment shader.

BUG=angleproject:2062
TEST=angle_unittests

Change-Id: I895953e81d3632d9bb873e8ac081fdf36f63f6b7
Reviewed-on: https://chromium-review.googlesource.com/559337
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-07-07 10:43:57 +00:00
Jamie Madill 40a1a37c61 Update gl2ext.h.
Also split the ANGLE modifications to the header into a separate
include.

BUG=angleproject:1897

Change-Id: I06cdcc26bab6bfa4b5bcb488c46558583cab5a83
Reviewed-on: https://chromium-review.googlesource.com/560020
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-07-06 15:00:52 +00:00
Jamie Madill 88f18d0125 Update eglext.h.
Also move the ANGLE modifications to eglext.h to a separate file
so we can more easily update and maintain the official header.

This is in preparation for adding the new program cache control
extension.

BUG=angleproject:1897

Change-Id: I3546e0c82f6536381301f62a115b42d580747a08
Reviewed-on: https://chromium-review.googlesource.com/559917
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-07-05 20:44:24 +00:00
Martin Radev 69056a1ecf Declare and initialize ViewID_OVR and InstanceID
The patch modifies the vertex shader's AST to declare and initialize
the global variables ViewID_OVR and InstanceID. Every occurrence of
gl_ViewID_OVR gets replaced by ViewID_OVR and initialized in main
with a value dependent on gl_InstanceID and the number of views.
To guarantee correct results for instanced rendering, each occurrence
of gl_InstanceID is replaced with InstanceID and initialized similarly.

BUG=angleproject:2062
TEST=angle_unittests

Change-Id: I48be688605b5af869bc370758e70ccc209ea4419
Reviewed-on: https://chromium-review.googlesource.com/548596
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-06-30 10:27:19 +00:00
Jamie Madill 360daeef19 Add platform hook for program cache updates.
This will need to be matched with a corresponding browser-side CL.
It will enable writing out binary shaders to disk.

BUG=angleproject:1897

Change-Id: I443281086050b9711b92a034cf37f808dd919007
Reviewed-on: https://chromium-review.googlesource.com/542963
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-06-29 17:16:07 +00:00
jchen10 4cdac9ebd1 ES31: Add atomic counter for GLSL parsing
This makes shader compiler support the new basic type 'atomic_uint'
and validate its layout qualifiers properly.

BUG=angleproject:1729
TEST=angle_unittests:AtomicCounterTest
     angle_deqp_gles31_tests:dEQP-GLES31.functional.atomic_counter.layout.invalid*
     angle_deqp_gles31_tests:dEQP-GLES31.functional.debug.negative_coverage.*.atomic*

Change-Id: Ia237eadf6ea72314f436a0abbb93a05598e71eba
Reviewed-on: https://chromium-review.googlesource.com/500088
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-06-09 16:47:54 +00:00
Jamie Madill 948bbe51db Redesign robust resource init as a display extension.
Also correct the enum allocation to values that are available to ANGLE.

BUG=angleproject:1635

Change-Id: I443f5654aa6a5049b4a1ae4c253cd6473b4e446e
Reviewed-on: https://chromium-review.googlesource.com/520002
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-06-01 19:19:35 +00:00
jchen10 af713a2408 ES31: Implement binding layout for uniform blocks
The binding point of uniform blocks can be specified in shaders with
this CL. See spec ESSL 3.10, section 4.4.4, page 58 for more info.

dEQP-GLES31.functional.ubo.* still can't completely pass as
the missing of arrays-of-arrays feature. Neither can
dEQP-GLES31.functional.layout_binding.ubo.* due to the incomplete
implementation of program interface APIs.

TEST=angle_end2end_tests:UniformBufferTest
BUG=angleproject:1442

Change-Id: If95d468fc109834a132b9b817730d3fdc3a615da
Reviewed-on: https://chromium-review.googlesource.com/483848
Commit-Queue: Jie A Chen <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Olli Etuaho <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-05-31 15:47:35 +00:00
Jamie Madill 98de826c92 Platform: Fix initialization order in tests.
Because of the platform refactor in abf3857206 we broke the way
the tests override the D3D workarounds for the tiny depth/stencil bug.

This change passes a pointer to the platform directly in the EGL init
logic, which solves this issue. It also removes all decltype code in
the platform header which might fix the UBSAN problem we were seeing
previously.

Also change a present mode selection error into a warning in the Vk
back-end, since this was being triggered on AMD, but is safe.

BUG=angleproject:2042

Change-Id: Ibbd0c69ce11a840cf4b33c616f56020001e553aa
Reviewed-on: https://chromium-review.googlesource.com/513519
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-05-29 19:30:26 +00:00
Olli Etuaho 9733ceefa4 Initialize uninitialized locals in GLSL output
Guarantee that local variables are initialized before they are used
in GLSL output. In HLSL output all variables were already being
initialized.

Locals are initialized using an AST transform. The local variable init
can only be run after some simplification of the AST, so that it is
able to handle complex cases like:

for (int i[2], j = i[0]; i[0] < 3; ++i[0]) {
}

If we're dealing with ESSL 1.00 which lacks array constructors, in
this kind of case the uninitialized array initialization code needs to
be hoisted out of the loop init statement, and the code also needs to
make sure that j's initializer is run after i is initialized.

Another complex case involves nameless structs. This can be an issue
also in ESSL 3.00 and above:

for (struct { float f; } s; s.f < 1.0; ++s.f) {
}

Since the struct doesn't have a name, its constructor can not be used.
We solve this by initializing the struct members individually,
similarly to how arrays are initialized in ESSL 1.00.

Initializing local variables is disabled on Mac and Android for now.
On Mac, invalid behavior was exposed in the WebGL 2.0 tests when
enabling it. On Android, the dEQP test runs failed for an unknown
reason. Bugs have been opened to resolve these issues later.

BUG=angleproject:1966
TEST=angle_end2end_tests, WebGL conformance tests

Change-Id: Ic06927f5b6cc9619bc82c647ee966605cd80bab2
Reviewed-on: https://chromium-review.googlesource.com/504728
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-05-29 15:55:18 +00:00
Jamie Madill 876429b7a1 Update gl2.h and update entry points.
Some method signatures were updated. Types like GLclampf and GLvoid
were replaced with other equivalents.

BUG=angleproject:1309

Change-Id: I05e8e2072c5a063d87ad96a855b907424661e680
Reviewed-on: https://chromium-review.googlesource.com/475011
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-04-27 16:32:22 +00:00
Jiawei-Shao 331f6dbde6 Tighten workaround on unary minus for Intel D3D drivers
This driver bug has been fixed in 20.19.15.4624.

BUG=chromium:644033

Change-Id: I6f621d7c4d4b823da29255f869af84097f4f7c2c
Reviewed-on: https://chromium-review.googlesource.com/476118
Reviewed-by: Yunchao He <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2017-04-24 14:52:12 +00:00
Corentin Wallez b29316019b Add robust entry point for CompressedTex(Sub)Image
BUG=angleproject:1354

Change-Id: I925db827c4ccf4e6f037a058f8f6b960a56047e1
Reviewed-on: https://chromium-review.googlesource.com/474964
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-04-19 15:26:22 +00:00
Geoff Lang e93dabaaa2 Output the number of columns and rows written for robust ReadPixels.
BUG=angleproject:1354

Change-Id: Ib78f74d7b1a449468e2c477955f6795dc5dbc811
Reviewed-on: https://chromium-review.googlesource.com/463786
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2017-04-04 19:15:07 +00:00
Geoff Lang fc72a07301 Update CHROMIUM_copy_texture entry points to the ES3 versions.
BUG=angleproject:1932

Change-Id: Ia45f8522320af1d747fbfb57468e8b881b033543
Reviewed-on: https://chromium-review.googlesource.com/459101
Reviewed-by: Geoff Lang <[email protected]>
2017-03-28 13:55:18 +00:00
Andrei Volykhin a552707181 Add support for EXT_YUV_target
Add new sampler type "__samplerExternal2DY2YEXT"
to sample a YUV texture image and output color value
without any color conversion,
new additional type to specify color space standard formula and
built-in functions for yuv to rgb transformation.

Change-Id: I1780650fe84cd75191c1ca1e4118e89d585bfd92
Reviewed-on: https://chromium-review.googlesource.com/454697
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2017-03-22 20:50:14 +00:00
Olli Etuaho 6ca2b65c43 Implement location layout qualifier for uniforms
This is a complete implementation of the uniform location layout
qualifier. Uniform location set in the shader is plumbed to shader
linking, which does several link-time checks for conflicts and
recursively applies the location to struct members.

Validate that location is consistent as specified in the table in
section 9.2.1 of the ESSL 3.10.4 spec. The location set in the shader
overrides the one set via the CHROMIUM_bind_uniform_location API.

Location conflicts must be checked even if the uniforms are not
statically used. Because of this unused uniforms are now recorded
during uniform linking. After linking checks are done, unused uniforms
are pruned from the program state.

Location is validated against the maximum number of uniform locations
at compile time as specified in section 4.4.3 of the ESSL 3.10.4 spec.

All dEQP uniform location tests don't yet pass due to unrelated bugs.

BUG=angleproject:1442
TEST=angle_end2end_tests, dEQP-GLES31.functional.uniform_location.*

Change-Id: I1f968e971f521fbc804b01e1a7c2b4d14f24d20f
Reviewed-on: https://chromium-review.googlesource.com/447942
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2017-03-09 16:52:08 +00:00
Jamie Madill e08a1d368e Plumb robust resource init extensions.
This also cleans up a few minor glitches in the extension texts,
and renames the EGL extension for consistency.

It incidentally fixes a bug in our EGL init where we were checking
the wrong client versions for KHR_create_context.

It also implements a new feature for tests which allow them to defer
Context creation until the test body. This allows tests to check for
EGL extension available before trying to create a context with certain
extensions.

BUG=angleproject:1635

Change-Id: I9311991332c357e36214082b16f2a4a57bfa8865
Reviewed-on: https://chromium-review.googlesource.com/450920
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-03-08 00:54:23 +00:00
Olli Etuaho 185e32b80d Increment ANGLE_SH_VERSION after ShaderVars API change
This was accidentally left out of commit
547cbd461b
"Validate uniform binding at link time".

BUG=angleproject:1893

Change-Id: I945608fd9aef8a605d69f1109ead2460aab0c228
Reviewed-on: https://chromium-review.googlesource.com/448456
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2017-03-02 08:56:06 +00:00
Olli Etuaho 547cbd461b Validate uniform binding at link time
GLSL ES Spec 3.10.4, section 4.4.5 has the rules for linking uniforms
with binding layout qualifiers. If a binding layout qualifier for a
uniform variable is specified in both vertex and fragment shaders, the
qualifiers must match.

BUG=angleproject:1893
TEST=dEQP-GLES31.functional.layout_binding.*binding_contradictory*

Change-Id: I0ae6a1a8967df818be8136510c22daee848b9da7
Reviewed-on: https://chromium-review.googlesource.com/447557
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2017-03-01 09:18:49 +00:00
Jamie Madill abe89c7d32 Tweak platform method signatures.
This works around a limitation in UBSAN which can't handle decltype.
Instead use void * and typedef where appropriate.

BUG=chromium:692274

Change-Id: I4eab796db3aa2e51c0fc558170eb2af61f07223d
Reviewed-on: https://chromium-review.googlesource.com/443885
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-02-16 16:20:22 +00:00
Geoff Lang feb8c68685 Add extensions to disable client arrays.
Chrome doesn't allow any client data in its command buffer.  Add an ANGLE
extension to request a context that disallows client data.

BUG=602737

Change-Id: If9d5144daea3c629a73562396000df59a671aad3
Reviewed-on: https://chromium-review.googlesource.com/441986
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-02-15 17:31:55 +00:00
Jamie Madill abf3857206 Remove old C++ ANGLE platform.
Now that the new platform is in place, we can remove the old methods.
Must be landed after https://codereview.chromium.org/2697463003/

BUG=angleproject:1892
BUG=chromium:678870

Change-Id: Ia29a3b120cf3521fc0409019c2e64e4dbc6f460d
Reviewed-on: https://chromium-review.googlesource.com/441274
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-02-15 00:32:55 +00:00
Jamie Madill dbffdfbda8 Fix counting of the new platform methods.
The context pointer was throwing off the count by one.
Also change the type to void * for ease of use.

BUG=angleproject:1892
BUG=chromium:678870

Change-Id: Iffac667f0aa896d9247e9ffddfeb3bc447a9692f
Reviewed-on: https://chromium-review.googlesource.com/441931
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-02-14 01:29:25 +00:00
Jamie Madill b1eeba1f20 Use a C API for the ANGLE platform.
The main purpose of this change is to fix a fuzzer bug where we would
trigger undefined behaviour calling between Chrome and ANGLE. It's
not specced how virtual function calls work if the shared objects are
not directly linked together, and ANGLE and Chrome are not linked.
Replace the old class-style API with a C dispatch table.

Follow-up work will make the Platform owned by the Display instead of
using global variables, but fixing this is a bit tricky.

BUG=angleproject:1892
BUG=chromium:678870

Change-Id: Iad188bc2e50f2b5e4a03ce0de233d686f569c705
Reviewed-on: https://chromium-review.googlesource.com/441273
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-02-13 23:12:23 +00:00
Geoff Lang ce02f08657 Add an extension to share textures at the display level.
BUG=angleproject:1639

Change-Id: If9140142ebce89f33921c13d9d212c17d1894162
Reviewed-on: https://chromium-review.googlesource.com/437618
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2017-02-09 14:56:15 +00:00
Geoff Lang e70413c7ec Roll EGL headers.
Update CGL backend to use new EGL types.

BUG=angleproject:1707

Change-Id: I165e81a758cad0a8036aef68c44a57bcc61e982d
Reviewed-on: https://chromium-review.googlesource.com/428292
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2017-01-17 22:09:03 +00:00
Qin Jiajia 4af4951ff9 Tighten the workaround for B5G6R5 on Intel drivers
This driver bug has been fixed in 20.19.15.4539.

BUG=chromium:644610
TEST=dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgb565*

Change-Id: I37556304ed4f70771fb88b792c01b6be5b3aa294
Reviewed-on: https://chromium-review.googlesource.com/424103
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-01-05 14:29:01 +00:00
Jamie Madill 80ab03c58d Add angle_white_box_tests for libANGLE render tests.
angle_end2end_tests included tests that used both the entry points
from our shared libraries as well as calling libANGLE classes like
gl::Context directly. Split these into a new test executable.

This also removes the libANGLE code from all the end2end tests.

It's necessary to add static versions of libEGL and libGLESv2 so
that we call safely call methods in libANGLE an the entry points
from the same target.

BUG=angleproject:1660

Change-Id: I6d82021b9300231ddb5fee435e5d77728f8f1292
Reviewed-on: https://chromium-review.googlesource.com/419175
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-01-04 19:24:32 +00:00
Jamie Madill a818c327fe translator: Remove non-sh scoped APIs.
Now that Chromium is switched over, we can remove the old global
APIs so they no longer conflict with glslang/Vulkan.

BUG=angleproject:1319

Change-Id: Ia673d47caa7ca40139e4989fac374acd48f52ab9
Reviewed-on: https://chromium-review.googlesource.com/408517
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-01-03 21:33:08 +00:00
Shao f165f0b4c6 Tighten the workarounds on isnan for Intel drivers
This driver bug has been fixed in 21.20.16.4542.

BUG=chromium:650547

Change-Id: I2a5c7c01bf48d854bd6c4c6a380e57617e00529a
Reviewed-on: https://chromium-review.googlesource.com/422992
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-12-27 19:26:20 +00:00
Kai Ninomiya d5fe352a91 Add GL_EXT_texture_compression_s3tc_srgb to GLES2/gl2ext.h
This extension is currently in draft; ANGLE will be the first implementation.

BUG=angleproject:1553
BUG=chromium:630498

Change-Id: I795caa36f722a347cb7924990b60452d51b1e177
Reviewed-on: https://chromium-review.googlesource.com/423435
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Kai Ninomiya <[email protected]>
2016-12-23 02:02:27 +00:00
Kai Ninomiya 4eee74de64 Update GLES2/gl2ext.h to revision 33260 (2016-10-27)
From https://www.khronos.org/registry/gles/api/GLES2/gl2ext.h

BUG=angleproject:1553

Change-Id: I3a0e5ee77de3db02eace63d40df7db040a739f88
Reviewed-on: https://chromium-review.googlesource.com/423434
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-12-23 00:20:47 +00:00
Olli Etuaho 09b04a2ffc Add shader translator support for OVR_multiview
The OVR_multiview and OVR_multiview2 extensions add gl_ViewID_OVR to
shaders. gl_ViewID_OVR can be translated either as is in GLSL output
or as a uniform by setting the SH_TRANSLATE_VIEWID_OVR_AS_UNIFORM
compiler flag.

If WebGL output is selected, the shaders will be validated according
to proposed rules in the WEBGL_multiview spec.

BUG=angleproject:1669
TEST=angle_unittests

Change-Id: I19ea3a6c8b4edb78be03f1a50a96bfef018870d0
Reviewed-on: https://chromium-review.googlesource.com/422848
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2016-12-22 12:10:08 +00:00
Jamie Madill e09bd5d32e Vulkan: Add display creation, test and extension.
With this CL we have the ability to create Vulkan test configs and run
basic tests, although the only thing that works is creating a Vulkan
Renderer using the extension.

BUG=angleproject:1319

Change-Id: I8ad17bba01241334be7da16e68fea38762ca6a20
Reviewed-on: https://chromium-review.googlesource.com/367750
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2016-12-20 23:42:25 +00:00
Jamie Madill 408293f8a4 D3D11: Fix stale SRVs with tiny depth textures.
When the tiny depth texture would get re-created on change, it was
not freeing any cached SRVs which were pointing to the old tex.
Fix this by erasing the cache entry if the texure is recreated.

Also include a test which hooks into the workarounds to force
testing on every platform.

Also narrow the workaround to only apply to depth/stencil textures
which use these mips in GL, rather than D3D, where we always create
a full mip chain.

BUG=angleproject:1664

Change-Id: If0ac396b8847e1bf9b50165e5332da573e9bb3e4
Reviewed-on: https://chromium-review.googlesource.com/421567
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2016-12-20 16:39:10 +00:00
Olli Etuaho da9fb093e0 Work around atan(y, x) bug on NVIDIA
atan(y, x) is not always returning expected results on NVIDIA OpenGL
drivers between versions 367 and 375. Work around this by emulating
atan(y, x) using the regular atan(x) function. A fix to the driver is
expected in a future release.

It is most convenient to implement the vector atan(y, x) functions by
using the scalar atan(y, x) function. Support for simple dependencies
between emulated functions is added to BuiltInFunctionEmulator. In the
current implementation one function is allowed to have at most one
other function as its dependency.

BUG=chromium:672380
TEST=angle_end2end_tests

Change-Id: I9eba8b0b7979c7c7eaed353b264932e41830beb1
Reviewed-on: https://chromium-review.googlesource.com/419016
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-12-13 18:05:53 +00:00
Qiankun Miao f52fe93dca Work around unary minus operator float issue on Intel Mac 10.11
Result of -float is wrong on Intel Mac 10.11 drivers. Replace -float
with 0.0 - float to work around this issue.

BUG=308366
BUG=672380

Change-Id: I53bc2eda7259fff5805bec39896fc7b7a6eaf665
Reviewed-on: https://chromium-review.googlesource.com/417169
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-12-12 15:38:53 +00:00
Geoff Lang c339c4e590 Split WebGL compatibility into two extensions.
The mechanism for requesting extensions is now a separate extension.
Added a way to query the extensions that support enabling.

BUG=angleproject:1523

Change-Id: I2efaa9f6d67b12ecae325f455404e34ba04d0e7c
Reviewed-on: https://chromium-review.googlesource.com/414529
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-12-01 17:24:53 +00:00
Corentin Wallez 1b896c6293 translator: remove code related to for-loop unrolling
For loop unrolling is not used and causes the translator fuzzer to find
a hang when unrolling tons of nested loops (duh).
Also remove MMap.h which was unused.

This is essentially a revert of https://codereview.appspot.com/4331048

BUG=chromium:665255

Change-Id: Id6940f7e306d4ed53bc992f751e9ffe733190f17
Reviewed-on: https://chromium-review.googlesource.com/412023
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2016-11-18 21:53:38 +00:00
Jamie Madill 861ebb3bb8 Use ShaderVars instead of ShaderLang in headers.
We only need the typed variable information in our header files.
The entry point and other enum info can be encapsulated better
in the cpp files that call through to the translator. The only
tricky one is the compile options, which we return from our
implementation - put the typedef for these in the ShaderVars
header to fix this.

This should partially work around the problem of shaderlang
for Vulkan and ANGLE's translator (also ShaderLang) using some
identifiers with the same names.

BUG=angleproject:1576

Change-Id: I43c530486498c210796b9e197a6780bf2f7b3afb
Reviewed-on: https://chromium-review.googlesource.com/412423
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-11-18 17:24:16 +00:00
Qiankun Miao 41f9f6732f Remove invariant qualifier for ESSL 3.0 on AMD driver
AMD driver in Linux requires invariant qualifier to match between
shaders even for GLSL >= 4.2. This conflicts with ESSL 3.0 which
disallows invariant qualifier in fragment shader. Remove invariant
qualifier in vertex shader to workaround AMD driver bug.

BUG=chromium:639760
TEST=webgl2_conformance

Change-Id: Id5adf7e7032105486df90a1f200471ea81ee5c36
Reviewed-on: https://chromium-review.googlesource.com/411917
Reviewed-by: Zhenyao Mo <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Zhenyao Mo <[email protected]>
2016-11-17 23:19:51 +00:00
Yuly Novikov ea5865497e Cleanup after translator component removal
- Unite translator with translator_lib
- Remove flags and defines for shared library exports

BUG=angleproject:1596

Change-Id: Icd145a4b79e2472766a2b56017bb0f36f244482e
Reviewed-on: https://chromium-review.googlesource.com/410261
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2016-11-11 19:45:51 +00:00