Commit Graph
378 Commits
Author SHA1 Message Date
Qin Jiajia a602f9064b ES31: Support shader storage buffer in D3D-API side.
Bug: angleproject:1951
Test: angle_end2end_tests

Change-Id: I0d8a4f8cf00fc7fd2d85315138e2b7457fd0b90c
Reviewed-on: https://chromium-review.googlesource.com/1242846
Commit-Queue: Jiajia Qin <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-09-26 04:21:17 +00:00
Geoff Lang 8b57fae579 Roll EGL headers.
BUG=angleproject:2508

Change-Id: I28782e488495a31da885f35e9c37b0dd22d951a3
Reviewed-on: https://chromium-review.googlesource.com/1236754
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-09-25 21:52:02 +00:00
Jamie Madill 4230d4847f Finish fixing EGL enums.
This removes the temporary defines now that Chromium is up-to-date.

Bug: angleproject:2806
Change-Id: I8e3308d6b80e49c2b2a7a698ee5d8ad40f442475
Reviewed-on: https://chromium-review.googlesource.com/1227031
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-14 19:01:41 +00:00
Jamie Madill f4d429c1cb Fix EGL enum allocation.
The following enums had a small typo causing them to be takend from an
unused block:

EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE
EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM
EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE

Fix this by temporarily defining a secondary enum. Once Chromium is
fixed upstream we can remove the temporary enum.

Reported by [email protected].

Bug: angleproject:2806
Change-Id: I2ce1dec0a30d5e83f2bec0ae243fd860cbcea4fc
Reviewed-on: https://chromium-review.googlesource.com/1220371
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-13 16:19:36 +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
Tobin Ehlis 1bf963b629 Clean up PlatformMethods attribute enum
Centralize definition of EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX
in Platform.h.

Bug: angleproject:2528
Change-Id: Id2b022c4ea08d2e98cbd6c3b248b58d096c20dfb
Reviewed-on: https://chromium-review.googlesource.com/1144265
Reviewed-by: Tobin Ehlis <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-08-30 22:20:00 +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
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
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
Tobin Ehlis 5ba3742794 Move PlatformMethods constructor to header
Move the default constructor for PlatformMethods struct from
Platform.cpp into Platform.h. This allows other projects to include
Platform.h and use PlatformMethods without having to link against ANGLE

Bug: angleproject:2528
Change-Id: Icb4b9e149e78e9ec7be85804d711d8a2216e61c4
Reviewed-on: https://chromium-review.googlesource.com/1115212
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-06-26 18:33:34 +00:00
Geoff Lang 24ddc7a894 WGL: Support unvirtualized contexts and unsafe multithreading.
When using unvirtualized contexts, DisplayWGL still creates a Renderer for
managing any internal GL resources such as emulated back buffers for
DXGISwapChainWindowSurfaceWGL or D3DTextureSurfaceWGL but also creates a new
Renderer for each GL context.  All created contexts share resources.

BUG=angleproject:2464

Change-Id: I945502514079368e062beef70bed49c61ed44403
Reviewed-on: https://chromium-review.googlesource.com/1097459
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-06-21 20:21:27 +00:00
jchen10 e5c614fbaf ParallelCompile: Update gl2ext.h
Updated from http://khronos.org/registry/OpenGL/api/GLES2/gl2ext.h

BUG=chromium:849576

Change-Id: I80e07fad80899b96b037a978855b70ff25bb5bd9
Reviewed-on: https://chromium-review.googlesource.com/1107494
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2018-06-20 14:38:44 +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 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 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
Courtney Goeltzenleuchter 390900a04b Add support for EGL_PLATFORM_ANGLE_EGL_HANDLE_ANGLE
To support ANGLE for Android need a way to tell ANGLE
what library to call when using GL backend.

Bug: angleproject:2418
Test: test-opengl-gl2_copyTexImage
Change-Id: Ie00251b0672a036db4720e1e5b269f66a30a03da
Reviewed-on: https://chromium-review.googlesource.com/1066822
Commit-Queue: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-05-24 15:56:49 +00:00
Olli Etuaho 983460e6cd Rewrite repeated assignments to swizzled vectors on NVIDIA
This works around the most common instances of a bug that reproduces
on some NVIDIA OpenGL drivers prior to version 397.31.

BUG=chromium:798117
TEST=angle_end2end_tests

Change-Id: Iafc6a9a64e56fa98b42117149fe6867040e932e5
Reviewed-on: https://chromium-review.googlesource.com/1042190
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-05-04 08:40:32 +00:00
Olli Etuaho 9fb23f619f Increment ANGLE_SH_VERSION
This was missing from change:
"ShaderVariable: separate fields for staticUse and active"

BUG=angleproject:2262

Change-Id: I521e9f9a536756d7d8163220c1d56885308272a1
Reviewed-on: https://chromium-review.googlesource.com/978203
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-03-23 15:27:44 +00:00
Olli Etuaho 107c724765 ShaderVariable: separate fields for staticUse and active
Thus far the compiler has used the "staticUse" flag to mark variables
that should have rather been marked "active", meaning that the code
may actually execute in a way that accesses the variable. There's a
clear definition for this use of the term "active" in the GLES 3.0.5
spec, section 2.12.6, and in GLES 3.1 section 7.3.1.

Having separate fields for recording static use and "activeness" of a
variable is the first step to fixing this.

According to the spec, usually only active resources should be
considered when checking use against max limits. Also, only active
uniforms get assigned a location. libANGLE code now correctly checks
the active flag rather than the static use flag in these cases.

The static use field still mirrors the active field for now, since
some code in Chromium also needs to be fixed to use the active field
correctly before the two can diverge.

After Chromium is fixed, we can fix ANGLE so that static use
information is recorded earlier during compilation and will accurately
reflect whether variables are statically used. Currently the compiler
only records variables once some static use may already have been
pruned from the AST.

BUG=angleproject:2262
TEST=angle_unittests, angle_end2end_tests

Change-Id: I025bb71361246ae00c911a1f8b66ec045f665f29
Reviewed-on: https://chromium-review.googlesource.com/970962
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-03-22 18:16:37 +00:00
Courtney Goeltzenleuchter aa5d883e02 Update KHR header to avoid compiler issue.
Build was dying due to undefined symbol NDK_FPABI that was coming
from include/KHR/khrplatform.h. Updating to latest eliminates the
issue.

Bug: angleproject:2411
Change-Id: I1896755e65b9a3afad6332caf0dd5d9b52cf2b28
Reviewed-on: https://chromium-review.googlesource.com/967235
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-03-19 22:57:09 +00:00
Geoff Lang 0ab41fa5eb Add an EGL extension to disable GL extensions by default.
BUG=angleproject:2404

Change-Id: I2667ddc92d5c9ef6e0ef115f2fdf0c3d3643d945
Reviewed-on: https://chromium-review.googlesource.com/962702
Reviewed-by: Frank Henigman <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-03-14 20:46:16 +00:00
Jiawei Shao 4ed05da293 ES31: Add link validation on geometry shader itself
This patch intends to support program link validation on geometry
shader itself. A link error should occur when linking a program with
a geometry shader that lacks input primitive or output primitive or
the declaration of 'max_vertices'.

This patch also adds the support of linking a program with geometry
shader in angle_end2end_tests.

BUG=angleproject:1941
TEST=angle_end2end_tests
     dEQP-GLES31.functional.shaders.linkage.es31.geometry.varying.rules.unspecified_*

Change-Id: I25fb08514753102f5dd3ab86211c05d2ca4fd185
Reviewed-on: https://chromium-review.googlesource.com/898842
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-02-12 16:43:40 +00:00
Olli Etuaho e13f7ebea8 Make NVIDIA constant register zero skip specific to VS
It was found that the driver issue only affects vertex
shaders, so the workaround can be simplified to affect only
vertex shaders.

BUG=angleproject:2294
TEST=WebGL conformance tests on passthrough command buffer,
     angle_end2end_tests

Change-Id: Ie7fb4e75a3999e1de3d5c20d3de21e7ebb08f148
Reviewed-on: https://chromium-review.googlesource.com/889099
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-01-31 15:19:53 +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
Olli Etuaho 0690e1aa31 Add a workaround to clamp gl_FragDepth
NVIDIA OpenGL drivers at least up to version 388.59 don't clamp
gl_FragDepth when it is written to a floating point depth buffer.
This bug is now worked around by clamping gl_FragDepth in the shader
if it is statically used.

BUG=angleproject:2299
TEST=angle_end2end_tests on NVIDIA

Change-Id: I61589b2b0dd2813c4901a157c8d37e470063773c
Reviewed-on: https://chromium-review.googlesource.com/840842
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2018-01-09 10:48:45 +00:00
Jamie Madill f3e2329595 EGL: Expose NULL driver device selection.
This makes the device type selection part of the ANGLE platform
extension. We currently support NULL driver selection on all
available back-ends (although on the NULL back-end, it already
has no device type). Optionally we could expose certain features
of this as separate extensions.

This currently also supports the old hidden enum, until we can
update Chrome and consolidate to the new exposed official enum.

Bug: angleproject:2159

Change-Id: I85d0811098e644e8192c207673af9e18ed7c1da2
Reviewed-on: https://chromium-review.googlesource.com/846021
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-01-05 00:08:29 +00:00
Jamie Madill 36937a64f4 Revert "Enable depth buffer to workaround driver bug on Intel windows"
This reverts commit 63ba357c09.

Reason for revert: May be causing Windows GPU.FYI bot failures.

https://ci.chromium.org/buildbot/chromium.gpu.fyi/Win10%20Release%20%28Intel%20HD%20630%29/1443

maps_pixel_test on Intel GPU:
Unexpected Failures:
* gpu_tests.maps_integration_test.MapsIntegrationTest.Maps_maps

webgl2_conformance_tests on Intel GPU:
Unexpected Failures:
* gpu_tests.webgl_conformance_integration_test.WebGLConformanceIntegrationTest.WebglConformance_deqp_functional_gles3_fboinvalidate_default
* gpu_tests.webgl_conformance_integration_test.WebGLConformanceIntegrationTest.WebglConformance_deqp_functional_gles3_fboinvalidate_sub

Bug: chromium:798757

Original change's description:
> Enable depth buffer to workaround driver bug on Intel windows
>
> Rendering with depth buffer disabled and stencil buffer enabled
> leads to memory leak if we set viewport a large size on Intel
> windows platforms. So we enable depth buffer if stencil buffer
> is enabled to workaround this issue.
>
> TEST=gl_test.exe --gtest_filter=GLClearFramebufferTestWithParam/GLClearFramebufferTest.ClearDepthStencil/0
> TEST=conformance/rendering/rendering-stencil-large-viewport.html
> TEST=RenderStencilBufferTest.DrawWithLargeViewport/ES3_D3D11
>
> BUG=782317
>
> Change-Id: Idb185db296f13e3fa897534514e198651a56439f
> Reviewed-on: https://chromium-review.googlesource.com/809574
> Commit-Queue: Jamie Madill <[email protected]>
> Reviewed-by: Jamie Madill <[email protected]>

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

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

Bug: 782317
Change-Id: I7e29da683b22fd4640c230598c7b220cfae6a177
Reviewed-on: https://chromium-review.googlesource.com/848133
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-01-03 20:15:05 +00:00
Olli Etuaho d8724a947b Start D3D constant register allocations from 1 on NVIDIA
Recent NVIDIA drivers have a bug where a specific optimized path
inside the driver doesn't handle constant register 0 correctly. Work
around this by starting constant register allocations from 1. This
should make sure that the bug doesn't trigger if the ordering of
uniforms is changed on the D3D backend.

The repro case seems to require some specific driver state to be set
that's used inside Chromium. Because of this we have not been able to
develop a standalone test case so far.

The maximum number of available uniform slots is reduced accordingly.
This should not take them below required minimums in the spec.

BUG=angleproject:2294
TEST=WebGL tests on passthrough command buffer,
     angle_end2end_tests --gtest_filter=*GLSLTest*Uniform*

Change-Id: I92fff71efe5432ea7f15a7e90d497492514c65dc
Reviewed-on: https://chromium-review.googlesource.com/847481
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-01-03 12:24:16 +00:00
JiangYizhou 63ba357c09 Enable depth buffer to workaround driver bug on Intel windows
Rendering with depth buffer disabled and stencil buffer enabled
leads to memory leak if we set viewport a large size on Intel
windows platforms. So we enable depth buffer if stencil buffer
is enabled to workaround this issue.

TEST=gl_test.exe --gtest_filter=GLClearFramebufferTestWithParam/GLClearFramebufferTest.ClearDepthStencil/0
TEST=conformance/rendering/rendering-stencil-large-viewport.html
TEST=RenderStencilBufferTest.DrawWithLargeViewport/ES3_D3D11

BUG=782317

Change-Id: Idb185db296f13e3fa897534514e198651a56439f
Reviewed-on: https://chromium-review.googlesource.com/809574
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-01-02 16:23:40 +00:00
Xinghua Cao 26143fdd0f ES31: Support bindImageTexture on Texture2D for compute shaders on D3D
BUG=angleproject:1987
TEST=angle_end2end_tests

Change-Id: I3b0afb441a41dbd7f204b1d1bba7884c8d203ce1
Reviewed-on: https://chromium-review.googlesource.com/749004
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-12-20 17:16:46 +00:00
Jiawei Shao bd924af173 ES31: Remove support of GL_OES_geometry_shader in compiler
This patch intends to remove the support of GL_OES_geometry_shader
in ANGLE compiler.

To make the implementation simpler, currently we decide to only
support "GL_EXT_geometry_shader" as the extension string of geometry
shader in ANGLE.

This patch also updates all the related shaders in angle_unittests
into R"()" format.

BUG=angleproject:1941
TEST=angle_unittests

Change-Id: Ife9858abeedfb46b02c5c2fb1cda16fa27198511
Reviewed-on: https://chromium-review.googlesource.com/773451
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-12-14 18:32:04 +00:00
jchen10 8225e73bb3 Support struct varying for transform feedback
Capturing struct members is vague In ES 3.00. But the ES 3.10
explicitly says that base-level members of struct are feasible for
transform feedback capture. This implementation fills the gap.

TEST=angle_end2end_tests:TrasnformFeedbackTest*
BUG=angleproject:2241
Change-Id: Ibdf3ae6c2b8b28952e2f7fef1363545cbccad389
Reviewed-on: https://chromium-review.googlesource.com/768613
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-12-13 16:03:49 +00:00
Olli Etuaho ebe13bb1b9 Remove SH_TRANSLATE_VIEWID_OVR_TO_UNIFORM
Instanced multiview is fully implemented and performs much better than
broadcasting draw calls on the CPU. There's no need to maintain
translating ViewID_OVR to a uniform.

BUG=angleproject:2267
TEST=angle_unittests

Change-Id: If3a8fa573f37b7926c052aecfcd4271f266751dc
Reviewed-on: https://chromium-review.googlesource.com/819417
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2017-12-13 15:55:49 +00:00
Corentin Wallez 9db70de8ec Reland: Implement EGL_ANGLE_iosurface_client_buffer
Includes a fix for creating pbuffers with <buftype> EGL_D3D_TEXTURE
with EGL_WIDTH and EGL_HEIGHT attributes.

BUG=angleproject:1649
[email protected]

Change-Id: Id2974b8fab02c3218febfac708b9b034e65cbc53
Reviewed-on: https://chromium-review.googlesource.com/823248
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2017-12-13 00:45:43 +00:00
Corentin Wallez 7f5c3eb768 Revert "Implement EGL_ANGLE_iosurface_client_buffer"
This reverts commit c7abc08034.

Reason for revert: Might have broken Chromium Win10 composition due to validation changes.

Original change's description:
> Implement EGL_ANGLE_iosurface_client_buffer
> 
> BUG=angleproject:1649
> 
> Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2
> Reviewed-on: https://chromium-review.googlesource.com/559107
> Reviewed-by: Corentin Wallez <[email protected]>
> Reviewed-by: Geoff Lang <[email protected]>
> Commit-Queue: Corentin Wallez <[email protected]>

[email protected],[email protected]

Change-Id: I605b710b6d76056d6276b09822cd6ddca277bfd0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:1649
Reviewed-on: https://chromium-review.googlesource.com/822172
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2017-12-12 14:55:31 +00:00
Corentin Wallez c7abc08034 Implement EGL_ANGLE_iosurface_client_buffer
BUG=angleproject:1649

Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2
Reviewed-on: https://chromium-review.googlesource.com/559107
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2017-12-11 19:52:06 +00:00
Jeff Gilbert 3dddccff31 Support RGB gl-tex-external stream consumers for StreamProducerNV12.
This makes it relatively simple to sample from a D3D11Texture of
arbitrary format.

From: https://bugzilla.mozilla.org/show_bug.cgi?id=1322746

BUG=angleproject:2233
TEST=angle_end2end_tests

Change-Id: I10cd3043b5cb0c5d36dd613467ba6c0ceadf41af
Reviewed-on: https://chromium-review.googlesource.com/758042
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-12-05 15:24:25 +00:00
Olli Etuaho 3de2703d83 Fix handling matrix qualifiers on block members
Individual block member row_major/column_major layout qualifiers may
override the qualifiers set on the block. During parsing, this was
already being handled correctly, so that the qualifier is resolved for
each block member and recorded for each TField / InterfaceBlockField.

Now we always write the qualifiers on a per-member granularity to the
output GLSL shaders, so that the native driver gets the correct
per-member qualifiers. This replaces earlier behavior where the matrix
qualifiers were only written per-block.

Also only use qualifiers from individual members in block layout.

Since the block-level qualifier information is no longer used after
parsing, it is no longer kept in the AST. A dummy value is still set
to the InterfaceBlock structs exposed through the ShaderVars
interface, since that has existing usage in Chromium that needs to be
removed before the field can be removed.

Some AMD OpenGL drivers don't seem to handle matrix layout qualifiers
correctly, so most of the added tests need to be skipped for AMD GL.
On NVIDIA and Intel the tests pass.

BUG=angleproject:2271
TEST=angle_unittests, angle_end2end_tests,
     dEQP-GLES31.functional.program_interface_query.uniform.matrix*

Change-Id: I1baa7a633bc2da548743c2190cb72db491b5227a
Reviewed-on: https://chromium-review.googlesource.com/800174
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2017-12-04 20:31:47 +00:00
Olli Etuaho 465835d61f Support arrays of arrays in the API
The ShaderVariable class that is used as an interface between the
compiler and the rest of the code gets arrays of arrays support.

Array of array variables are passed from the compiler just like any
other variables. However, when stored in Program state each innermost
array constitutes a separate variable. This is done to make the
implementation match the GLES specification for program interface
query APIs.

This will be tested more fully once support for parsing arrays of
arrays lands in the compiler.

TEST=angle_end2end_tests, angle_unittests
BUG=angleproject:2125

Change-Id: I0f7159000f039be92a87a52b3b68cd9a215a21cb
Reviewed-on: https://chromium-review.googlesource.com/684742
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-11-22 12:38:32 +00:00
Jiawei Shao 89be29a5cd ES31: Implement creation and attaching geometry shader on OpenGL
This patch intends to implement the creation of a geometry shader
and attaching a geometry shader to a program on OpenGL back-ends.

This patch also adds all geometry shader related dEQP-GLES31 test
failures to deqp_gles31_test_expectations.txt.

BUG=angleproject:1941
TEST=angle_end2end_tests

Change-Id: Ib0b497030255b15dacd967e48bc59eef0009af46
Reviewed-on: https://chromium-review.googlesource.com/757979
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-11-22 05:14:29 +00:00
Jamie Madill 2f294c9abb Add constructors for TMemoryQualifier and TLayoutQualifier.
These replace the ::create methods, to facilitate constexpr versions.
Also adds a constructor of WorkGroupSize that can be made to be
constexpr.

Bug: angleproject:1432
Change-Id: I413d1a56102c94d6a383775110a2b850a7532ea0
Reviewed-on: https://chromium-review.googlesource.com/776279
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Kai Ninomiya <[email protected]>
2017-11-20 20:52:25 +00:00
Olli Etuaho b5601eb675 Only initialize globals if initialization flag is set
This avoids the possibility of initializing globals twice in Chromium.
Now we also never initialize variables redundantly in case we're
writing HLSL output. This was already the intent of the code before,
but a mistake had slipped in and the code didn't actually check the
output type properly.

This also simplifies DeferGlobalInitializers by running it after
SeparateDeclarations.

BUG=chromium:735497
TEST=WebGL conformance tests

Change-Id: I95036a24ac8cf18113755510376a2fca286b3ee6
Reviewed-on: https://chromium-review.googlesource.com/771555
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2017-11-16 20:14:54 +00:00
Jamie Madill 740aa41ddf Fix angle::Platform export definitions.
This was only showing up in the GYP build on Windows.

BUG=chromium:778918

Change-Id: Ib9db0c928474be887ec1f46d7e99c0a3dedfb9e0
Reviewed-on: https://chromium-review.googlesource.com/768947
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-11-14 16:52:19 +00:00
Jamie Madill ff7aac5e4f Re-land "Export angle::PlatformMethods."
This should fix undefined function call sanitizer warnings.

Re-land fixes the build and uses proper export annotation. Also fixes
the missing source includes in BUILD.gn for libANGLE so future
changes to Platform.h (and other includes) will get picked up by the
dependency analyzer step.

BUG=chromium:778918

Change-Id: I92cc8a43bbbdc70de50a67f73b223d8f903cd6cd
Reviewed-on: https://chromium-review.googlesource.com/767111
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
2017-11-14 04:34:52 +00:00
Jamie Madill c2eb32bad8 Revert "Export angle::PlatformMethods."
This reverts commit 8b920b211d.

Reason for revert: This had a syntax error and skipped the compile step, so went undetected.

BUG=chromium:778918

Original change's description:
> Export angle::PlatformMethods.
> 
> This should fix undefined function call sanitizer warnings.
> 
> BUG=chromium:778918
> 
> Change-Id: I718d58edd7b75a3fca1089edc4df7f3251d85153
> Reviewed-on: https://chromium-review.googlesource.com/767152
> Reviewed-by: Jamie Madill <[email protected]>
> Commit-Queue: Jamie Madill <[email protected]>

[email protected],[email protected]

Change-Id: I1825ce88bc82867a983bb08cd6732caff54f061c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:778918
Reviewed-on: https://chromium-review.googlesource.com/767128
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-11-13 21:53:14 +00:00
Jamie Madill 8b920b211d Export angle::PlatformMethods.
This should fix undefined function call sanitizer warnings.

BUG=chromium:778918

Change-Id: I718d58edd7b75a3fca1089edc4df7f3251d85153
Reviewed-on: https://chromium-review.googlesource.com/767152
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-11-13 21:19:01 +00:00
Olli Etuaho bb0775da28 Add flag for turning off initializing variables with loops
This flag is needed to toggle upcoming variable initialization mode
which uses for loops to optimize the compilation process. Initializing
variables using for loops will be turned on by default, but it needs
to be turned off in Chromium in certain cases. Chromium will use the
flag added in this patch and that code will need to go into Chromium
before finishing the implementation in ANGLE.

BUG=chromium:735497

Change-Id: I3a0e7b7c6cebe60afa72964fbd0caf3b1eafccbc
Reviewed-on: https://chromium-review.googlesource.com/763451
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-11-12 09:08:00 +00:00
Jamie Madill cac94a9124 Optimize ShaderVariable::isBuiltIn.
This makes the check a bit faster, by inlining the prefix check.
Also some cleanups to ValidateVertexShaderAttributeTypeMatch.

BUG=angleproject:2202

Change-Id: Ifeab4cd85a91a1639a461f44776a68ac98c5bd79
Reviewed-on: https://chromium-review.googlesource.com/761240
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-11-11 15:44:44 +00:00
JiangYizhou 38d92b59c4 Workaround Intel driver bug on D3D when renderering with no render target
When rendering with no render target on D3D, two bugs lead to
incorrect behavior on Intel drivers < 4815. The rendering samples
always pass neglecting discard statement in pixel shader.

Two bugs are listed bellow,
1. When a framebuffer has no attachments, the pixel shader will be
recompiled to drop 'SV_TARGET'. On Intel drivers, when using a pixel
shader with no 'SV_TARGET' in a draw, pixels are always generated even
if they should be discard by 'discard' statements.

2. When a framebuffer has no attachments, ID3D11BlendState.RenderTarget
[].RenderTargetWriteMask were set to 0 in angle. If RenderTargetWriteMask
is 0 and rendertarget is not set, then rendering samples also pass
neglecting discard statement in pixel shader on Intel.

So we add a dummy texture as render target to workaround this issue.

BUG=angleproject:2152

TEST=FramebufferTest_ES31.RenderingLimitToDefaultFBOSizeWithNoAttachments/ES3_1_D3D11
TEST=dEQP-GLES31.functional.fbo.no_attachments.*
TEST=dEQP-GLES31.functional.state_query.integer.max_framebuffer*
TEST=dEQP-GLES31.functional.state_query.integer.max_color_texture_samples_*
TEST=dEQP-GLES31.functional.state_query.integer.max_depth_texture_samples_*
TEST=dEQP-GLES31.functional.state_query.integer.max_integer_samples_*

Change-Id: I1cb974703b6c05c39b731d147f7c8c4fb7b5fe68
Reviewed-on: https://chromium-review.googlesource.com/741544
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-11-10 20:38:42 +00:00