Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1201)

Unified Diff: src/sksl/SkSLSPIRVCodeGenerator.cpp

Issue 2403083002: Revert of Turned on SkSL->GLSL compiler (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/sksl/SkSLSPIRVCodeGenerator.h ('k') | src/sksl/SkSLToken.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sksl/SkSLSPIRVCodeGenerator.cpp
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp
index 5403ba362814057ad46e2047d96a3f730b4a54c8..d17e3c42a2d438a38a7f80ce35a9899141bd20cc 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -15,7 +15,6 @@
#include "ir/SkSLExtension.h"
#include "ir/SkSLIndexExpression.h"
#include "ir/SkSLVariableReference.h"
-#include "SkSLCompiler.h"
namespace SkSL {
@@ -2163,16 +2162,10 @@
lv->store(result, out);
return result;
}
- case Token::LOGICALNOT: {
+ case Token::NOT: {
ASSERT(p.fOperand->fType == *fContext.fBool_Type);
SpvId result = this->nextId();
this->writeInstruction(SpvOpLogicalNot, this->getType(p.fOperand->fType), result,
- this->writeExpression(*p.fOperand, out), out);
- return result;
- }
- case Token::BITWISENOT: {
- SpvId result = this->nextId();
- this->writeInstruction(SpvOpNot, this->getType(p.fOperand->fType), result,
this->writeExpression(*p.fOperand, out), out);
return result;
}
@@ -2328,7 +2321,7 @@
this->writeInstruction(SpvOpDecorate, target, SpvDecorationDescriptorSet, layout.fSet,
fDecorationBuffer);
}
- if (layout.fBuiltin >= 0 && layout.fBuiltin != SK_FRAGCOLOR_BUILTIN) {
+ if (layout.fBuiltin >= 0) {
this->writeInstruction(SpvOpDecorate, target, SpvDecorationBuiltIn, layout.fBuiltin,
fDecorationBuffer);
}
@@ -2370,19 +2363,10 @@
return result;
}
-#define BUILTIN_IGNORE 9999
-void SPIRVCodeGenerator::writeGlobalVars(Program::Kind kind, const VarDeclarations& decl,
- std::ostream& out) {
+void SPIRVCodeGenerator::writeGlobalVars(const VarDeclarations& decl, std::ostream& out) {
for (size_t i = 0; i < decl.fVars.size(); i++) {
const VarDeclaration& varDecl = decl.fVars[i];
const Variable* var = varDecl.fVar;
- if (var->fModifiers.fLayout.fBuiltin == BUILTIN_IGNORE) {
- continue;
- }
- if (var->fModifiers.fLayout.fBuiltin == SK_FRAGCOLOR_BUILTIN &&
- kind != Program::kFragment_Kind) {
- continue;
- }
if (!var->fIsReadFrom && !var->fIsWrittenTo &&
!(var->fModifiers.fFlags & (Modifiers::kIn_Flag |
Modifiers::kOut_Flag |
@@ -2578,8 +2562,7 @@
}
for (size_t i = 0; i < program.fElements.size(); i++) {
if (program.fElements[i]->fKind == ProgramElement::kVar_Kind) {
- this->writeGlobalVars(program.fKind, ((VarDeclarations&) *program.fElements[i]),
- body);
+ this->writeGlobalVars(((VarDeclarations&) *program.fElements[i]), body);
}
}
for (size_t i = 0; i < program.fElements.size(); i++) {
« no previous file with comments | « src/sksl/SkSLSPIRVCodeGenerator.h ('k') | src/sksl/SkSLToken.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698