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

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: documentation and cleanups 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/sksl.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 506b2379f6fecf5c2fe271c61d8ebbc4f4dbb89a..fbe05fb3aa4de1cd95556accdc19939699d8261e 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 0
djsollen 2016/06/10 14:07:25 shouldn't this be 1?
+
#include "GrGpu.h"
#include "GrGpuFactory.h"
#include "vk/GrVkBackendContext.h"
@@ -17,7 +19,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;
@@ -105,9 +114,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 finishDrawTarget() override;
@@ -222,10 +237,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/sksl.gyp ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698