Upgraded to DX12

This commit is contained in:
Axel1092 2020-09-25 20:19:28 +02:00 committed by Axel1092
parent 159801fd40
commit dfa4bb6e15
2 changed files with 6 additions and 18 deletions

View File

@ -103,3 +103,7 @@ DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel2,DefaultResponse=ECR_Ignore,bTraceType=True,bStaticObject=False,Name="SensorTrace")
+EditProfiles=(Name="BlockAll",CustomResponses=((Channel="SensorObject"),(Channel="SensorTrace")))
+EditProfiles=(Name="OverlapAll",CustomResponses=((Channel="SensorObject",Response=ECR_Overlap),(Channel="SensorTrace",Response=ECR_Overlap)))
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12

View File

@ -11,13 +11,6 @@
#include "HighResScreenshot.h"
#include "Runtime/ImageWriteQueue/Public/ImageWriteQueue.h"
// For now we only support Vulkan on Windows.
#if PLATFORM_WINDOWS
# define CARLA_WITH_VULKAN_SUPPORT 1
#else
# define CARLA_WITH_VULKAN_SUPPORT 1
#endif
// =============================================================================
// -- Local variables and types ------------------------------------------------
// =============================================================================
@ -43,8 +36,6 @@ struct LockTexture
// -- Static local functions ---------------------------------------------------
// =============================================================================
#if CARLA_WITH_VULKAN_SUPPORT == 1
// Temporal; this avoid allocating the array each time and also avoids checking
// for a bigger texture, ReadSurfaceData will allocate the space needed.
TArray<FColor> gPixels;
@ -76,8 +67,6 @@ static void WritePixelsToBuffer_Vulkan(
Buffer.copy_from(Offset, gPixels);
}
#endif // CARLA_WITH_VULKAN_SUPPORT
// =============================================================================
// -- FPixelReader -------------------------------------------------------------
// =============================================================================
@ -138,21 +127,16 @@ void FPixelReader::WritePixelsToBuffer(
UTextureRenderTarget2D &RenderTarget,
carla::Buffer &Buffer,
uint32 Offset,
FRHICommandListImmediate &
#if CARLA_WITH_VULKAN_SUPPORT == 1
InRHICmdList
#endif // CARLA_WITH_VULKAN_SUPPORT
FRHICommandListImmediate &InRHICmdList
)
{
check(IsInRenderingThread());
#if CARLA_WITH_VULKAN_SUPPORT == 1
if (IsVulkanPlatform(GMaxRHIShaderPlatform))
if (IsVulkanPlatform(GMaxRHIShaderPlatform) || IsD3DPlatform(GMaxRHIShaderPlatform, false))
{
WritePixelsToBuffer_Vulkan(RenderTarget, Buffer, Offset, InRHICmdList);
return;
}
#endif // CARLA_WITH_VULKAN_SUPPORT
FTextureRenderTargetResource* RenderTargetResource = RenderTarget.GetRenderTargetResource();
if(!RenderTargetResource)