aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2016-02-25 09:47:33 -0500
committerGravatar Greg Daniel <egdaniel@google.com>2016-02-25 09:47:33 -0500
commit2d07b76405a672dced858aaa9ed475755ea13305 (patch)
tree206f87017a2f2a8ec7514d58019d3a5e92d144de /src
parent57599fe6c0336feaeeeb9b1996e77b70219b483c (diff)
Update shaderc lib and use single combined lib
Diffstat (limited to 'src')
-rw-r--r--src/gpu/vk/GrVkProgramBuilder.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gpu/vk/GrVkProgramBuilder.cpp b/src/gpu/vk/GrVkProgramBuilder.cpp
index 13daf714d9..5a3a075348 100644
--- a/src/gpu/vk/GrVkProgramBuilder.cpp
+++ b/src/gpu/vk/GrVkProgramBuilder.cpp
@@ -107,18 +107,18 @@ bool GrVkProgramBuilder::CreateVkShaderModule(const GrVkGpu* gpu,
shaderc_compile_options_set_forced_version_profile(options, 140, shaderc_profile_none);
shaderc_shader_kind shadercStage = vk_shader_stage_to_shaderc_kind(stage);
- shaderc_spv_module_t module = shaderc_compile_into_spv(compiler,
- shaderString.c_str(),
- strlen(shaderString.c_str()),
- shadercStage,
- "shader",
- "main",
- options);
+ shaderc_compilation_result_t result = shaderc_compile_into_spv(compiler,
+ shaderString.c_str(),
+ strlen(shaderString.c_str()),
+ shadercStage,
+ "shader",
+ "main",
+ options);
shaderc_compile_options_release(options);
#ifdef SK_DEBUG
- if (shaderc_module_get_num_errors(module)) {
+ if (shaderc_result_get_num_errors(result)) {
SkDebugf("%s\n", shaderString.c_str());
- SkDebugf("%s\n", shaderc_module_get_error_message(module));
+ SkDebugf("%s\n", shaderc_result_get_error_message(result));
return false;
}
#endif
@@ -128,14 +128,14 @@ bool GrVkProgramBuilder::CreateVkShaderModule(const GrVkGpu* gpu,
moduleCreateInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
moduleCreateInfo.pNext = nullptr;
moduleCreateInfo.flags = 0;
- moduleCreateInfo.codeSize = shaderc_module_get_length(module);
- moduleCreateInfo.pCode = (const uint32_t*)shaderc_module_get_bytes(module);
+ moduleCreateInfo.codeSize = shaderc_result_get_length(result);
+ moduleCreateInfo.pCode = (const uint32_t*)shaderc_result_get_bytes(result);
VkResult err = GR_VK_CALL(gpu->vkInterface(), CreateShaderModule(gpu->device(),
&moduleCreateInfo,
nullptr,
shaderModule));
- shaderc_module_release(module);
+ shaderc_result_release(result);
if (err) {
return false;
}