src/compiler/translator/ValidateOutputs.cpp


Log

Author Commit Date CI Message
Olli Etuaho 856c497e 2016-08-08T11:38:39 Clarify error checking function names in the GLSL parser Most error checking functions in ParseContext used to follow a format like <property>ErrorCheck. Sometimes this function would check that the node/value would have <property>, sometimes it would check that the node/value would not have it, which was confusing. Change most of these functions to use a lot more descriptive names, which clearly communicate what they are checking for. Also includes a bit of refactoring in constructorErrorCheck(), so that the function only checks for errors rather than also setting the type of the constructor node. Also make TType::arraySize unsigned, and return a sanitized size from checkIsValidArraySize() instead of using an output parameter. BUG=angleproject:911 TEST=angle_unittests Change-Id: Id9767b8c79594ad3f782f801ea68eb96df721a31 Reviewed-on: https://chromium-review.googlesource.com/367070 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 5ed23982 2016-04-22T15:08:57 Fix allocation in ValidateOutputs. We should not be using the pool allocator for destructable objects. BUG=None Change-Id: I89236b28f04bd9b7095056edbda4172dbbfe9586 Reviewed-on: https://chromium-review.googlesource.com/340362 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Kimmo Kinnunen 8518e7f6 2015-07-16T14:54:08 Make all fragment shader out variables require location layout qualifier Make all fragment shader out variables require location layout qualifier. Previously, the last variable did not need a location layout qualifier if the previous variables had those. TEST=angle_unittests BUG=angleproject:1070 Change-Id: Ifb66ee52b811409f5278eaad330d6cd9b8ea059f Reviewed-on: https://chromium-review.googlesource.com/287100 Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6d276c8e 2015-07-20T19:00:38 Revert "Make all fragment shader out variables require location layout qualifier" Causes a warning on Windows: compiler\translator\ValidateOutputs.cpp(37): warning C4804: '>' : unsafe use of type 'bool' in operation BUG=angleproject:1070 This reverts commit 140941d066c11238ba4f2f15647fb2d65ae56faf. Change-Id: Ieed42cdda22f17c6e15c38ee1c059184869e6919 Reviewed-on: https://chromium-review.googlesource.com/286820 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Kimmo Kinnunen 140941d0 2015-07-16T14:54:08 Make all fragment shader out variables require location layout qualifier Make all fragment shader out variables require location layout qualifier. Previously, the last variable did not need a location layout qualifier if the previous variables had those. TEST=angle_unittests BUG=angleproject:1070 Change-Id: I3763b8ca38b1e14ee8456a54592c01e0fd89692c Reviewed-on: https://chromium-review.googlesource.com/286101 Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Olli Etuaho 3d0d9a48 2015-06-01T12:16:36 Clean up TIntermTraverser usage Remove default parameters from TIntermTraverser. Also clean up a few dead function declarations in traversers. TEST=angle_unittests, angle_end2end_tests BUG=angleproject:1037 Change-Id: I8d126c6c2d5b53e8b14e23e3d102f204a59323b3 Reviewed-on: https://chromium-review.googlesource.com/275184 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 6b9cb259 2013-10-17T10:45:47 Rename ParseHelper.cpp/h to ParseContext.cpp/h. TRAC #24002 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang
Geoff Lang 17732823 2013-08-29T13:46:49 Moved the compiler source files into directories based on their project and added a compiler.gypi to generate the compiler projects.