Skip to content

Commit

Permalink
Do not use pre-commit in vendor folder
Browse files Browse the repository at this point in the history
  • Loading branch information
WSSDude committed Jan 18, 2025
1 parent 4900f83 commit 699d145
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ repos:
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: ^vendor/
- id: end-of-file-fixer
exclude: ^vendor/
- id: check-added-large-files
exclude: ^vendor/
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
hooks:
- id: clang-format
exclude: ^vendor/
2 changes: 1 addition & 1 deletion vendor/.clang-format
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DisableFormat: true
DisableFormat: true
42 changes: 21 additions & 21 deletions vendor/D3D12MemAlloc/D3D12MemAlloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Documentation of all members: D3D12MemAlloc.h
- [Thread safety](@ref general_considerations_thread_safety)
- [Versioning and compatibility](@ref general_considerations_versioning_and_compatibility)
- [Features not supported](@ref general_considerations_features_not_supported)
\section main_see_also See also
- [Product page on GPUOpen](https://gpuopen.com/gaming-product/d3d12-memory-allocator/)
Expand Down Expand Up @@ -199,7 +199,7 @@ enum ALLOCATION_FLAGS

/**
Set this flag if the allocation should have its own dedicated memory allocation (committed resource with implicit heap).
Use it for special, big resources, like fullscreen textures used as render targets.
- When used with functions like D3D12MA::Allocator::CreateResource, it will use `ID3D12Device::CreateCommittedResource`,
Expand Down Expand Up @@ -250,7 +250,7 @@ struct ALLOCATION_DESC
/** \brief Additional heap flags to be used when allocating memory.
In most cases it can be 0.
- If you use D3D12MA::Allocator::CreateResource(), you don't need to care.
Necessary flag `D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS`, `D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES`,
or `D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES` is added automatically.
Expand Down Expand Up @@ -473,7 +473,7 @@ class D3D12MA_API Allocation : public IUnknownImpl
Returns `TRUE` only if the allocator is sure that the entire memory where the
allocation was created was filled with zeros at the moment the allocation was made.
Returns `FALSE` if the memory could potentially contain garbage data.
If it's a render-target or depth-stencil texture, it then needs proper
initialization with `ClearRenderTargetView`, `ClearDepthStencilView`, `DiscardResource`,
Expand Down Expand Up @@ -625,7 +625,7 @@ struct POOL_DESC
`D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES`,
`D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES`.
Except if ResourceHeapTier = 2, then it may be `D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES` = 0.
You can specify additional flags if needed.
*/
D3D12_HEAP_FLAGS HeapFlags;
Expand All @@ -650,12 +650,12 @@ struct POOL_DESC
*/
UINT MaxBlockCount;
/** \brief Additional minimum alignment to be used for all allocations created from this pool. Can be 0.
Leave 0 (default) not to impose any additional alignment. If not 0, it must be a power of two.
*/
UINT64 MinAllocationAlignment;
/** \brief Additional parameter allowing pool to create resources with passed protected session.
If not null then all the heaps and committed resources will be created with this parameter.
Valid only if ID3D12Device4 interface is present in current Windows SDK!
*/
Expand Down Expand Up @@ -751,19 +751,19 @@ struct ALLOCATOR_DESC
{
/// Flags.
ALLOCATOR_FLAGS Flags;

/** Direct3D device object that the allocator should be attached to.
Allocator is doing `AddRef`/`Release` on this object.
*/
ID3D12Device* pDevice;

/** \brief Preferred size of a single `ID3D12Heap` block to be allocated.
Set to 0 to use default, which is currently 64 MiB.
*/
UINT64 PreferredBlockSize;

/** \brief Custom CPU memory allocation callbacks. Optional.
Optional, can be null. When specified, will be used for all CPU-side memory allocations.
Expand Down Expand Up @@ -792,7 +792,7 @@ class D3D12MA_API Allocator : public IUnknownImpl
/// Returns cached options retrieved from D3D12 device.
const D3D12_FEATURE_DATA_D3D12_OPTIONS& GetD3D12Options() const;
/** \brief Returns true if `D3D12_FEATURE_DATA_ARCHITECTURE1::UMA` was found to be true.
For more information about how to use it, see articles in Microsoft Docs articles:
- "UMA Optimizations: CPU Accessible Textures and Standard Swizzle"
Expand All @@ -810,7 +810,7 @@ class D3D12MA_API Allocator : public IUnknownImpl
*/
BOOL IsCacheCoherentUMA() const;
/** \brief Returns total amount of memory of specific segment group, in bytes.
\param memorySegmentGroup use `DXGI_MEMORY_SEGMENT_GROUP_LOCAL` or DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL`.
This information is taken from `DXGI_ADAPTER_DESC`.
Expand Down Expand Up @@ -866,7 +866,7 @@ class D3D12MA_API Allocator : public IUnknownImpl

#ifdef __ID3D12Device8_INTERFACE_DEFINED__
/** \brief Similar to Allocator::CreateResource, but supports new structure `D3D12_RESOURCE_DESC1`.
It internally uses `ID3D12Device8::CreateCommittedResource2` or `ID3D12Device8::CreatePlacedResource1`.
To work correctly, `ID3D12Device8` interface must be available in the current system. Otherwise, `E_NOINTERFACE` is returned.
Expand Down Expand Up @@ -1000,9 +1000,9 @@ class D3D12MA_API Allocator : public IUnknownImpl

Allocator(const ALLOCATION_CALLBACKS& allocationCallbacks, const ALLOCATOR_DESC& desc);
~Allocator();

AllocatorPimpl* m_Pimpl;

D3D12MA_CLASS_NO_COPY(Allocator)
};

Expand Down Expand Up @@ -1066,12 +1066,12 @@ struct VIRTUAL_ALLOCATION_DESC
/// Flags.
VIRTUAL_ALLOCATION_FLAGS Flags;
/** \brief Size of the allocation.
Cannot be zero.
*/
UINT64 Size;
/** \brief Required alignment of the allocation.
Must be power of two. Special value 0 has the same meaning as 1 - means no special alignment is required, so allocation can start at any offset.
*/
UINT64 Alignment;
Expand Down Expand Up @@ -1130,7 +1130,7 @@ class D3D12MA_API VirtualBlock : public IUnknownImpl
*/
HRESULT Allocate(const VIRTUAL_ALLOCATION_DESC* pDesc, VirtualAllocation* pAllocation, UINT64* pOffset);
/** \brief Frees the allocation.
Calling this function with `allocation.AllocHandle == 0` is correct and does nothing.
*/
void FreeAllocation(VirtualAllocation allocation);
Expand Down Expand Up @@ -1159,7 +1159,7 @@ class D3D12MA_API VirtualBlock : public IUnknownImpl
/** \brief Frees memory of a string returned from VirtualBlock::BuildStatsString.
*/
void FreeStatsString(WCHAR* pStatsString) const;

protected:
virtual void ReleaseThis();

Expand Down Expand Up @@ -2022,4 +2022,4 @@ Features deliberately excluded from the scope of this library:
It is recommended to disable such warnings instead.
- This is a C++ library. **Bindings or ports to any other programming languages** are welcome as external projects but
are not going to be included into this repository.
*/
*/

0 comments on commit 699d145

Please sign in to comment.