Explorar o código

[hldx] Upgraded hldx to 1.15.0 :
- Added command_list_resource_barriers method
- Allowed state promotion for console

TothBenoit hai 1 ano
pai
achega
24184f41fd
Modificáronse 3 ficheiros con 8 adicións e 1 borrados
  1. 1 0
      libs/directx/dx/Dx12.hx
  2. 6 0
      libs/directx/dx12.cpp
  3. 1 1
      libs/directx/haxelib.json

+ 1 - 0
libs/directx/dx/Dx12.hx

@@ -180,6 +180,7 @@ abstract CommandList(Resource) {
 	public function clearDepthStencilView( rtv : Address, flags : ClearFlags, depth : Single, stencil : Int ) {}
 	public function reset( alloc : CommandAllocator, state : PipelineState ) {}
 	public function resourceBarrier( b : ResourceBarrier ) {}
+	public function resourceBarriers( b : hl.CArray<ResourceBarrier>, barrierCount : Int ) {}
 	public function setPipelineState( state : PipelineState ) {}
 	public function setDescriptorHeaps( heaps : hl.NativeArray<DescriptorHeap> ) {}
 	public function copyBufferRegion( dst : GpuResource, dstOffset : Int64, src : GpuResource, srcOffset : Int64, size : Int64 ) {}

+ 6 - 0
libs/directx/dx12.cpp

@@ -157,6 +157,7 @@ HL_PRIM dx_driver *HL_NAME(create)( HWND window, int flags, uchar *dev_desc ) {
 #if defined(_DEBUG)
 	params.ProcessDebugFlags = D3D12_PROCESS_DEBUG_FLAG_DEBUG_LAYER_ENABLED;
 #endif
+	params.ProcessDebugFlags |= D3D12XBOX_PROCESS_DEBUG_FLAG_ENABLE_COMMON_STATE_PROMOTION;
 	params.GraphicsCommandQueueRingSizeBytes = static_cast<UINT>(D3D12XBOX_DEFAULT_SIZE_BYTES);
 	params.GraphicsScratchMemorySizeBytes = static_cast<UINT>(D3D12XBOX_DEFAULT_SIZE_BYTES);
 	params.ComputeScratchMemorySizeBytes = static_cast<UINT>(D3D12XBOX_DEFAULT_SIZE_BYTES);
@@ -833,6 +834,10 @@ void HL_NAME(command_list_resource_barrier)( ID3D12GraphicsCommandList *l, D3D12
 	l->ResourceBarrier(1,barrier);
 }
 
+void HL_NAME(command_list_resource_barriers)(ID3D12GraphicsCommandList* l, D3D12_RESOURCE_BARRIER* barrier, int barrierCount) {
+	l->ResourceBarrier(barrierCount, barrier);
+}
+
 void HL_NAME(command_list_clear_render_target_view)( ID3D12GraphicsCommandList *l, D3D12_CPU_DESCRIPTOR_HANDLE view, FLOAT *colors ) {
 	l->ClearRenderTargetView(view,colors,0,NULL);
 }
@@ -971,6 +976,7 @@ DEFINE_PRIM(_RES, command_list_create, _I32 _RES _RES);
 DEFINE_PRIM(_VOID, command_list_close, _RES);
 DEFINE_PRIM(_VOID, command_list_reset, _RES _RES _RES);
 DEFINE_PRIM(_VOID, command_list_resource_barrier, _RES _STRUCT);
+DEFINE_PRIM(_VOID, command_list_resource_barriers, _RES _ABSTRACT(hl_carray) _I32);
 DEFINE_PRIM(_VOID, command_list_execute, _RES);
 DEFINE_PRIM(_VOID, command_list_clear_render_target_view, _RES _I64 _STRUCT);
 DEFINE_PRIM(_VOID, command_list_clear_depth_stencil_view, _RES _I64 _I32 _F32 _I32);

+ 1 - 1
libs/directx/haxelib.json

@@ -4,7 +4,7 @@
 	"license" : "BSD",
 	"contributors" : ["ncannasse"],
 	"description" : "DirectX support for Haxe/HL.",
-	"version" : "1.14.0",
+	"version" : "1.15.0",
 	"releasenote" : "",
 	"dependencies": {}
 }