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

Unified Diff: src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp

Issue 929503002: Multi-string shaders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: windows warning Created 5 years, 10 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/gpu/gl/builders/GrGLGeometryShaderBuilder.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp b/src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp
index 8be2531c96dfa1244a8494a2217b5830fa419714..b20575259b841aac293f3e776d054ff51de053b1 100644
--- a/src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp
@@ -6,7 +6,6 @@
*/
#include "GrGLGeometryShaderBuilder.h"
-#include "GrGLShaderStringBuilder.h"
#include "GrGLProgramBuilder.h"
#include "../GrGLGpu.h"
@@ -37,35 +36,7 @@ void GrGLGeometryBuilder::addVarying(const char* name, GrGLVarying* v) {
}
bool GrGLGeometryBuilder::compileAndAttachShaders(GrGLuint programId,
- SkTDArray<GrGLuint>* shaderIds) const {
- const GrGLContext& glCtx = fProgramBuilder->gpu()->glContext();
- SkASSERT(fProgramBuilder->ctxInfo().glslGeneration() >= k150_GrGLSLGeneration);
- SkString geomShaderSrc(GrGetGLSLVersionDecl(fProgramBuilder->ctxInfo()));
- geomShaderSrc.append("layout(triangles) in;\n"
- "layout(triangle_strip, max_vertices = 6) out;\n");
- this->appendDecls(fInputs, &geomShaderSrc);
- this->appendDecls(fOutputs, &geomShaderSrc);
- geomShaderSrc.append("void main() {\n");
- geomShaderSrc.append("\tfor (int i = 0; i < 3; ++i) {\n"
- "\t\tgl_Position = gl_in[i].gl_Position;\n");
- geomShaderSrc.append("\t\tgl_PointSize = 1.0;\n");
- SkASSERT(fInputs.count() == fOutputs.count());
- for (int i = 0; i < fInputs.count(); ++i) {
- geomShaderSrc.appendf("\t\t%s = %s[i];\n",
- fOutputs[i].getName().c_str(),
- fInputs[i].getName().c_str());
- }
- geomShaderSrc.append("\t\tEmitVertex();\n"
- "\t}\n"
- "\tEndPrimitive();\n");
- geomShaderSrc.append("}\n");
- GrGLuint geomShaderId =
- GrGLCompileAndAttachShader(glCtx, programId,
- GR_GL_GEOMETRY_SHADER, geomShaderSrc,
- fProgramBuilder->gpu()->stats());
- if (!geomShaderId) {
- return false;
- }
- *shaderIds->append() = geomShaderId;
- return true;
+ SkTDArray<GrGLuint>* shaderIds) {
+ SkFAIL("Geometry shaders are not currently supported");
+ return false;
}
« no previous file with comments | « src/gpu/gl/builders/GrGLGeometryShaderBuilder.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698