Граф коммитов

411 Коммитов

Автор SHA1 Сообщение Дата
Qin Jiajia 1521442384 ES31: Add top_level_array_stride support
Bug: angleproject:1920
Change-Id: Id18c6cc1bb840c05f73a019156c462886f01d9eb
Reviewed-on: https://chromium-review.googlesource.com/c/1396745
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-01-18 11:12:27 +00:00
Jeff Gilbert 465d6090cd Add GL_ANGLE_provoking_vertex on D3D11 and GL.
This extension is a subset of GL_ARB_provoking_vertex without the
QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION query.

Bug: angleproject:2829
Change-Id: I907a4d16b7b13d3bbfb948842091eedd7b6a8b77
Reviewed-on: https://chromium-review.googlesource.com/c/1410289
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-01-16 20:32:14 +00:00
Jamie Madill ab2bfa814c Enable Chromium clang style plugin for libANGLE.
This fixes a few style warnings:

 * auto should not deduce to raw pointer type
 * inlined virtual methods are not allowed
 * non-trivial constructors and destructors should be explicit
 * inlined non-trivial constructors should not be in-class
 * missing override keywords

Bug: angleproject:3069
Change-Id: I3b3e55683691da3ebf6da06a5d3c729c71b6ee53
Reviewed-on: https://chromium-review.googlesource.com/c/1407640
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-16 01:44:15 +00:00
Xinghua Cao f3179a6a17 ES31: Implement bindImageTexture binds a single layer on D3D backend
Dynamically generate image2D variables' declaration and function
definition in libANGLE.

Bug: angleproject:1987
TEST=angle_end2end_tests.ComputeShaderTest.*

Change-Id: Idacc756f7bd15f22eccb1d689e18e997f3e74159
Reviewed-on: https://chromium-review.googlesource.com/c/1142885
Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-01-15 03:42:50 +00:00
Shahbaz Youssefi 4f3b207d04 Vulkan: Shader path for texture-to-texture copy
This change implements glCopy[Sub]TextureCHROMIUM in GPU.  As with the
previous change implementing glCopyTex[Sub]Image2D, it currently only
selects the shader path if the texture is already defined.

Bug: angleproject:2958
Change-Id: Ia1b5625f92e6c9f91807c9b601e5c34d2d5e5c30
Reviewed-on: https://chromium-review.googlesource.com/c/1392394
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-09 04:07:30 +00:00
Jamie Madill 1f56ed2a9b Add WGLWindow and WGL test configs.
WGLWindow lets us use a Windows driver's bindings instead of ANGLE.
This only works if the underlying driver supports OpenGL ES
compatibility.

Also adds the WGL headers, WGL XML, and a specialized WGL loader.

Because of a small driver issue with NVIDIA I added a retry for the WGL
Window initialization.

Bug: angleproject:2995
Change-Id: Ie5148ece470dd03df33015f4919ad1fa79a859ec
Reviewed-on: https://chromium-review.googlesource.com/c/1366021
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-03 21:35:24 +00:00
Jamie Madill ba319ba31c Re-land "Load entry points dynamically in tests and samples."
Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL
headers.

This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.

Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.

All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.

The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.

Bug: angleproject:2995
Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57
Reviewed-on: https://chromium-review.googlesource.com/c/1392382
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-01 18:56:45 +00:00
Yuly Novikov 9f088621eb Revert "Load entry points dynamically in tests and samples."
This reverts commit 03923558a7.

Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624

Original change's description:
> Load entry points dynamically in tests and samples.
> 
> This CL adds a dynamic loader generator based on XML files. It also
> refactors the entry point generation script to move the XML parsing
> into a helper class.
> 
> Additionally this includes a new GLES 1.0 base header. The new
> header allows for function pointer types and hiding prototypes.
> 
> All tests and samples now load ANGLE dynamically. In the future this
> will be extended to load entry points from the driver directly when
> possible. This will allow us to perform more accurate A/B testing.
> 
> The new build configuration leads to some tests having more warnings
> applied. The CL includes fixes for the new warnings.
> 
> Bug: angleproject:2995
> Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
> Reviewed-on: https://chromium-review.googlesource.com/c/1359516
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org

Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2995
Reviewed-on: https://chromium-review.googlesource.com/c/1392381
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-29 20:46:23 +00:00
Jamie Madill 03923558a7 Load entry points dynamically in tests and samples.
This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.

Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.

All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.

The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.

Bug: angleproject:2995
Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
Reviewed-on: https://chromium-review.googlesource.com/c/1359516
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2018-12-29 16:24:36 +00:00
Jamie Madill 8c78ce4bd3 Use visitor pattern for Shader Variable APIs.
In many places in ANGLE we need to traverse a ShaderVariable tree. We
do this to store uniform offset and other information, to flatten the
tree of uniforms for the front-end, or to produce active variable lists
for uniform and shader storage blocks. In each case, we would write
separate tree traversal code.

This patch introduces a shared visitor pattern for all of the shader
variable tree traversal instances. With that get more common code. Also
it is easier to write new variable traversals. ProgramD3D and
ProgramLinkedResources in particular get nice simplificiations.

The visitor object recieves callbacks from the traversal when entering
structs, array elements, and new variables. The visitor can treat these
differently depending on the use case. A common visitor that constructs
full variable names is used as a base class in several places.

Also moves the 'isRowMajorLayout' from sh::InterfaceBlockField to
sh::ShaderVariable. This allows us to forgo using templates in several
call sites.

Bug: angleproject:3024
Change-Id: I472d81ec775e2eee92fb3d2eb0ca83860221ba2e
Reviewed-on: https://chromium-review.googlesource.com/c/1358722
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-12-29 08:04:48 +00:00
Ian Elliott bcb7890895 Implement eglSwapBuffersWithDamage on top of VK_KHR_incremental_present
Bug: angleproject:2510
Change-Id: I12b0877f787dbcb48e2890f54ba4bc8ebe8294b4
Reviewed-on: https://chromium-review.googlesource.com/c/1383373
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2018-12-20 17:09:46 +00:00
Jamie Madill 4638dc9def Re-land "Load correct libGLESv2 on Linux and Mac."
Re-land fixes build to ensure commit_id is built before libEGL.

libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Bug: chromium:915731
Change-Id: I4192a938d1f4117cea1bf1399c98bda7ac25ddab
Reviewed-on: https://chromium-review.googlesource.com/c/1380511
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-18 18:54:44 +00:00
Yuly Novikov 175d918a1f Revert "Load correct libGLESv2 on Linux and Mac."
This reverts commit dd815b623e.

Reason for revert: Broke https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/win-rel/8006

Original change's description:
> Load correct libGLESv2 on Linux and Mac.
> 
> libEGL was implicitly loading libGLESv2 on startup. This is bad
> because on platforms like Linux and Mac we could sometimes use the
> incorrect rpath. This in turn meant we needed workarounds like using
> "_angle" extensions to our shared objects to get the correct loading
> behaviour.
> 
> Fix this by loading libGLESv2 dynamically in libEGL. We build the
> loader automatically from egl.xml. The loader itself is lazily
> initialized on every EGL entry point call. This is necessary because
> on Linux, etc, there is no equivalent to Windows' DLLMain.
> 
> We also use an EGL.h with different generation options so we have the
> proper function pointer types. A README is included for instructions
> on how to regenerate EGL.h.
> 
> The entry point generation script is refactored into a helper class
> that is used in the loader generator. Also adds the libGLESv2 versions
> of the EGL entry points in the DEF file on Windows. This allows them to
> be imported properly in 32-bit configurations.
> 
> Also fixes up some errors in ANGLE's entry point definitions. Also
> includes a clang-format disable rule for the Khronos headers.
> 
> This CL will help us to run ANGLE tests against native drivers.
> 
> Bug: angleproject:2871
> Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
> Reviewed-on: https://chromium-review.googlesource.com/c/1370725
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org

Change-Id: I921b3c45435ab4f05cbc2d1c1172b4185d6257b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2871
Reviewed-on: https://chromium-review.googlesource.com/c/1378887
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-16 19:53:36 +00:00
Jamie Madill dd815b623e Load correct libGLESv2 on Linux and Mac.
libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
Reviewed-on: https://chromium-review.googlesource.com/c/1370725
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-12-16 14:04:28 +00:00
Shahbaz Youssefi 611bbaabb2 Vulkan: Convert vertex attributes in compute
In this commit, VertexArrayVk::convertVertexBuffer() is renamed to
VertexArrayVk::convertVertexBufferCpu() to explicitly show it does a CPU
readback.  A new VertexArrayVk::convertVertexBuffer() function is added
that has the same functionality in gpu (with some assumptions, where the
CPU fallback is used should those assumptions fail).  Currently, the
only requirement is that buffer offset/stride are divided by the
component size.

ConvertVertex.comp is the shader responsible for this conversion, and it
implements the functionality in renderer/copyvertex.inc, minus a few
functions that are not used in the Vulkan backend.

Bug: angleproject:2958, angleproject:3009
Change-Id: I8ec9a5f4672509bcf7b9e352cd27663970ad4653
Reviewed-on: https://chromium-review.googlesource.com/c/1364451
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-12-11 21:20:33 +00:00
Yizhou Jiang 7310da33bc Implement GetMultismaplefvANGLE and SampleMaskiANGLE of texture multisample extension
This patch adds GetMultismaplefvANGLE and SampleMaskiANGLE api.

TEST=TextureMultisampleTest.CheckSamplePositions*
TEST=NegativeTextureMultisampleTest.Negtive*

BUG=angleproject:2275

Change-Id: Ib1e8b856059229bbe88328a28cf2a892f4673214
Reviewed-on: https://chromium-review.googlesource.com/c/1319252
Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-11-29 03:09:05 +00:00
Austin Eng 3b7c9d099b Change offsets in MultiDrawElements* entrypoints to match glMultiDrawElements
This patch changes arguments for MultiDrawElements and
MultiDrawElementsInstanced from from GLsizei *offsets to
const* GLvoid* indices.

Bug: chromium:890539

Change-Id: I2124cf2daeaa6af0f889f3c46aa2b8c77be200a6
Reviewed-on: https://chromium-review.googlesource.com/c/1352591
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2018-11-28 01:50:44 +00:00
Tobin Ehlis 573f76b3ee Debug: Add Systrace Markers
Update ScopedPerfEventHelper class to add systrace markers by default.
This change unifies ANGLE EVENT* macro system so that at the base level
in LoggingAnnotator class, systrace markers will be added by default.

Modify the base DebugLogger to use char* by default and move any
conversions to wchar_t to the Windows specializations where wchar is
used. This limits type conversions to only where they're needed.

This change also includes some new TRACE_EVENT() calls in the VK
backend which will result in systrace markers for those calls on the
Android platform.

The new build flag "angle_enable_trace" is added to enable the tracing
calls.

Bug: angleproject:2528
Change-Id: Icefc197d4407e1cd31338710e37865abae6a0b15
Reviewed-on: https://chromium-review.googlesource.com/c/1042785
Commit-Queue: Tobin Ehlis <tobine@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-11-26 15:45:45 +00:00
Jamie Madill fde74c078f Vulkan: Apply point size clamping workaround in NV.
It seems to be a regression in recent drivers. Olli contributed this
workaround for the GL back-end some time ago. This CL enables it for
Vulkan as well on the affected drivers.

Bug: angleproject:2970
Change-Id: I37f0caf8d9db073cb880aa1500d1ff7a1eee9d34
Reviewed-on: https://chromium-review.googlesource.com/c/1341108
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-11-18 23:56:03 +00:00
jchen10 cd47a379f9 Add SH_INIT_SHARED_VARIABLES flag
This option is used to initialize shared variables to zero at the
beginning of shader execution to avoid compute shaders being able to
read undefined values that could be coming from another webpage or
application.
It's implemented by declaring variables with initial value for HLSL.
For GLSL, it's not allowed to use declaraction initializer for shared
variables, so we need to explicitly assign them to zero at the
beginning of main(). This implementation is only for HLSL.

Bug: chromium:898030

Change-Id: Ic5906500bf4a35cd9a071923f82f32c5e2991be3
Reviewed-on: https://chromium-review.googlesource.com/c/1330310
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-11-13 02:03:08 +00:00
Shahbaz Youssefi d856ca48f4 Vulkan: add clear test for emulated stencil or depth formats
S8_UINT and D24_UNORM_X8_UINT are the only formats currently that are
single-aspect and are possibly emulated with a packed depth-stencil
format if it's not supported.  A flag to FeaturesVk has been added as a
way to force this behavior for the sake of testing.

This test is added to ensure the correct clear algorithm is used for
this case.  Additionally, this case is detected and the other aspect is
forcefully cleared to 0 whenever the original aspect is cleared.

Bug: angleproject:2815
Change-Id: Ief3039d66bbf46468213b9e3224f7cc7541c3a2e
Reviewed-on: https://chromium-review.googlesource.com/c/1312453
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-11-08 13:53:29 +00:00
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 <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2018-11-06 18:04:07 +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 <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
2018-11-02 02:51:57 +00:00
Austin Eng 7cf9cd2423 Add flags to shader translator to emulate gl_DrawID
Adds support for translating gl_DrawID for implementation of
GL_ANGLE_multi_draw.

Currently the change only supports and allows emulation of the
draw id using a uniform variable named `gl_DrawID`. This uniform is
mapped in the translated shader to a hashed name that does not
use the gl_ namespace

Bug: chromium:890539

Change-Id: I08a246ca911e88e733ccdf22f1ed69dcae948e05
Reviewed-on: https://chromium-review.googlesource.com/c/1271957
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2018-10-26 19:41:23 +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 <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-10-26 18:45:54 +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 <yizhou.jiang@intel.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-10-22 02:53:04 +00:00
Geoff Lang 79b914075c Add an extension for querying esimated GPU memory size of resources.
BUG=892288

Change-Id: I56fc3ab00c06d711e1a21eb1ad4b2224126730dc
Reviewed-on: https://chromium-review.googlesource.com/c/1262021
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-10-12 20:04:34 +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 <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
2018-10-12 01:40:05 +00:00
Courtney Goeltzenleuchter 7d81ae7177 Put feature utility into it's own library
To minimize system impact, have feature configuration utility
live in it's own library.

Bug=angleproject:2418

Change-Id: Ic8e3862965e515ded7e1a6078a7b9f8b92878818
Reviewed-on: https://chromium-review.googlesource.com/c/1269822
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
2018-10-09 19:52:11 +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 <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
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 <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-10-04 12:06:13 +00:00
Jamie Madill c3bef3e7b0 Allow 'defined' in define in non-WebGL.
This is needed to pass dEQP conformance. Several of the harder dEQP
tests around this behaviour are excluded from the mustpass list. This
is presumably because the behaviours weren't implemented portably.
Nevertheless we need to support conformant behaviour for GLES 2.0
Contexts for the most simple uses.

This also leaves the error behaviour intact for WebGL specs.

Bug: angleproject:1335
Change-Id: Ia80b4f71475efa928488ee6c2ee35c566d4602d4
Reviewed-on: https://chromium-review.googlesource.com/c/1242013
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-10-03 13:23:05 +00:00
Olli Etuaho a78092cb25 Support ESSL 3.00 EXT_blend_func_extended shaders
This adds support for the index layout qualifier that's used in
EXT_blend_func_extended to set whether a fragment output should be
bound to the primary or secondary blend source color.

Output locations are now validated correctly so that two outputs can
have the same location as long as they have a different index. Some
tests are fixed to allow this.

BUG=angleproject:1085
TEST=angle_unittests

Change-Id: I1de3ad1406398952287791eca367562bed59d380
Reviewed-on: https://chromium-review.googlesource.com/1245982
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-10-01 08:24:13 +00:00
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 <jiajia.qin@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
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 <ynovikov@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
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 <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
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 dan.glastonbury@gmail.com.

Bug: angleproject:2806
Change-Id: I2ce1dec0a30d5e83f2bec0ae243fd860cbcea4fc
Reviewed-on: https://chromium-review.googlesource.com/1220371
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
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 <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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 <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
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 <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
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 <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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 <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
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 <jmadill@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
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 <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
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 <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
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 <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
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 <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
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 <lfy@google.com>
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Brandon1 Jones <brandon1.jones@intel.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
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 <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
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 <courtneygo@google.com>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-05-24 15:56:49 +00:00