UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
D3D12Util.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4 D3D12Util.h: D3D RHI utility definitions.
5 =============================================================================*/
6
7#pragma once
8
9#include "CoreMinimal.h"
10#include "Containers/Queue.h"
11#include "D3D12RHICommon.h"
12#include "D3D12Queue.h"
13#include "D3D12Access.h"
14#include "DXGIUtilities.h"
15#include "RenderUtils.h"
16#include "ShaderCore.h"
17
18namespace D3D12RHI
19{
27 extern void VerifyD3D12Result(HRESULT Result, const ANSICHAR* Code, const ANSICHAR* Filename, uint32 Line, ID3D12Device* Device, FString Message = FString());
28
36 extern void VerifyD3D12CreateTextureResult(HRESULT D3DResult, const ANSICHAR* Code, const ANSICHAR* Filename, uint32 Line, const D3D12_RESOURCE_DESC& TextureDesc, ID3D12Device* Device);
37
41#define VERIFYD3D12RESULT_LAMBDA(x, Device, Lambda) {HRESULT hres = x; if (FAILED(hres)) { VerifyD3D12Result(hres, #x, __FILE__, __LINE__, Device, Lambda()); }}
42#define VERIFYD3D12RESULT_EX(x, Device) {HRESULT hres = x; if (FAILED(hres)) { VerifyD3D12Result(hres, #x, __FILE__, __LINE__, Device); }}
43#define VERIFYD3D12RESULT(x) {HRESULT hres = x; if (FAILED(hres)) { VerifyD3D12Result(hres, #x, __FILE__, __LINE__, nullptr); }}
44#define VERIFYD3D12CREATETEXTURERESULT(x, Desc, Device) {HRESULT hres = x; if (FAILED(hres)) { VerifyD3D12CreateTextureResult(hres, #x, __FILE__, __LINE__, Desc, Device); }}
45
48
49} // namespace D3D12RHI
50
51using namespace D3D12RHI;
52
53class FD3D12Buffer;
54class FD3D12Resource;
56class FD3D12Texture;
57
59
61
63void SetD3D12ResourceName(FD3D12Resource* Resource, const TCHAR* Name);
64void SetD3D12ResourceName(FD3D12Buffer* Resource, const TCHAR* Name);
65void SetD3D12ResourceName(FD3D12Texture* Resource, const TCHAR* Name);
66
68
70{
74#if PLATFORM_SUPPORTS_MESH_SHADERS
75 SV_Mesh,
77#endif
80};
81
91
116
159
166{
167 switch (Face)
168 {
169 case CubeFace_PosX:
170 default:
171 return 0;//D3DCUBEMAP_FACE_POSITIVE_X;
172 case CubeFace_NegX:
173 return 1;//D3DCUBEMAP_FACE_NEGATIVE_X;
174 case CubeFace_PosY:
175 return 2;//D3DCUBEMAP_FACE_POSITIVE_Y;
176 case CubeFace_NegY:
177 return 3;//D3DCUBEMAP_FACE_NEGATIVE_Y;
178 case CubeFace_PosZ:
179 return 4;//D3DCUBEMAP_FACE_POSITIVE_Z;
180 case CubeFace_NegZ:
181 return 5;//D3DCUBEMAP_FACE_NEGATIVE_Z;
182 };
183}
184
189{
190 return MipSlice + ArraySlice * MipLevels;
191}
192
197{
198public:
201
202public:
212
213 template<class ClassType>
218 {
219 return SourceObject == Other.SourceObject && Subresource == Other.Subresource;
220 }
222 {
223 return SourceObject != Other.SourceObject || Subresource != Other.Subresource;
224 }
226 {
228 }
229
232 {
233 return K.GetHash();
234 }
235};
236
239
244{
245public:
248
251
253 FORCEINLINE int32 GetNumActiveTargets() const { return NumActiveTargets; }
254 FORCEINLINE FD3D12RenderTargetView* GetRenderTargetView(int32 TargetIndex) { return RenderTargetViews[TargetIndex]; }
256
257private:
260
262 FD3D12DepthStencilView* DepthStencilView;
263
265 int32 NumActiveTargets;
266};
267
269
273template <class Type>
275{
276private:
277 mutable FCriticalSection SynchronizationObject; // made this mutable so this class can have const functions and still be thread safe
278 TQueue<Type> Items;
279 uint32 Size = 0;
280public:
281
282 inline const uint32 GetSize() const { return Size; }
283
284 void Enqueue(const Type& Item)
285 {
286 FScopeLock ScopeLock(&SynchronizationObject);
287 Items.Enqueue(Item);
288 Size++;
289 }
290
291 bool Dequeue(Type& Result)
292 {
293 FScopeLock ScopeLock(&SynchronizationObject);
294 Size--;
295 return Items.Dequeue(Result);
296 }
297
298 template <typename CompareFunc>
299 bool Dequeue(Type& Result, const CompareFunc& Func)
300 {
301 FScopeLock ScopeLock(&SynchronizationObject);
302
303 if (Items.Peek(Result))
304 {
305 if (Func(Result))
306 {
307 Items.Dequeue(Result);
308 Size--;
309
310 return true;
311 }
312 }
313
314 return false;
315 }
316
317 template <typename ResultType, typename CompareFunc>
318 bool BatchDequeue(TArray<ResultType>& Result, const CompareFunc& Func, uint32 MaxItems)
319 {
320 FScopeLock ScopeLock(&SynchronizationObject);
321
322 uint32 i = 0;
323 Type Item;
324 while (Items.Peek(Item) && i <= MaxItems)
325 {
326 if (Func(Item))
327 {
328 Items.Dequeue(Item);
329 Size--;
330 Result.Emplace(Item);
331
332 i++;
333 }
334 else
335 {
336 break;
337 }
338 }
339
340 return i > 0;
341 }
342
343 bool Peek(Type& Result)
344 {
345 FScopeLock ScopeLock(&SynchronizationObject);
346 return Items.Peek(Result);
347 }
348
349 bool IsEmpty()
350 {
351 FScopeLock ScopeLock(&SynchronizationObject);
352 return Items.IsEmpty();
353 }
354
355 void Empty()
356 {
357 FScopeLock ScopeLock(&SynchronizationObject);
358
359 Type Result;
360 while (Items.Dequeue(Result)) {}
361 }
362};
363
365{
366 check(HeapType == D3D12_HEAP_TYPE_CUSTOM ? pCustomHeapProperties != nullptr : true);
367 return HeapType == D3D12_HEAP_TYPE_UPLOAD ||
368 (HeapType == D3D12_HEAP_TYPE_CUSTOM &&
370}
371
373{
374 check(HeapType == D3D12_HEAP_TYPE_CUSTOM ? pCustomHeapProperties != nullptr : true);
375 return HeapType == D3D12_HEAP_TYPE_DEFAULT ||
376 (HeapType == D3D12_HEAP_TYPE_CUSTOM &&
378}
379
381{
382 return !IsGPUOnly(HeapType, pCustomHeapProperties);
383}
384
386{
387 if (HeapType == D3D12_HEAP_TYPE_DEFAULT || IsCPUWritable(HeapType, pCustomHeapProperties))
388 {
390 }
391 else
392 {
393 check(HeapType == D3D12_HEAP_TYPE_READBACK);
395 }
396}
397
398static inline uint64 GetTilesNeeded(uint32 Width, uint32 Height, uint32 Depth, const D3D12_TILE_SHAPE& Shape)
399{
400 return uint64((Width + Shape.WidthInTexels - 1) / Shape.WidthInTexels) *
401 ((Height + Shape.HeightInTexels - 1) / Shape.HeightInTexels) *
402 ((Depth + Shape.DepthInTexels - 1) / Shape.DepthInTexels);
403}
404
405static void Get4KTileShape(D3D12_TILE_SHAPE* pTileShape, DXGI_FORMAT DXGIFormat, EPixelFormat UEFormat, D3D12_RESOURCE_DIMENSION Dimension, uint32 SampleCount)
406{
407 //Bits per unit
408 uint32 BPU = GPixelFormats[UEFormat].BlockBytes * 8;
409
410 switch (Dimension)
411 {
414 {
415 check(!UE::DXGIUtilities::IsBlockCompressedFormat(DXGIFormat));
416 pTileShape->WidthInTexels = (BPU == 0) ? 4096 : 4096 * 8 / BPU;
417 pTileShape->HeightInTexels = 1;
418 pTileShape->DepthInTexels = 1;
419 }
420 break;
422 {
423 pTileShape->DepthInTexels = 1;
424 if (UE::DXGIUtilities::IsBlockCompressedFormat(DXGIFormat))
425 {
426 // Currently only supported block sizes are 64 and 128.
427 // These equations calculate the size in texels for a tile. It relies on the fact that 16*16*16 blocks fit in a tile if the block size is 128 bits.
428 check(BPU == 64 || BPU == 128);
429 pTileShape->WidthInTexels = 16 * UE::DXGIUtilities::GetWidthAlignment(DXGIFormat);
430 pTileShape->HeightInTexels = 16 * UE::DXGIUtilities::GetHeightAlignment(DXGIFormat);
431 if (BPU == 64)
432 {
433 // If bits per block are 64 we double width so it takes up the full tile size.
434 // This is only true for BC1 and BC4
435 check((DXGIFormat >= DXGI_FORMAT_BC1_TYPELESS && DXGIFormat <= DXGI_FORMAT_BC1_UNORM_SRGB) ||
436 (DXGIFormat >= DXGI_FORMAT_BC4_TYPELESS && DXGIFormat <= DXGI_FORMAT_BC4_SNORM));
437 pTileShape->WidthInTexels *= 2;
438 }
439 }
440 else
441 {
442 if (BPU <= 8)
443 {
444 pTileShape->WidthInTexels = 64;
445 pTileShape->HeightInTexels = 64;
446 }
447 else if (BPU <= 16)
448 {
449 pTileShape->WidthInTexels = 64;
450 pTileShape->HeightInTexels = 32;
451 }
452 else if (BPU <= 32)
453 {
454 pTileShape->WidthInTexels = 32;
455 pTileShape->HeightInTexels = 32;
456 }
457 else if (BPU <= 64)
458 {
459 pTileShape->WidthInTexels = 32;
460 pTileShape->HeightInTexels = 16;
461 }
462 else if (BPU <= 128)
463 {
464 pTileShape->WidthInTexels = 16;
465 pTileShape->HeightInTexels = 16;
466 }
467 else
468 {
469 check(false);
470 }
471
472 if (SampleCount <= 1)
473 { /* Do nothing */
474 }
475 else if (SampleCount <= 2)
476 {
477 pTileShape->WidthInTexels /= 2;
478 pTileShape->HeightInTexels /= 1;
479 }
480 else if (SampleCount <= 4)
481 {
482 pTileShape->WidthInTexels /= 2;
483 pTileShape->HeightInTexels /= 2;
484 }
485 else if (SampleCount <= 8)
486 {
487 pTileShape->WidthInTexels /= 4;
488 pTileShape->HeightInTexels /= 2;
489 }
490 else if (SampleCount <= 16)
491 {
492 pTileShape->WidthInTexels /= 4;
493 pTileShape->HeightInTexels /= 4;
494 }
495 else
496 {
497 check(false);
498 }
499
500 check(UE::DXGIUtilities::GetWidthAlignment(DXGIFormat) == 1);
501 check(UE::DXGIUtilities::GetHeightAlignment(DXGIFormat) == 1);
502 }
503
504 break;
505 }
507 {
508 if (UE::DXGIUtilities::IsBlockCompressedFormat(DXGIFormat))
509 {
510 // Currently only supported block sizes are 64 and 128.
511 // These equations calculate the size in texels for a tile. It relies on the fact that 16*16*16 blocks fit in a tile if the block size is 128 bits.
512 check(BPU == 64 || BPU == 128);
513 pTileShape->WidthInTexels = 8 * UE::DXGIUtilities::GetWidthAlignment(DXGIFormat);
514 pTileShape->HeightInTexels = 8 * UE::DXGIUtilities::GetHeightAlignment(DXGIFormat);
515 pTileShape->DepthInTexels = 4;
516 if (BPU == 64)
517 {
518 // If bits per block are 64 we double width so it takes up the full tile size.
519 // This is only true for BC1 and BC4
520 check((DXGIFormat >= DXGI_FORMAT_BC1_TYPELESS && DXGIFormat <= DXGI_FORMAT_BC1_UNORM_SRGB) ||
521 (DXGIFormat >= DXGI_FORMAT_BC4_TYPELESS && DXGIFormat <= DXGI_FORMAT_BC4_SNORM));
522 pTileShape->DepthInTexels *= 2;
523 }
524 }
525 else
526 {
527 if (BPU <= 8)
528 {
529 pTileShape->WidthInTexels = 16;
530 pTileShape->HeightInTexels = 16;
531 pTileShape->DepthInTexels = 16;
532 }
533 else if (BPU <= 16)
534 {
535 pTileShape->WidthInTexels = 16;
536 pTileShape->HeightInTexels = 16;
537 pTileShape->DepthInTexels = 8;
538 }
539 else if (BPU <= 32)
540 {
541 pTileShape->WidthInTexels = 16;
542 pTileShape->HeightInTexels = 8;
543 pTileShape->DepthInTexels = 8;
544 }
545 else if (BPU <= 64)
546 {
547 pTileShape->WidthInTexels = 8;
548 pTileShape->HeightInTexels = 8;
549 pTileShape->DepthInTexels = 8;
550 }
551 else if (BPU <= 128)
552 {
553 pTileShape->WidthInTexels = 8;
554 pTileShape->HeightInTexels = 8;
555 pTileShape->DepthInTexels = 4;
556 }
557 else
558 {
559 check(false);
560 }
561
562 check(UE::DXGIUtilities::GetWidthAlignment(DXGIFormat) == 1);
563 check(UE::DXGIUtilities::GetHeightAlignment(DXGIFormat) == 1);
564 }
565 }
566 break;
567 }
568}
569
570#define ASSERT_RESOURCE_STATES 0 // Disabled for now.
571
572#if ASSERT_RESOURCE_STATES
573class FD3D12View;
574struct FD3D12ViewSubset;
575
576// template <class TView>
577// bool AssertResourceState(ID3D12CommandList* pCommandList, FD3D12View* pView, const D3D12_RESOURCE_STATES& State);
578
581#endif
582
596
598{
599 switch (PrimitiveType)
600 {
605 #if defined(D3D12RHI_PRIMITIVE_TOPOLOGY_RECTLIST)
607 #endif
608
609 default:
610 ensure(0);
612 }
613}
614
615#pragma warning(push)
616#pragma warning(disable: 4063)
648#pragma warning(pop)
649
650// @return 0xffffffff if not not supported
652{
653 if (SampleCount <= DX_MAX_MSAA_COUNT)
654 {
655 // 0 has better quality (a more even distribution)
656 // higher quality levels might be useful for non box filtered AA or when using weighted samples
657 return 0;
658 }
659
660 // not supported
661 return 0xffffffff;
662}
663
665{
666public:
667 FD3D12ScopeLock(FCriticalSection* CritSec) : CS(CritSec) { CS->Lock(); }
668 ~FD3D12ScopeLock() { CS->Unlock(); }
669private:
671};
672
674{
675public:
676 FD3D12ScopeNoLock(FCriticalSection* CritSec) { /* Do Nothing! */ }
677 ~FD3D12ScopeNoLock() { /* Do Nothing! */ }
678};
679
680
682{
683 // Check for ALLOW_RENDER_TARGET compatibility
685 {
687 {
688 IncompatibilityReason.Append(TEXT("D3D12_RESOURCE_STATE_RENDER_TARGET requires D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET.\n"));
689 return false;
690 }
691 }
692
693 // Check for ALLOW_DEPTH_STENCIL compatibility
695 {
697 {
698 IncompatibilityReason.Append(TEXT("D3D12_RESOURCE_STATE_DEPTH_WRITE or D3D12_RESOURCE_STATE_DEPTH_READ requires D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL.\n"));
699 return false;
700 }
701 }
702
703 // Check for ALLOW_UNORDERED_ACCESS compatibility
705 {
707 {
708 IncompatibilityReason.Append(TEXT("D3D12_RESOURCE_STATE_UNORDERED_ACCESS requires D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS.\n"));
709 return false;
710 }
711 }
712
713 // Check for DENY_SHADER_RESOURCE incompatibility
715 {
717 {
718 IncompatibilityReason.Append(TEXT("D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE or D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE cannot be used with D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE.\n"));
719 return false;
720 }
721 }
722
723 return true;
724}
725
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define NULL
Definition oodle2base.h:134
#define FORCEINLINE
Definition AndroidPlatform.h:140
#define check(expr)
Definition AssertionMacros.h:314
#define ensure( InExpression)
Definition AssertionMacros.h:464
#define FORCEINLINE_DEBUGGABLE
Definition CoreMiscDefines.h:74
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
FPlatformTypes::ANSICHAR ANSICHAR
An ANSI character. Normally a signed type.
Definition Platform.h:1131
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::FPlatformRecursiveMutex FCriticalSection
Definition CriticalSection.h:53
ED3D12Access
Definition D3D12Access.h:15
#define DX_MAX_MSAA_COUNT
Definition D3D12RHIDefinitions.h:10
void SetD3D12ResourceName(FD3D12ResourceLocation &ResourceLocation, const TCHAR *Name)
Definition D3D12Util.cpp:77
bool IsGPUOnly(D3D12_HEAP_TYPE HeapType, const D3D12_HEAP_PROPERTIES *pCustomHeapProperties=nullptr)
Definition D3D12Util.h:372
FORCEINLINE uint32 GetD3D12CubeFace(ECubeFace Face)
Definition D3D12Util.h:165
FORCEINLINE_DEBUGGABLE D3D12_PRIMITIVE_TOPOLOGY_TYPE TranslatePrimitiveTopologyType(EPrimitiveTopologyType TopologyType)
Definition D3D12Util.h:583
FORCEINLINE_DEBUGGABLE bool CheckResourceStateCompatibility(D3D12_RESOURCE_STATES State, D3D12_RESOURCE_FLAGS Flags, FString &IncompatibilityReason)
Definition D3D12Util.h:681
FORCEINLINE_DEBUGGABLE uint32 GetMaxMSAAQuality(uint32 SampleCount)
Definition D3D12Util.h:651
bool ShouldSetD3D12ResourceName(const FD3D12ResourceLocation &ResourceLocation)
Definition D3D12Util.cpp:47
FORCEINLINE_DEBUGGABLE D3D_PRIMITIVE_TOPOLOGY TranslatePrimitiveType(EPrimitiveType PrimitiveType)
Definition D3D12Util.h:597
bool IsCPUAccessible(D3D12_HEAP_TYPE HeapType, const D3D12_HEAP_PROPERTIES *pCustomHeapProperties=nullptr)
Definition D3D12Util.h:380
FORCEINLINE uint32 CalcSubresource(uint32 MipSlice, uint32 ArraySlice, uint32 MipLevels)
Definition D3D12Util.h:188
FORCEINLINE_DEBUGGABLE D3D12_PRIMITIVE_TOPOLOGY_TYPE D3D12PrimitiveTypeToTopologyType(D3D_PRIMITIVE_TOPOLOGY PrimitiveType)
Definition D3D12Util.h:617
void SetD3D12ObjectName(ID3D12Object *Object, const TCHAR *Name)
Definition D3D12Util.cpp:57
ED3D12Access DetermineInitialBufferD3D12Access(D3D12_HEAP_TYPE HeapType, const D3D12_HEAP_PROPERTIES *pCustomHeapProperties=nullptr)
Definition D3D12Util.h:385
EShaderVisibility
Definition D3D12Util.h:70
@ SV_Geometry
Definition D3D12Util.h:73
@ SV_All
Definition D3D12Util.h:78
@ SV_ShaderVisibilityCount
Definition D3D12Util.h:79
@ SV_Pixel
Definition D3D12Util.h:72
@ SV_Vertex
Definition D3D12Util.h:71
FString GetD312ObjectName(ID3D12Object *const Object)
Definition D3D12Util.cpp:103
bool IsCPUWritable(D3D12_HEAP_TYPE HeapType, const D3D12_HEAP_PROPERTIES *pCustomHeapProperties=nullptr)
Definition D3D12Util.h:364
void LogExecuteCommandLists(uint32 NumCommandLists, ID3D12CommandList *const *ppCommandLists)
Definition D3D12Util.cpp:1662
ERootSignatureType
Definition D3D12Util.h:83
@ RS_WorkGraphLocalCompute
Definition D3D12Util.h:88
@ RS_RayTracingLocal
Definition D3D12Util.h:86
@ RS_WorkGraphLocalRaster
Definition D3D12Util.h:89
@ RS_Raster
Definition D3D12Util.h:84
@ RS_RayTracingGlobal
Definition D3D12Util.h:85
@ RS_WorkGraphGlobal
Definition D3D12Util.h:87
FPixelFormatInfo GPixelFormats[PF_MAX]
Definition PixelFormat.cpp:31
EPixelFormat
Definition PixelFormat.h:16
@ MaxSimultaneousRenderTargets
Definition RHIDefinitions.h:287
ECubeFace
Definition RHIDefinitions.h:525
@ CubeFace_NegX
Definition RHIDefinitions.h:527
@ CubeFace_PosX
Definition RHIDefinitions.h:526
@ CubeFace_NegY
Definition RHIDefinitions.h:529
@ CubeFace_NegZ
Definition RHIDefinitions.h:531
@ CubeFace_PosZ
Definition RHIDefinitions.h:530
@ CubeFace_PosY
Definition RHIDefinitions.h:528
EPrimitiveTopologyType
Definition RHIDefinitions.h:809
EPrimitiveType
Definition RHIDefinitions.h:822
@ PT_RectList
Definition RHIDefinitions.h:844
@ PT_PointList
Definition RHIDefinitions.h:837
@ PT_LineList
Definition RHIDefinitions.h:830
@ PT_TriangleList
Definition RHIDefinitions.h:824
@ PT_TriangleStrip
Definition RHIDefinitions.h:827
const char * source
Definition lz4.h:711
constexpr uint32 HashCombineFast(uint32 A, uint32 B)
Definition TypeHash.h:74
uint32 PointerHash(const void *Key)
Definition TypeHash.h:91
uint32 Size
Definition VulkanMemory.cpp:4034
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition D3D12Adapter.h:136
FD3D12ResourceLocation ResourceLocation
Definition D3D12Resources.h:929
Definition D3D12Util.h:244
FORCEINLINE FD3D12RenderTargetView * GetRenderTargetView(int32 TargetIndex)
Definition D3D12Util.h:254
FORCEINLINE int32 GetNumActiveTargets() const
Definition D3D12Util.h:253
FORCEINLINE FD3D12DepthStencilView * GetDepthStencilView()
Definition D3D12Util.h:255
~FD3D12BoundRenderTargets()
Definition D3D12Util.cpp:1658
Definition D3D12Resources.h:1017
Definition D3D12View.h:435
Definition D3D12Device.h:176
Definition D3D12Util.h:197
uint32 GetHash() const
Definition D3D12Util.h:225
void * SourceObject
Definition D3D12Util.h:199
friend uint32 GetTypeHash(const FD3D12LockedKey &K)
Definition D3D12Util.h:231
FD3D12LockedKey(FD3D12Resource *source, uint32 subres=0)
Definition D3D12Util.h:206
bool operator==(const FD3D12LockedKey &Other) const
Definition D3D12Util.h:217
FD3D12LockedKey(class FD3D12ResourceLocation *source, uint32 subres=0)
Definition D3D12Util.h:209
FD3D12LockedKey(ClassType *source, uint32 subres=0)
Definition D3D12Util.h:214
FD3D12LockedKey()
Definition D3D12Util.h:203
uint32 Subresource
Definition D3D12Util.h:200
bool operator!=(const FD3D12LockedKey &Other) const
Definition D3D12Util.h:221
Definition D3D12View.h:423
Definition D3D12Resources.h:641
Definition D3D12Resources.h:181
Definition D3D12Texture.h:31
Definition D3D12View.h:221
Definition RHIShaderBindingLayout.h:72
Definition ScopeLock.h:141
Definition Array.h:670
Definition Queue.h:48
bool Peek(FElementType &OutItem) const
Definition Queue.h:219
bool IsEmpty() const
Definition Queue.h:206
bool Enqueue(const FElementType &Item)
Definition Queue.h:123
bool Dequeue(FElementType &OutItem)
Definition Queue.h:80
Definition StaticArray.h:26
Definition D3D12CommandList.cpp:417
void VerifyD3D12CreateTextureResult(HRESULT D3DResult, const ANSICHAR *Code, const ANSICHAR *Filename, uint32 Line, const D3D12_RESOURCE_DESC &TextureDesc, ID3D12Device *Device)
Definition D3D12Util.cpp:1114
void VerifyD3D12Result(HRESULT D3DResult, const ANSICHAR *Code, const ANSICHAR *Filename, uint32 Line, ID3D12Device *Device, FString Message)
Definition D3D12Util.cpp:1100
void LogPageFaultData(class FD3D12Adapter *InAdapter, FD3D12Device *InDevice, D3D12_GPU_VIRTUAL_ADDRESS InPageFaultAddress)
U16 Index
Definition radfft.cpp:71
Definition D3D12Util.h:118
uint8 Flags
Definition D3D12Util.h:134
uint8 bUseRootConstants
Definition D3D12Util.h:131
friend uint32 GetTypeHash(const FD3D12QuantizedBoundShaderState &State)
Definition D3D12Util.h:145
uint8 bUseDirectlyIndexedResourceHeap
Definition D3D12Util.h:129
ERootSignatureType RootSignatureType
Definition D3D12Util.h:121
bool operator==(const FD3D12QuantizedBoundShaderState &RHS) const
Definition D3D12Util.h:137
TStaticArray< FShaderRegisterCounts, SV_ShaderVisibilityCount > RegisterCounts
Definition D3D12Util.h:120
uint8 bAllowIAInputLayout
Definition D3D12Util.h:126
uint8 bUseDiagnosticBuffer
Definition D3D12Util.h:128
static void InitShaderRegisterCounts(D3D12_RESOURCE_BINDING_TIER ResourceBindingTier, const FShaderCodePackedResourceCounts &Counts, FShaderRegisterCounts &Shader, bool bAllowUAVs=false)
Definition D3D12Util.cpp:1136
uint8 bNeedsAgsIntrinsicsSpace
Definition D3D12Util.h:127
uint8 bUseDirectlyIndexedSamplerHeap
Definition D3D12Util.h:130
uint8 Padding
Definition D3D12Util.h:132
FRHIShaderBindingLayout ShaderBindingLayout
Definition D3D12Util.h:119
Definition D3D12Util.h:665
~FD3D12ScopeLock()
Definition D3D12Util.h:668
FD3D12ScopeLock(FCriticalSection *CritSec)
Definition D3D12Util.h:667
Definition D3D12Util.h:674
~FD3D12ScopeNoLock()
Definition D3D12Util.h:677
FD3D12ScopeNoLock(FCriticalSection *CritSec)
Definition D3D12Util.h:676
Definition D3D12View.h:109
int32 BlockBytes
Definition PixelFormat.h:470
Definition ShaderCore.h:773
Definition D3D12Util.h:93
uint8 UnorderedAccessCount
Definition D3D12Util.h:97
bool operator==(const FShaderRegisterCounts &RHS) const
Definition D3D12Util.h:99
uint8 SamplerCount
Definition D3D12Util.h:94
uint8 ConstantBufferCount
Definition D3D12Util.h:95
uint8 ShaderResourceCount
Definition D3D12Util.h:96
friend uint32 GetTypeHash(const FShaderRegisterCounts &Counts)
Definition D3D12Util.h:107
Definition D3D12Util.h:275
const uint32 GetSize() const
Definition D3D12Util.h:282
bool Peek(Type &Result)
Definition D3D12Util.h:343
bool Dequeue(Type &Result, const CompareFunc &Func)
Definition D3D12Util.h:299
void Enqueue(const Type &Item)
Definition D3D12Util.h:284
void Empty()
Definition D3D12Util.h:355
bool Dequeue(Type &Result)
Definition D3D12Util.h:291
bool BatchDequeue(TArray< ResultType > &Result, const CompareFunc &Func, uint32 MaxItems)
Definition D3D12Util.h:318
bool IsEmpty()
Definition D3D12Util.h:349