src/tests/compiler_tests/EXT_blend_func_extended_test.cpp


Log

Author Commit Date CI Message
Alexey Knyazev 9666d4d5 2023-09-01T00:00:00 Disallow dynamic indexing of SecondaryFragData in WebGL 2.0 WebGL 2.0 disallows dynamic indexing of gl_FragData in ESSL 1.00 shaders. By extension, this rule should also apply to gl_SecondaryFragDataEXT. Bug: angleproject:1085 Change-Id: I5859356f72d25c4ffd1db92466dffc6eeacb6a64 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4843628 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 558df6f1 2023-08-21T00:00:00 Fix fragment output variables validation * Reject fragment shaders that assign out-of-range fragment locations * Reject fragment shaders that assign output variables of different types to the same location * Apply similar validation for fragment outputs bound via API calls * Ensure that masks for active output variables and draw buffer types are set after processing all fragment output bindings Bug: angleproject:1085 Change-Id: If29cbb58be1981279fc97c67739fe4136b0cdc98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4813656 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Victor Costan ffd39978 2019-02-20T10:45:24 test: Replace _TEST_CASE_ with _TEST_SUITE_. Googletest is (at last) converging with industry-standard terminology [1]. We previously called test suites "test cases", which was rather confusing for folks coming from any other testing framework. Chrome now has a googletest version that supports _TEST_SUITE_ macros instead of _TEST_CASE_, so this CL cleans up some of the outdated usage. [1] https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature Bug: chromium:925652 Change-Id: Ia0deec0bc4216ef1adabc33985a7cbda89682608 Reviewed-on: https://chromium-review.googlesource.com/c/1477418 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Victor Costan <pwnall@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>
Olli Etuaho a78092cb 2018-09-26T14:16:13 Support ESSL 3.00 EXT_blend_func_extended shaders This adds support for the index layout qualifier that's used in EXT_blend_func_extended to set whether a fragment output should be bound to the primary or secondary blend source color. Output locations are now validated correctly so that two outputs can have the same location as long as they have a different index. Some tests are fixed to allow this. BUG=angleproject:1085 TEST=angle_unittests Change-Id: I1de3ad1406398952287791eca367562bed59d380 Reviewed-on: https://chromium-review.googlesource.com/1245982 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 7c8567a3 2018-02-20T15:44:07 Always add most extension symbols to symbol table An error will be generated either way if the extension symbols are used incorrectly since each use of an extension function or variable checks whether the extension is enabled. We now also track extension in unmangled built-in names, so that redefining built-ins of extensions that are not enabled can be supported. This includes refactoring the shader extension tests to share a common helper class ShaderExtensionTest. BUG=angleproject:2267 TEST=angle_unittests Change-Id: I9cc5e9bd62fa07796e69256a6a9a493531a62446 Reviewed-on: https://chromium-review.googlesource.com/926526 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He 4f285443 2017-04-21T12:15:49 Refactoring: replace NULL by nullptr for pointers (2nd CL). This CL mainly handles the pointer comparisons (== or !=). BUG=angleproject:2001 Change-Id: I25ac3b61032e7ad91459a1c6541cadc87cf9b160 Reviewed-on: https://chromium-review.googlesource.com/483935 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yunchao He d7297bfb 2017-04-19T15:27:10 Code refactoring: replace NULL by nullptr for pointers. This is the frist change to replace NULL by nullptr. It handles the initialization and assignment for pointers. BUG=angleproject:2001 Change-Id: I6d4bb198a72e38b867cd2f65a6e6f2f61339a0b5 Reviewed-on: https://chromium-review.googlesource.com/481600 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill acb4b81a 2016-11-07T13:50:29 translator: Put ShaderLang APIs in "sh" namespace. Working with glslang in Vulkan means we are static linking libANGLE with functions that have the same name as our translator APIs. We can fix this by scoping our APIs. We don't need to scope the types of the file, since they don't conflict. This will require a follow-up patch to remove the unscoped APIs once we switch over Chromium. We also scope TCompiler and some related classes to avoid multiply defined link errors with glslang. BUG=angleproject:1576 Change-Id: I729b19467d2ff7d374a82044b16dbebdf2dc8f16 Reviewed-on: https://chromium-review.googlesource.com/408337 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Kenneth Russell add0ef14 2015-12-17T15:43:31 Remove deprecated ShShaderOutput versions. These aren't referenced from Chromium code any more. BUG=chromium:550487 Change-Id: Ie4094667ec5f739efd9f1253ffdb779deaf3cebc Reviewed-on: https://chromium-review.googlesource.com/319162 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Kenneth Russell <kbr@chromium.org>
Kimmo Kinnunen b18609b9 2015-07-16T14:13:11 Implement ES 2,3 parts of EXT_blend_func_extended for shader translation Exposes gl_SecondaryFragColor, glSecondaryFragData[] and gl_MaxDualSourceDrawBuffers to GLES SL 1.0. Relaxes rules for undefined output locations for GLES SL 3.0 and exposes gl_MaxDualSourceDrawBuffers. If the output GL context is GL ES 2.0 or 3.0: The emulation layer is expected to turn on EXT_blend_func_extended if the output GL context supports it. If the output GL context is GL: The emulation layer is expected to turn on EXT_blend_func_extended if the output GL context supports ARB_blend_func_extended or if GL context is 3.2 or later. If the source shader spec is GLES SL 2.0: The emulation layer is expected to inspect the shader compilation output variables upon linking. If output target is GL SL, the emulation layer should bind color location 0, index 1 to "angle_SecondaryFragColor" if variable "gl_SecondaryFragColorEXT" is used. Alternatively, emulation layer should bind "angle_SecondaryFragData" to locations 0,1,2,3,..., all color index 1, if "gl_SecondaryFragData" array is used. (The caller can not bind the locations or specify output variables.) If the source shader spec is GLES SL 3.0: The emulation layer is expected to do location auto-resolve of the the output variables that have undefined output locations that have not been bound by the caller. (The caller can not use gl_ built-ins, so nothing to do with those.) BUG=angleproject:1085 TEST=angle_unittest Change-Id: I5cafe205b0c29478b0dcd24aa89a7b0000f5d046 Reviewed-on: https://chromium-review.googlesource.com/287580 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com>