Selaa lähdekoodia

[DX12] Update xbs code for newer GDK

TothBenoit 1 vuosi sitten
vanhempi
commit
495e60db81
2 muutettua tiedostoa jossa 1 lisäystä ja 10 poistoa
  1. 1 1
      libs/directx/dx/Dx12.hx
  2. 0 9
      libs/directx/dx12.cpp

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

@@ -355,7 +355,7 @@ enum abstract ResourceState(Int) {
 	public var SHADING_RATE_SOURCE = 0x1000000;
 	public var GENERIC_READ = 0x1 | 0x2 | 0x40 | 0x80 | 0x200 | 0x800;
 	public var ALL_SHADER_RESOURCE = 0x40 | 0x80;
-	public var PRESENT = 0;
+	public var PRESENT = #if ( console && !xbogdk ) 0x100000 #else 0 #end;
 	public var PREDICATION = 0x200;
 	public var VIDE_DECODE_READ = 0x10000;
 	public var VIDE_DECODE_WRITE = 0x20000;

+ 0 - 9
libs/directx/dx12.cpp

@@ -584,20 +584,11 @@ HL_PRIM void HL_NAME(resource_unmap)( ID3D12Resource *res, int subres, D3D12_RAN
 HL_PRIM int64 HL_NAME(get_required_intermediate_size)( ID3D12Resource *res, int first, int count ) {
 	auto desc = res->GetDesc();
 	UINT64 size = 0;
-#ifndef HL_XBS
 	static_driver->device->GetCopyableFootprints(&desc, first, count, 0, NULL, NULL, NULL, &size);
-#else
-	D3D12_PLACED_SUBRESOURCE_FOOTPRINT pLayouts;
-	static_driver->device->GetCopyableFootprints(&desc, first + count - 1, 1, 0, &pLayouts, NULL, NULL, &size);
-	size += pLayouts.Offset;
-#endif
 	return size;
 }
 
 HL_PRIM bool HL_NAME(update_sub_resource)( ID3D12GraphicsCommandList *cmd, ID3D12Resource *res, ID3D12Resource *tmp, int64 tmpOffs, int first, int count, D3D12_SUBRESOURCE_DATA *data ) {
-#ifdef HL_XBS
-	tmpOffs = 0;
-#endif
 	return UpdateSubresources(cmd,res,tmp,(UINT64)tmpOffs,(UINT)first,(UINT)count,data) != 0;
 }