#include "dawn/native/vulkan/ShaderModuleVk.h"
#include <cstdint>
#include <map>
#include <string>
#include <unordered_set>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "dawn/common/HashUtils.h"
#include "dawn/common/MatchVariant.h"
#include "dawn/native/CacheRequest.h"
#include "dawn/native/PhysicalDevice.h"
#include "dawn/native/Serializable.h"
#include "dawn/native/TintUtils.h"
#include "dawn/native/vulkan/BindGroupLayoutVk.h"
#include "dawn/native/vulkan/DeviceVk.h"
#include "dawn/native/vulkan/FencedDeleter.h"
#include "dawn/native/vulkan/PhysicalDeviceVk.h"
#include "dawn/native/vulkan/PipelineLayoutVk.h"
#include "dawn/native/vulkan/UtilsVulkan.h"
#include "dawn/native/vulkan/VulkanError.h"
#include "dawn/platform/DawnPlatform.h"
#include "dawn/platform/metrics/HistogramMacros.h"
#include "dawn/platform/tracing/TraceEvent.h"
#include "partition_alloc/pointers/raw_ptr.h"
#include "tint/tint.h"
#ifdef DAWN_ENABLE_SPIRV_VALIDATION
#include "dawn/native/SpirvValidation.h"
#endif
namespace dawn::native::vulkan {
#define COMPILED_SPIRV_MEMBERS …
DAWN_SERIALIZABLE(…){};
#undef COMPILED_SPIRV_MEMBERS
bool TransformedShaderModuleCacheKey::operator==(
const TransformedShaderModuleCacheKey& other) const { … }
size_t TransformedShaderModuleCacheKeyHashFunc::operator()(
const TransformedShaderModuleCacheKey& key) const { … }
class ShaderModule::ConcurrentTransformedShaderModuleCache { … };
ResultOrError<Ref<ShaderModule>> ShaderModule::Create(
Device* device,
const UnpackedPtr<ShaderModuleDescriptor>& descriptor,
const std::vector<tint::wgsl::Extension>& internalExtensions,
ShaderModuleParseResult* parseResult,
OwnedCompilationMessages* compilationMessages) { … }
ShaderModule::ShaderModule(Device* device,
const UnpackedPtr<ShaderModuleDescriptor>& descriptor,
std::vector<tint::wgsl::Extension> internalExtensions)
: … { … }
MaybeError ShaderModule::Initialize(ShaderModuleParseResult* parseResult,
OwnedCompilationMessages* compilationMessages) { … }
void ShaderModule::DestroyImpl() { … }
ShaderModule::~ShaderModule() = default;
#if TINT_BUILD_SPV_WRITER
#define SPIRV_COMPILATION_REQUEST_MEMBERS …
DAWN_MAKE_CACHE_REQUEST(…);
#undef SPIRV_COMPILATION_REQUEST_MEMBERS
#endif
ResultOrError<ShaderModule::ModuleAndSpirv> ShaderModule::GetHandleAndSpirv(
SingleShaderStage stage,
const ProgrammableStage& programmableStage,
const PipelineLayout* layout,
bool clampFragDepth,
bool emitPointSize,
std::optional<uint32_t> maxSubgroupSizeForFullSubgroups) { … }
}