Skip to content

Commit

Permalink
[hldx] Upgraded hldx to 1.15.0 :
Browse files Browse the repository at this point in the history
- Added command_list_resource_barriers method
- Allowed state promotion for console
  • Loading branch information
TothBenoit committed Jan 31, 2024
1 parent 783cd2a commit 24184f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions libs/directx/dx/Dx12.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {}
Expand Down
6 changes: 6 additions & 0 deletions libs/directx/dx12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion libs/directx/haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license" : "BSD",
"contributors" : ["ncannasse"],
"description" : "DirectX support for Haxe/HL.",
"version" : "1.14.0",
"version" : "1.15.0",
"releasenote" : "",
"dependencies": {}
}

0 comments on commit 24184f4

Please sign in to comment.