Skip to content

Commit

Permalink
GLSL output now has type float.
Browse files Browse the repository at this point in the history
  • Loading branch information
phisiart committed Nov 26, 2017
1 parent ab2e65b commit a1f3ea5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codegen/codegen_opengl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void CodeGenOpenGL::AddFunction(LoweredFunc f) {
}

CHECK(!f->args.empty()) << "Must have at least one argument";
this->stream << "out vec4 " << this->GetVarID(f->args[0].get()) << ";\n";
this->stream << "out float " << this->GetVarID(f->args[0].get()) << ";\n";
this->output_ = f->args[0].get();

this->stream << "void main() {\n";
Expand Down Expand Up @@ -92,7 +92,7 @@ std::string CodeGenOpenGL::GetBufferRef(
Type t, const Variable* buffer, Expr index) {
if (buffer == this->output_) {
CHECK(index.get() == iter_var_) << "GLSL must write to corresponding elem";
return this->var_idmap_[buffer] + ".r";
return this->var_idmap_[buffer];
}

std::ostringstream os;
Expand Down

0 comments on commit a1f3ea5

Please sign in to comment.