Prior to this change, the OpenGL compiler accepted all "non-struct" "non-array" types for unary operations (++, --, and -). This ignored the existence of sampler objects. If someone tried to negate a sampler, then the compiler would tell the assembler to negate a non- numerical type. This change makes it so the GSL compiler only accepts unary operations on numerical types (including vectors and matrices). Also added a unittest that makes sure we gracefully fail to compile bad unary operations. Bug chromium:910883 Change-Id: Ia69056b31664900c3126cab42ecb8603d1a5d7db Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32448Tested-by:Sean Risser <srisser@google.com> Presubmit-Ready: Sean Risser <srisser@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| preprocessor | Loading commit data... | |
| AnalyzeCallDepth.cpp | Loading commit data... | |
| AnalyzeCallDepth.h | Loading commit data... | |
| Android.mk | Loading commit data... | |
| BUILD.gn | Loading commit data... | |
| BaseTypes.h | Loading commit data... | |
| Common.h | Loading commit data... | |
| Compiler.cpp | Loading commit data... | |
| Compiler.h | Loading commit data... | |
| Compiler.vcxproj | Loading commit data... | |
| Compiler.vcxproj.filters | Loading commit data... | |
| ConstantUnion.h | Loading commit data... | |
| Diagnostics.cpp | Loading commit data... | |
| Diagnostics.h | Loading commit data... | |
| DirectiveHandler.cpp | Loading commit data... | |
| DirectiveHandler.h | Loading commit data... | |
| ExtensionBehavior.h | Loading commit data... | |
| InfoSink.cpp | Loading commit data... | |
| InfoSink.h | Loading commit data... | |
| Initialize.cpp | Loading commit data... | |
| Initialize.h | Loading commit data... | |
| InitializeGlobals.h | Loading commit data... | |
| InitializeParseContext.cpp | Loading commit data... | |
| InitializeParseContext.h | Loading commit data... | |
| IntermTraverse.cpp | Loading commit data... | |
| Intermediate.cpp | Loading commit data... | |
| MMap.h | Loading commit data... | |
| OutputASM.cpp | Loading commit data... | |
| OutputASM.h | Loading commit data... | |
| ParseHelper.cpp | Loading commit data... | |
| ParseHelper.h | Loading commit data... | |
| PoolAlloc.cpp | Loading commit data... | |
| PoolAlloc.h | Loading commit data... | |
| Pragma.h | Loading commit data... | |
| SymbolTable.cpp | Loading commit data... | |
| SymbolTable.h | Loading commit data... | |
| TranslatorASM.cpp | Loading commit data... | |
| TranslatorASM.h | Loading commit data... | |
| Types.h | Loading commit data... | |
| ValidateLimitations.cpp | Loading commit data... | |
| ValidateLimitations.h | Loading commit data... | |
| ValidateSwitch.cpp | Loading commit data... | |
| ValidateSwitch.h | Loading commit data... | |
| debug.cpp | Loading commit data... | |
| debug.h | Loading commit data... | |
| generate_parser.sh | Loading commit data... | |
| glslang.h | Loading commit data... | |
| glslang.l | Loading commit data... | |
| glslang.y | Loading commit data... | |
| glslang_lex.cpp | Loading commit data... | |
| glslang_tab.cpp | Loading commit data... | |
| glslang_tab.h | Loading commit data... | |
| intermOut.cpp | Loading commit data... | |
| intermediate.h | Loading commit data... | |
| localintermediate.h | Loading commit data... | |
| osinclude.h | Loading commit data... | |
| ossource_posix.cpp | Loading commit data... | |
| ossource_win.cpp | Loading commit data... | |
| parseConst.cpp | Loading commit data... | |
| util.cpp | Loading commit data... | |
| util.h | Loading commit data... |