src/libANGLE/queryutils.cpp


Log

Author Commit Date CI Message
Ian Elliott 3d6e3004 2019-02-01T15:43:59 Implement EGL_ANDROID_recordable for Vulkan back-end. This initial implementation provides the extension, and always answers that the ANativeWindow is not recordable. BUG=angleproject:2511 Change-Id: Id3c57351dd1029bff7adf7166f9c82eee6e634b3 Reviewed-on: https://chromium-review.googlesource.com/c/1412507 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 5313c8a8 2019-01-14T17:02:52 Implement EGL_KHR_fence_sync and EGL_KHR_wait_sync EGL_KHR_fence_sync introduces the EGLSync object and associated create/destroy/clientWait functions. EGL_KHR_wait_sync adds the serverWait function on top of that. Bug: angleproject:2466 Change-Id: Iebb239a85c4471ea18b3c3a8a83b793af555e31d Reviewed-on: https://chromium-review.googlesource.com/c/1412261 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill dd34b3b9 2019-01-16T09:59:54 Pack VertexAttribType enum. This improves performance slightly in vertex array format checks. Instead of needing to switch on GLenum values we can use packed arrays and tables to determine the values we need. Does not significantly affect performance but will enable future work. Bug: angleproject:3074 Change-Id: I6f4821a463e9b41fe3f8c8967eb3ed4c1d6b84be Reviewed-on: https://chromium-review.googlesource.com/c/1393903 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7c985f5c 2018-11-29T18:16:17 Make angle::Result an enum. This moves away from a class type to a value type. This should improve performance when using angle::Result as a return value. Previously the generated code would return a pointer instead of a value. Improves performance in the most targeted microbenchmark by 10%. In more realistic scanarios it will have a smaller improvement. Also simplifies the class implementation and usage. Includes some unrelated code generation changes. Bug: angleproject:2491 Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa Reviewed-on: https://chromium-review.googlesource.com/c/1356139 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill e3e680ca 2018-12-03T17:49:08 Remove State::syncProgramTextures. Removes the concept of the program textures dirty object. Instead we use a set of dirty bits to represent dirty texture samples. We mark certain textures dirty and update state structures whenever there is a new Texture/Program/Sampler bound, or when Texture/Program/Sampler state changes. This is in preparation for making clearing the uncleared active textures into a dirty bit as well. Also includes new dirty bit handling for texture image units. These are a GLES 3.1 feature. Bug: angleproject:2966 Change-Id: Ibb8619dd2669bb39fdbcd75e3685be9a8aeeee91 Reviewed-on: https://chromium-review.googlesource.com/c/1346649 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 4f6592fa 2018-11-27T16:37:45 Remove gl::Error. Removes several TODOs. Only egl::Error remains. Also slightly decreases binary size. Bug: angleproject:2491 Change-Id: I3a9d1c22eb0884ca9e37362463fddd0083faf826 Reviewed-on: https://chromium-review.googlesource.com/c/1337462 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 6ba22ee1 2018-10-26T16:15:40 GL: Implement EGL_ANDROID_get_frame_timestamps. BUG=angleproject:2936 Change-Id: I758d797d185b2de330cce3401bfeef76c7df590e Reviewed-on: https://chromium-review.googlesource.com/c/1302836 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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>
Jamie Madill f4a789f9 2018-10-18T16:56:20 Use angle::Result in front-end (Part 6) Refactors the gl::Program, gl::Compiler and gl::Query classes. Bug: angleproject:2491 Change-Id: I96acecdc6af301a89201bd7f5222a180433e5eb2 Reviewed-on: https://chromium-review.googlesource.com/c/1289711 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Joonatan Saarhelo bbd532d1 2018-10-10T17:40:26 Fix querying large vertex attrib divisors glGetVertexAttribIuiv previously returned an incorrect value for GL_VERTEX_ATTRIB_ARRAY_DIVISOR, because the divisor was treated as an integer even though it is an unsigned integer. BUG=angleproject:2281 Change-Id: I4d1c9df15244db855c6a000fc8fb6cc786bfcb85 Reviewed-on: https://chromium-review.googlesource.com/c/1273300 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: 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>
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>
Jamie Madill e25b8006 2018-09-20T13:39:49 Move sampler sync out of syncProgramTextures. We only need to call the syncState for samplers when they are dirty. Also includes changes to refactor out the sampler sync in GL. Adds observer bindings so sampler sync is handled correctly in resource sharing scenarios. Bug: angleproject:2763 Change-Id: I762f0738ee7572ae29ce6bd5384a30aa9588c848 Reviewed-on: https://chromium-review.googlesource.com/1227797 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
jchen10 a155bacf 2018-08-16T15:26:39 ParallelCompile: Parallelize shader translation This changes to construct a new ShHandle of compiler for each Shader, and use it to translate the shader source in a background thread. Bug: chromium:849576 Change-Id: Ib49952c7292321ee6aa1c5996f8f7927f40d8f04 Reviewed-on: https://chromium-review.googlesource.com/1177195 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 097d3c0c 2018-09-12T11:03:05 Make SamplerState a contained class. This will more easily allow us to use a cached completeness comparison value. The cached value only gets updated on certain setters. Bug: angleproject:2763 Change-Id: Ib80db8517560617087ae8360f7af69d6c2392b76 Reviewed-on: https://chromium-review.googlesource.com/1171507 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi c14ab2a7 2018-08-24T13:57:55 Fix dEQP_GLES3.functional.negative_api.shader.program_binary The frontend was not taking into account the fact that some drivers do not support program binaries. The fix is that now glGetProgramiv(GL_PROGRAM_BINARY_LENGTH) returns 0 under such circumstances. Bug: angleproject:2780 Change-Id: I4ea2cda6bb4612e69dbd7e00b3d43b97ee3b3c3d Reviewed-on: https://chromium-review.googlesource.com/1188768 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Lingfeng Yang 6e5bf36f 2018-08-15T09:53:17 GLES1: Fixes for Gets() test - Fixed wrong face parameter for glGetMaterial*. - Enabled GL_LINE_SMOOTH capability in state only (no rendering yet) - Enabled logical operation capability in state only (no rendering yet) - Fixed wrong handling of GL_RGB/ALPHA_SCALE and GL_POINT_COORD_REPLACE_OES Test: Enable and pass Gets() GLES1 conformance test BUG=angleproject:2306 Change-Id: Ib5c50a2055129b76ad24053baf0dac24dcc00761 Reviewed-on: https://chromium-review.googlesource.com/1176161 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
jchen10 3fd614d0 2018-08-13T12:21:58 Refactor Context dependency for resolveCompile The context parameter of Shader::resolveCompile method causes a bad impact that many methods in Shader, Program etc. have to have a same context parameter. By removing it, these methods can be decoupled from Context. BUG=chromium:849576 Change-Id: Ia5545ee9dce45794550f6086bc0e6c4707e1276e Reviewed-on: https://chromium-review.googlesource.com/1172202 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 7ae70d8f 2018-07-06T13:47:01 ParallelCompile: Parallelize D3D linking This adds a new linking state to Program. If a Program is in linking state, on the one hand the foreground thread may continue issuing more GL calls, and on the other hand the background linking threads may be accessing Program internally too. Without a proper constraint there must be conflicts between them. For this purpose, we block any further GL calls to Program until it's actually linked. In addition, we prohibit parallel linking an active program, so that ProgramD3D does not have to worry about such similar conflicts. Also changes the WorkerThread to support limiting the number of concurrently running worker threads. BUG=chromium:849576 Change-Id: I52618647539323f8bf27201320bdf7301c4982e6 Reviewed-on: https://chromium-review.googlesource.com/1127495 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b983a4b2 2018-08-01T11:34:51 Pass Context to Framebuffer::invalidateCompletenessCache. This will be useful for validation state caching. Bug: angleproject:2747 Change-Id: I0737adca7406f79b9e15429f30ae22e1299cd7e4 Reviewed-on: https://chromium-review.googlesource.com/1158611 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
LRN 03d132eb 2018-07-14T13:31:35 Support EGL_(WIDTH|HEIGHT) in eglSurfaceAttrib(), fixed resize Setting EGL_WIDTH or EGL_HEIGHT results in mFixedWidth and mFixedHeight changing their values. Whenever the swap chain is tested for needing a resize, surfaces with mFixedSize are treated as if they should be resized to mFixedWidth and mFixedHeight from their current size. This way fixed-size surfaces can be resized - it's enough to do a couple of eglSurfaceAttrib() calls and then either let ANGLE check surface for needing a resize in due course, or force that by calling eglWaitNative(). BUG=angleproject:2725 Change-Id: I2932d8ecd5a2f10500e4aa8583a169aa09bf01bb Reviewed-on: https://chromium-review.googlesource.com/1139055 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill a0691b77 2018-07-25T10:41:22 Pass Context to Fence Impl methods. This is needed for the error refactoring and also for the Vulkan implementation. Bug: angleproject:2738 Change-Id: I4e1bed7f67ef17feb5554b5838a2ed5feb22bba0 Reviewed-on: https://chromium-review.googlesource.com/1150091 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang f97641c1 2018-06-21T19:22:45 GLES1: Texture parameters Note: minimum buffer size is now checked for texture parameters in GLES2. - Mipmap generation hint - Crop rect - Update test expectations BUG=angleproject:2306 Change-Id: Ib459b8191111732a1326b44f2226b72ca297325a Reviewed-on: https://chromium-review.googlesource.com/1111575 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Lingfeng Yang 9c4c0926 2018-06-13T09:29:00 Reland "GLES1: Point rasterization (partial implementation)" This is a reland of 4004ae0e033a0169de3cb53c0a036833ad47178a Fix: Put the missing early-out in ValidatePointParameterCommon Original change's description: > GLES1: Point rasterization (partial implementation) > > - Not included: Smooth points > > - GL_OES_point_sprite > - Update test expectations. Note: due to different random sampling, > edge cases were hit in UserClip. Disabling that test for now. > > BUG=angleproject:2306 > > Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa > Reviewed-on: https://chromium-review.googlesource.com/1101910 > Reviewed-by: Corentin Wallez <cwallez@chromium.org> > Commit-Queue: Lingfeng Yang <lfy@google.com> Bug: angleproject:2306 Change-Id: Id8e71352a77ff0ce71cb604965effbfb8aca613e Reviewed-on: https://chromium-review.googlesource.com/1108458 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Frank Henigman a58d69e9 2018-06-20T18:07:11 Revert "GLES1: Point rasterization (partial implementation)" This reverts commit 4004ae0e033a0169de3cb53c0a036833ad47178a. Crash in PointParameterTest.NegativeEnum/ES1_OPENGL. https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac%20FYI%20GPU%20ASAN%20Release/1178 angle_end2end_tests on Intel GPU on Mac on Mac-10.12.6 angle_end2end_tests on ATI GPU on Mac Retina on Mac-10.12.6 Original change's description: > GLES1: Point rasterization (partial implementation) > > - Not included: Smooth points > > - GL_OES_point_sprite > - Update test expectations. Note: due to different random sampling, > edge cases were hit in UserClip. Disabling that test for now. > > BUG=angleproject:2306 > > Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa > Reviewed-on: https://chromium-review.googlesource.com/1101910 > Reviewed-by: Corentin Wallez <cwallez@chromium.org> > Commit-Queue: Lingfeng Yang <lfy@google.com> TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,lfy@google.com Change-Id: I776ce0506d349382b3af035c962aa2c3f6826b99 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2306 Bug: angleproject:2680 Reviewed-on: https://chromium-review.googlesource.com/1108457 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Lingfeng Yang 4004ae0e 2018-06-13T09:29:00 GLES1: Point rasterization (partial implementation) - Not included: Smooth points - GL_OES_point_sprite - Update test expectations. Note: due to different random sampling, edge cases were hit in UserClip. Disabling that test for now. BUG=angleproject:2306 Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa Reviewed-on: https://chromium-review.googlesource.com/1101910 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Jiawei Shao a8802477 2018-05-28T11:17:47 ES31: Implement FramebufferTextureEXT on OpenGL back-ends This patch intends to implement FramebufferTextureEXT on OpenGL back-ends. 1. Support layered framebuffer attachments. 2. Add new framebuffer completeness rules on layered framebuffer attachments. 3. Support FRAMEBUFFER_ATTACHMENT_LAYERED_EXT as a valid <pname> parameter of GetFramebufferAttachmentParameteriv. Note that for an entire level of a cube map: 1. It has no TextureTarget because TEXTURE_CUBE is not a valid target for TexImage*D. 2. It corresponds to 6 ImageDescs (that represents its faces) in class Texture, so when the cube map is cube complete, we return the ImageDesc of its first face, meanwhile we do not allow querying ImageDesc if it is not cube complete. BUG=angleproject:1941 TEST=angle_end2end_tests dEQP-GLES31.functional.geometry_shading.query.framebuffer_attachment_layers dEQP-GLES31.functional.geometry_shading.query.framebuffer_incomplete_layer_targets dEQP-GLES31.functional.geometry_shading.layered.* dEQP-GLES31.functional.geometry_shading.instanced.invocation_per_layer_* dEQP-GLES31.functional.geometry_shading.instanced.multiple_layers_per_invocation_* Change-Id: I44393b513ec8f1a682fd1c47d3eaa6f3b3fae877 Reviewed-on: https://chromium-review.googlesource.com/1075811 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Lingfeng Yang 45b5a875 2018-06-07T11:33:25 GLES1: Texture environment API BUG=angleproject:2306 Change-Id: Ibb168d5c9f7aa96a48c96ffbe96ecead2276975e Reviewed-on: https://chromium-review.googlesource.com/1092101 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang 7ba3f425 2018-06-01T09:43:04 GLES1: Fog API and rendering - Update test expectations BUG=angleproject:2306 Change-Id: Ic5aa5f052bcbe9c5adaf0eb0c6c06df66fd1720c Reviewed-on: https://chromium-review.googlesource.com/1082978 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang d0febe7a 2018-05-17T22:36:52 Reland "GLES1: Entry points for lighting and materials" This is a reland of 4a09c1a245c406e402b3996b7ed33798b897e60f Entry points have been autogenerated again. Original change's description: > GLES1: Entry points for lighting and materials > > - glLight*/glMaterial and their queries > - Use new packed enums in these entry points, except for lightmodel > which stays GLenum to be consistent with other generic glGet's > - State.cpp: New glGet* queries related to light model and > light/normal rescale enablement > - GLES1State.cpp: Functions to get/set lighting/material state > - Validation for lighting/materials > > + Add a few convenience methods to random_utils for sampling > non-negative floats and a sampler for random booleans > > BUG=angleproject:2306 > > Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e > Reviewed-on: https://chromium-review.googlesource.com/1065502 > Commit-Queue: Lingfeng Yang <lfy@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:2306 Change-Id: I434273acd5200dd9f4925e239a032cc8db31a434 Reviewed-on: https://chromium-review.googlesource.com/1072849 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Jamie Madill 493f9571 2018-05-24T19:52:15 Add PrimitiveMode packed GLenum. Bug: angleproject:2574 Change-Id: I3d7bd7ca0d69a364a611dc04799ea34906fc4a6c Reviewed-on: https://chromium-review.googlesource.com/1067114 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Lingfeng Yang 668e507f 2018-05-24T17:12:14 Revert "GLES1: Entry points for lighting and materials" This reverts commit 4a09c1a245c406e402b3996b7ed33798b897e60f. Reason for revert: Seems to break the build Original change's description: > GLES1: Entry points for lighting and materials > > - glLight*/glMaterial and their queries > - Use new packed enums in these entry points, except for lightmodel > which stays GLenum to be consistent with other generic glGet's > - State.cpp: New glGet* queries related to light model and > light/normal rescale enablement > - GLES1State.cpp: Functions to get/set lighting/material state > - Validation for lighting/materials > > + Add a few convenience methods to random_utils for sampling > non-negative floats and a sampler for random booleans > > BUG=angleproject:2306 > > Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e > Reviewed-on: https://chromium-review.googlesource.com/1065502 > Commit-Queue: Lingfeng Yang <lfy@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,lfy@google.com Change-Id: Ifabd708ded87c7484ad6d466508e2c2d6ea2557c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2306 Reviewed-on: https://chromium-review.googlesource.com/1071828 Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 4a09c1a2 2018-05-17T22:36:52 GLES1: Entry points for lighting and materials - glLight*/glMaterial and their queries - Use new packed enums in these entry points, except for lightmodel which stays GLenum to be consistent with other generic glGet's - State.cpp: New glGet* queries related to light model and light/normal rescale enablement - GLES1State.cpp: Functions to get/set lighting/material state - Validation for lighting/materials + Add a few convenience methods to random_utils for sampling non-negative floats and a sampler for random booleans BUG=angleproject:2306 Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e Reviewed-on: https://chromium-review.googlesource.com/1065502 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiawei Shao b1e91380 2018-05-17T14:33:55 ES31: Implement EXT_geometry_shader framebuffer default layers on OpenGL This patch implements FRAMEBUFFER_DEFAULT_LAYERS_EXT as a legal framebuffer parameter required in OpenGL ES 3.1 extension EXT_geometry_shader on OpenGL back-ends. The query on FRAMEBUFFER_DEFAULT_LAYERS_EXT specifies the layer count used when the framebuffer has no attachments. BUG=angleproject:1941 TEST=dEQP-GLES31.functional.geometry_shading.query.framebuffer_default_layers Change-Id: I888465dfe23da53541ec2fedb8616027df532466 Reviewed-on: https://chromium-review.googlesource.com/1063560 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Jiawei Shao c6f82872 2018-04-24T14:14:50 ES31: Add REFERENCED_BY_GEOMETRY_SHADER as program interface property This patch implements GL_REFERENCED_BY_GEOMETRY_SHADER as a valid property of program interfaces. BUG=angleproject:1941 TEST=angle_end2end_tests dEQP-GLES31.functional.geometry_shading.query.referenced_by_geometry_shader Change-Id: Id9659313d371dbfc7d00bf9d816df4449fbf29ec Reviewed-on: https://chromium-review.googlesource.com/1025281 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Geoff Lang 8ceea819 2018-04-10T03:07:13 Refactor packed enum generation to support EGL enums. Convert the very simple EGL texture type enum. BUG=angleproject:1618 Change-Id: Ieea382a282a8f2544f2982627e8445e6e5cea826 Reviewed-on: https://chromium-review.googlesource.com/1019386 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang abb09f12 2018-04-16T10:43:53 GLES1: Client vertex array pointer API glVertexPointer glNormalPointer glColorPointer glPointSizePointerOES glTexCoordPointer BUG=angleproject:2306 Change-Id: Id022b467ac998ea116130c5cec0c77afefb0dd4c Reviewed-on: https://chromium-review.googlesource.com/1014381 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao 3dd8d291 2018-03-30T09:39:09 Use ShaderBitSet for active use bits on uniforms BUG=angleproject:2169 Change-Id: I192c2e3c453540c8a6d7b0d066218ea3c9fbaab2 Reviewed-on: https://chromium-review.googlesource.com/989411 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiawei Shao 385b3e03 2018-03-21T09:43:28 Use packed enums on shader types in ANGLE renderer This patch uses a packed internal enum ShaderType everywhere we need a shader type instead of the GLenum value of the shader type. This patch also uses program::getAttachedShader(type) everywhere we need to get gl::Shader from a program in ANGLE. BUG=angleproject:2169 Change-Id: I28a7fa1cfe35622c57a486932911110688eaadec Reviewed-on: https://chromium-review.googlesource.com/972844 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
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>
Jiawei Shao 447bfac1 2018-03-14T14:23:40 ES31: Support program parameter queries on geometry shader This patch implements all the program queries on the geometry shader stage of a program by glGetProgramiv(), including the queries on geometry shader input/output primitives, invocations and maximum output vertices BUG=angleproject:1941 TEST=dEQP-GLES31.functional.geometry_shading.query.geometry_linked_* dEQP-GLES31.functional.geometry_shading.query.geometry_shader_invocations dEQP-GLES31.functional.state_query.program.geometry_shader_state_get_programiv Change-Id: Ibfa630c64dba5baf52ff84ce7e0bf4c567eef8c4 Reviewed-on: https://chromium-review.googlesource.com/961397 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 99d492c2 2018-02-27T15:17:10 Use packed enums for the texture types and targets, part 2 This completes the refactor by using the packed enums in the gl:: layer and in the backends. The packed enum code generation is modified to support explicitly assigning values to the packed enums so that the TextureTarget cube map faces are in the correct order and easy to iterate over. BUG=angleproject:2169 Change-Id: I5903235e684ccf382e92a8a1e10c5c85b4b16a04 Reviewed-on: https://chromium-review.googlesource.com/939994 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yunchao He bacaa714 2018-01-30T14:01:39 ES31: support stencil texture via DEPTH_STENCIL_TEXTURE_MODE. BUG=angleproject:2373 Change-Id: I5edd9db6ef6101b0ad75f71fdcdfbb1261100583 Reviewed-on: https://chromium-review.googlesource.com/936421 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Qin Jiajia 9bf55527 2018-01-29T13:56:23 Fix the incorrect calculation for MAX_NAME_LENGTH The old implementation forgot to consider the instance array situation. This change will use unified method to calculate the interface block's MAX_NAME_LENGTH. It also removes some cases which have already passed from expectation files. BUG=angleproject:1920 TEST=angle_end2end_tests *program_interface_query.uniform_block.resource_list.block_array* *program_interface_query.shader_storage_block.resource_list.block_array* Change-Id: I6ef53951487e6366d69ecaa43e4df6824baad042 Reviewed-on: https://chromium-review.googlesource.com/890386 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
jchen10 910a3daf 2017-11-15T09:40:11 ES31 program query: support TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING corresponds to the set of output variables in the last non-fragment stage of program that would be captured when transform feedback is active. The resources enumerated by this query are listed as specified by the most recent call to TransformFeedbackVaryings before the last call to LinkProgram. This mainly collects these resources for query. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.* Change-Id: I0655b12c6d82cef1b44d4ca57ea55bb60d1f78fb Reviewed-on: https://chromium-review.googlesource.com/770450 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Bryan Bernhart (Intel Americas Inc) 2eeb1b34 2017-11-29T16:06:43 WebGLCompat: Fix depthstencil query results. getFramebufferAttachmentParameter returns incorrect result for framebuffers in an inconsistent state. BUG=angleproject:2259 Change-Id: I76fa99f1b8847c30469d344bd93dedd9cf6657bf Reviewed-on: https://chromium-review.googlesource.com/798318 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5201ce12 2017-11-28T11:36:28 Fix MSVC 2015 warnings. BUG=angleproject:2258 Change-Id: I280eb0e461fd749b01594bb1bb9a417f2cbc23fa Reviewed-on: https://chromium-review.googlesource.com/793975 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
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>
Geoff Lang 92019431 2017-11-20T13:09:34 Make conversion from GL types to native bools consistant. Some places would compare with "== GL_TRUE" and others with "!= GL_FALSE". This behaviour is not in the OpenGL spec but "!= GL_FALSE" is the most standard and follows the same rules as C and C++. Remove un-necessary validation that params are either GL_TRUE or GL_FALSE. Update some internal storage from GLboolean to bool. BUG=angleproject:2258 Change-Id: I12adbe2d24318a206521ca6ad1099ee7e2bf677e Reviewed-on: https://chromium-review.googlesource.com/779799 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@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 d255123c 2017-10-26T20:03:33 Store shader interface variables as per query spec GLES 3.1 section 7.3.1.1 specifies how active variable entries should be generated and how active variables are named. The specs for program interface variable queries are built on top of this section. ANGLE has already followed this spec for the most part for generating variable lists in ProgramState, but now we also follow the naming spec for arrays and include [0] at the end of the stored name. This will make implementing arrays of arrays more straightforward. Most logic for variable queries will just keep working as is when arrays of arrays are added instead of needing more complex logic for handling array indexing. BUG=angleproject:2125 TEST=angle_end2end_tests Change-Id: I3acd14253153e10bc312114b0303065da2efb506 Reviewed-on: https://chromium-review.googlesource.com/739826 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
jchen10 58f67be0 2017-10-27T08:59:27 ES31 program query: support AtomicCounterBuffer and UniformBlock Calculates atomic counter buffer's shader reference according to its child counters. Merges GL_UNIFORM_BLOCK_* queries to GL_*. Refreshes deqp_gles31_test_expectations. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* dEQP-GLES31.functional.state_query.program.active_atomic_counter_buffers_get_programiv dEQP-GLES31.functional.layout_binding.ubo.* Change-Id: Ia23ddfef5f5dd7e15628f4c259273e1c01c14d80 Reviewed-on: https://chromium-review.googlesource.com/715436 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Xinghua Cao 971f8508 2017-10-17T13:01:24 Implement get compute work group size for glGetProgramiv BUG=angleproject:2187 TEST=dEQP-GLES31.functional.state_query.program.compute_work_group_size_get_programiv Change-Id: Ic09153ffccfb207e37ad70cf7e14714be987e7e1 Reviewed-on: https://chromium-review.googlesource.com/722178 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 2e568cfb 2017-09-18T17:05:22 Add generator for packed GL enums. For testing this also converts two unimportant GLenums, gl::BufferUsage and gl::CullModeFace. BUG=angleproject:2169 Change-Id: If1e86a97d0fed3fd567303aca6506ec579503076 Reviewed-on: https://chromium-review.googlesource.com/688000 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
Geoff Lang af143fef 2017-10-05T13:59:43 Refactor the eglQueryContext entry point. BUG=angleproject:1635 Change-Id: Ia6ab5a2a7339d78912d7f871ed62941af1957eb1 Reviewed-on: https://chromium-review.googlesource.com/702856 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 10d4026b 2017-10-04T16:34:09 Fix compilation error on 32-bit systems a99ed554ca606 introduced explicit template instantiations that tunred out to be the same on 32-bit CPUs because GLenum and size_t are the same type. BUG=angleproject:2165 Change-Id: I85fafeff1996cb457f2b718e177944fc6aca50bf Reviewed-on: https://chromium-review.googlesource.com/699839 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
jchen10 baf5d945 2017-08-28T20:45:48 ES31: Add UNIFORM support for ProgramInterface Add program resource properties for uniform. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* Change-Id: Ia5cf6219db43b8b1f73efbb3565d21c86e9d3ec0 Reviewed-on: https://chromium-review.googlesource.com/638050 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 a99ed554 2017-09-22T08:10:32 Refactor data conversions for state commands This mainly enforces the rules as descripted in ES 3.10, section 2.2.1 and 2.2.2, by enhancing the "queryconversions" to support more rules, removing the scattered type convertors in "utilities" , "mathutil" and "queryutils", and forcing to only use the convertors in "queryconversions". BUG=angleproject:2165 Change-Id: I73c1dc850e2b3b8a479ece1d9c5eb7ae4ce851fe Reviewed-on: https://chromium-review.googlesource.com/680094 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jiajia Qin 729b2c6e 2017-08-14T09:36:11 ES31: Enable shader storage buffer support for OpenGL backend BUG=angleproject:1951 TEST=angle_end2end_tests:ShaderStorageBuffer Change-Id: I1afc3cd005ad2e595c6ce937fc53e17423f8ec8b Reviewed-on: https://chromium-review.googlesource.com/618132 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 d9cd7b7f 2017-08-30T15:04:25 ES31: Add glGetProgramInterfaceiv API Add API entry and validation checks(GLES 3.1 section 7.3). Add the first 4 interfaces(PROGRAM_INPUT, PROGRAM_OUTPUT, UNIFORM and UNIFORM_BLOCK) implementation. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTestES31.* Change-Id: Iab80ba332e2a5e2b3e677039359e60a420e3d6b0 Reviewed-on: https://chromium-review.googlesource.com/642729 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 70b5bb00 2017-08-28T13:32:37 Rename gl::FenceSync to gl::Sync. The spec refers to Sync objects, FenceSyncs being a subtype. The motivation for this fix is to clear up the FenceSync_ entry point for auto-generation. BUG=angleproject:1309 Change-Id: I94c440476d701628575e7a3eea68b6dd110f41c3 Reviewed-on: https://chromium-review.googlesource.com/636516 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
jchen10 880683b1 2017-04-12T16:21:55 ES31: Add glGetProgramResourceiv API Add API entry and validation checks(GLES 3.1 section 7.3). Add the first 2 interfaces(PROGRAM_INPUT and PROGRAM_OUTPUT) implementation. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTestES31.* Change-Id: I50057f7b99f4dc7c23ca87fa9b797ca424f66e3d Reviewed-on: https://chromium-review.googlesource.com/475075 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 40ac783b 2017-07-26T14:38:46 Implement remaining eglQuerySurface and eglSurfaceAttrib enums. BUG=angleproject:2075 Change-Id: I3b500fe80512e7a3e3a9ae9a9724015952c9cbc8 Reviewed-on: https://chromium-review.googlesource.com/587299 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 31ecbd70 2017-07-26T13:01:27 Refactor eglQuerySurface and eglSurfaceAttrib. BUG=angleproject:2075 Change-Id: I6911a2a1e665237e1d262c06f3ccf2d84cc09669 Reviewed-on: https://chromium-review.googlesource.com/586860 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
jchen10 191381fd 2017-04-11T13:59:04 ES31: Add glGetProgramResourceLocation API Add API entry and validation checks(GLES 3.1 section 7.3). Add the first 2 interfaces(PROGRAM_INPUT and PROGRAM_OUTPUT) implementation. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTestES31.* Change-Id: I5128cda43b0d9176c910b036cdc76bf37757670e Reviewed-on: https://chromium-review.googlesource.com/474212 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev e5285d29 2017-07-14T16:23:53 Handle ANGLE_multiview state queries The patch extends glGetIntegerv and glGetFramebufferAttachmentParameteriv logic to handle the new tokens from the ANGLE_multiview extension. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ide145279cd7b58cd03502458d7d3a1a0f5e9e86d Reviewed-on: https://chromium-review.googlesource.com/573780 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Shao dde78e8c 2017-05-22T14:13:27 ES31: Implement Vertex Attrib Binding on OpenGL This patch intends to implement Vertex Attrib Binding on OpenGL back-ends: 1. Add supports for updating vertex attributes by Vertex Attrib Binding APIs. 2. Refactor the process of updating vertex attribtues in class VertexArray to make it easier to implement this feature. BUG=angleproject:1593 TEST=dEQP-GLES31.functional.vertex_attribute_binding.* Change-Id: I800e61518c552b94b84c415895ad31668b0a84b2 Reviewed-on: https://chromium-review.googlesource.com/510251 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 eaef1e5e 2017-06-13T10:44:11 Link atomic counters to buffers Gather counters from each shader and group them according the layout qualifier 'binding' into each buffer. BUG=angleproject:1729 TEST=angle_end2end_tests:AtomicCounterBufferTest Change-Id: I8d0cd0d2bf65be37c035b0e1540481c8bee0bae4
Jamie Madill ffe00c03 2017-06-27T16:26:55 Add program cache transform feedback workaround. On Qualcomm devices, they don't seem to correctly save transform feedback info. Work around this by disabling caching on these devices. This mirrors a Chromium workaround. BUG=angleproject:2088 Change-Id: I6496d2fb6a03788379a6968bcd5eb3a9cb9d15d4 Reviewed-on: https://chromium-review.googlesource.com/549981 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 4928b7ca 2017-06-20T12:57:39 Proliferate gl::Context everywhere. This gives the D3D back-end access to the GL state almost anywhere. This uses the onDestroy hook for Textures to push errors up from destructors, although they still don't quite make it to the Context. There are places, such as in EGL object (Context/Surface) destruction, where we end up calling through to GL implementation internals without having access to a gl::Context. We handle this via a proxy Context to a Display, basically a null context, that has access to impl-side state like the Renderer pointer if necessary. It does not have access to the normal GL state. Also Pass gl::Context to RefCountObject::release(). Since we're using destroy() methods now, we should not ever call the destructor directly. BUG=angleproject:1156 Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259 Reviewed-on: https://chromium-review.googlesource.com/529707 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev dd5f27ee 2017-06-07T10:17:09 Make VertexBinding's member variables private The patch decorates all members in VertexBinding as private and limits access to them only through getters and setters. This makes it easier to debug and keep track of any assignments to the class members. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Iddd49063d060f136bc9cf11c313a5af0931d433c Reviewed-on: https://chromium-review.googlesource.com/530786 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill bd044ed8 2017-06-05T12:59:21 Defer shader compiles when possible. When using the program binary memory cache inside ANGLE, this will give a potential fast path. If the user doesn't query the shader compile status or info log before calling LinkProgram, then we can check the program cache before translating the program, and if it finds a hit, we don't even need to call the translator. To preserve the shader settings at compile time, a reference to the current shader translator is kept in a binding pointer on the call to compile. This mirrors a similar implementation in Chromium's command buffer. Also the compile options and source are cached at compile to preserve the correct shader state. BUG=angleproject:1897 Change-Id: I3c046d7ac8c3b5c8cc169c4802ffe47f95537212 Reviewed-on: https://chromium-review.googlesource.com/517379 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 876429b7 2017-04-20T15:46:24 Update gl2.h and update entry points. Some method signatures were updated. Types like GLclampf and GLvoid were replaced with other equivalents. BUG=angleproject:1309 Change-Id: I05e8e2072c5a063d87ad96a855b907424661e680 Reviewed-on: https://chromium-review.googlesource.com/475011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 82483b93 2017-04-11T15:33:00 Obey the bufSize and write to the length parameter in glGetSynciv. BUG=angleproject:1985 TEST=conformance2/state/gl-object-get-calls Change-Id: Ic83c408b60d394ff5719beaedc5d4721b7811a47 Reviewed-on: https://chromium-review.googlesource.com/474551 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 38f2cfb8 2017-04-11T15:23:08 Refactor validation of glGetSynciv. BUG=angleproject:1985 Change-Id: Idf1057e6d8d8c850643e3b2a22be5a881c8a2301 Reviewed-on: https://chromium-review.googlesource.com/474550 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
jchen10 fd7c3b52 2017-03-21T15:36:03 ES31: Add glGetProgramResourceName API Add API entry and validation checks(GLES 3.1 section 7.3). Add the first 2 interfaces(PROGRAM_INPUT and PROGRAM_OUTPUT) implementation. BUG=angleproject:1920 Change-Id: Ide7d5ad40a611a091c3dffab47fd31da57b69f1d Reviewed-on: https://chromium-review.googlesource.com/457523 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shao 80957d99 2017-02-20T21:25:59 ES31: Implement Vertex Attrib Binding entry points This patch intends to implement all entry points related to Vertex Attrib Binding. (1) Add entry points and validation code on following APIs: - VertexAttribFormat - VertexAttribIFormat - VertexAttribBinding - BindVertexBuffer - VertexBindingDivisor (2) Add queries on following parameters: - VERTEX_ATTRIB_BINDING - VERTEX_ATTRIB_RELATIVE_OFFSET - VERTEX_BINDING_DIVISOR - VERTEX_BINDING_OFFSET - VERTEX_BINDING_STRIDE - VERTEX_BINDING_BUFFER BUG=angleproject:1593 TEST=angle_end2end_tests TEST=angle_unittests TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_relative_offset_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_bindings_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_stride_* TEST=dEQP-GLES31.functional.state_query.vertex_attribute_binding.* TEST=dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.vertex_attrib_pointer TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_format TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_i_format Change-Id: I4b477a82df6aad89b89b088580a06d66963e6666 Reviewed-on: https://chromium-review.googlesource.com/446124 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Yunchao He 61afff14 2017-03-14T15:34:03 ES31: Add PROGRAM_SEPARABLE to ProgramParameter and GetProgram BUG=angleproject:1939 TEST=angle_end2end_tests Change-Id: I97ad11360f7c015947a2c0cc7d4a47f994726834 Reviewed-on: https://chromium-review.googlesource.com/454264 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
jchen10 15015f7f 2017-03-16T13:54:21 ES31: Add glGetProgramResourceIndex API Add API entry and validation checks(GLES 3.1 section 7.3). Add the first 2 interfaces(PROGRAM_INPUT and PROGRAM_OUTPUT) implementation. BUG=angleproject:1920 Change-Id: Ib2dedded9fd79b315e9f38de7c27a5e4ec4c6066 Reviewed-on: https://chromium-review.googlesource.com/453085 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill a02315b0 2017-02-23T14:14:47 WebGL Compat: Add DEPTH_STENCIL attachments. This is a special WebGL 1 binding point, that does not correspond to any native functionality. Due to particularities in validation we need to represent this with additional state in the Framebuffer. WebGL 2 fixes this oddity by resolving to the GLES 3 native spec. In order to pass the WebGL framebuffer objects test, we will also need a chromium-side CL to work with the additional state tracking it does in the blink layer, and an additional patch to ANGLE to clear the depth buffer before the first use (robust resource init). BUG=angleproject:1708 Change-Id: I111f8f5a451cce7de6cf281a6bc335b92dd2daf2 Reviewed-on: https://chromium-review.googlesource.com/444095 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4e0e6f8a 2017-02-17T11:06:03 WebGL Compat: Add DEPTH_STENCIL renderbuffers. This special internal format was defined in the WebGL 1 spec as a special unsized format with at least 16 bits of depth and at least 8 bits of stencil. Intenally ANGLE will translate this to packed 24/8 depth/stencil. The new test is adapted from the WebGL test: conformance/renderbuffers/framebuffer-object-attachment BUG=angleproject:1708 Change-Id: I44b03e41889eed02481f603b8d52c530dcfed5ce Reviewed-on: https://chromium-review.googlesource.com/442094 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiawei-Shao 2597fb64 2016-12-09T16:38:02 ES31: Refactor VertexArray for Vertex Attrib Binding OpenGL ES3.1 feature Vertex Attrib Binding requires vertex arrays should be split into two arrays: 1. an array of vertex buffer binding points, each of which specifies: - a bound buffer object, - a starting offset for vertex attribute data in that buffer object, - a stride used by all attributes using that binding point, - a frequency divisor used by all attributes using that binding point. 2. an array of generic vertex attribute format information records, each of which specifies: - a reference to one of the new buffer binding points above, - a component count and format, and a normalization flag for the attribute data, - the offset of the attribute data relative to the base offset of each vertex found at the associated binding point. Current ANGLE implementation simply uses a struct to represent a vertex attribute object, which does not meet the requirements above. This patch aims to be the the basis of the implementation of all ES3.1 Vertex Attrib Binding APIs by refactoring the struct VertexAttribute and the class VertexArray to fit the new data layout and ensuring all current functionality is retained. BUG=angleproject:1593 TEST=angle_unittests, angle_end2end_tests, gpu_unittests Change-Id: Ieb41f1bf503f815fd0476d2ea045dcb863465254 Reviewed-on: https://chromium-review.googlesource.com/418880 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
JiangYizhou f7bbc8a3 2016-11-16T09:57:22 ES3.1: Implement framebuffer parameters api for opengl part. Add new framebuffer parameters that can be set with glFramebufferParameteri and queried with glGetFramebufferParameteriv. GL_FRAMEBUFFER DEFAULT WIDTH GL_FRAMEBUFFER_DEFAULT_HEIGHT GL_FRAMEBUFFER_DEFAULT_SAMPLES GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS BUG=angleproject:1594 TEST=angle_unittests TEST=angle_end2end_tests TEST=dEQP-GLES31.functional.state_query.framebuffer_default.framebuffer_default* Change-Id: I425e73a6b798fc7c73841ab98d7c8aabc381133d Reviewed-on: https://chromium-review.googlesource.com/412126 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c5a2a172 2017-01-13T15:55:07 Add EGL_EXT_pixel_format_float support, enables float EGL surfaces. Add floating point EGL configs for the D3D11 backend. BUG=angleproject:1707 Change-Id: Ic84cd3a0d41e78cc39d0275d83e7695f55673ddf Reviewed-on: https://chromium-review.googlesource.com/428294 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 65603eb8 2017-01-12T16:48:03 Refactor EGL config entry points to to separate validation. BUG=angleproject:1707 BUG=angleproject:798 Change-Id: I34fefa9f9bbd42ef05f222c8caf856a22cf206a3 Reviewed-on: https://chromium-review.googlesource.com/428293 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
He Yunchao 11b038be 2016-11-22T21:24:04 ES31: Implement glGetTexLevelParameter{i|f}v entry point BUG=angleproject:1679 TEST=dEQP-GLES31.functional.state_query.texture_level.* Change-Id: I36cc7406199fc0c3c1585ad48f010d7dba5fe9e4 Reviewed-on: https://chromium-review.googlesource.com/414250 Commit-Queue: Yunchao He <yunchao.he@intel.com> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 9f09037b 2016-12-02T10:20:43 Change dEQP ES 3.1 expectations from FAIL to SKIP. UNIMPLEMENTED debug spam was causing the tests time time out. We can mark them as FAIL again once the dEQP test setup/tear down code doesn't emmit so many messages. Implement a couple validation cases for ES 3.1 to greatly reduce the spam. BUG=angleproject:1647 BUG=angleproject:1442 Change-Id: Ie7b4ac8737a2df1c0ada6ad53154ddf2f37d9c3c Reviewed-on: https://chromium-review.googlesource.com/415520 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3b573612 2016-10-31T14:08:10 Add enough ES 3.1 enums to support initializing the dEQP ES 3.1 tests. BUG=angleproject:1442 Change-Id: Iece3efb272fdcbe004d4136129ba7bfe74ba5265 Reviewed-on: https://chromium-review.googlesource.com/405530 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 81c6b577 2016-10-19T14:07:52 Implement GL_EXT_texture_sRGB_decode for GL. BUG=angleproject:1383 BUG=655247 Change-Id: I409b12e1ae418530576de5ec9ce26b7be5d91650 Reviewed-on: https://chromium-review.googlesource.com/400807 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 496c02df 2016-10-20T11:38:11 Implement robust the GetBufferPointerv entry point. BUG=angleproject:1354 Change-Id: Id7dd8438224adb1e2729bcdc18a306e5dfc83a3b Reviewed-on: https://chromium-review.googlesource.com/401399 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 0a9661f2 2016-10-20T10:59:20 Implement robust the GetInternalFormativ entry point. BUG=angleproject:1354 Change-Id: Ib25fe4905fdd6c532c67de1d4ca1ba37932f8e0b Reviewed-on: https://chromium-review.googlesource.com/401149 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang ebebe1c7 2016-10-14T12:01:31 Implement robust GetBufferParameter entry points. BUG=angleproject:1354 Change-Id: I979c8768975380dba7f0b256b2729b2147ff7984 Reviewed-on: https://chromium-review.googlesource.com/399042 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 6899b87f 2016-10-14T11:30:13 Implement the robust GetActiveUniformBlockiv entry point. BUG=angleproject:1354 Change-Id: I2e8051910f50dc040f6be4922142364d36788c4e Reviewed-on: https://chromium-review.googlesource.com/399041 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 0b031061 2016-10-13T14:30:04 Implement robust GetVertexAttrib entry points. BUG=angleproject:1354 Change-Id: Ic71392555ae4212c4144bc67d7c5e53874af4d53 Reviewed-on: https://chromium-review.googlesource.com/398198 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c1984ed4 2016-10-07T12:41:00 Implement robust TexParameter and SamplerParameter entry points. BUG=angleproject:1354 Change-Id: I3aa2dcb8603a839f9c07cd9dd41cb695d2e699f2 Reviewed-on: https://chromium-review.googlesource.com/395529 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang d7d0ed32 2016-10-07T11:33:51 Implement robust GetShaderiv entry points. BUG=angleproject:1354 Change-Id: I994b7a596b5b67fadbd91ad0d64054c792523200 Reviewed-on: https://chromium-review.googlesource.com/395111 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 740d9020 2016-10-07T11:20:52 Implement robust GetRenderbufferParameteriv entry points. BUG=angleproject:1354 Change-Id: I073b75d416bd5184402b580bcebfca34f7cd28a8 Reviewed-on: https://chromium-review.googlesource.com/395110 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang ff5b2d51 2016-09-07T11:32:23 Add a GL_ANGLE_robust_client_memory extension. This allows specifying data size to all GL functions that provide a pointer to client memory and a length parameter for all functions in which the driver writes to client memory. BUG=angleproject:1354 Change-Id: Ia68be1576b957cb529c87b5e0d1bd638c7dbd371 Reviewed-on: https://chromium-review.googlesource.com/382012 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>