include


Log

Author Commit Date CI Message
Jonah Ryan-Davis 2b0553ce 2019-02-08T10:07:21 Implement EXT_instanced_arrays Bug: angleproject:3015 Change-Id: Ib01cc5e0df6db27981cb843a6bd386de5d10c2db Reviewed-on: https://chromium-review.googlesource.com/c/1452740 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill c09ae15c 2019-02-01T14:16:32 Enable -Wextra-semi and -Wextra-semi-stmt. This will prevent users from accidentally making semicolon errors in the future. Bug: chromium:926235 Change-Id: I79a6fa376fb1ad8f0fcf1b65b1f572a035d1f4e9 Reviewed-on: https://chromium-review.googlesource.com/c/1446493 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Qin Jiajia 15214423 2019-01-07T12:44:44 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>
Jeff Gilbert 465d6090 2019-01-02T16:21:18 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>
Jamie Madill ab2bfa81 2019-01-15T19:06:47 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>
Xinghua Cao f3179a6a 2018-07-12T16:22:06 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>
Shahbaz Youssefi 4f3b207d 2019-01-01T14:48:25 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>
Jamie Madill 1f56ed2a 2019-01-03T15:24:22 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>
Jamie Madill ba319ba3 2018-12-29T10:29:33 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>
Yuly Novikov 9f088621 2018-12-29T20:46:15 Revert "Load entry points dynamically in tests and samples." This reverts commit 03923558a7103827ffec6a4d2a1453ed91f01c6f. 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>
Jamie Madill 03923558 2018-12-29T10:29:33 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>
Jamie Madill 8c78ce4b 2018-12-16T19:14:58 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>
Ian Elliott bcb78908 2018-12-19T11:46:29 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>
Jamie Madill 4638dc9d 2018-12-17T13:13:49 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>
Yuly Novikov 175d918a 2018-12-16T19:53:23 Revert "Load correct libGLESv2 on Linux and Mac." This reverts commit dd815b623e60a1e1550f328104ffcd7caf20fde1. 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>
Jamie Madill dd815b62 2018-12-15T10:39:00 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>
Shahbaz Youssefi 611bbaab 2018-12-06T01:59:53 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>
Yizhou Jiang 7310da33 2018-11-05T14:40:01 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>
Austin Eng 3b7c9d09 2018-11-21T18:09:05 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>
Tobin Ehlis 573f76b3 2018-05-03T11:10:44 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>
Jamie Madill fde74c07 2018-11-18T16:12:02 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>
jchen10 cd47a379 2018-11-11T11:08:16 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>
Shahbaz Youssefi d856ca48 2018-10-31T16:55:12 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>
Austin Eng 1bf18ce9 2018-10-19T15:34:02 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>
Yizhou Jiang c0b6c639 2018-09-06T15:02:04 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>
Austin Eng 7cf9cd24 2018-10-09T15:27:32 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>
Till Rathmann b8543630 2018-10-02T19:46:14 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>
Yizhou Jiang 7818a85c 2018-09-06T15:02:04 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>
Geoff Lang 79b91407 2018-10-04T15:11:30 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>
Yizhou Jiang c4533eae 2018-09-19T15:23:29 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>
Courtney Goeltzenleuchter 7d81ae71 2018-10-08T19:25:19 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>
Olli Etuaho 0ca09753 2018-09-24T11:00:50 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>
Brandon Jones 4e6f2aea 2018-09-19T11:09:51 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>
Jamie Madill c3bef3e7 2018-10-03T07:35:09 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>
Olli Etuaho a78092cb 2018-09-26T14:16:13 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>
Qin Jiajia a602f906 2018-09-11T14:40:24 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>
Geoff Lang 8b57fae5 2018-09-20T12:48:29 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>
Jamie Madill 4230d484 2018-09-14T10:14:45 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>
Jamie Madill f4d429c1 2018-09-13T11:20:52 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>
Olli Etuaho 064458a8 2018-08-30T14:02:02 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>
Tobin Ehlis 1bf963b6 2018-07-19T14:56:37 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>
Olli Etuaho f0d0408a 2018-08-28T16:02:13 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>
Olli Etuaho 89664843 2018-08-24T14:45:36 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>
Olli Etuaho 8ca60805 2018-08-23T14:10:02 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>
jchen10 82af620e 2018-06-22T10:59:52 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>
Tobin Ehlis 5ba37427 2018-06-26T10:45:53 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>
Geoff Lang 24ddc7a8 2018-06-11T14:56:34 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>
jchen10 e5c614fb 2018-06-20T15:20:12 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>
Jiawei Shao 5f9482f4 2018-05-18T09:00:09 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>
Jamie Madill 1c597eea 2018-05-24T14:19:31 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>
Brandon Jones 2b0cdcc1 2018-05-02T08:02:50 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>
Courtney Goeltzenleuchter 390900a0 2018-05-18T09:44:59 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>
Olli Etuaho 983460e6 2018-05-02T17:57:39 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 <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 9fb23f61 2018-03-23T14:16:28 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 <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 107c7247 2018-03-20T15:45:35 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 <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Courtney Goeltzenleuchter aa5d883e 2018-03-16T09:53:03 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 <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 0ab41fa5 2018-03-14T11:03:30 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 <fjhenigman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jiawei Shao 4ed05da2 2018-02-02T14:26:15 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 <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho e13f7ebe 2018-01-26T17:08:49 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 <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 2aaa7b4e 2018-01-12T17:17:27 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 <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 0690e1aa 2017-12-21T20:51:38 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 <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill f3e23295 2018-01-04T18:19:21 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 <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 36937a64 2018-01-03T14:03:44 Revert "Enable depth buffer to workaround driver bug on Intel windows" This reverts commit 63ba357c093954d2bc475867e1296fbf5afc1d37. 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 <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=zmo@chromium.org,geofflang@chromium.org,jmadill@chromium.org,kbr@chromium.org,cwallez@chromium.org,yunchao.he@intel.com,jiajia.qin@intel.com,xinghua.cao@intel.com,bryan.bernhart@intel.com,yizhou.jiang@intel.com,yang.gu@intel.com # 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 <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho d8724a94 2017-12-29T18:40:36 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 <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
JiangYizhou 63ba357c 2017-12-06T10:25:40 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 <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 26143fdd 2017-11-01T18:19:05 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 <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao bd924af1 2017-11-16T15:28:04 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 <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
jchen10 8225e73b 2017-11-14T16:29:03 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 <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho ebe13bb1 2017-12-11T13:32:44 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 <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 9db70de8 2017-07-04T18:28:42 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 TBR=geofflang@chromium.org Change-Id: Id2974b8fab02c3218febfac708b9b034e65cbc53 Reviewed-on: https://chromium-review.googlesource.com/823248 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 7f5c3eb7 2017-12-12T14:54:17 Revert "Implement EGL_ANGLE_iosurface_client_buffer" This reverts commit c7abc08034a30a41748eefc5b628a76d4e2daa8a. 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 <cwallez@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Corentin Wallez <cwallez@chromium.org> TBR=geofflang@chromium.org,cwallez@chromium.org 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 <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez c7abc080 2017-07-04T18:28:42 Implement EGL_ANGLE_iosurface_client_buffer BUG=angleproject:1649 Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2 Reviewed-on: https://chromium-review.googlesource.com/559107 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jeff Gilbert 3dddccff 2017-11-14T16:44:36 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 <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 3de2703d 2017-11-30T12:16:47 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 <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 465835d6 2017-09-26T13:34:10 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 <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao 89be29a5 2017-11-06T14:36:45 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 <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2f294c9a 2017-11-20T14:47:26 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 <jmadill@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Olli Etuaho b5601eb6 2017-11-15T18:08:04 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 <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 740aa41d 2017-11-14T10:35:35 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 <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ff7aac5e 2017-11-13T16:57:14 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 <jmadill@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org>
Jamie Madill c2eb32ba 2017-11-13T21:51:48 Revert "Export angle::PlatformMethods." This reverts commit 8b920b211d7363daef0d5fb8d2bd69f3253ab033. 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 <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=jmadill@chromium.org,piman@chromium.org 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 <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8b920b21 2017-11-13T15:09:56 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 <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho bb0775da 2017-11-10T16:20:43 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 <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill cac94a91 2017-11-10T10:09:32 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 <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
JiangYizhou 38d92b59 2017-09-13T13:47:52 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 <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiajia Qin 3a9090fa 2017-09-27T14:37:04 ES31: Add BUFFER_VARIABLE and SHADER_STORAGE_BLOCK program interfaces This patch collects the shader storage block members information. It implements getShaderStorageBlockMemberInfo and getShaderStorageBlockSize for OpenGL backend. Meanwhile, it implements BUFFER_VARIABLE and SHADER_STORAGE_BLOCK interfaces for program query. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* dEQP-GLES31.functional.layout_binding.ssbo* dEQP-GLES31.functional.compute.basic.empty dEQP-GLES31.functional.compute.basic.ssbo_rw* dEQP-GLES31.functional.compute.basic.ssbo_local_barrier* dEQP-GLES31.functional.compute.basic.copy_image_to_ssbo_small dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_groups dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_invocations dEQP-GLES31.functional.compute.basic.copy_ssbo_single_invocation dEQP-GLES31.functional.compute.basic.copy_ssbo_to_image_small dEQP-GLES31.functional.compute.basic.shared_var* dEQP-GLES31.functional.compute.basic.ubo_to_ssbo* dEQP-GLES31.functional.compute.basic.write_multiple_arr* dEQP-GLES31.functional.compute.shared_var.basic_type.* dEQP-GLES31.functional.compute.shared_var.work_group_size.* dEQP-GLES31.functional.atomic_counter.* Change-Id: Ie8b81fde5a2e919aab77adb3d137c9ff2f193409 Reviewed-on: https://chromium-review.googlesource.com/712235 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 661fc487 2017-10-16T12:17:05 Work around NVIDIA GLSL vector-scalar op bug This adds a new AST transform VectorizeVectorScalarArithmetic. The AST transform works around incorrect handling of certain types of GLSL arithmetic operations by NVIDIA's GL driver. It works around only the most common cases where the bug reproduces, since detecting all the cases would take more sophisticated analysis of the code than what is currently easily implementable in ANGLE. When a float add operator has both vector and scalar operands, the AST transform turns the scalar operand into a vector operand. Example: vec4 f; f += 1.0; gets turned into: vec4 f; f += vec4(1.0); When a vector constructor contains a binary scalar float multiplication or division operation as its only argument, the AST transform turns both operands of the binary operation into vector operands. Example: float f, g; vec4(f * g); gets turned into: float f, g; vec4(vec4(f) * vec4(g)); Another example with compound assignment: float f, g; vec4(f *= g); gets turned into: float f, g; vec4 s0 = vec4(f); (s0 *= g, f = s0.x), s0; This latter transformation only works in case the compound assignment left hand expression doesn't have side effects. BUG=chromium:772651 TEST=angle_end2end_tests Change-Id: I84ec04287793c56a94845a725785439565debdaf Reviewed-on: https://chromium-review.googlesource.com/721321 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 977abce7 2017-11-07T08:03:19 Refactor interface block linking. This moves the logic for interface block linking. The new design is intended to be flexible enough to be passed into a back-end call to ProgramImpl::link. Then, the Impl object can be responsible for both filtering out unreferenced interface blocks as well as having access to the linked interface block information. A future change will pass the InterfaceBlockLinker objects (or objects when dealing with ES 3.1 and Shader Storage Blocks) to the Impl. This will help fix a D3D11 back-end bug where we would need acess to the Shader objects to finish a deferred uniform block link. This should also potentially make it easier for the back-ends to determine Shader Storage Block size and properties without defining new Impl methods. BUG=angleproject:2208 Change-Id: Ic5244a808dba44ba1a8c08d9ee701952034d2b18 Reviewed-on: https://chromium-review.googlesource.com/746203 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jeff Gilbert 20c285ec 2017-10-31T19:01:09 callClearTwiceOnSmallTarget is needed for all sizes. Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1325733 BUG=angleproject:2214 Change-Id: I6837a0fbf0bbbd0877f333f0625729445a5999aa Reviewed-on: https://chromium-review.googlesource.com/748320 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Qin Jiajia ca68d988 2017-09-18T16:41:56 ES31: Add std430 support for OpenGL backend BUG=angleproject:1920 TEST=angle_unittests Change-Id: Ie8e171abec053c2c5dca93d6e79db534f74520e7 Reviewed-on: https://chromium-review.googlesource.com/737532 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho e7c2857d 2017-10-23T16:29:33 Clean up direct access of ShaderVariable::arraySize This change is pure refactoring. It's intended to help with adding support for arrays of arrays. BUG=angleproject:2125 TEST=angle_unittests Change-Id: I82881a98c3c476fd6666a551ce6be255ae0de4cf Reviewed-on: https://chromium-review.googlesource.com/733127 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 15de9262 2017-10-13T11:08:13 Add array size functions to ShaderVars These can be used instead of direct access of the arraySize field in Chromium, so that arrays of arrays support can be implemented inside ANGLE without breaking the Chromium build. BUG=angleproject:2125 TEST=angle_unittests Change-Id: I123c2a18549e8f6e40ade946870a5437faf2155e Reviewed-on: https://chromium-review.googlesource.com/718201 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang b433e872 2017-10-05T14:01:47 Change robust resource init into a context creation attribute. Enabled support on OpenGL even through the extension is not fully implemented so that testing with Chromium/Passthrough commmand decoder is still possible. BUG=angleproject:1635 Change-Id: Ia417b1779aace1eae19514325701a79cd33f4ef3 Reviewed-on: https://chromium-review.googlesource.com/678479 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jiawei Shao 4cc89e2b 2017-08-31T14:25:54 ES31: Enable 'location' layout qualifier on shader interfaces in compiler This patch enables 'location' layout qualifier for vertex outputs and fragment shader inputs when the shader version is 3.1 in ANGLE GLSL compiler and adds the check on location conflicts for these varyings. According to GLSL ES 3.1 SPEC (Chapter 4.4.1 and Chapter 4.4.2), 'location' layout qualifier is allowed on both inputs and outputs of vertex and fragment shaders. 'location' layout qualifier on shader interfaces is only valid on shaders whose version is 3.1 and above. According to GLSL ES 3.0 SPEC, vertex shader cannot have output layout qualifiers (Chapter 4.3.8.2) and fragment shader cannot have input layout qualifiers (Chapter 4.3.8.1). The 'location' qualifier on varyings is used in the shader interface matching defined in OpenGL ES 3.1. (OpenGL ES 3.1 SPEC Chapter 7.4.1). This new link rule will be added to Program.cpp in another patch. For the OpenGL ES 3.1 extension GL_OES_geometry_shader, according to GL_OES_shader_io_blocks SPEC (Chapter 4.4.1 and Chapter 4.4.2), 'location' layout qualifier is both valid on geometry shader inputs and outputs. This feature will be implemented together with other rules on geometry shader inputs and outputs. BUG=angleproject:2144 TEST=angle_unittests Change-Id: I62d85f7144c177448321c2db36ed7aaeaa1fb205 Reviewed-on: https://chromium-review.googlesource.com/645366 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 84aa2dcf 2017-09-11T15:51:02 Add textureGather and textureGatherOffset The patch adds new built-ins and extends the semantic parser to add support for textureGather and textureGatherOffset. BUG=angleproject:1442 TEST=angle_unittests TEST=angle_deqp_gles31_tests.exe --deqp-case=dEQP-GLES31.functional.texture.gather* --deqp-egl-display-type=angle-gl Change-Id: Iaf98c3420fbd61193072fdec8f5a61ac4c574101 Reviewed-on: https://chromium-review.googlesource.com/660124 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9abe07c6 2017-09-19T00:25:00 Move Platform Context pointer to start of struct. This will ensure that new methods (placed at the end) don't collide with the context pointer when using a mismatched platform. BUG=angleproject:1892 Change-Id: Ice6a3ccaf3cc2a1e36a04bc217386cf096612176 Reviewed-on: https://chromium-review.googlesource.com/672147 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9dfa628d 2017-09-08T11:06:03 Add RequestExtension to static link. This probably was left out accidentally. Also this fixes the return type of the prototype in the extension header (should be void, not boolean). BUG=angleproject:1523 Change-Id: I7bf0b36b05a4cba4cb6fb2411fc53103dda54bfe Reviewed-on: https://chromium-review.googlesource.com/657898 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Martin Radev 7cadfcc7 2017-09-07T16:38:57 Change ANGLE_multiview's enum values The enums introduced by the ANGLE_multiview extension are changed to use the values reserved specifically for ANGLE. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ib668f2e0e9022442a432b1a04050aeb2ff82a3d1 Reviewed-on: https://chromium-review.googlesource.com/654864 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Martin Radev <mradev@nvidia.com>
Martin Radev c1d4e550 2017-08-21T12:01:10 D3D11: Select view in vertex shader View selection can happen in the vertex shader through the optional feature VPAndRTArrayIndexFromAnyShaderFeedingRasterizer. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Iaf65685e04f828b0936295fea867f6f6cbe69bee Reviewed-on: https://chromium-review.googlesource.com/628419 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 855d964b 2017-05-17T14:05:06 Prefix user-defined names in GLSL output Now user-defined names are prefixed by _u in GLSL output in case name hashing is not on. Internal names such as names of temporary variables created in AST transformations are written out as such. This makes handling of internal function names and internal variable names consistent. It also removes the possibility of name conflicts between user-defined names and internal names in case name hashing is not on. In the same vein, it makes it safe to use GLSL reserved words that are not reserved in ESSL as variable names in case name hashing is not on. This also makes the GLSL output more consistent with how names are handled in HLSL output. Name hashing code is shared between VariableInfo and OutputGLSLBase to ensure names are handled consistently in both. The name that's used in the shader source for a given interface variable is written out to ShaderVariable::mappedName. An exception needs to be made for identifiers close to the length limit, since adding any prefix would take them over the limit. But they can be just written out as such, since we don't have any builtins or ANGLE internal variables that have as long names and could create a conflict. BUG=angleproject:2139 BUG=angleproject:2038 TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests Change-Id: Id6ed052c4fab2d091227dc9a3668083053b67a38 Reviewed-on: https://chromium-review.googlesource.com/507647 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>