Add explicit to D3D12 specific files.

This CL updates the d3d12 files to add explicit to single parameter
constructors.

Bug: dawn:1339
Change-Id: I7896fa37a5eed90fb4184951bd4d823f96d8e88b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86642
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair 2022-04-19 14:02:15 +00:00 committed by Dawn LUCI CQ
parent a1f13f8bad
commit 9aa4b11281
8 changed files with 9 additions and 9 deletions

View File

@ -25,7 +25,7 @@ namespace dawn::native::d3d12 {
class Backend : public BackendConnection {
public:
Backend(InstanceBase* instance);
explicit Backend(InstanceBase* instance);
MaybeError Initialize();

View File

@ -29,7 +29,7 @@ namespace dawn::native::d3d12 {
class CommandAllocatorManager {
public:
CommandAllocatorManager(Device* device);
explicit CommandAllocatorManager(Device* device);
// A CommandAllocator that is reserved must be used on the next ExecuteCommandLists
// otherwise its commands may be reset before execution has completed on the GPU

View File

@ -312,7 +312,7 @@ namespace dawn::native::d3d12 {
using Base = BindGroupTrackerBase;
public:
BindGroupStateTracker(Device* device)
explicit BindGroupStateTracker(Device* device)
: BindGroupTrackerBase(),
mDevice(device),
mViewAllocator(device->GetViewShaderVisibleDescriptorAllocator()),

View File

@ -31,7 +31,7 @@ namespace dawn::native::d3d12 {
// Wraps 11 wrapped resources in a cache.
class D3D11on12ResourceCacheEntry : public RefCounted {
public:
D3D11on12ResourceCacheEntry(ComPtr<ID3D11On12Device> d3d11on12Device);
explicit D3D11on12ResourceCacheEntry(ComPtr<ID3D11On12Device> d3d11on12Device);
D3D11on12ResourceCacheEntry(ComPtr<IDXGIKeyedMutex> d3d11on12Resource,
ComPtr<ID3D11On12Device> d3d11on12Device);
~D3D11on12ResourceCacheEntry();

View File

@ -35,7 +35,7 @@ namespace dawn::native::d3d12 {
// operations is extracted from the descriptors.
class RenderPassBuilder {
public:
RenderPassBuilder(bool hasUAV);
explicit RenderPassBuilder(bool hasUAV);
// Returns the highest color attachment index + 1. If there is no color attachment, returns
// 0. Range: [0, kMaxColorAttachments + 1)

View File

@ -30,7 +30,7 @@ namespace dawn::native::d3d12 {
class ResidencyManager {
public:
ResidencyManager(Device* device);
explicit ResidencyManager(Device* device);
MaybeError LockAllocation(Pageable* pageable);
void UnlockAllocation(Pageable* pageable);

View File

@ -57,7 +57,7 @@ namespace dawn::native::d3d12 {
// multiple allocation methods.
class ResourceAllocatorManager {
public:
ResourceAllocatorManager(Device* device);
explicit ResourceAllocatorManager(Device* device);
ResultOrError<ResourceHeapAllocation> AllocateMemory(
D3D12_HEAP_TYPE heapType,

View File

@ -45,7 +45,7 @@ namespace dawn::native::d3d12 {
class SamplerHeapCacheEntry : public RefCounted {
public:
SamplerHeapCacheEntry() = default;
SamplerHeapCacheEntry(std::vector<Sampler*> samplers);
explicit SamplerHeapCacheEntry(std::vector<Sampler*> samplers);
SamplerHeapCacheEntry(SamplerHeapCache* cache,
StagingDescriptorAllocator* allocator,
std::vector<Sampler*> samplers,
@ -83,7 +83,7 @@ namespace dawn::native::d3d12 {
// BindGroup.
class SamplerHeapCache {
public:
SamplerHeapCache(Device* device);
explicit SamplerHeapCache(Device* device);
~SamplerHeapCache();
ResultOrError<Ref<SamplerHeapCacheEntry>> GetOrCreate(