mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
Remove usages of SPVC
Remove all usages of SPVC from the code and update the fuzzers. Some of the include paths and deps came transitively from spvc, so needed to update build rules. This patch does NOT remove the flags related to spvc usage, they are just no-ops as the moment. After this patch lands I will remove the usage of those flags from the bots, then remove the flags. BUG=dawn:521 Change-Id: I0d7c3e28f79354c78f00c48b6a383b823094a069 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27900 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
a1758eef07
commit
c35e2ba379
@@ -129,27 +129,8 @@ namespace dawn_native { namespace null {
|
||||
ResultOrError<ShaderModuleBase*> Device::CreateShaderModuleImpl(
|
||||
const ShaderModuleDescriptor* descriptor) {
|
||||
Ref<ShaderModule> module = AcquireRef(new ShaderModule(this, descriptor));
|
||||
|
||||
if (IsToggleEnabled(Toggle::UseSpvc)) {
|
||||
shaderc_spvc::CompileOptions options;
|
||||
options.SetValidate(IsValidationEnabled());
|
||||
shaderc_spvc::Context* context = module->GetContext();
|
||||
shaderc_spvc_status status = context->InitializeForGlsl(
|
||||
module->GetSpirv().data(), module->GetSpirv().size(), options);
|
||||
if (status != shaderc_spvc_status_success) {
|
||||
return DAWN_VALIDATION_ERROR("Unable to initialize instance of spvc");
|
||||
}
|
||||
|
||||
spirv_cross::Compiler* compiler;
|
||||
status = context->GetCompiler(reinterpret_cast<void**>(&compiler));
|
||||
if (status != shaderc_spvc_status_success) {
|
||||
return DAWN_VALIDATION_ERROR("Unable to get cross compiler");
|
||||
}
|
||||
DAWN_TRY(module->ExtractSpirvInfo(*compiler));
|
||||
} else {
|
||||
spirv_cross::Compiler compiler(module->GetSpirv());
|
||||
DAWN_TRY(module->ExtractSpirvInfo(compiler));
|
||||
}
|
||||
spirv_cross::Compiler compiler(module->GetSpirv());
|
||||
DAWN_TRY(module->ExtractSpirvInfo(compiler));
|
||||
return module.Detach();
|
||||
}
|
||||
ResultOrError<SwapChainBase*> Device::CreateSwapChainImpl(
|
||||
|
||||
Reference in New Issue
Block a user