src/libANGLE/renderer/ProgramImpl_mock.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>
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>
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>
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 7af0de52 2017-11-06T17:09:33 Rename UniformLinker.cpp/h to ProgramLinkedResources. A more general name for a file that will house a collection of pogram variable related linking code. BUG=angleproject:2208 Change-Id: I82710f6abadd2df58fb58a3c4179989fe956e7e4 Reviewed-on: https://chromium-review.googlesource.com/755858 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: 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>
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>
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 6c1f671b 2017-02-14T19:08:04 Add destroy hooks for several GL objects. These hooks allow the back-end renderer to free object resources without having to store pointers to shared device handles for each and every object. This will allow us to save memory on back-ends that really care about memory overhead. There is a downside in that there is more boilerplate in passing gl::Context handles around everywhere. BUG=angleproject:1684 Change-Id: I89463bba8d23f92920e8956650cb73c7fc6d66b7 Reviewed-on: https://chromium-review.googlesource.com/426401 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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 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>
Jamie Madill 60ec6ea7 2016-01-22T15:27:19 Implement dirty bits for Framebuffer. The dirty bits set the stage for performance improvements in D3D, but don't actually reduce any of the redundant work just yet. BUG=angleproject:1260 Change-Id: Ib84e6a9b7aa40c37c41790f492361b22faaf4742 Reviewed-on: https://chromium-review.googlesource.com/318730 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@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 e79b1e14 2015-11-04T16:36:37 D3D11: Restrict use of MAX_UINT element indexes. We need to block the app from using MAX_UINT on D3D11 because we can't disable primitive restart on this platform. Instead generate an INVALID_OPERATION error, which is spec-compliant in ES3 because the result is undefined behaviour. This is also compliant with WebGL which explicitly defines an error here. BUG=angleproject:597 Change-Id: I7ebc5371b63ff860dc6dddf79939e9629ebb2a3c Reviewed-on: https://chromium-review.googlesource.com/309638 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>