src/libANGLE/renderer/gl/ProgramGL.h


Log

Author Commit Date CI Message
Courtney Goeltzenleuchter c5b5cf6c 2020-09-10T16:58:18 Refactor to pass ProgramMergedVaryings to link impl Follow-on CL needs the ProgramMergedVaryings in the Vulkan backend to generate valid SPIRV. Bug: angleproject:3078 Change-Id: Ic442a3e0bd713fec36bd6b9420f67f3b1118e5ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404336 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Geoff Lang 07467b4a 2020-03-20T10:40:56 Remove GL_CHROMIUM_path_rendering Bug: chromium:1063193 Bug: angleproject:4270 Change-Id: I35b24b7d8d892181955e49dd2495655bc57cb0df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112275 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis beb0eb2d 2019-06-14T15:10:33 Clean up workarounds/features to single location. Rename all workarounds structs to features, and move the lists to a shared location in include/platform (to help with documentation, see: https://cs.chromium.org/chromium/src/ui/gl/gl_switches.cc?sq=package:chromium&g=0&l=69) Bug: angleproject:1621 Change-Id: I4069f08131db5e886047a007efb5d7764dfee5f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660952 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 7d53c60b 2019-02-15T21:06:42 ParallelCompile: use the native extensions This enhances to use the native parallel compile extensions if available. Bug: 873724 Change-Id: I0aaed314accd75e1bfa596b322225b56d729d3a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1475234 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e332e621 2019-02-14T12:53:04 D3D: Asynchronously load program binaries. Unpack as much of the binary steam as possible before passing the final loading of the shader programs off to a worker thread. Reporting as many possible link errors before becoming asynchronous means that linking should only fail due to unexpected system issues at that point. This also allows other backends to asynchronously load program binaries. BUG=angleproject:2857 Change-Id: I587917a3e54522114dabd41d1b14fc491c8fd18a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1473451 Commit-Queue: Jamie Madill <jmadill@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
jchen10 a100d8f4 2018-12-29T16:39:55 ParallelCompile: add GL backend support For GL backend, at first each worker thread must have a naitve context for its own to work in. These worker contexts have to be shared from the main context, so that all shader and program objects are seen in any context. This extends backend displays to create and destroy the worker contexts. RendererGL manages and allocates them to the worker threads. ShaderImpl has a new compile method added to do the actual glCompile work in worker thread. The ProgramGL's link method is broken down by introducing the LinkEventGL class. Bug: chromium:849576 Change-Id: Idc2c51b4b6c978781ae77810e62c480acc67ebb5 Reviewed-on: https://chromium-review.googlesource.com/c/1373015 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 956ab4d9 2018-10-10T16:13:03 Optimize several functions for the Program perf test. This gives the same or slightly better performance in the ProgramDraw perf test. Also only set the Program object as dirty when there are dirty bits set in the Program itself. Bug: angleproject:2877 Change-Id: I07b428b40d3e3c24e0a42c970524756b6dc3a30e Reviewed-on: https://chromium-review.googlesource.com/c/1271475 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6f755b21 2018-10-09T12:48:54 Use angle::Result in front-end. (Part 1) This covers most of the hot paths used in draw calls. Gives in the order of a 5% reduction in draw call overhead. Bug: angleproject:2491 Change-Id: I2d53afb1163eaceed61fb9cd9ce6c1267c85c0fa Reviewed-on: https://chromium-review.googlesource.com/c/1258149 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 785e8a0b 2018-10-04T17:42:00 Remove gl::LinkResult. Instead of returning a small struct from LinkProgram calls we use angle::Result. Linking can have 3 cases: - the link was successful -> angle::Result::Continue - the link failed -> angle::Result::Incomplete - there was an internal error -> angle::Result::Stop Note that any unexpected Incomplete is still an error. Each function that accepts Incomplete must check explicitly. This is the last user of ErrorOrResult. Bug: angleproject:2491 Change-Id: Idba23be27efe4b561720a4bdd8fe486b40779497 Reviewed-on: https://chromium-review.googlesource.com/c/1255645 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com>
Qin Jiajia 47f6dd0d 2018-08-10T13:36:32 Implement robust initialization for image texture This change fixes a bug that the image texture initialization time is not correct. It happens when we use compute shader to write data to an uninitialized texture, then use readPixels to read the result which results that texture initialization falls behind image store and covers the real result. Bug: angleproject:2766 Change-Id: I4e986972096857afc975c40dfa4d559a2f31194c Reviewed-on: https://chromium-review.googlesource.com/1170569 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 70aeda49 2018-08-20T12:17:40 Add gl::Program::syncState and dirty bits. Currently this handles uniform block bindings. Cleans up some logic in D3D. Bug: angleproject:2747 Change-Id: I8c2989738d50a77d6f6d90a9ff11dceab6d3129c Reviewed-on: https://chromium-review.googlesource.com/1172085 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: 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>
Jiajia Qin 94f1e89f 2017-11-20T12:14:32 ES31: Add atomic counter buffer data size BUG=angleproject:1729 TEST=dEQP-GLES31.functional.ssbo.layout.* dEQP-GLES31.functional.compute.basic.atomic_counter* Change-Id: Ic78c0f089fd539c0b1064e8405d63505456dbc01 Reviewed-on: https://chromium-review.googlesource.com/777958 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 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>
Jamie Madill 6db1c2e8 2017-11-08T09:17:40 Link interface blocks in ProgramImpl::link. This allows the back-end to have access to the interface block info in the link operation, and also allows the interface block info to have direct access to the post-link Impl information. BUG=angleproject:2208 Change-Id: Ib2bfb3c9155eee715bd3d29de1c3fdd67b16eed4 Reviewed-on: https://chromium-review.googlesource.com/753521 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c9727f31 2017-11-07T12:37:07 Pass InterfaceBlockLinker to ProgramImpl::link. This change is in preparation for moving the linking logic to the Implementation. Introduces a ProgramLinkedResources class that is passed into the Impl and holds linking-related info such as the UBOs, Varyings, etc. BUG=angleproject:2208 Change-Id: I2ef0824b54bfb462c79d003bffe34e9cfad60d8a Reviewed-on: https://chromium-review.googlesource.com/746204 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fb997ec1 2017-09-20T15:44:27 Removed "name" and "used" from variable location. The used flag was redundant with the index (which used MAXUINT). The name was redundant with the stored uniform. Removing these gives a very minor performance speed up when iterating and retrieving uniform locations. BUG=angleproject:1390 Change-Id: Ieeccdff7c131e1359e754e246d3648b73aad5baf Reviewed-on: https://chromium-review.googlesource.com/659224 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Jamie Madill 54164b0c 2017-08-28T15:17:37 Add getUniform impl methods. This will let us remove some of the uniform data management code in the GL front-end, and simplify the GL back-end. It will also enable us to implement uniform data more efficiently in the D3D11 back-end, and probably Vulkan back-end later. This also implements a new impl method for the ProgramGL class to flag optimized-out uniforms as no longer used, post-link. This is important because otherwise the optimized uniforms get assigned valid locations, and then the getUniform calls are expected to succeed. We also use a workaround for uniform value queries for the GL back-end. It seems as though some drivers (seen on NVIDIA and AMD) may not properly clamp to the maximum representable integer value when querying out-of-range floating point values. Work around this by always calling the driver with the proper type and then casting the value in ANGLE. BUG=angleproject:1390 Change-Id: I03dc2382e7af52455c356a2bf3971a4d1bd46ec6 Reviewed-on: https://chromium-review.googlesource.com/616785 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 4e619f58 2017-08-09T11:50:06 Add branch for viewport or layer selection in VS The patch extends the behavior of SH_SELECT_VIEW_IN_NV_GLSL_VERTEX_SHADER so that either the viewport or layer is selected based on the value of the internal uniform variable MultiviewRenderPath. BUG=angleproject:2062 TEST=angle_end2end_tests TEST=angle_unittests Change-Id: Ia311b12b1fed642dac78eba8732e2535242f34fd Reviewed-on: https://chromium-review.googlesource.com/615260 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 27a60631 2017-06-30T15:12:01 Re-apply UBO binding workaround on program save. The workaround which was previously defined to only apply on load also seems to affect save on some AMD drivers. BUG=angleproject:1637 BUG=angleproject:1897 Change-Id: Ia01a1420a484f3c2682ce97eaab18baccfb66a50 Reviewed-on: https://chromium-review.googlesource.com/558008 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9cf9e871 2017-06-05T12:59:25 Move LinkResult to the gl:: namespace. This is a derived type from gl::Error so makes sense to be there. Also makes it more accessible than in ProgramImpl.h BUG=angleproject:1897 Change-Id: Id41b13e5a072745d8c361057f5bef8f152e0452b Reviewed-on: https://chromium-review.googlesource.com/522872 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 83418fb1 2017-06-05T12:59:24 Don't allow for error in ProgramImpl::save. Refactoring cleanup patch only. BUG=angleproject:1897 Change-Id: I6d12de5dab16ead9684886a1cf15b570e3c98156 Reviewed-on: https://chromium-review.googlesource.com/522871 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c564c070 2017-06-01T12:45:42 Pass gl::Context to impl methods instead of ContextImpl. In some cases we might have to call back into the GL layer, passing the Context, and if we just have a ContextImpl pointer this isn't possible. It also removes the need for SafeGetImpl. BUG=angleproject:2044 Change-Id: I6363e84b25648c992c25779d4c43f795aa2866d6 Reviewed-on: https://chromium-review.googlesource.com/516835 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Jamie Madill 8ecf7f9b 2017-01-13T17:29:52 Vulkan: Implement shader compilation. This hooks up the Vulkan GLSL, decorated with locations, to glslang, and then pipes the SPIRV back to the Program implementation for later use when making pipelines to run draw calls. The program compilation tests work now, but don't really test anything other than not generating Vulkan validation layer errors during compilation and shader object generation. BUG=angleproject:1576 Change-Id: I625e42219f4b4d1433dd3109b94e1a2f666ba4bd Reviewed-on: https://chromium-review.googlesource.com/408519 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e7d8432d 2017-01-10T18:21:59 Move ProgramGL's sampler bindings to gl::Program. This saves code duplication and makes the sampler validation a bit simpler. In the future we might be able to use it to replace the custom D3D logic for caching sampler info, but this relies on some shader-specific non-merged data. This also introduces some code duplication in Uniform1iv. BUG=angleproject:1685 Change-Id: I258607a21886ca20766607bddf958cd511fac3f1 Reviewed-on: https://chromium-review.googlesource.com/426781 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 192745a7 2016-12-22T15:58:21 Add varying packing validation for WebGL. This CL moves the varying packing from the D3D layer up to Program. This is necessary for WebGL validation, and gives us consistency for the various back-ends. There may be some additional cleanup work on the VaryingPacking class, because it does some work that is D3D- specific. WebGL requires strict varying packing. Instead of allowing success unconditionally, it's an explicit error to succeed to pack a set of varyings that the sample algorithm would fail to pack. Introduce a new packing mode option to the varying packing class to handle this different packing style, while keeping our old more relaxed packing method for ES code. BUG=angleproject:1675 Change-Id: I674ae685ba573cc2ad7d9dfb7441efa8cb2d55fc Reviewed-on: https://chromium-review.googlesource.com/423254 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill a7d12dc7 2016-12-13T15:08:19 Store uniform block bindings in program binaries. This affects all back-ends - we weren't saving this. Note that bindings can only be set after program linking. The spec is fairly clear in that any programs saved must be loadable and runnable under the same set of state, which would include block bindings. Also add validation for zero binary formats in GetProgramBinary. Also add a workaround for AMD where the block bindings were not applied properly after link, similarly to our original bug. This CL also includes a few fixups for GLProgram (raii). BUG=angleproject:1637 Change-Id: Iae068eb4e1e4c763aa9f9332c033e38708026c8f Reviewed-on: https://chromium-review.googlesource.com/418393 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Sami Väisänen 46eaa946 2016-06-29T10:26:37 Support CHROMIUM_path_rendering fragment operations This brings two new APIs, BindFragmentInputLocation and ProgramPathFragmentInputGen that together dictate how the fragment shader varyings are used. BUG=angleproject:1382 Change-Id: I4b52fd8a3555235a73aecd4f3dba2d500789cbb0 Reviewed-on: https://chromium-review.googlesource.com/357071 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Sami Väisänen <svaisanen@nvidia.com> Commit-Queue: Sami Väisänen <svaisanen@nvidia.com>
Jamie Madill 48ef11b2 2016-04-27T15:21:52 Rename gl::Framebuffer::Data to gl::FramebufferState. Moving this out of the Framebuffer class allows us to forward- declare it. BUG=angleproject:1363 Change-Id: I91971c37a92151df508cdf7f0eb8c3e93506d112 Reviewed-on: https://chromium-review.googlesource.com/340741 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9082b982 2016-04-27T15:21:51 Rename gl::Data to gl::ContextState. Part of the new world order of renaming the Obj::Data classes to ObjState. BUG=angleproject:1363 Change-Id: I15cf002b8b093d687f540b9e86f045874af24a7e Reviewed-on: https://chromium-review.googlesource.com/340740 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 65a0be92 2015-10-02T09:57:30 Implement program binary in ProgramGL. BUG=angleproject:882 Change-Id: I8d57c185066e9fc0c1b8def09bc48d80ad97d328 Reviewed-on: https://chromium-review.googlesource.com/303901 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Philippe Hamel 4091119b 2016-04-07T16:45:50 Add workaround to always call useProgram after a successful link. This workaround is meant to reproduce the behavior of the use_current_program_after_successful_link workaround in Chromium (http://crbug.com/110263) The workaround was shown to be unnecessary for MacOSX 10.9 and higher (http://crrev.com/39eb535b). BUG=349137 Change-Id: I3023f053aa1593ba7044a889dd47746b8f7e0581 Reviewed-on: https://chromium-review.googlesource.com/337780 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c5629759 2015-12-07T16:29:04 Implement full program binary support for ES3. Refactor validation to be used in both the OES and ES3 entry points. BUG=angleproject:600 BUG=angleproject:1101 Change-Id: I2008c4ea04ce07910f03ae0b997f8a77b66203d8 Reviewed-on: https://chromium-review.googlesource.com/316620 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4a3c2341 2015-10-08T12:58:45 Program: Clean up UBO info gathering. The data size & block member info was getting messy, so clean up how we query this from the Impl layer. Also remove the register information from gl::UniformBlock, moving it into the D3D-only world. BUG=angleproject:1172 Change-Id: I40af658ebbd6b7c1a4251906a387ebcbb621cf77 Reviewed-on: https://chromium-review.googlesource.com/304150 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 01306fc7 2015-10-05T16:53:10 Revert "Implement program binary in ProgramGL." Causing issues on AMD and Intel bots. This reverts commit 6d8926691a8ed59add7602af602af3e6f7a81ab6. Change-Id: Ifb395f78a6a44b874ac13da1f252f604a1a7b0bc Reviewed-on: https://chromium-review.googlesource.com/303439 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6d892669 2015-10-02T09:57:30 Implement program binary in ProgramGL. Verified by end2end tests and manually checking that chrome can load and save program binaries. BUG=angleproject:882 Change-Id: Ic7e4b443365af6ea2d9ce5b0ecfb685eac85f479 Reviewed-on: https://chromium-review.googlesource.com/303828 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c46cc2f3 2015-10-01T17:16:20 Remove ProgramImpl::getBinaryFormat. Because we only expose GL_ANGLE_program_binary, we're only allowed to use the GL_PROGRAM_BINARY_ANGLE binary type. This should be enforced at the GL level. If implementations wish to use multiple types of formats internally, they are able to by writing those enums to their binaries. BUG=angleproject:882 BUG=angleproject:1123 Change-Id: I43685958814e4333b7cef3952d92c1017dc885f8 Reviewed-on: https://chromium-review.googlesource.com/303827 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2b280922 2015-10-01T17:05:15 Remove the unused ProgramImpl::getShaderVersion method. BUG=angleproject:882 BUG=angleproject:1123 Change-Id: Iace1d6c2c594f0b00c18d595f14cef9bce6f3595 Reviewed-on: https://chromium-review.googlesource.com/303826 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5d124a69 2015-09-15T13:03:27 Support UBOs in RendererGL and ProgramGL. Reland: fix compile warnings on Windows. BUG=angleproject:882 BUG=angleproject:883 Change-Id: If4844d50d43ff9b765f64606e8f08d65a1afd9a4 Reviewed-on: https://chromium-review.googlesource.com/303431 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cf2dbd91 2015-10-01T15:48:22 Revert "Support UBOs in RendererGL and ProgramGL." Compile error. This reverts commit 97d82b724b71be464f2aff377f056cade44fca94. Change-Id: I71ae10cb01b8ded0297eaf4742fb1098ce02a9bb Reviewed-on: https://chromium-review.googlesource.com/303303 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 97d82b72 2015-09-15T13:03:27 Support UBOs in RendererGL and ProgramGL. BUG=angleproject:882 BUG=angleproject:883 Change-Id: I36f8ef42d87e289658a6ba4899380bc72b9bcebf Reviewed-on: https://chromium-review.googlesource.com/299871 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3d3d2f20 2015-09-23T16:47:51 Re-re-land "Move sampler validation to the GL layer." This previously was D3D-only, but is required for every draw call. This completes the work of removing the D3D-specific Impl methods from ProgramImpl. Also add several regression tests to cover texture and sampler validation. Re-land with a fix for duplicate sampler active uniforms. Re-re-land with a fix for a test comparison warning on Linux. BUG=angleproject:1123 Change-Id: Iaf7b33861c07b9ceed4bd53ac2f010d35f05df45 Reviewed-on: https://chromium-review.googlesource.com/301712 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6d246510 2015-09-23T18:04:10 Revert "Re-land "Move sampler validation to the GL layer."" Build failure on Linux: In file included from ../../third_party/angle/src/tests/gl_tests/UniformTest.cpp:7: In file included from ../../third_party/angle/src/tests/test_utils/ANGLETest.h:10: ../../testing/gtest/include/gtest/gtest.h:1392:16: error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare] if (expected == actual) { ~~~~~~~~ ^ ~~~~~~ ../../testing/gtest/include/gtest/gtest.h:1422:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned int>' requested here return CmpHelperEQ(expected_expression, actual_expression, expected, ^ ../../third_party/angle/src/tests/gl_tests/UniformTest.cpp:487:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here EXPECT_EQ(GL_SAMPLER_2D, type); ^ BUG=angleproject:1123 This reverts commit 6cbf4385280c4c1dd97f0882ecb18dbc4c341fd4. Change-Id: I95279b37d253e3ea78faa53f3773f2dc3d17df95 Reviewed-on: https://chromium-review.googlesource.com/302030 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6cbf4385 2015-09-22T19:12:11 Re-land "Move sampler validation to the GL layer." This previously was D3D-only, but is required for every draw call. This completes the work of removing the D3D-specific Impl methods from ProgramImpl. Also add several regression tests to cover texture and sampler validation. Re-land with a fix for duplicate sampler active uniforms. BUG=angleproject:1123 Change-Id: Iefef06e7901873c98bf2ba7864efd16a4c6435d3 Reviewed-on: https://chromium-review.googlesource.com/301581 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3aa23a7c 2015-09-22T19:03:33 Revert "Move sampler validation to the GL layer." Probably causing failures in the dEQP-GLES2 GL back-end tests: dEQP-GLES2.functional.uniform_api.info_query.basic.sampler2D_both BUG=angleproject:1123 This reverts commit 6fa156b66da2090c98f1a044a948694c7ac83324. Change-Id: I3cc993c34aae4a108037ce81709b71d16ece814e Reviewed-on: https://chromium-review.googlesource.com/301580 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6fa156b6 2015-09-22T10:17:01 Move sampler validation to the GL layer. This previously was D3D-only, but is required for every draw call. This completes the work of removing the D3D-specific Impl methods from ProgramImpl. Also add several regression tests to cover texture and sampler validation. BUG=angleproject:1123 Change-Id: I167cbc8f47b4a397d2ae6cc507bdac35168bcacd Reviewed-on: https://chromium-review.googlesource.com/299400 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 62d31cb6 2015-09-11T13:25:51 Re^6-land "Move Uniform and UBO info to the gl::Program layer." This data was previously stored entirely in the Impl level. Move as much as possible to the GL level, using a read-only view in the Impl level. Some information in D3D-specific, and should be stored separately in the Impl. This patch has a lot of refactoring that splits the D3D and GL info, and moves as much validation as possible to the GL layer, where it is shared between the back-ends. Re-land with fix for dEQP unused uniforms. The fix involves storing a local copy of all uniform data in the GL layer. This will also let us validate sampler indexes during draw calls at the GL layer. Re-re-land with a fix for multiply defined symbols on Clang. Re-re-re-land with a fix for boolean uniforms and Uniform{1234}f. Re^4-land with a fix for boolean uniform arrays and UBO uniforms. Re^5-land with a fix for a test warning on Linux. Re^6-land with a fix for transposed matrix uniform arrays. BUG=angleproject:1123 TEST=end2end_tests, bots, dEQP GLES3.ubo and GLES2.uniform_api Change-Id: Ie6fcde1c16eb05d67191b629338b88302a2563f5 Reviewed-on: https://chromium-review.googlesource.com/298971 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill fb53603c 2015-09-11T13:19:49 Revert "Re^5-land "Move Uniform and UBO info to the gl::Program layer."" Failing dEQP-GLES3.functional.uniform_api.random.22 and 23: There's a bug with arrays of tranpsosed matrix uniforms. BUG=angleproject:1123 This reverts commit 78d356929bd0441d81e2dd8a63130cd6788e2fde. Change-Id: If39b5908af39671dfe98965e6a1ba77fd18ea8fc Reviewed-on: https://chromium-review.googlesource.com/299320 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 78d35692 2015-09-11T08:32:51 Re^5-land "Move Uniform and UBO info to the gl::Program layer." This data was previously stored entirely in the Impl level. Move as much as possible to the GL level, using a read-only view in the Impl level. Some information in D3D-specific, and should be stored separately in the Impl. This patch has a lot of refactoring that splits the D3D and GL info, and moves as much validation as possible to the GL layer, where it is shared between the back-ends. Re-land with fix for dEQP unused uniforms. The fix involves storing a local copy of all uniform data in the GL layer. This will also let us validate sampler indexes during draw calls at the GL layer. Re-re-land with a fix for multiply defined symbols on Clang. Re-re-re-land with a fix for boolean uniforms and Uniform{1234}f. Re^4-land with a fix for boolean uniform arrays and UBO uniforms. Re^5-land with a fix for a test warning on Linux. BUG=angleproject:1123 TEST=end2end_tests, bots, dEQP GLES3.ubo and GLES2.uniform_api Change-Id: I03afcd446d9e74573c4d4c712ed7407b91d8001c Reviewed-on: https://chromium-review.googlesource.com/299180 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill a2eb02c9 2015-09-11T12:31:41 Revert "Re^4-land "Move Uniform and UBO info to the gl::Program layer."" Test has a warning on Linux: In file included from ../../third_party/angle/src/tests/test_utils/ANGLETest.h:13: ../../testing/gtest/include/gtest/gtest.h:1392:16: error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare] if (expected == actual) { ~~~~~~~~ ^ ~~~~~~ ../../testing/gtest/include/gtest/gtest.h:1422:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned int>' requested here return CmpHelperEQ(expected_expression, actual_expression, expected, ^ ../../third_party/angle/src/tests/gl_tests/UniformBufferTest.cpp:357:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here EXPECT_EQ(GL_FLOAT, type); ^ BUG=angleproject:1123 This reverts commit 2ae1ee6161c24aab065190b1528f6195e80e34d0. Change-Id: Ic3dabea54068377d1f2c5f722ba52966cf1a0491 Reviewed-on: https://chromium-review.googlesource.com/299170 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2ae1ee61 2015-09-10T10:04:24 Re^4-land "Move Uniform and UBO info to the gl::Program layer." This data was previously stored entirely in the Impl level. Move as much as possible to the GL level, using a read-only view in the Impl level. Some information in D3D-specific, and should be stored separately in the Impl. This patch has a lot of refactoring that splits the D3D and GL info, and moves as much validation as possible to the GL layer, where it is shared between the back-ends. Re-land with fix for dEQP unused uniforms. The fix involves storing a local copy of all uniform data in the GL layer. This will also let us validate sampler indexes during draw calls at the GL layer. Re-re-land with a fix for multiply defined symbols on Clang. Re-re-re-land with a fix for boolean uniforms and Uniform{1234}f. Re^4-land with a fix for boolean uniform arrays and UBO uniforms. BUG=angleproject:1123 TEST=end2end_tests, bots, dEQP GLES3.ubo and GLES2.uniform_api Change-Id: I4c9f5ed31b81380507bef7981f97086d642801ae Reviewed-on: https://chromium-review.googlesource.com/298451 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 61b8dd97 2015-09-09T19:04:04 Revert "Re-re-re-land "Move Uniform and UBO info to the gl::Program layer."" Seems to be failing the dEQP-GLES2.functional.uniform_api tests relating to boolean arrays. BUG=angleproject:1123 This reverts commit 892a6a4b17b35e89898be8b4605c1ee595d3ae13. Change-Id: Ifc4ce3ca806ef88a02ac6f693334ac37ce098a88 Reviewed-on: https://chromium-review.googlesource.com/298520 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 892a6a4b 2015-09-09T10:17:15 Re-re-re-land "Move Uniform and UBO info to the gl::Program layer." This data was previously stored entirely in the Impl level. Move as much as possible to the GL level, using a read-only view in the Impl level. Some information in D3D-specific, and should be stored separately in the Impl. This patch has a lot of refactoring that splits the D3D and GL info, and moves as much validation as possible to the GL layer, where it is shared between the back-ends. Re-land with fix for dEQP unused uniforms. The fix involves storing a local copy of all uniform data in the GL layer. This will also let us validate sampler indexes during draw calls at the GL layer. Re-re-land with a fix for multiply defined symbols on Clang. Re-re-re-land with a fix for boolean uniforms and Uniform{1234}f. BUG=angleproject:1123 TEST=end2end_tests,Canary WebGL (D3D11/GL), dEQP-GLES2+3.functional.uniform_api Change-Id: Ia40820a5ce2f34ec2d27648b1dc940a8955e9999 Reviewed-on: https://chromium-review.googlesource.com/298440 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b654f659 2015-09-08T20:40:00 Revert "Re-re-land "Move Uniform and UBO info to the gl::Program layer."" Failes the gles2_conform_test: GLES2ConformTest.GL2Tests_glGetUniform_input_run Possibly also WebGL failures, will investigate. BUG=angleproject:1123 This reverts commit 10750cb936288d8dd09d49fadd592904c06c56f9. Change-Id: I1ae59325e1831589019bc5a27ffc2091d3994a65 Reviewed-on: https://chromium-review.googlesource.com/298200 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 10750cb9 2015-09-04T14:23:52 Re-re-land "Move Uniform and UBO info to the gl::Program layer." This data was previously stored entirely in the Impl level. Move as much as possible to the GL level, using a read-only view in the Impl level. Some information in D3D-specific, and should be stored separately in the Impl. This patch has a lot of refactoring that splits the D3D and GL info, and moves as much validation as possible to the GL layer, where it is shared between the back-ends. Re-land with fix for dEQP unused uniforms. The fix involves storing a local copy of all uniform data in the GL layer. This will also let us validate sampler indexes during draw calls at the GL layer. Re-re-land with a fix for multiply defined symbols on Clang. BUG=angleproject:1123 TEST=end2end_tests,Canary WebGL (D3D11/GL), dEQP-GLES2+3.functional.uniform_api Change-Id: I7b55e4964fbe64e0106c37928c894146937a2476 Reviewed-on: https://chromium-review.googlesource.com/298110 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2119dd05 2015-09-08T19:30:37 Revert "Re-land "Move Uniform and UBO info to the gl::Program layer."" Problems with multiply defined symbols in the Linux builder. BUG=angleproject:1123 This reverts commit ff1abe63c3d8af28e9755c8d0c95b2aeca27a0d9. Change-Id: Ifcb2ad885d0841c128ffd69afb6594e37eba17fc Reviewed-on: https://chromium-review.googlesource.com/298100 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ff1abe63 2015-09-04T14:23:52 Re-land "Move Uniform and UBO info to the gl::Program layer." This data was previously stored entirely in the Impl level. Move as much as possible to the GL level, using a read-only view in the Impl level. Some information in D3D-specific, and should be stored separately in the Impl. This patch has a lot of refactoring that splits the D3D and GL info, and moves as much validation as possible to the GL layer, where it is shared between the back-ends. Re-land with fix for dEQP unused uniforms. The fix involves storing a local copy of all uniform data in the GL layer. This will also let us validate sampler indexes during draw calls at the GL layer. BUG=angleproject:1123 TEST=end2end_tests,Canary WebGL (D3D11/GL), dEQP-GLES2+3.functional.uniform_api Change-Id: I9074c057c2c67d4d3221ec11c5556a26e07c7ceb Reviewed-on: https://chromium-review.googlesource.com/297070 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 48705cad 2015-09-02T20:40:51 Revert "Move Uniform and UBO info to the gl::Program layer." Seems to be failing dEQP-GLES2.functional.uniform_api.value.unused_uniforms.* on Linux (possibly Win as well) BUG=angleproject:1123 This reverts commit 54f882c9167b1aff5b3700187a2048bd886e8b17. Change-Id: I7dbbf40aae8dd9ebd35895df0dd338a3b6b9cc96 Reviewed-on: https://chromium-review.googlesource.com/297051 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 54f882c9 2015-09-02T14:33:48 Move Uniform and UBO info to the gl::Program layer. This data was previously stored entirely in the Impl level. Move as much as possible to the GL level, using a read-only view in the Impl level. Some information in D3D-specific, and should be stored separately in the Impl. This patch has a lot of refactoring that splits the D3D and GL info, and moves as much validation as possible to the GL layer, where it is shared between the back-ends. BUG=angleproject:1123 TEST=end2end_tests,Canary WebGL (D3D11/GL), dEQP-GLES2+3.functional.uniform_api Change-Id: I8b7e1380a61590a46ccee646a47ffe9bda287f6b Reviewed-on: https://chromium-review.googlesource.com/295124 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f5f4ad24 2015-09-02T18:32:38 Revert "Revert "Clean up interface to ProgramImpl::link."" Should be fixed now with the fix the prior CL. BUG=angleproject:1123 This reverts commit 63069dfc20bc34fe6962dee694953893ee6fc663. Change-Id: Ie1826673820e3a24f9bb3e4ff5c723ac47570041 Reviewed-on: https://chromium-review.googlesource.com/297050 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 63069dfc 2015-09-01T17:26:41 Revert "Clean up interface to ProgramImpl::link." Probably causing bot failures in a prior dependent patch. BUG=angleproject:1123 This reverts commit b83592750d00ca96413575016b0e27bc9d861f58. Change-Id: I7642c4a66b190dda49cbb16611abc893f3eb6422 Reviewed-on: https://chromium-review.googlesource.com/296700 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b8359275 2015-08-26T15:57:14 Clean up interface to ProgramImpl::link. We no longer need to pass mutable shaders with the changed to packed varyings. BUG=angleproject:1123 Change-Id: I0a4bbf5d770ff48e10e3de2146840d8987b1e826 Reviewed-on: https://chromium-review.googlesource.com/295194 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 80a6fc03 2015-08-21T16:53:16 Make output variables part of Program's shared data. Also initialize this structure within Program instead of DynamicHLSL. This should have benefits for other back-ends. Also these variables weren't being serialized and de-serialized with the program binary, which could mess up WebGL apps that use MRT. BUG=angleproject:1123 Change-Id: Ic0dd4840f26441a1bee8527dfa178b24daf82f8a Reviewed-on: https://chromium-review.googlesource.com/294571 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 63805b47 2015-08-25T13:17:39 Make the Program's semantic index D3D-only. This concept isn't strictly necessary for GL-side validation. Instead we can use a bitset to track active attribs, and determine is a particular location is active. BUG=angleproject:1123 Change-Id: If7a920a3071672116bafffb3368671f721723b65 Reviewed-on: https://chromium-review.googlesource.com/294570 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 1528e56b 2015-08-24T15:10:58 Bind native GL attributes to match the locations in gl::Program. Simplifies a lot of logic when we don't have to maintain mappings between the driver and gl-layer locations. BUG=angleproject:882 BUG=angleproject:1123 Change-Id: Ia94257a322f768fdfa3167000a46a0715820ef4d Reviewed-on: https://chromium-review.googlesource.com/295231 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill c349ec03 2015-08-21T16:53:12 Re-land "Move shader attributes into Program shared data." Re-land with a fix for a warning in 32-bit Windows. Making the Program own the attribs, and the Impl only see a read-only copy cleans up the Impl object. It also allows us to more cleanly isolate certain coded into D3D. BUG=angleproject:1123 Change-Id: I73bda4b6d9e675d87d087d44757c598437d607f2 Reviewed-on: https://chromium-review.googlesource.com/295191 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4e10722d 2015-08-24T14:12:17 Revert "Move shader attributes into Program shared data." Once again a signed/unsigned mismatch warning in 32-bit. src\libangle\renderer\gl\programgl.cpp(190) : warning C4018: '<' : signed/unsigned mismatch BUG=angleproject:1123 This reverts commit 2d7731838722a53102e5086dba445e37f6e98d7e. Change-Id: Icd26906ead1eaa06b4bd3ff7fc2b10bef4f46022 Reviewed-on: https://chromium-review.googlesource.com/295241 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2d773183 2015-08-18T10:27:28 Move shader attributes into Program shared data. Making the Program own the attribs, and the Impl only see a read-only copy cleans up the Impl object. It also allows us to more cleanly isolate certain coded into D3D. BUG=angleproject:1123 Change-Id: I469051eb066fc56e55282affa2d5398b394ab8d2 Reviewed-on: https://chromium-review.googlesource.com/293826 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 36cfd6a3 2015-08-18T10:46:20 Clean up Program::validate. This method should really be an Impl method, since it corresponds to a specific OpenGL call. Making it an Impl method also allows us to remove applyUniforms, which doesn't correspond to a GL call. BUG=angleproject:1123 Change-Id: I2abee3cfaa7393cad44566782d51ed701e84846b Reviewed-on: https://chromium-review.googlesource.com/293825 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d1fe1646 2015-08-21T16:26:04 Move UBO bindings into Program shared state. Sharing the bindings with the Impl (read-only) allows us to clean out the applyUniformBuffers method from the Impl class, and make it D3D- only. BUG=angleproject:1123 Change-Id: Icb51a90cb227bbbdd83319ea308b68aa1c4c325e Reviewed-on: https://chromium-review.googlesource.com/293824 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 72f39c15 2015-08-21T16:10:04 Make more Program sampler methods D3D-only. Several of these methods that deal with the sampler mapping can be made D3D-only quite simply by casting to ProgramD3D in the Renderer. BUG=angleproject:1123 Change-Id: Ia6648d26744f9aa69a4a0facb356209df471fa7b Reviewed-on: https://chromium-review.googlesource.com/293823 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5c42266e 2015-08-18T10:46:15 Make Program::usesPointSize D3D-only. This test is only used in the D3D code, so we can remove this Impl method. If we need it in the future we can always support it more generally from the translator, or handle it differently on each Renderer. BUG=angleproject:1123 Change-Id: Ic4a22ad6cec93726195e68200fc25cc2956be44c Reviewed-on: https://chromium-review.googlesource.com/293822 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 31c8c56a 2015-08-19T14:08:03 Make ProgramImpl::compileProgramExecutables D3D-only. Finally we can isolate this method into the D3D-only code, and remove the interface from ProgramImpl. BUG=angleproject:1123 Change-Id: I253b15d44d4cf8bbb5dbeaa78bbcc431a5267bf7 Reviewed-on: https://chromium-review.googlesource.com/293765 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ccdf74b8 2015-08-18T10:46:12 Move TF Feedback linked varyings into D3D-only. The LinkedVarying structure is a D3D-specific type, and the GL back-end doesn't need the extra info. Isolate this into the D3D back-end so we can clean up the Impl inteface. BUG=angleproject:1123 Change-Id: I76d77ac505876d865e3e02f47acbfd6665a9507e Reviewed-on: https://chromium-review.googlesource.com/293764 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e473deee 2015-08-18T14:49:01 Clean up uniform block Program Impl APIs. The D3D-specific code we can split into D3D-only methods, and the GL-level shared code we can place in Program instead of making Impl methods. This cleans up the Impl inteface significantly. BUG=angleproject:1123 Change-Id: Ibcb7d07733eb939adf5bb4f5395a661875a60238 Reviewed-on: https://chromium-review.googlesource.com/293763 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ea918db9 2015-08-18T14:48:59 Clean up Program::linkUniforms. This method previously relied on output from the D3D back-end from ProgramImpl::link. Split the D3D-specific code into its own method, and do the linking validation before we call link. BUG=angleproject:1123 Change-Id: I582671e21af605af9f4451b02fc96ad29c923048 Reviewed-on: https://chromium-review.googlesource.com/293762 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ada9ecc3 2015-08-17T12:53:37 Make TF Feedback buffer mode a GL-level variable. Don't query this as an Impl method, since it exists on the GL level. Also some related refactorings and cleanups. BUG=angleproject:1123 Change-Id: I3610bc0db2bcaa96408506e06a65a2f4dab93150 Reviewed-on: https://chromium-review.googlesource.com/293761 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5c6b7bfe 2015-08-17T12:53:35 Add a Program::Data shared state structure. Similar to the Framebuffer and other classes, this gives the Impl class a read-only view of the object's state. BUG=angleproject:1123 Change-Id: I580eaebe2de236adf8131d6e3f54633cecce8c25 Reviewed-on: https://chromium-review.googlesource.com/293760 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0b9e9032 2015-08-17T11:51:52 Revert "Revert "Implement dirty bits acceleration for VertexArrayGL."" Should be fixed with the Iterator change. BUG=angleproject:1040 This reverts commit 5b21ed5fd030d33ae379b8cc493746244d2928b4. Change-Id: Ibb77775b6b2ce5a49cee7dd81efc62d8c3ba3c62 Reviewed-on: https://chromium-review.googlesource.com/293901 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5b21ed5f 2015-08-14T18:12:50 Revert "Implement dirty bits acceleration for VertexArrayGL." Seems to cause an exception in Release, in end2end_tests. BUG=angleproject:1040 This reverts commit 6d51c70ccf63a2c5ec240d960ff1bc179d36c92c. Change-Id: I6548bc68dce07d2d85e40afdb604157e689c1d6c Reviewed-on: https://chromium-review.googlesource.com/293821 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6d51c70c 2015-08-14T10:38:10 Implement dirty bits acceleration for VertexArrayGL. BUG=angleproject:1040 TEST=angle_end2end_tests,angle_perftests,WebGL Change-Id: I91d9aea5eefb58ecaf5b1cc95926fddb2aa846ea Reviewed-on: https://chromium-review.googlesource.com/289570 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang b61e173a 2015-06-05T11:49:55 Only sync attributes used by the current program in RendererGL. Improves draw call overhead of RendererGL. DrawCallPerf_gl: Before: 136973 score After: 153317 score Improvement: 11.932% BUG=angleproject:959 Change-Id: Ib75f6fdd756648e4a07f6e970cda03abbdbcf009 Reviewed-on: https://chromium-review.googlesource.com/275409 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f51bc795 2015-05-04T14:57:03 Optimize Texture binding by only applying referenced textures. Update ProgramGL to track which the current values of sampler uniforms so that only the currently applied texture units have to be bound for the draw call. BUG=angleproject:882 Change-Id: I280aa106172b13a5fbb31cdefba27b6691c0a0e4 Reviewed-on: https://chromium-review.googlesource.com/264803 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0ca53786 2015-05-07T13:49:39 Fix issues with ProgramGL. * Don't re-create the native GL program every link, some program state should persist between re-linking such as bound attribute locations. * Forward glBindAttribLocation calls to the ProgramImpl, fixes some chromium rendering issues because chromium always binds attribute locations, sometimes with gaps. * Query the real attrib location before inserting it into the list of attribs. It was unsafe to rely on the attrib having the same location as its index into the active attributes. BUG=angleproject:882 Change-Id: If14b4c4c2f5ebcdaa4f7c5a890b9519d6d4e6e43 Reviewed-on: https://chromium-review.googlesource.com/269991 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Gregoire Payen de La Garanderie 68694e99 2015-03-24T14:03:37 Add UBO offset support for D3D11.1. Also fixes the uniform count upper limit in glGetActiveUniformsiv, as well as an assert hit with used but unbound uniform buffer. BUG=angleproject:507 BUG=angleproject:962 Change-Id: I096fe1c9b4f0f398f3a638cd8311278987dfb7dc Reviewed-on: https://chromium-review.googlesource.com/263404 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com>
Geoff Lang 90a09b56 2015-04-01T18:21:24 Revert "Add UBO offset support for D3D11.1." Failed on 32-bit builds. See: https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Builder/builds/24828/steps/compile/logs/stdio angle\src\libangle\validationes.cpp(1461) : error C2220: warning treated as error - no 'object' file generated angle\src\libangle\validationes.cpp(1461) : warning C4018: '<' : signed/unsigned mismatch This reverts commit 381f969315c0c70bacf183e58de7194f42486112. Change-Id: I05f09f19e40046994d34809c5b79095458f56148 Reviewed-on: https://chromium-review.googlesource.com/263474 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Gregoire Payen de La Garanderie 381f9693 2015-03-24T14:03:37 Add UBO offset support for D3D11.1. Also fixes the uniform count upper limit in glGetActiveUniformsiv, as well as an assert hit with used but unbound uniform buffer. BUG=angleproject:507 BUG=angleproject:962 Change-Id: I263b14df41d4e45a67304c1d145646398721cf0a Reviewed-on: https://chromium-review.googlesource.com/263412 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Gregoire Payen de La Garanderie 3917f578 2015-04-01T15:17:21 Revert "Add UBO offset support for D3D11.1." Was ignoring the uniform block bindings. This reverts commit 7159ea6778eb73c233736cc2fa59ae9177b75e4b. Change-Id: Ie7d2b40d3fb2adedd309f1162fb6fd33ab0b4c3c Reviewed-on: https://chromium-review.googlesource.com/263420 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f0d10f89 2015-03-31T12:56:52 Replace non-copyable macro with a helper class. This class provides a simpler scheme for blocking default copy and assignment operators. It also reduces the amount of code needed since it's inherited to child classes. This also fixes the conflict between our macro and the same-named macro in Chromium code. BUG=angleproject:956 Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f Reviewed-on: https://chromium-review.googlesource.com/263257 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Gregoire Payen de La Garanderie 7159ea67 2015-03-24T14:03:37 Add UBO offset support for D3D11.1. Also fixes the uniform count upper limit in glGetActiveUniformsiv. BUG=angleproject:507 Change-Id: Icfc90ed64cf94b1bab2d4cc93a8fb5e11b28d666 Reviewed-on: https://chromium-review.googlesource.com/261874 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b1f435e4 2015-02-20T10:01:01 Implement basic functionality of ProgramGL. BUG=angle:882 Change-Id: I1d859197011081729c4c5733b78ac10491fe926c Reviewed-on: https://chromium-review.googlesource.com/251542 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f9a6f084 2015-01-22T13:32:49 Add GL and WGL renderer stubs. BUG=angle:890 Change-Id: I64f2a72b4a350f95acc2ca7080fea1a308422ca4 Reviewed-on: https://chromium-review.googlesource.com/242573 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>