Fix issues with roll into Skia

Specifically there are build failures due to size_t not being defined
in CachedObject.h, as well as unused functions in ShaderModule.cpp

Change-Id: Ie9bd903660e3563fdf797e716bf55f6fa8627e84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35103
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Ryan Harrison 2020-12-08 16:32:34 +00:00 committed by Commit Bot service account
parent 2093157afe
commit 0824188672
2 changed files with 6 additions and 4 deletions

View File

@ -17,6 +17,8 @@
#include "dawn_native/ObjectBase.h"
#include <cstddef>
namespace dawn_native {
// Some objects are cached so that instead of creating new duplicate objects,

View File

@ -670,6 +670,7 @@ namespace dawn_native {
return {std::move(metadata)};
}
#ifdef DAWN_ENABLE_WGSL
// Currently only partially populated the reflection data, needs to be
// completed using PopulateMetadataUsingSPIRVCross. In the future, once
// this function is complete, ReflectShaderUsingSPIRVCross and
@ -677,7 +678,6 @@ namespace dawn_native {
ResultOrError<EntryPointMetadataTable> ReflectShaderUsingTint(
DeviceBase* device,
const tint::ast::Module& module) {
#ifdef DAWN_ENABLE_WGSL
ASSERT(module.IsValid());
EntryPointMetadataTable result;
@ -699,10 +699,8 @@ namespace dawn_native {
result[entryPoint.name] = std::move(metadata);
}
return std::move(result);
#else
return DAWN_VALIDATION_ERROR("Using Tint is not enabled in this build.");
#endif // DAWN_ENABLE_WGSL
}
#endif // DAWN_ENABLE_WGSL
// Uses SPIRV-Cross, which is planned for removal, but until
// ReflectShaderUsingTint is completed, will be kept as a
@ -727,6 +725,7 @@ namespace dawn_native {
return std::move(result);
}
#ifdef DAWN_ENABLE_WGSL
// Temporary utility method that allows for polyfilling like behaviour,
// specifically data missing from the Tint implementation is filled in
// using the SPIRV-Cross implementation. Once the Tint implementation is
@ -766,6 +765,7 @@ namespace dawn_native {
}
return {};
}
#endif // DAWN_ENABLE_WGSL
} // anonymous namespace