#include "dawn/native/ApplyClearColorValueWithDrawHelper.h"
#include <limits>
#include <string>
#include <utility>
#include "dawn/common/Enumerator.h"
#include "dawn/common/Range.h"
#include "dawn/native/BindGroup.h"
#include "dawn/native/BindGroupLayout.h"
#include "dawn/native/Buffer.h"
#include "dawn/native/CommandEncoder.h"
#include "dawn/native/Device.h"
#include "dawn/native/InternalPipelineStore.h"
#include "dawn/native/ObjectContentHasher.h"
#include "dawn/native/RenderPassEncoder.h"
#include "dawn/native/RenderPipeline.h"
#include "dawn/native/utils/WGPUHelpers.h"
#include "dawn/native/webgpu_absl_format.h"
namespace dawn::native {
namespace {
static const char kVSSource[] = …;
const char* GetTextureComponentTypeString(DeviceBase* device, wgpu::TextureFormat format) { … }
std::string ConstructFragmentShader(DeviceBase* device,
const KeyOfApplyClearColorValueWithDrawPipelines& key) { … }
RenderPipelineBase* GetCachedPipeline(InternalPipelineStore* store,
const KeyOfApplyClearColorValueWithDrawPipelines& key) { … }
ResultOrError<RenderPipelineBase*> GetOrCreateApplyClearValueWithDrawPipeline(
DeviceBase* device,
const KeyOfApplyClearColorValueWithDrawPipelines& key) { … }
Color GetClearColorValue(const RenderPassColorAttachment& attachment) { … }
ResultOrError<Ref<BufferBase>> CreateUniformBufferWithClearValues(
CommandEncoder* encoder,
const RenderPassDescriptor* renderPassDescriptor,
const KeyOfApplyClearColorValueWithDrawPipelines& key) { … }
bool NeedsBigIntClear(const RenderPassColorAttachment& colorAttachmentInfo) { … }
bool GetKeyOfApplyClearColorValueWithDrawPipelines(
const DeviceBase* device,
const RenderPassDescriptor* renderPassDescriptor,
KeyOfApplyClearColorValueWithDrawPipelines* key) { … }
}
size_t KeyOfApplyClearColorValueWithDrawPipelinesHashFunc::operator()(
KeyOfApplyClearColorValueWithDrawPipelines key) const { … }
bool KeyOfApplyClearColorValueWithDrawPipelinesEqualityFunc::operator()(
KeyOfApplyClearColorValueWithDrawPipelines key1,
KeyOfApplyClearColorValueWithDrawPipelines key2) const { … }
ClearWithDrawHelper::ClearWithDrawHelper() = default;
ClearWithDrawHelper::~ClearWithDrawHelper() = default;
MaybeError ClearWithDrawHelper::Initialize(CommandEncoder* encoder,
const RenderPassDescriptor* renderPassDescriptor) { … }
MaybeError ClearWithDrawHelper::Apply(RenderPassEncoder* renderPassEncoder) { … }
}