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

Unified Diff: src/gpu/vk/GrVkGpu.h

Issue 1984363002: initial checkin of SkSL compiler (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: fixed CMake build Created 4 years, 6 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 | « gyp/skslc.gyp ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkGpu.h
diff --git a/src/gpu/vk/GrVkGpu.h b/src/gpu/vk/GrVkGpu.h
index 3373abd0f898e8dbc3b483bb7e0f7946307db330..542917e9d01f1c707b63ee506f509f1e9b6540fa 100644
--- a/src/gpu/vk/GrVkGpu.h
+++ b/src/gpu/vk/GrVkGpu.h
@@ -8,6 +8,8 @@
#ifndef GrVkGpu_DEFINED
#define GrVkGpu_DEFINED
+#define USE_SKSL 1
+
#include "GrGpu.h"
#include "GrGpuFactory.h"
#include "vk/GrVkBackendContext.h"
@@ -18,7 +20,14 @@
#include "GrVkVertexBuffer.h"
#include "GrVkUtil.h"
+#if USE_SKSL
+namespace SkSL {
+ class Compiler;
+}
+#else
#include "shaderc/shaderc.h"
+#endif
+
#include "vk/GrVkDefines.h"
class GrPipeline;
@@ -111,9 +120,15 @@ public:
bool byRegion,
VkImageMemoryBarrier* barrier) const;
+#if USE_SKSL
+ SkSL::Compiler* shaderCompiler() const {
+ return fCompiler;
+ }
+#else
shaderc_compiler_t shadercCompiler() const {
return fCompiler;
}
+#endif
void submitSecondaryCommandBuffer(const GrVkSecondaryCommandBuffer*,
const GrVkRenderPass*,
@@ -242,10 +257,13 @@ private:
VkDebugReportCallbackEXT fCallback;
#endif
+#if USE_SKSL
+ SkSL::Compiler* fCompiler;
+#else
// Shaderc compiler used for compiling glsl in spirv. We only want to create the compiler once
// since there is significant overhead to the first compile of any compiler.
shaderc_compiler_t fCompiler;
-
+#endif
typedef GrGpu INHERITED;
};
« no previous file with comments | « gyp/skslc.gyp ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698