mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-05 20:55:58 +00:00
Add running spirv-val on output of Tint
This also removes an unused param from the ValidateSPIRV method. BUG=dawn:543 Change-Id: I369a8097ef49751cedbe6605989750a292027b6b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29842 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
parent
d1bca09f4a
commit
ccaef85257
@ -122,7 +122,7 @@ namespace dawn_native {
|
||||
}
|
||||
#endif
|
||||
|
||||
MaybeError ValidateSpirv(DeviceBase*, const uint32_t* code, uint32_t codeSize) {
|
||||
MaybeError ValidateSpirv(const uint32_t* code, uint32_t codeSize) {
|
||||
spvtools::SpirvTools spirvTools(SPV_ENV_VULKAN_1_1);
|
||||
|
||||
std::ostringstream errorStream;
|
||||
@ -225,6 +225,9 @@ namespace dawn_native {
|
||||
}
|
||||
|
||||
std::vector<uint32_t> spirv = generator.result();
|
||||
|
||||
DAWN_TRY(ValidateSpirv(spirv.data(), spirv.size()));
|
||||
|
||||
return std::move(spirv);
|
||||
}
|
||||
|
||||
@ -717,7 +720,7 @@ namespace dawn_native {
|
||||
case wgpu::SType::ShaderModuleSPIRVDescriptor: {
|
||||
const auto* spirvDesc =
|
||||
static_cast<const ShaderModuleSPIRVDescriptor*>(chainedDescriptor);
|
||||
DAWN_TRY(ValidateSpirv(device, spirvDesc->code, spirvDesc->codeSize));
|
||||
DAWN_TRY(ValidateSpirv(spirvDesc->code, spirvDesc->codeSize));
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user