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

Unified Diff: src/gpu/vk/GrVkCaps.cpp

Issue 1835813003: Use NV glsl shader compiler for Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@cacheHash
Patch Set: Created 4 years, 9 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/vk/GrVkCaps.h ('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/GrVkCaps.cpp
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index 6d1d844525b18e37d0666376be40eeb24e2e31a6..41bf1ad9e47e41f1bed0a2d2c1379d817f57a6a7 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -13,7 +13,10 @@
#include "vk/GrVkBackendContext.h"
GrVkCaps::GrVkCaps(const GrContextOptions& contextOptions, const GrVkInterface* vkInterface,
- VkPhysicalDevice physDev, uint32_t featureFlags) : INHERITED(contextOptions) {
+ VkPhysicalDevice physDev, uint32_t featureFlags, uint32_t extensionFlags)
+ : INHERITED(contextOptions) {
+ fCanUseGLSLForShaderModule = false;
+
/**************************************************************************
* GrDrawTargetCaps fields
**************************************************************************/
@@ -40,11 +43,11 @@ GrVkCaps::GrVkCaps(const GrContextOptions& contextOptions, const GrVkInterface*
fShaderCaps.reset(new GrGLSLCaps(contextOptions));
- this->init(contextOptions, vkInterface, physDev, featureFlags);
+ this->init(contextOptions, vkInterface, physDev, featureFlags, extensionFlags);
}
void GrVkCaps::init(const GrContextOptions& contextOptions, const GrVkInterface* vkInterface,
- VkPhysicalDevice physDev, uint32_t featureFlags) {
+ VkPhysicalDevice physDev, uint32_t featureFlags, uint32_t extensionFlags) {
VkPhysicalDeviceProperties properties;
GR_VK_CALL(vkInterface, GetPhysicalDeviceProperties(physDev, &properties));
@@ -58,12 +61,13 @@ void GrVkCaps::init(const GrContextOptions& contextOptions, const GrVkInterface*
this->initConfigRenderableTable(vkInterface, physDev);
this->initStencilFormats(vkInterface, physDev);
-
+ if (SkToBool(extensionFlags & kNV_glsl_shader_GrVkExtensionFlag)) {
+ fCanUseGLSLForShaderModule = true;
+ }
this->applyOptionsOverrides(contextOptions);
- // need to friend GrVkCaps in GrGLSLCaps.h
- // GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
- // glslCaps->applyOptionsOverrides(contextOptions);
+ GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
+ glslCaps->applyOptionsOverrides(contextOptions);
}
int get_max_sample_count(VkSampleCountFlags flags) {
« no previous file with comments | « src/gpu/vk/GrVkCaps.h ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698