joshualitt | 30ba436 | 2014-08-21 20:18:45 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrGLShaderStringBuilder_DEFINED |
| 9 | #define GrGLShaderStringBuilder_DEFINED |
| 10 | |
| 11 | #include "GrAllocator.h" |
mtklein | b9eb4ac | 2015-02-02 18:26:03 -0800 | [diff] [blame] | 12 | #include "GrGpu.h" |
joshualitt | 30ba436 | 2014-08-21 20:18:45 -0700 | [diff] [blame] | 13 | #include "gl/GrGLContext.h" |
ethannicholas | 5961bc9 | 2016-10-12 06:39:56 -0700 | [diff] [blame] | 14 | #include "SkSLGLSLCodeGenerator.h" |
joshualitt | 30ba436 | 2014-08-21 20:18:45 -0700 | [diff] [blame] | 15 | #include "SkTypes.h" |
| 16 | |
Ethan Nicholas | d1b2eec | 2017-11-01 15:45:43 -0400 | [diff] [blame] | 17 | std::unique_ptr<SkSL::Program> GrSkSLtoGLSL(const GrGLContext& context, GrGLenum type, |
| 18 | const char** skslStrings, int* lengths, int count, |
| 19 | const SkSL::Program::Settings& settings, |
| 20 | SkSL::String* glsl); |
| 21 | |
joshualitt | 30ba436 | 2014-08-21 20:18:45 -0700 | [diff] [blame] | 22 | GrGLuint GrGLCompileAndAttachShader(const GrGLContext& glCtx, |
| 23 | GrGLuint programId, |
| 24 | GrGLenum type, |
Ethan Nicholas | d1b2eec | 2017-11-01 15:45:43 -0400 | [diff] [blame] | 25 | const char* glsl, |
| 26 | int glslLength, |
Ethan Nicholas | 941e7e2 | 2016-12-12 15:33:30 -0500 | [diff] [blame] | 27 | GrGpu::Stats*, |
Ethan Nicholas | d1b2eec | 2017-11-01 15:45:43 -0400 | [diff] [blame] | 28 | const SkSL::Program::Settings& settings); |
joshualitt | 30ba436 | 2014-08-21 20:18:45 -0700 | [diff] [blame] | 29 | |
Brian Salomon | e334c59 | 2017-05-15 11:00:58 -0400 | [diff] [blame] | 30 | void GrGLPrintShader(const GrGLContext&, GrGLenum type, const char** skslStrings, int* lengths, |
| 31 | int count, const SkSL::Program::Settings&); |
| 32 | |
joshualitt | 30ba436 | 2014-08-21 20:18:45 -0700 | [diff] [blame] | 33 | #endif |