blob: c693a390ccda9d973f2e565f42eede13c6bf548c [file] [log] [blame]
joshualitt30ba4362014-08-21 20:18:45 -07001/*
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"
mtkleinb9eb4ac2015-02-02 18:26:03 -080012#include "GrGpu.h"
joshualitt30ba4362014-08-21 20:18:45 -070013#include "gl/GrGLContext.h"
ethannicholas5961bc92016-10-12 06:39:56 -070014#include "SkSLGLSLCodeGenerator.h"
joshualitt30ba4362014-08-21 20:18:45 -070015#include "SkTypes.h"
16
Ethan Nicholasd1b2eec2017-11-01 15:45:43 -040017std::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
joshualitt30ba4362014-08-21 20:18:45 -070022GrGLuint GrGLCompileAndAttachShader(const GrGLContext& glCtx,
23 GrGLuint programId,
24 GrGLenum type,
Ethan Nicholasd1b2eec2017-11-01 15:45:43 -040025 const char* glsl,
26 int glslLength,
Ethan Nicholas941e7e22016-12-12 15:33:30 -050027 GrGpu::Stats*,
Ethan Nicholasd1b2eec2017-11-01 15:45:43 -040028 const SkSL::Program::Settings& settings);
joshualitt30ba4362014-08-21 20:18:45 -070029
Brian Salomone334c592017-05-15 11:00:58 -040030void GrGLPrintShader(const GrGLContext&, GrGLenum type, const char** skslStrings, int* lengths,
31 int count, const SkSL::Program::Settings&);
32
joshualitt30ba4362014-08-21 20:18:45 -070033#endif