Files
UnrealEngineUWP/Engine/Source/Runtime/NetworkFileSystem/Private/NetworkFileServerHttp.cpp

504 lines
14 KiB
C++
Raw Normal View History

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#if ENABLE_HTTP_FOR_NFS
#include "NetworkFileSystemPrivatePCH.h"
#include "NetworkFileServerHttp.h"
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
class FNetworkFileServerClientConnectionHTTP : public FNetworkFileServerClientConnection
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
public:
FNetworkFileServerClientConnectionHTTP(const FFileRequestDelegate& InFileRequestDelegate,
const FRecompileShadersDelegate& InRecompileShadersDelegate, const TArray<ITargetPlatform*>& InActiveTargetPlatforms )
: FNetworkFileServerClientConnection( InFileRequestDelegate,InRecompileShadersDelegate,InActiveTargetPlatforms)
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
}
bool SendPayload( TArray<uint8> &Out )
{
// Make Boundaries between payloads, add a visual marker for easier debugging.
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
uint32 Marker = 0xDeadBeef;
uint32 Size = Out.Num();
OutBuffer.Append((uint8*)&Marker,sizeof(uint32));
OutBuffer.Append((uint8*)&Size,sizeof(uint32));
OutBuffer.Append(Out);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
return true;
}
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
private:
TArray<uint8>& GetOutBuffer() { return OutBuffer; }
void ResetBuffer() { OutBuffer.Reset(); }
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
TArray<uint8> OutBuffer;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
friend class FNetworkFileServerHttp;
};
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
//////////////////////////////////////////////////////////////////////////
// LibWebsockets specific structs.
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// a object of this type is associated by libwebsocket to every http session.
struct PerSessionData
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// data being received.
TArray<uint8> In;
// data being sent out.
TArray<uint8> Out;
};
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// protocol array.
static struct libwebsocket_protocols Protocols[] = {
/* first protocol must always be HTTP handler */
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
"http-only", // name
FNetworkFileServerHttp::CallBack_HTTP, // callback
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
sizeof(PerSessionData), // per_session_data_size
15 * 1024,
15 * 1024
},
{
NULL, NULL, 0 /* End of list */
}
};
//////////////////////////////////////////////////////////////////////////
FNetworkFileServerHttp::FNetworkFileServerHttp(
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
int32 InPort,
const FFileRequestDelegate* InFileRequestDelegate,
const FRecompileShadersDelegate* InRecompileShadersDelegate,
const TArray<ITargetPlatform*>& InActiveTargetPlatforms
)
:ActiveTargetPlatforms(InActiveTargetPlatforms)
,Port(InPort)
{
if (Port < 0 )
{
Port = DEFAULT_HTTP_FILE_SERVING_PORT;
}
UE_LOG(LogFileServer, Warning, TEXT("Unreal Network Http File Server starting up..."));
if (InFileRequestDelegate && InFileRequestDelegate->IsBound())
{
FileRequestDelegate = *InFileRequestDelegate;
}
if (InRecompileShadersDelegate && InRecompileShadersDelegate->IsBound())
{
RecompileShadersDelegate = *InRecompileShadersDelegate;
}
StopRequested.Reset();
Ready.Reset();
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// spin up the worker thread, this will block till Init has executed on the freshly spinned up thread, Ready will have appropriate value
// set by the end of this function.
WorkerThread = FRunnableThread::Create(this,TEXT("FNetworkFileServerHttp"), 8 * 1024, TPri_AboveNormal);
}
bool FNetworkFileServerHttp::IsItReadyToAcceptConnections(void) const
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
return (Ready.GetValue() != 0);
}
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
#if UE_BUILD_DEBUG
void libwebsocket_debugLog(int level, const char *line)
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
{
UE_LOG(LogFileServer, Warning, TEXT(" LibWebsocket: %s"), ANSI_TO_TCHAR(line));
}
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
#endif
Copying //UE4/Dev-Platform to //UE4/Dev-Main (Source: //UE4/Dev-Platform @ 3046626) #rb none #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2948322 on 2016/04/19 by Nick.Shin update libwebsockets to v1.7.4 part 4 of 4 - doing this in stages for tracking purposes #jira UEPLAT-1246 - Update libWebsockets #jira UEPLAT-1221 - update websocket library #jira UEPLAT-1204 - Rebuild libwebsockets with SSL Change 2970016 on 2016/05/07 by Nick.Shin undo all of the following upgrades: - zlib - openssl - libcurl - libwebsockets and reset webrtc #jira UE-30298 - Fortnite and Orion crash on login Change 3020547 on 2016/06/20 by Jeff.Campeau Support for applocal deployment of binaries -applocaldir added to UAT to specify a per project directory to gather packages for applocal deployment Added ApplocalPrerequisitesDirectory property to packaging settings to set -applocaldir for packages built from the editor. Change 3020552 on 2016/06/20 by Jeff.Campeau Add switch to disable debug symbol cache creation Change 3020567 on 2016/06/20 by Jeff.Campeau constexpr enabled for Xbox One Change 3020568 on 2016/06/20 by Jeff.Campeau Separate setting for debug #jira UEPLAT-1348 Change 3020628 on 2016/06/20 by Jeff.Campeau Use global view instead of relying on current thread (fixes issues if pump message is called from a different thread). Change 3020629 on 2016/06/20 by Jeff.Campeau Use Slate tick to drive message processing during blocking loads (improves PLM). Change 3020633 on 2016/06/20 by Jeff.Campeau Fix Xbox One toolchain pathing to work for environment variables with and without trailing slashes. Pass requested XDK edition to VCVars batch file (fixes issues in building with a newer XDK installed SxS than the engine is configured for). Change 3020873 on 2016/06/21 by Lee.Clark PS4 - Fix missing audio when using A3D. Change 3021225 on 2016/06/21 by Keith.Judge Optimized away a bunch of GetVertexShader() calls in FSplineMeshVertexFactoryShaderParameters::SetMesh(). Saves about 0.9ms across a 100ms capture. Change 3021286 on 2016/06/21 by Dmitry.Rekman Linux: symbolication for memory profiler. - Also repaired/improved finding function name from debug info and overall callstack parsing. #tests Ran Linux editor and TestPAL, crashed multiple times Change 3021512 on 2016/06/21 by Mark.Satterthwaite Compile fixes for new clang version. Change 3021521 on 2016/06/21 by Mark.Satterthwaite Duplicate Fortnite CL #3013418: Don't release Metal buffers directly into the buffer pool, instead defer this until the command-buffer is known to have finished. This prevents the CPU from trying to modify the buffer while the GPU is still reading it if the GPU has fallen so far behind the CPU and therefore eliminates one possible cause of invalid access on the GPU. Change 3021528 on 2016/06/21 by Mark.Satterthwaite Make the Metal buffer pool cull after 30 frames - this will better match Apple's GART which unwires unused allocations after 1sec of idle, making them as expensive to use allocating a new buffer. Change 3021595 on 2016/06/21 by Mark.Satterthwaite Consolidate the way in which optional Metal features are exposed across macOS, iOS & tvOS devices & expose all the available features, unifying more of the code across all three platforms. - Implement Metal Depth-16 and stencil-texture-view support where available. - Use counting queries in Metal when available and expected (i.e. Metal_SM4+ or Metal_MRT+). - On latest iOS devices running Metal export support for GRHISupportsBaseVertexIndex & GRHISupportsFirstInstance when available. - On latest iOS devices running Metal export support for indirect buffer draw and dispatch calls. - Specify Metal layered rendering like any other and change the code so that there aren't preprocessor defines in the code. This lets the Metal MRT path assert if anyone ever tries to issue a layered draw call as its only supported on Mac. - Add support to Metal for setting UAVs from a uniform buffer. - Remove unused GlobalUniform header from MetalRHI. - Remove unnecessary FrameCount delay from Metal resource free lists. Change 3021702 on 2016/06/21 by Mark.Satterthwaite Fix mis-use of FreeListMutex instead of PoolMutex in MetalContext. Change 3022152 on 2016/06/21 by Nick.Shin Back out revision 5 from //UE4/Dev-Platform/Engine/Source/Runtime/NetworkFileSystem/Private/NetworkFileServerHttp.cpp forgot to un-do this when the giant revert (CL: #2970016) was done #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 3022409 on 2016/06/21 by Dmitry.Rekman Fixed inability to run Setup.sh on Ubuntu 14.04 (UE-29289). - Contains PR #2258 (contributed by wshearn). Change 3022541 on 2016/06/22 by Lee.Clark PS4 - Make sure the render target masks are set correctly for disabled render targets. Fixes a validation check for shaders expecting to write to NULL render targets. Change 3022973 on 2016/06/22 by Michael.Trepka Fixed a problem in MacToolChain where both BuildConfiguration.bGeneratedSYMFile and BuildConfiguration.bUsePDBFiles set to false would not disable dSYM generation. Change 3023106 on 2016/06/22 by Dmitry.Rekman Linux: enable code to catch memory stomps during async loading. - Changed FLinuxPlatformMemory::BinnedAllocFrom/FreeToOS() to use mmap()/munmap(). Updated platform function signature accordingly. #tests Ran OrionServer on Linux (and OrionClient on Windows as a zero probe), tested also with running Linux editor with binned malloc. Change 3023256 on 2016/06/22 by Mark.Satterthwaite Fix compile errors from latest Metal changes that broke iOS. Change 3023268 on 2016/06/22 by Mark.Satterthwaite Use the Linux mmap/munmap/mprotect code to implement BinnedAllocFromOS/BinnedFreeToOS/PageProtect on Apple platforms as they are all equivalent. Change 3023651 on 2016/06/22 by Mark.Satterthwaite Make Metal SM5 the default for 10.11.5 or later, this time most of the features should be working on AMD & Nvidia, though tiled-reflections and distance-field AO/Shadows must still be forcibly disabled on Intel. Change 3023777 on 2016/06/22 by Brent.Pease + Update config for Android and iOS Change 3023781 on 2016/06/22 by Chris.Babcock Use mmap/munmap for Android BinnedAllocFromOS #ue4 #android Change 3023947 on 2016/06/22 by Mark.Satterthwaite Added a command-line switch for Mac "-RedirectNSLog" that will capture the output of NSLog using an NSPipe and write it into our log instead when not running under the debugger, thereby capturing output from underlying libraries that would otherwise be lost when outside a debugger. Change 3024434 on 2016/06/23 by Lee.Clark PS4 - Remove Delta Color Compression support Change 3024735 on 2016/06/23 by Mark.Satterthwaite Changes to MetalStatistics module initialisation. Change 3024741 on 2016/06/23 by Mark.Satterthwaite Change the way we test for Metal GPU support to avoid instantiating any MTLDevice's until MetalRHI is loaded so we can properly instantiate optional modules. Change 3025477 on 2016/06/23 by Brent.Pease + Added UnrealPluginLanguage.cs based on AndroidPluginLanguage.cs + Change UEDeployAndroid.cs to use UnrealPluginLanguage Change 3026085 on 2016/06/23 by Jeff.Campeau Separate Xbox One target settings for editor only values Move values that need to be loaded by the editor into the default inis (editor won't load target specific inis) Eliminate circular dependency on Xbox One settings (causing settings to either not load or memory corruption on shutdown) Clean up cached ini sections for UBT/UAT Change 3026093 on 2016/06/23 by Jeff.Campeau Cleanup unused files Change 3026745 on 2016/06/24 by Mark.Satterthwaite + Implemented rudimentary runtime debugging of MetalRHI with several different levels of complexity controlled by the new console-variable "rhi.Metal.RuntimeDebugLevel". + The MetalStateCache must also correctly set the render-pass descriptor when the previous render-target load action was 'Clear' as we will need to switch render targets or we'll mistakenly clear again. + Queries must not reset the MetalStateCache when they overflow the available buffer space, they simply break the encoder. - By default "rhi.Metal.RuntimeDebugLevel" is off & it is compiled out for Shipping - when enabled each higher level collects more data or changes the MetalRHI behaviour to make a command-buffer failure mode debuggable at the expense of performance. In order for this to work the number of command-buffers that may be allocated from the command-queue is also controllable via a console-variable "rhi.Metal.CommandQueueSize" which must be set prior to startup. Change 3026831 on 2016/06/24 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3026940 on 2016/06/24 by Brent.Pease PR #2458: added GetGameBundleId blueprint function (Contributed by derekvanvliet) Change 3027396 on 2016/06/24 by Brent.Pease Add BuildGraph.csproj to get Xamarin .sln builds working again Change 3029211 on 2016/06/27 by Michael.Trepka Added a setting (on by default) to make the game window preserve its content's aspect ratio while being resized by user Change 3029518 on 2016/06/27 by Josh.Adams Rollback //UE4/Dev-Platform/Engine/Build/BatchFiles/Mac/xcodeunlock.sh to revision 1 Change 3030385 on 2016/06/28 by Keith.Judge Fix XB1 deployment issues with AppXManifest for Paragon. Change 3030416 on 2016/06/28 by Lee.Clark PS4 - Fix Mediaplayer IsPlaying Change 3030922 on 2016/06/28 by Keith.Judge XB1 - Add pass through _RenderThread resource creation functions to D3D11.x RHI. Stops the render/RHI threads from stalling so much. Change 3030948 on 2016/06/28 by Jeff.Campeau Revert to using constant chunk indexes instead of polling the OS. (OS API has a bug that will not be fixed.) Change 3031016 on 2016/06/28 by Brent.Pease UEPLAT-1244 - Archive dSYM file UEPLAT-1359 - Support creating dSYM bundle Changes: + Added ios settings flag for dsym bundle + Added ios setting for creating xcode archive + xcode archive is now only put in the mac host or build machine's ~/Library/Developer/Xcode/Archives folder, it is not copied into the -archive folder like the ipa is Change 3031352 on 2016/06/28 by Bob.Tellez Added tps file for xcodeunlock Change 3031604 on 2016/06/28 by Mark.Satterthwaite Add an additional cast to flush-to-zero in the Metal shader translator bounds-checking code to avoid an internal GPU compiler error. Change 3031879 on 2016/06/28 by Brent.Pease + PhysX libraries for bitcode support on tvOS. Change 3032374 on 2016/06/29 by Keith.Judge Enable Oodle Handler Component on Xbox One Change 3032407 on 2016/06/29 by Keith.Judge Xbox One - Disable UpdateBufferStats when STATS is 0. Small perf gain. Change 3032432 on 2016/06/29 by Keith.Judge XB1 CPU Perf - Make CreateVertexDeclaration_RenderThread much faster by implementing a pass through to the RHI function rather than stalling the RHI thread. Change 3033474 on 2016/06/29 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3033603 on 2016/06/29 by Brent.Pease + Support UnrealPluginLanguage for IOS and TVOS builds + Allow ios/tvos UPL files an opportunity to modify a package's info.plist file Change 3034004 on 2016/06/30 by Lee.Clark PS4 - Use SDK 3.508.101 Change 3034007 on 2016/06/30 by Lee.Clark PS4 - VRTracker now uses SCE_VR_TRACKER_ROBUSTNESS_LEVEL_HIGH Change 3034173 on 2016/06/30 by Lee.Clark PS4 - Make sure depth target is null when eliminating fast clears. Fixes a GNM Validation failure Change 3034498 on 2016/06/30 by Jeff.Campeau Use MSBuild version 14 when generating project files. Change 3034943 on 2016/06/30 by Mark.Satterthwaite For Metal modify the MTLVertexDescriptor when calls to SetStreamSource provide different strides than the initial vertex-declaration which then requires compiling a different MTLRenderPipelineState. This silences errors reported by the Metal debug layer where the larger stride would see the shader read beyond the end of the buffer, but the smaller stride provided by SetStreamSource would work correctly. This may eliminate some more causes of Page-Fault GPU restarts. Change 3035416 on 2016/07/01 by Lee.Clark PS4 - Replace export vertex shader check with a CFLAG Change 3036093 on 2016/07/01 by Brent.Pease + Fix dSYM bundle path on Windows ios builds + Search for DeltaCopy directory if its not found from the user settings + Do not build an XCArchive file when building for ios on non-mac platforms Change 3036726 on 2016/07/02 by Brent.Pease + Add missing tvOS bitcode library Change 3037455 on 2016/07/05 by Lee.Clark PS4 - Default SmoothFrameRate to false Change 3037470 on 2016/07/05 by Keith.Judge Xbox One - Allow framerate smoothing, but default to off for consistency with PS4. Change 3038322 on 2016/07/05 by Jeremiah.Waldron Fix for asset packages with Unicode characters in their name not being loaded on Android. Fixing AndroidString's WIDECHAR* Strstr(WIDECHAR*, WIDECHAR*) function - Using an implementation of wcsstr, with a fix integrated for the incorrect implementation in Android ndk master branch, instead of converting the incoming WIDECHAR strings to ANSI strings just to be able to use strstr on them. The previous method was prone to causing the FString's Find and Contains functions to return false positives because when we convert wide to ansi, any character over the value of 255 is just set to '?' This in turn caused any package path strings with one of those characters in it to fail to load since they would be interpreted as having a question mark in their path, which is an invalid path character. #jira UE-18643 #android Change 3038693 on 2016/07/05 by Mark.Satterthwaite Change the way we store debug info for Metal shaders - the KeepDebugInfo flag now does precisely that, storing the shader code into the Metal header along with the path it was generated from. That means if KeepDebugInfo is enabled and Optimise is disabled then we can still access the shader code from within the Metal tools. On iOS/tvOS the shader code will be runtime compiled so that it shows up in the tooling but on Macs it will prefer to load the optimised version and simply unpack the shader code to the path from which it was compiled. This only works if we change the Metal shader compiler to emit temporary Metal files to the OS temporary directory so that the tools can read the file directly. Change 3039880 on 2016/07/06 by Mark.Satterthwaite Implement point-light shadow caching for RHI's that support specifying the render target layer from the vertex shader in lieu of geometry shaders. This requires changing FScreenVSForGS to TScreenVSForGS so that there can be a vertex-shader-layer variant (only compiled on RHI's that use it) whose output matches FCopyShadowMapsCubePS input. This alternative rendering path also requires adding the instance count to DrawRectangle so that we can render to all faces of the cubemap from a single draw call. Change 3040407 on 2016/07/06 by Michael.Trepka Added View->Enter Full Screen menu item for games on Mac Change 3040550 on 2016/07/06 by Mark.Satterthwaite Intel Metal compiler requires bool expressions be cast to 'int' rather than 'uint'. Change 3041098 on 2016/07/07 by Peter.Sauerbrei initial changes to get IOS builds from PC in launcher release of engine Change 3041310 on 2016/07/07 by Keith.Judge Xbox One - Optimize away GetDesc() and checks for D3D11_USAGE_DYNAMIC deep in the state cache as it's impossible for any buffer to have that flag set. Change 3041327 on 2016/07/07 by Keith.Judge Xbox One - Remove pointless memory barrier call in D3D11Query Change 3041352 on 2016/07/07 by Keith.Judge Xbox One - Add _RenderThread version of UpdateTexture2D() that just passes through to the RHI one. Saves a fairly significant chunk of time on the render/RHI thread when this is called a lot. Change 3041419 on 2016/07/07 by Jeff.Campeau Xbox One toolchain fix for VS2015 Update 3 Change 3041635 on 2016/07/07 by Jeff.Campeau Don't change game render resolution in response to WM_SIZE messages when in fullscreen (the game will restore the correct video mode when the window is restored). #jira OR-15578 Change 3041735 on 2016/07/07 by Peter.Sauerbrei re-enabled the build parameters for launcher release builds in IOS Change 3041783 on 2016/07/07 by Joe.Graf Changed bAutpApplyFailed to bAutoApplyFailed (typo) Change 3041784 on 2016/07/07 by Joe.Graf Fixed missing %s from a log message in UResavePackagesCommandlet Change 3042434 on 2016/07/08 by Lee.Clark PS4 - Fix compilation failure when Unsafe Command Buffers are enabled. Change 3042658 on 2016/07/08 by Lee.Clark PS4 - Use SDK 3.508.201 Change 3042970 on 2016/07/08 by Josh.Adams Redoing CL in 3040890 in Dev-Platform Change 3043243 on 2016/07/08 by Chris.Babcock clamped allowed slot range for gameplay debugger's categories copy of CL# 3040313 from //UE4/Dev-Framework #jira UE-32866 Change 3043500 on 2016/07/08 by Mark.Satterthwaite Downgrade "-Wdelete-non-virtual-dtor " to a warning again for Xcode 8 on iOS/tvOS to match macOS. Change 3044628 on 2016/07/11 by Mark.Satterthwaite Disable ShaderCache by default - it was implemented prior to RHI-thread/parallel-execution so it isn't thread-safe and can't be enabled by default on Mac now that Metal supports these features. #jira UE-32989 Change 3044948 on 2016/07/11 by Dmitry.Rekman Fix editor crash (happened on Linux, but not really specific to it) (UE-32973) - We can pass flags with shadows enabled when rendering asset thumbnails; thus disable shadows always when r.ShadowQuality is 0. (Redoing CL 3029574 by Bob). - Also fix mismatched 'noperspective' qualifier that caused NVidia drivers to refuse to link GL shaders. #jira UE-32973 Change 3045322 on 2016/07/11 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3046028 on 2016/07/12 by Lee.Clark PS4 - Check for correct SDK installation Allow use of 7th core when Morpheus is enabled Change 3046339 on 2016/07/12 by Peter.Sauerbrei fix for incorrect error message when iPhone Plus icon is the correct size [CL 3046645 by Josh Adams in Main branch]
2016-07-12 15:06:08 -04:00
FNetworkFileServerHttp* user_space_patch = NULL;
bool FNetworkFileServerHttp::Init()
{
// setup log level.
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
#if UE_BUILD_DEBUG
lws_set_log_level( LLL_ERR | LLL_WARN | LLL_NOTICE | LLL_DEBUG , libwebsocket_debugLog);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
#endif
struct lws_context_creation_info Info;
memset(&Info,0,sizeof(lws_context_creation_info));
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// look up libwebsockets.h for details.
Info.port = Port;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// we listen on all available interfaces.
Info.iface = NULL;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// serve only the http protocols.
Info.protocols = Protocols;
// no extensions
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
Info.extensions = NULL;
Info.gid = -1;
Info.uid = -1;
Info.options = 0;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// tack on this object.
Info.user = this;
Context = libwebsocket_create_context(&Info);
Port = Info.port;
if (Context == NULL) {
UE_LOG(LogFileServer, Fatal, TEXT(" Could not create a libwebsocket content for port : %d"), Port);
return false;
}
Copying //UE4/Dev-Platform to //UE4/Dev-Main (Source: //UE4/Dev-Platform @ 3046626) #rb none #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2948322 on 2016/04/19 by Nick.Shin update libwebsockets to v1.7.4 part 4 of 4 - doing this in stages for tracking purposes #jira UEPLAT-1246 - Update libWebsockets #jira UEPLAT-1221 - update websocket library #jira UEPLAT-1204 - Rebuild libwebsockets with SSL Change 2970016 on 2016/05/07 by Nick.Shin undo all of the following upgrades: - zlib - openssl - libcurl - libwebsockets and reset webrtc #jira UE-30298 - Fortnite and Orion crash on login Change 3020547 on 2016/06/20 by Jeff.Campeau Support for applocal deployment of binaries -applocaldir added to UAT to specify a per project directory to gather packages for applocal deployment Added ApplocalPrerequisitesDirectory property to packaging settings to set -applocaldir for packages built from the editor. Change 3020552 on 2016/06/20 by Jeff.Campeau Add switch to disable debug symbol cache creation Change 3020567 on 2016/06/20 by Jeff.Campeau constexpr enabled for Xbox One Change 3020568 on 2016/06/20 by Jeff.Campeau Separate setting for debug #jira UEPLAT-1348 Change 3020628 on 2016/06/20 by Jeff.Campeau Use global view instead of relying on current thread (fixes issues if pump message is called from a different thread). Change 3020629 on 2016/06/20 by Jeff.Campeau Use Slate tick to drive message processing during blocking loads (improves PLM). Change 3020633 on 2016/06/20 by Jeff.Campeau Fix Xbox One toolchain pathing to work for environment variables with and without trailing slashes. Pass requested XDK edition to VCVars batch file (fixes issues in building with a newer XDK installed SxS than the engine is configured for). Change 3020873 on 2016/06/21 by Lee.Clark PS4 - Fix missing audio when using A3D. Change 3021225 on 2016/06/21 by Keith.Judge Optimized away a bunch of GetVertexShader() calls in FSplineMeshVertexFactoryShaderParameters::SetMesh(). Saves about 0.9ms across a 100ms capture. Change 3021286 on 2016/06/21 by Dmitry.Rekman Linux: symbolication for memory profiler. - Also repaired/improved finding function name from debug info and overall callstack parsing. #tests Ran Linux editor and TestPAL, crashed multiple times Change 3021512 on 2016/06/21 by Mark.Satterthwaite Compile fixes for new clang version. Change 3021521 on 2016/06/21 by Mark.Satterthwaite Duplicate Fortnite CL #3013418: Don't release Metal buffers directly into the buffer pool, instead defer this until the command-buffer is known to have finished. This prevents the CPU from trying to modify the buffer while the GPU is still reading it if the GPU has fallen so far behind the CPU and therefore eliminates one possible cause of invalid access on the GPU. Change 3021528 on 2016/06/21 by Mark.Satterthwaite Make the Metal buffer pool cull after 30 frames - this will better match Apple's GART which unwires unused allocations after 1sec of idle, making them as expensive to use allocating a new buffer. Change 3021595 on 2016/06/21 by Mark.Satterthwaite Consolidate the way in which optional Metal features are exposed across macOS, iOS & tvOS devices & expose all the available features, unifying more of the code across all three platforms. - Implement Metal Depth-16 and stencil-texture-view support where available. - Use counting queries in Metal when available and expected (i.e. Metal_SM4+ or Metal_MRT+). - On latest iOS devices running Metal export support for GRHISupportsBaseVertexIndex & GRHISupportsFirstInstance when available. - On latest iOS devices running Metal export support for indirect buffer draw and dispatch calls. - Specify Metal layered rendering like any other and change the code so that there aren't preprocessor defines in the code. This lets the Metal MRT path assert if anyone ever tries to issue a layered draw call as its only supported on Mac. - Add support to Metal for setting UAVs from a uniform buffer. - Remove unused GlobalUniform header from MetalRHI. - Remove unnecessary FrameCount delay from Metal resource free lists. Change 3021702 on 2016/06/21 by Mark.Satterthwaite Fix mis-use of FreeListMutex instead of PoolMutex in MetalContext. Change 3022152 on 2016/06/21 by Nick.Shin Back out revision 5 from //UE4/Dev-Platform/Engine/Source/Runtime/NetworkFileSystem/Private/NetworkFileServerHttp.cpp forgot to un-do this when the giant revert (CL: #2970016) was done #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 3022409 on 2016/06/21 by Dmitry.Rekman Fixed inability to run Setup.sh on Ubuntu 14.04 (UE-29289). - Contains PR #2258 (contributed by wshearn). Change 3022541 on 2016/06/22 by Lee.Clark PS4 - Make sure the render target masks are set correctly for disabled render targets. Fixes a validation check for shaders expecting to write to NULL render targets. Change 3022973 on 2016/06/22 by Michael.Trepka Fixed a problem in MacToolChain where both BuildConfiguration.bGeneratedSYMFile and BuildConfiguration.bUsePDBFiles set to false would not disable dSYM generation. Change 3023106 on 2016/06/22 by Dmitry.Rekman Linux: enable code to catch memory stomps during async loading. - Changed FLinuxPlatformMemory::BinnedAllocFrom/FreeToOS() to use mmap()/munmap(). Updated platform function signature accordingly. #tests Ran OrionServer on Linux (and OrionClient on Windows as a zero probe), tested also with running Linux editor with binned malloc. Change 3023256 on 2016/06/22 by Mark.Satterthwaite Fix compile errors from latest Metal changes that broke iOS. Change 3023268 on 2016/06/22 by Mark.Satterthwaite Use the Linux mmap/munmap/mprotect code to implement BinnedAllocFromOS/BinnedFreeToOS/PageProtect on Apple platforms as they are all equivalent. Change 3023651 on 2016/06/22 by Mark.Satterthwaite Make Metal SM5 the default for 10.11.5 or later, this time most of the features should be working on AMD & Nvidia, though tiled-reflections and distance-field AO/Shadows must still be forcibly disabled on Intel. Change 3023777 on 2016/06/22 by Brent.Pease + Update config for Android and iOS Change 3023781 on 2016/06/22 by Chris.Babcock Use mmap/munmap for Android BinnedAllocFromOS #ue4 #android Change 3023947 on 2016/06/22 by Mark.Satterthwaite Added a command-line switch for Mac "-RedirectNSLog" that will capture the output of NSLog using an NSPipe and write it into our log instead when not running under the debugger, thereby capturing output from underlying libraries that would otherwise be lost when outside a debugger. Change 3024434 on 2016/06/23 by Lee.Clark PS4 - Remove Delta Color Compression support Change 3024735 on 2016/06/23 by Mark.Satterthwaite Changes to MetalStatistics module initialisation. Change 3024741 on 2016/06/23 by Mark.Satterthwaite Change the way we test for Metal GPU support to avoid instantiating any MTLDevice's until MetalRHI is loaded so we can properly instantiate optional modules. Change 3025477 on 2016/06/23 by Brent.Pease + Added UnrealPluginLanguage.cs based on AndroidPluginLanguage.cs + Change UEDeployAndroid.cs to use UnrealPluginLanguage Change 3026085 on 2016/06/23 by Jeff.Campeau Separate Xbox One target settings for editor only values Move values that need to be loaded by the editor into the default inis (editor won't load target specific inis) Eliminate circular dependency on Xbox One settings (causing settings to either not load or memory corruption on shutdown) Clean up cached ini sections for UBT/UAT Change 3026093 on 2016/06/23 by Jeff.Campeau Cleanup unused files Change 3026745 on 2016/06/24 by Mark.Satterthwaite + Implemented rudimentary runtime debugging of MetalRHI with several different levels of complexity controlled by the new console-variable "rhi.Metal.RuntimeDebugLevel". + The MetalStateCache must also correctly set the render-pass descriptor when the previous render-target load action was 'Clear' as we will need to switch render targets or we'll mistakenly clear again. + Queries must not reset the MetalStateCache when they overflow the available buffer space, they simply break the encoder. - By default "rhi.Metal.RuntimeDebugLevel" is off & it is compiled out for Shipping - when enabled each higher level collects more data or changes the MetalRHI behaviour to make a command-buffer failure mode debuggable at the expense of performance. In order for this to work the number of command-buffers that may be allocated from the command-queue is also controllable via a console-variable "rhi.Metal.CommandQueueSize" which must be set prior to startup. Change 3026831 on 2016/06/24 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3026940 on 2016/06/24 by Brent.Pease PR #2458: added GetGameBundleId blueprint function (Contributed by derekvanvliet) Change 3027396 on 2016/06/24 by Brent.Pease Add BuildGraph.csproj to get Xamarin .sln builds working again Change 3029211 on 2016/06/27 by Michael.Trepka Added a setting (on by default) to make the game window preserve its content's aspect ratio while being resized by user Change 3029518 on 2016/06/27 by Josh.Adams Rollback //UE4/Dev-Platform/Engine/Build/BatchFiles/Mac/xcodeunlock.sh to revision 1 Change 3030385 on 2016/06/28 by Keith.Judge Fix XB1 deployment issues with AppXManifest for Paragon. Change 3030416 on 2016/06/28 by Lee.Clark PS4 - Fix Mediaplayer IsPlaying Change 3030922 on 2016/06/28 by Keith.Judge XB1 - Add pass through _RenderThread resource creation functions to D3D11.x RHI. Stops the render/RHI threads from stalling so much. Change 3030948 on 2016/06/28 by Jeff.Campeau Revert to using constant chunk indexes instead of polling the OS. (OS API has a bug that will not be fixed.) Change 3031016 on 2016/06/28 by Brent.Pease UEPLAT-1244 - Archive dSYM file UEPLAT-1359 - Support creating dSYM bundle Changes: + Added ios settings flag for dsym bundle + Added ios setting for creating xcode archive + xcode archive is now only put in the mac host or build machine's ~/Library/Developer/Xcode/Archives folder, it is not copied into the -archive folder like the ipa is Change 3031352 on 2016/06/28 by Bob.Tellez Added tps file for xcodeunlock Change 3031604 on 2016/06/28 by Mark.Satterthwaite Add an additional cast to flush-to-zero in the Metal shader translator bounds-checking code to avoid an internal GPU compiler error. Change 3031879 on 2016/06/28 by Brent.Pease + PhysX libraries for bitcode support on tvOS. Change 3032374 on 2016/06/29 by Keith.Judge Enable Oodle Handler Component on Xbox One Change 3032407 on 2016/06/29 by Keith.Judge Xbox One - Disable UpdateBufferStats when STATS is 0. Small perf gain. Change 3032432 on 2016/06/29 by Keith.Judge XB1 CPU Perf - Make CreateVertexDeclaration_RenderThread much faster by implementing a pass through to the RHI function rather than stalling the RHI thread. Change 3033474 on 2016/06/29 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3033603 on 2016/06/29 by Brent.Pease + Support UnrealPluginLanguage for IOS and TVOS builds + Allow ios/tvos UPL files an opportunity to modify a package's info.plist file Change 3034004 on 2016/06/30 by Lee.Clark PS4 - Use SDK 3.508.101 Change 3034007 on 2016/06/30 by Lee.Clark PS4 - VRTracker now uses SCE_VR_TRACKER_ROBUSTNESS_LEVEL_HIGH Change 3034173 on 2016/06/30 by Lee.Clark PS4 - Make sure depth target is null when eliminating fast clears. Fixes a GNM Validation failure Change 3034498 on 2016/06/30 by Jeff.Campeau Use MSBuild version 14 when generating project files. Change 3034943 on 2016/06/30 by Mark.Satterthwaite For Metal modify the MTLVertexDescriptor when calls to SetStreamSource provide different strides than the initial vertex-declaration which then requires compiling a different MTLRenderPipelineState. This silences errors reported by the Metal debug layer where the larger stride would see the shader read beyond the end of the buffer, but the smaller stride provided by SetStreamSource would work correctly. This may eliminate some more causes of Page-Fault GPU restarts. Change 3035416 on 2016/07/01 by Lee.Clark PS4 - Replace export vertex shader check with a CFLAG Change 3036093 on 2016/07/01 by Brent.Pease + Fix dSYM bundle path on Windows ios builds + Search for DeltaCopy directory if its not found from the user settings + Do not build an XCArchive file when building for ios on non-mac platforms Change 3036726 on 2016/07/02 by Brent.Pease + Add missing tvOS bitcode library Change 3037455 on 2016/07/05 by Lee.Clark PS4 - Default SmoothFrameRate to false Change 3037470 on 2016/07/05 by Keith.Judge Xbox One - Allow framerate smoothing, but default to off for consistency with PS4. Change 3038322 on 2016/07/05 by Jeremiah.Waldron Fix for asset packages with Unicode characters in their name not being loaded on Android. Fixing AndroidString's WIDECHAR* Strstr(WIDECHAR*, WIDECHAR*) function - Using an implementation of wcsstr, with a fix integrated for the incorrect implementation in Android ndk master branch, instead of converting the incoming WIDECHAR strings to ANSI strings just to be able to use strstr on them. The previous method was prone to causing the FString's Find and Contains functions to return false positives because when we convert wide to ansi, any character over the value of 255 is just set to '?' This in turn caused any package path strings with one of those characters in it to fail to load since they would be interpreted as having a question mark in their path, which is an invalid path character. #jira UE-18643 #android Change 3038693 on 2016/07/05 by Mark.Satterthwaite Change the way we store debug info for Metal shaders - the KeepDebugInfo flag now does precisely that, storing the shader code into the Metal header along with the path it was generated from. That means if KeepDebugInfo is enabled and Optimise is disabled then we can still access the shader code from within the Metal tools. On iOS/tvOS the shader code will be runtime compiled so that it shows up in the tooling but on Macs it will prefer to load the optimised version and simply unpack the shader code to the path from which it was compiled. This only works if we change the Metal shader compiler to emit temporary Metal files to the OS temporary directory so that the tools can read the file directly. Change 3039880 on 2016/07/06 by Mark.Satterthwaite Implement point-light shadow caching for RHI's that support specifying the render target layer from the vertex shader in lieu of geometry shaders. This requires changing FScreenVSForGS to TScreenVSForGS so that there can be a vertex-shader-layer variant (only compiled on RHI's that use it) whose output matches FCopyShadowMapsCubePS input. This alternative rendering path also requires adding the instance count to DrawRectangle so that we can render to all faces of the cubemap from a single draw call. Change 3040407 on 2016/07/06 by Michael.Trepka Added View->Enter Full Screen menu item for games on Mac Change 3040550 on 2016/07/06 by Mark.Satterthwaite Intel Metal compiler requires bool expressions be cast to 'int' rather than 'uint'. Change 3041098 on 2016/07/07 by Peter.Sauerbrei initial changes to get IOS builds from PC in launcher release of engine Change 3041310 on 2016/07/07 by Keith.Judge Xbox One - Optimize away GetDesc() and checks for D3D11_USAGE_DYNAMIC deep in the state cache as it's impossible for any buffer to have that flag set. Change 3041327 on 2016/07/07 by Keith.Judge Xbox One - Remove pointless memory barrier call in D3D11Query Change 3041352 on 2016/07/07 by Keith.Judge Xbox One - Add _RenderThread version of UpdateTexture2D() that just passes through to the RHI one. Saves a fairly significant chunk of time on the render/RHI thread when this is called a lot. Change 3041419 on 2016/07/07 by Jeff.Campeau Xbox One toolchain fix for VS2015 Update 3 Change 3041635 on 2016/07/07 by Jeff.Campeau Don't change game render resolution in response to WM_SIZE messages when in fullscreen (the game will restore the correct video mode when the window is restored). #jira OR-15578 Change 3041735 on 2016/07/07 by Peter.Sauerbrei re-enabled the build parameters for launcher release builds in IOS Change 3041783 on 2016/07/07 by Joe.Graf Changed bAutpApplyFailed to bAutoApplyFailed (typo) Change 3041784 on 2016/07/07 by Joe.Graf Fixed missing %s from a log message in UResavePackagesCommandlet Change 3042434 on 2016/07/08 by Lee.Clark PS4 - Fix compilation failure when Unsafe Command Buffers are enabled. Change 3042658 on 2016/07/08 by Lee.Clark PS4 - Use SDK 3.508.201 Change 3042970 on 2016/07/08 by Josh.Adams Redoing CL in 3040890 in Dev-Platform Change 3043243 on 2016/07/08 by Chris.Babcock clamped allowed slot range for gameplay debugger's categories copy of CL# 3040313 from //UE4/Dev-Framework #jira UE-32866 Change 3043500 on 2016/07/08 by Mark.Satterthwaite Downgrade "-Wdelete-non-virtual-dtor " to a warning again for Xcode 8 on iOS/tvOS to match macOS. Change 3044628 on 2016/07/11 by Mark.Satterthwaite Disable ShaderCache by default - it was implemented prior to RHI-thread/parallel-execution so it isn't thread-safe and can't be enabled by default on Mac now that Metal supports these features. #jira UE-32989 Change 3044948 on 2016/07/11 by Dmitry.Rekman Fix editor crash (happened on Linux, but not really specific to it) (UE-32973) - We can pass flags with shadows enabled when rendering asset thumbnails; thus disable shadows always when r.ShadowQuality is 0. (Redoing CL 3029574 by Bob). - Also fix mismatched 'noperspective' qualifier that caused NVidia drivers to refuse to link GL shaders. #jira UE-32973 Change 3045322 on 2016/07/11 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3046028 on 2016/07/12 by Lee.Clark PS4 - Check for correct SDK installation Allow use of 7th core when Morpheus is enabled Change 3046339 on 2016/07/12 by Peter.Sauerbrei fix for incorrect error message when iPhone Plus icon is the correct size [CL 3046645 by Josh Adams in Main branch]
2016-07-12 15:06:08 -04:00
// ========================================
// March 11 2016 - nick.shin
// libwebsocket_create_context() above is not setting the user_space pointer properly
// this can be corrected with the following two code changes:
//#include "private-libwebsockets.h" // put this in NetworkFileServerHttp.h
// Context->user_space = this;
// but this fails in UE4 frontend with multiple defined symbols...
// i will continue to analyze this problem after today's ZBR day
// since, there's only one of 'this' object -- for now...
user_space_patch = this;
// ========================================
Ready.Set(true);
return true;
}
FString FNetworkFileServerHttp::GetSupportedProtocol() const
{
return FString("http");
}
bool FNetworkFileServerHttp::GetAddressList(TArray<TSharedPtr<FInternetAddr> >& OutAddresses) const
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// if Init failed, its already too late.
ensure( Context != nullptr);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// we are listening to all local interfaces.
ISocketSubsystem::Get()->GetLocalAdapterAddresses(OutAddresses);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// Fix up ports.
for (int32 AddressIndex = 0; AddressIndex < OutAddresses.Num(); ++AddressIndex)
{
OutAddresses[AddressIndex]->SetPort(Port);
}
return true;
}
int32 FNetworkFileServerHttp::NumConnections() const
{
return RequestHandlers.Num();
}
void FNetworkFileServerHttp::Shutdown()
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
{
// Allow multiple calls to this function.
if ( WorkerThread )
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
WorkerThread->Kill(true); // Kill Nicely. Wait for everything to shutdown.
delete WorkerThread;
WorkerThread = NULL;
}
}
uint32 FNetworkFileServerHttp::Run()
{
UE_LOG(LogFileServer, Display, TEXT("Unreal Network File Http Server is ready for client connections on port %d"), Port);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// start servicing.
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// service libwebsocket context.
while(!StopRequested.GetValue())
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// service libwebsocket, have a slight delay so it doesn't spin on zero load.
libwebsocket_service(Context, 10);
libwebsocket_callback_on_writable_all_protocol(&Protocols[0]);
}
UE_LOG(LogFileServer, Display, TEXT("Unreal Network File Http Server is now Shutting down "));
return true;
}
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// Called internally by FRunnableThread::Kill.
void FNetworkFileServerHttp::Stop()
{
StopRequested.Set(true);
}
void FNetworkFileServerHttp::Exit()
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// let's start shutting down.
// fires a LWS_CALLBACK_PROTOCOL_DESTROY callback, we clean up after ourselves there.
libwebsocket_context_destroy(Context);
Context = NULL;
}
FNetworkFileServerHttp::~FNetworkFileServerHttp()
{
Shutdown();
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// delete our request handlers.
for ( auto& Element : RequestHandlers)
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
delete Element.Value;
}
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// make sure context has been already cleaned up.
check( Context == NULL );
}
FNetworkFileServerClientConnectionHTTP* FNetworkFileServerHttp::CreateNewConnection()
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
return new FNetworkFileServerClientConnectionHTTP(FileRequestDelegate,RecompileShadersDelegate,ActiveTargetPlatforms);
}
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// Have a similar process function for the normal tcp connection.
void FNetworkFileServerHttp::Process(FArchive& In, TArray<uint8>&Out, FNetworkFileServerHttp* Server)
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
int loops = 0;
while(!In.AtEnd())
{
UE_LOG(LogFileServer, Log, TEXT("In %d "), loops++);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// Every Request has a Guid attached to it - similar to Web session IDs.
FGuid ClientGuid;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
In << ClientGuid;
UE_LOG(LogFileServer, Log, TEXT("Recieved GUID %s"), *ClientGuid.ToString());
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
FNetworkFileServerClientConnectionHTTP* Connection = NULL;
if (Server->RequestHandlers.Contains(ClientGuid))
{
UE_LOG(LogFileServer, Log, TEXT("Picking up an existing handler" ));
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
Connection = Server->RequestHandlers[ClientGuid];
}
else
{
UE_LOG(LogFileServer, Log, TEXT("Creating a handler" ));
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
Connection = Server->CreateNewConnection();
Server->RequestHandlers.Add(ClientGuid,Connection);
}
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
Connection->ProcessPayload(In);
Out.Append(Connection->GetOutBuffer());
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
Connection->ResetBuffer();
}
}
// This static function handles all callbacks coming in and when context is services via libwebsocket_service
// return value of -1, closes the connection.
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
int FNetworkFileServerHttp::CallBack_HTTP(
struct libwebsocket_context *Context,
struct libwebsocket *Wsi,
enum libwebsocket_callback_reasons Reason,
void *User,
void *In,
size_t Len)
{
PerSessionData* BufferInfo = (PerSessionData*)User;
Copying //UE4/Dev-Platform to //UE4/Dev-Main (Source: //UE4/Dev-Platform @ 3046626) #rb none #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2948322 on 2016/04/19 by Nick.Shin update libwebsockets to v1.7.4 part 4 of 4 - doing this in stages for tracking purposes #jira UEPLAT-1246 - Update libWebsockets #jira UEPLAT-1221 - update websocket library #jira UEPLAT-1204 - Rebuild libwebsockets with SSL Change 2970016 on 2016/05/07 by Nick.Shin undo all of the following upgrades: - zlib - openssl - libcurl - libwebsockets and reset webrtc #jira UE-30298 - Fortnite and Orion crash on login Change 3020547 on 2016/06/20 by Jeff.Campeau Support for applocal deployment of binaries -applocaldir added to UAT to specify a per project directory to gather packages for applocal deployment Added ApplocalPrerequisitesDirectory property to packaging settings to set -applocaldir for packages built from the editor. Change 3020552 on 2016/06/20 by Jeff.Campeau Add switch to disable debug symbol cache creation Change 3020567 on 2016/06/20 by Jeff.Campeau constexpr enabled for Xbox One Change 3020568 on 2016/06/20 by Jeff.Campeau Separate setting for debug #jira UEPLAT-1348 Change 3020628 on 2016/06/20 by Jeff.Campeau Use global view instead of relying on current thread (fixes issues if pump message is called from a different thread). Change 3020629 on 2016/06/20 by Jeff.Campeau Use Slate tick to drive message processing during blocking loads (improves PLM). Change 3020633 on 2016/06/20 by Jeff.Campeau Fix Xbox One toolchain pathing to work for environment variables with and without trailing slashes. Pass requested XDK edition to VCVars batch file (fixes issues in building with a newer XDK installed SxS than the engine is configured for). Change 3020873 on 2016/06/21 by Lee.Clark PS4 - Fix missing audio when using A3D. Change 3021225 on 2016/06/21 by Keith.Judge Optimized away a bunch of GetVertexShader() calls in FSplineMeshVertexFactoryShaderParameters::SetMesh(). Saves about 0.9ms across a 100ms capture. Change 3021286 on 2016/06/21 by Dmitry.Rekman Linux: symbolication for memory profiler. - Also repaired/improved finding function name from debug info and overall callstack parsing. #tests Ran Linux editor and TestPAL, crashed multiple times Change 3021512 on 2016/06/21 by Mark.Satterthwaite Compile fixes for new clang version. Change 3021521 on 2016/06/21 by Mark.Satterthwaite Duplicate Fortnite CL #3013418: Don't release Metal buffers directly into the buffer pool, instead defer this until the command-buffer is known to have finished. This prevents the CPU from trying to modify the buffer while the GPU is still reading it if the GPU has fallen so far behind the CPU and therefore eliminates one possible cause of invalid access on the GPU. Change 3021528 on 2016/06/21 by Mark.Satterthwaite Make the Metal buffer pool cull after 30 frames - this will better match Apple's GART which unwires unused allocations after 1sec of idle, making them as expensive to use allocating a new buffer. Change 3021595 on 2016/06/21 by Mark.Satterthwaite Consolidate the way in which optional Metal features are exposed across macOS, iOS & tvOS devices & expose all the available features, unifying more of the code across all three platforms. - Implement Metal Depth-16 and stencil-texture-view support where available. - Use counting queries in Metal when available and expected (i.e. Metal_SM4+ or Metal_MRT+). - On latest iOS devices running Metal export support for GRHISupportsBaseVertexIndex & GRHISupportsFirstInstance when available. - On latest iOS devices running Metal export support for indirect buffer draw and dispatch calls. - Specify Metal layered rendering like any other and change the code so that there aren't preprocessor defines in the code. This lets the Metal MRT path assert if anyone ever tries to issue a layered draw call as its only supported on Mac. - Add support to Metal for setting UAVs from a uniform buffer. - Remove unused GlobalUniform header from MetalRHI. - Remove unnecessary FrameCount delay from Metal resource free lists. Change 3021702 on 2016/06/21 by Mark.Satterthwaite Fix mis-use of FreeListMutex instead of PoolMutex in MetalContext. Change 3022152 on 2016/06/21 by Nick.Shin Back out revision 5 from //UE4/Dev-Platform/Engine/Source/Runtime/NetworkFileSystem/Private/NetworkFileServerHttp.cpp forgot to un-do this when the giant revert (CL: #2970016) was done #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 3022409 on 2016/06/21 by Dmitry.Rekman Fixed inability to run Setup.sh on Ubuntu 14.04 (UE-29289). - Contains PR #2258 (contributed by wshearn). Change 3022541 on 2016/06/22 by Lee.Clark PS4 - Make sure the render target masks are set correctly for disabled render targets. Fixes a validation check for shaders expecting to write to NULL render targets. Change 3022973 on 2016/06/22 by Michael.Trepka Fixed a problem in MacToolChain where both BuildConfiguration.bGeneratedSYMFile and BuildConfiguration.bUsePDBFiles set to false would not disable dSYM generation. Change 3023106 on 2016/06/22 by Dmitry.Rekman Linux: enable code to catch memory stomps during async loading. - Changed FLinuxPlatformMemory::BinnedAllocFrom/FreeToOS() to use mmap()/munmap(). Updated platform function signature accordingly. #tests Ran OrionServer on Linux (and OrionClient on Windows as a zero probe), tested also with running Linux editor with binned malloc. Change 3023256 on 2016/06/22 by Mark.Satterthwaite Fix compile errors from latest Metal changes that broke iOS. Change 3023268 on 2016/06/22 by Mark.Satterthwaite Use the Linux mmap/munmap/mprotect code to implement BinnedAllocFromOS/BinnedFreeToOS/PageProtect on Apple platforms as they are all equivalent. Change 3023651 on 2016/06/22 by Mark.Satterthwaite Make Metal SM5 the default for 10.11.5 or later, this time most of the features should be working on AMD & Nvidia, though tiled-reflections and distance-field AO/Shadows must still be forcibly disabled on Intel. Change 3023777 on 2016/06/22 by Brent.Pease + Update config for Android and iOS Change 3023781 on 2016/06/22 by Chris.Babcock Use mmap/munmap for Android BinnedAllocFromOS #ue4 #android Change 3023947 on 2016/06/22 by Mark.Satterthwaite Added a command-line switch for Mac "-RedirectNSLog" that will capture the output of NSLog using an NSPipe and write it into our log instead when not running under the debugger, thereby capturing output from underlying libraries that would otherwise be lost when outside a debugger. Change 3024434 on 2016/06/23 by Lee.Clark PS4 - Remove Delta Color Compression support Change 3024735 on 2016/06/23 by Mark.Satterthwaite Changes to MetalStatistics module initialisation. Change 3024741 on 2016/06/23 by Mark.Satterthwaite Change the way we test for Metal GPU support to avoid instantiating any MTLDevice's until MetalRHI is loaded so we can properly instantiate optional modules. Change 3025477 on 2016/06/23 by Brent.Pease + Added UnrealPluginLanguage.cs based on AndroidPluginLanguage.cs + Change UEDeployAndroid.cs to use UnrealPluginLanguage Change 3026085 on 2016/06/23 by Jeff.Campeau Separate Xbox One target settings for editor only values Move values that need to be loaded by the editor into the default inis (editor won't load target specific inis) Eliminate circular dependency on Xbox One settings (causing settings to either not load or memory corruption on shutdown) Clean up cached ini sections for UBT/UAT Change 3026093 on 2016/06/23 by Jeff.Campeau Cleanup unused files Change 3026745 on 2016/06/24 by Mark.Satterthwaite + Implemented rudimentary runtime debugging of MetalRHI with several different levels of complexity controlled by the new console-variable "rhi.Metal.RuntimeDebugLevel". + The MetalStateCache must also correctly set the render-pass descriptor when the previous render-target load action was 'Clear' as we will need to switch render targets or we'll mistakenly clear again. + Queries must not reset the MetalStateCache when they overflow the available buffer space, they simply break the encoder. - By default "rhi.Metal.RuntimeDebugLevel" is off & it is compiled out for Shipping - when enabled each higher level collects more data or changes the MetalRHI behaviour to make a command-buffer failure mode debuggable at the expense of performance. In order for this to work the number of command-buffers that may be allocated from the command-queue is also controllable via a console-variable "rhi.Metal.CommandQueueSize" which must be set prior to startup. Change 3026831 on 2016/06/24 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3026940 on 2016/06/24 by Brent.Pease PR #2458: added GetGameBundleId blueprint function (Contributed by derekvanvliet) Change 3027396 on 2016/06/24 by Brent.Pease Add BuildGraph.csproj to get Xamarin .sln builds working again Change 3029211 on 2016/06/27 by Michael.Trepka Added a setting (on by default) to make the game window preserve its content's aspect ratio while being resized by user Change 3029518 on 2016/06/27 by Josh.Adams Rollback //UE4/Dev-Platform/Engine/Build/BatchFiles/Mac/xcodeunlock.sh to revision 1 Change 3030385 on 2016/06/28 by Keith.Judge Fix XB1 deployment issues with AppXManifest for Paragon. Change 3030416 on 2016/06/28 by Lee.Clark PS4 - Fix Mediaplayer IsPlaying Change 3030922 on 2016/06/28 by Keith.Judge XB1 - Add pass through _RenderThread resource creation functions to D3D11.x RHI. Stops the render/RHI threads from stalling so much. Change 3030948 on 2016/06/28 by Jeff.Campeau Revert to using constant chunk indexes instead of polling the OS. (OS API has a bug that will not be fixed.) Change 3031016 on 2016/06/28 by Brent.Pease UEPLAT-1244 - Archive dSYM file UEPLAT-1359 - Support creating dSYM bundle Changes: + Added ios settings flag for dsym bundle + Added ios setting for creating xcode archive + xcode archive is now only put in the mac host or build machine's ~/Library/Developer/Xcode/Archives folder, it is not copied into the -archive folder like the ipa is Change 3031352 on 2016/06/28 by Bob.Tellez Added tps file for xcodeunlock Change 3031604 on 2016/06/28 by Mark.Satterthwaite Add an additional cast to flush-to-zero in the Metal shader translator bounds-checking code to avoid an internal GPU compiler error. Change 3031879 on 2016/06/28 by Brent.Pease + PhysX libraries for bitcode support on tvOS. Change 3032374 on 2016/06/29 by Keith.Judge Enable Oodle Handler Component on Xbox One Change 3032407 on 2016/06/29 by Keith.Judge Xbox One - Disable UpdateBufferStats when STATS is 0. Small perf gain. Change 3032432 on 2016/06/29 by Keith.Judge XB1 CPU Perf - Make CreateVertexDeclaration_RenderThread much faster by implementing a pass through to the RHI function rather than stalling the RHI thread. Change 3033474 on 2016/06/29 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3033603 on 2016/06/29 by Brent.Pease + Support UnrealPluginLanguage for IOS and TVOS builds + Allow ios/tvos UPL files an opportunity to modify a package's info.plist file Change 3034004 on 2016/06/30 by Lee.Clark PS4 - Use SDK 3.508.101 Change 3034007 on 2016/06/30 by Lee.Clark PS4 - VRTracker now uses SCE_VR_TRACKER_ROBUSTNESS_LEVEL_HIGH Change 3034173 on 2016/06/30 by Lee.Clark PS4 - Make sure depth target is null when eliminating fast clears. Fixes a GNM Validation failure Change 3034498 on 2016/06/30 by Jeff.Campeau Use MSBuild version 14 when generating project files. Change 3034943 on 2016/06/30 by Mark.Satterthwaite For Metal modify the MTLVertexDescriptor when calls to SetStreamSource provide different strides than the initial vertex-declaration which then requires compiling a different MTLRenderPipelineState. This silences errors reported by the Metal debug layer where the larger stride would see the shader read beyond the end of the buffer, but the smaller stride provided by SetStreamSource would work correctly. This may eliminate some more causes of Page-Fault GPU restarts. Change 3035416 on 2016/07/01 by Lee.Clark PS4 - Replace export vertex shader check with a CFLAG Change 3036093 on 2016/07/01 by Brent.Pease + Fix dSYM bundle path on Windows ios builds + Search for DeltaCopy directory if its not found from the user settings + Do not build an XCArchive file when building for ios on non-mac platforms Change 3036726 on 2016/07/02 by Brent.Pease + Add missing tvOS bitcode library Change 3037455 on 2016/07/05 by Lee.Clark PS4 - Default SmoothFrameRate to false Change 3037470 on 2016/07/05 by Keith.Judge Xbox One - Allow framerate smoothing, but default to off for consistency with PS4. Change 3038322 on 2016/07/05 by Jeremiah.Waldron Fix for asset packages with Unicode characters in their name not being loaded on Android. Fixing AndroidString's WIDECHAR* Strstr(WIDECHAR*, WIDECHAR*) function - Using an implementation of wcsstr, with a fix integrated for the incorrect implementation in Android ndk master branch, instead of converting the incoming WIDECHAR strings to ANSI strings just to be able to use strstr on them. The previous method was prone to causing the FString's Find and Contains functions to return false positives because when we convert wide to ansi, any character over the value of 255 is just set to '?' This in turn caused any package path strings with one of those characters in it to fail to load since they would be interpreted as having a question mark in their path, which is an invalid path character. #jira UE-18643 #android Change 3038693 on 2016/07/05 by Mark.Satterthwaite Change the way we store debug info for Metal shaders - the KeepDebugInfo flag now does precisely that, storing the shader code into the Metal header along with the path it was generated from. That means if KeepDebugInfo is enabled and Optimise is disabled then we can still access the shader code from within the Metal tools. On iOS/tvOS the shader code will be runtime compiled so that it shows up in the tooling but on Macs it will prefer to load the optimised version and simply unpack the shader code to the path from which it was compiled. This only works if we change the Metal shader compiler to emit temporary Metal files to the OS temporary directory so that the tools can read the file directly. Change 3039880 on 2016/07/06 by Mark.Satterthwaite Implement point-light shadow caching for RHI's that support specifying the render target layer from the vertex shader in lieu of geometry shaders. This requires changing FScreenVSForGS to TScreenVSForGS so that there can be a vertex-shader-layer variant (only compiled on RHI's that use it) whose output matches FCopyShadowMapsCubePS input. This alternative rendering path also requires adding the instance count to DrawRectangle so that we can render to all faces of the cubemap from a single draw call. Change 3040407 on 2016/07/06 by Michael.Trepka Added View->Enter Full Screen menu item for games on Mac Change 3040550 on 2016/07/06 by Mark.Satterthwaite Intel Metal compiler requires bool expressions be cast to 'int' rather than 'uint'. Change 3041098 on 2016/07/07 by Peter.Sauerbrei initial changes to get IOS builds from PC in launcher release of engine Change 3041310 on 2016/07/07 by Keith.Judge Xbox One - Optimize away GetDesc() and checks for D3D11_USAGE_DYNAMIC deep in the state cache as it's impossible for any buffer to have that flag set. Change 3041327 on 2016/07/07 by Keith.Judge Xbox One - Remove pointless memory barrier call in D3D11Query Change 3041352 on 2016/07/07 by Keith.Judge Xbox One - Add _RenderThread version of UpdateTexture2D() that just passes through to the RHI one. Saves a fairly significant chunk of time on the render/RHI thread when this is called a lot. Change 3041419 on 2016/07/07 by Jeff.Campeau Xbox One toolchain fix for VS2015 Update 3 Change 3041635 on 2016/07/07 by Jeff.Campeau Don't change game render resolution in response to WM_SIZE messages when in fullscreen (the game will restore the correct video mode when the window is restored). #jira OR-15578 Change 3041735 on 2016/07/07 by Peter.Sauerbrei re-enabled the build parameters for launcher release builds in IOS Change 3041783 on 2016/07/07 by Joe.Graf Changed bAutpApplyFailed to bAutoApplyFailed (typo) Change 3041784 on 2016/07/07 by Joe.Graf Fixed missing %s from a log message in UResavePackagesCommandlet Change 3042434 on 2016/07/08 by Lee.Clark PS4 - Fix compilation failure when Unsafe Command Buffers are enabled. Change 3042658 on 2016/07/08 by Lee.Clark PS4 - Use SDK 3.508.201 Change 3042970 on 2016/07/08 by Josh.Adams Redoing CL in 3040890 in Dev-Platform Change 3043243 on 2016/07/08 by Chris.Babcock clamped allowed slot range for gameplay debugger's categories copy of CL# 3040313 from //UE4/Dev-Framework #jira UE-32866 Change 3043500 on 2016/07/08 by Mark.Satterthwaite Downgrade "-Wdelete-non-virtual-dtor " to a warning again for Xcode 8 on iOS/tvOS to match macOS. Change 3044628 on 2016/07/11 by Mark.Satterthwaite Disable ShaderCache by default - it was implemented prior to RHI-thread/parallel-execution so it isn't thread-safe and can't be enabled by default on Mac now that Metal supports these features. #jira UE-32989 Change 3044948 on 2016/07/11 by Dmitry.Rekman Fix editor crash (happened on Linux, but not really specific to it) (UE-32973) - We can pass flags with shadows enabled when rendering asset thumbnails; thus disable shadows always when r.ShadowQuality is 0. (Redoing CL 3029574 by Bob). - Also fix mismatched 'noperspective' qualifier that caused NVidia drivers to refuse to link GL shaders. #jira UE-32973 Change 3045322 on 2016/07/11 by Josh.Adams Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform) Change 3046028 on 2016/07/12 by Lee.Clark PS4 - Check for correct SDK installation Allow use of 7th core when Morpheus is enabled Change 3046339 on 2016/07/12 by Peter.Sauerbrei fix for incorrect error message when iPhone Plus icon is the correct size [CL 3046645 by Josh Adams in Main branch]
2016-07-12 15:06:08 -04:00
// FNetworkFileServerHttp* Server = (FNetworkFileServerHttp*)libwebsocket_context_user(Context);
FNetworkFileServerHttp* Server = user_space_patch; // see Init() for details...
switch (Reason)
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
case LWS_CALLBACK_HTTP:
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// hang on to socket even if there's no data for atleast 60 secs.
libwebsocket_set_timeout(Wsi, NO_PENDING_TIMEOUT, 60);
/* if it was not legal POST URL, let it continue and accept data */
if (!lws_hdr_total_length(Wsi, WSI_TOKEN_POST_URI))
{
char *requested_uri = (char *) In;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// client request the base page. e.g http://unrealfileserver:port/
// just return a banner, probably add some more information, e,g Version, Config, Game. etc.
if ( FCString::Strcmp(ANSI_TO_TCHAR(requested_uri), TEXT("/")) == 0 )
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
TCHAR Buffer[1024];
TCHAR ServerBanner[] = TEXT("<HTML>This is Unreal File Server</HTML>");
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
int x = FCString::Sprintf(
Buffer,
TEXT("HTTP/1.0 200 OK\x0d\x0a")
TEXT("Server: Unreal File Server\x0d\x0a")
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
TEXT("Connection: close\x0d\x0a")
TEXT("Content-Type: text/html; charset=utf-8\x0d\x0a")
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
TEXT("Content-Length: %u\x0d\x0a\x0d\x0a%s"),
FCString::Strlen(ServerBanner),
ServerBanner
);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// very small data being sent, its fine to just send.
libwebsocket_write(Wsi,(unsigned char*)TCHAR_TO_ANSI(Buffer),FCStringAnsi::Strlen(TCHAR_TO_ANSI(Buffer)), LWS_WRITE_HTTP);
}
else
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// client has asked for a file. ( only html/js files are served.)
// what type is being served.
FString FilePath = FPaths::GameDir() / TEXT("Binaries/HTML5") + FString((ANSICHAR*)In);
TCHAR Mime[512];
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
if ( FilePath.Contains(".js"))
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
FCStringWide::Strcpy(Mime,TEXT("application/javascript;charset=UTF-8"));
}
else
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
FCStringWide::Strcpy(Mime,TEXT("text/html;charset=UTF-8"));
}
UE_LOG(LogFileServer, Warning, TEXT("HTTP Serving file %s with mime %s "), *FilePath, (Mime));
FString AbsoluteFilePath = FPaths::ConvertRelativePathToFull(FilePath);
AbsoluteFilePath.ReplaceInline(TEXT("/"),TEXT("\\"));
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// we are going to read the complete file in memory and then serve it in batches.
// rather than reading and sending in batches because Unreal NFS servers are not running in memory
// constrained env and the added complexity is not worth it.
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
TArray<uint8> FileData;
FFileHelper::LoadFileToArray(FileData, *AbsoluteFilePath, FILEREAD_Silent);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
if (FileData.Num() == 0)
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// umm. we didn't find file, we should tell the client that we couldn't find it.
// send 404.
char Header[]= "HTTP/1.1 404 Not Found\x0d\x0a"
"Server: Unreal File Server\x0d\x0a"
"Connection: close\x0d\x0a";
libwebsocket_write(Wsi,(unsigned char*)Header,FCStringAnsi::Strlen(Header), LWS_WRITE_HTTP);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// chug along, client will close the connection.
break;
}
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// file up the header.
TCHAR Header[1024];
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
int Length = 0;
if (FilePath.Contains("gz"))
{
Length = FCString::Sprintf(Header,
TEXT("HTTP/1.1 200 OK\x0d\x0a")
TEXT("Server: Unreal File Server\x0d\x0a")
TEXT("Connection: close\x0d\x0a")
TEXT("Content-Type: %s \x0d\x0a")
TEXT("Content-Encoding: gzip\x0d\x0a")
TEXT("Content-Length: %u\x0d\x0a\x0d\x0a"),
Mime, FileData.Num());
}
else
{
Length = FCString::Sprintf(Header,
TEXT("HTTP/1.1 200 OK\x0d\x0a")
TEXT("Server: Unreal File Server\x0d\x0a")
TEXT("Connection: close\x0d\x0a")
TEXT("Content-Type: %s \x0d\x0a")
TEXT("Content-Length: %u\x0d\x0a\x0d\x0a"),
Mime, FileData.Num());
}
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// make space for the whole file in our out buffer.
BufferInfo->Out.Append((uint8*)TCHAR_TO_ANSI(Header),Length);
BufferInfo->Out.Append(FileData);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// we need to write back to the client, queue up a write callback.
libwebsocket_callback_on_writable(Context, Wsi);
}
}
else
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// we got a post request!, queue up a write callback.
libwebsocket_callback_on_writable(Context, Wsi);
}
break;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
case LWS_CALLBACK_HTTP_BODY:
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// post data is coming in, push it on to our incoming buffer.
UE_LOG(LogFileServer, Log, TEXT("Incoming HTTP Partial Body Size %d, total size %d"),Len, Len+ BufferInfo->In.Num());
BufferInfo->In.Append((uint8*)In,Len);
// we received some data - update time out.
libwebsocket_set_timeout(Wsi, NO_PENDING_TIMEOUT, 60);
}
break;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
case LWS_CALLBACK_HTTP_BODY_COMPLETION:
{
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// we have all the post data from the client.
// create archives and process them.
UE_LOG(LogFileServer, Log, TEXT("Incoming HTTP total size %d"), BufferInfo->In.Num());
FMemoryReader Reader(BufferInfo->In);
TArray<uint8> Writer;
FNetworkFileServerHttp::Process(Reader,Writer,Server);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// even if we have 0 data to push, tell the client that we don't any data.
ANSICHAR Header[1024];
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
int Length = FCStringAnsi::Sprintf(
(ANSICHAR*)Header,
"HTTP/1.1 200 OK\x0d\x0a"
"Server: Unreal File Server\x0d\x0a"
"Connection: close\x0d\x0a"
"Content-Type: application/octet-stream \x0d\x0a"
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
"Content-Length: %u\x0d\x0a\x0d\x0a",
Writer.Num()
);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// Add Http Header
BufferInfo->Out.Append((uint8*)Header,Length);
// Add Binary Data.
BufferInfo->Out.Append(Writer);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// we have enqueued data increase timeout and push a writable callback.
libwebsocket_set_timeout(Wsi, NO_PENDING_TIMEOUT, 60);
libwebsocket_callback_on_writable(Context, Wsi);
}
break;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
case LWS_CALLBACK_CLOSED_HTTP:
// client went away or
//clean up.
BufferInfo->In.Empty();
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
BufferInfo->Out.Empty();
break;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
case LWS_CALLBACK_PROTOCOL_DESTROY:
// we are going away.
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
break;
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
case LWS_CALLBACK_HTTP_WRITEABLE:
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// get rid of superfluous write callbacks.
if ( BufferInfo == NULL )
break;
// we have data o send out.
if (BufferInfo->Out.Num())
{
int SentSize = libwebsocket_write(Wsi,(unsigned char*)BufferInfo->Out.GetData(),BufferInfo->Out.Num(), LWS_WRITE_HTTP);
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
// get rid of the data that has been sent.
BufferInfo->Out.RemoveAt(0,SentSize);
}
break;
default:
break;
}
Change 2898947 on 2016/03/08 by Mark.Satterthwaite Move the Apple Driver Monitor stats into their own stat groups, DriverMonitor has the common stats, DriverMonitorAMD/Intel/Nvidia have the vendor/GPU specific stats. The Metal and OpenGL RHIs update the driver monitor stats group for the current GPU at the appropriate time. Change 2898950 on 2016/03/08 by Mark.Satterthwaite More shader cache code documentation. Change 2898952 on 2016/03/08 by Michael.Trepka Check GPU driver version and warn of bad drivers only on Windows Change 2898964 on 2016/03/08 by Mark.Satterthwaite Only verify the vertex attribute layout for Metal in debug builds or when using development with the debug layer turned on. It reduces performance significantly and isn't all that helpful unless you are attempting to debug a mismatch. Change 2898973 on 2016/03/08 by Mark.Satterthwaite Switch uniform buffers to managed memory on Mac as this is more appropriate for AMD & Nvidia GPUs. Change 2898988 on 2016/03/08 by Mark.Satterthwaite Simplify MetalContext by having only one SubmitCommandsHint implementation. Change 2899011 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2898988: Proper fix for UE-25804 - we have to manually expand PF_G8 + SRGB to RGBA8_sRGB - this then fixes UE-27483. #jira UE-25804 #jira UE-27483 Change 2899024 on 2016/03/08 by Mark.Satterthwaite Duplicate 4.11 CL #2887365 & CL #2887583: Allow InfiltratorDemoEditor under Metal to issue a query buffer reset without crashing - the function that switches to the new query buffer needs to reapply some of the draw-state so that future commands don't dereference nil. #jira UE-27513 My earlier fix for UE-27513 overlooked various internal details that meant it wouldn't restore state correctly, would fail validation and could crash in a new place. This version will ensure that cached state is only reset when it is appropriate to do so and will restore it correct when doing a query buffer reset. #jira UE-27513 Change 2899418 on 2016/03/08 by Daniel.Lamb Added support for textboxes in the editor to convert uasset filenames into long package names. As this is more useful to the cooker and more portable for projects. #codereview Matt.Kuhlenschmidt #jira UE-27785 Change 2899419 on 2016/03/08 by Daniel.Lamb Added support for passing -opengl command through to launch on if the editor is started with it. #codereview Michael.Trepka Change 2900846 on 2016/03/09 by Mark.Satterthwaite Reimplement Metal object lifetime tracking as stats in the stat-group, though the old system is maintained as a debug-only tool that could (and probably should) be extended to track over/under-release bugs. Currently the texture count will be distorted by texture SRVs so will need improvement but other stats should be reliable. In order to properly report the number of buffers the TResourcePool policy class must now define a FreeResource function, so I've added them to the appropriate places too. Change 2900853 on 2016/03/09 by Mark.Satterthwaite Optimise away empty encoders that don't perform a clear operation on AMD & Intel, but not Nvidia or non-Mac Metal devices. This should slightly improve performance. Change 2900927 on 2016/03/09 by Mark.Satterthwaite Implemented operation threshold submission of Metal command buffers to keep the GPU busier and not just idle waiting for the CPU. Whenever rhi.Metal.CommandBufferCommitThreshold is set to a value >0 and the current command buffer has >= draw/dispatch operations outstanding then the command-buffer will be committed at the next encoder boundary. The default value is 100 operations which is currently arbitrary and the feature can be disabled by setting the value to <= 0 in which case only explicit submissions will occur as previously. Change 2901310 on 2016/03/09 by Mark.Satterthwaite Change OneColor clear shader setup so that it works with parallel encoding in Metal. Change 2903002 on 2016/03/10 by Mark.Satterthwaite Instantiate the OneColor shaders once in Metal. Change 2903274 on 2016/03/10 by Mark.Satterthwaite Remove more unnecessary parallel execution stalls from MetalRHI. Change 2903402 on 2016/03/10 by Mark.Satterthwaite Implement Metal support for index buffer SRVs. Change 2903419 on 2016/03/10 by Mark.Satterthwaite Always use Managed memory on Mac Metal for buffers. Change 2905206 on 2016/03/11 by Mark.Satterthwaite Worked around UE-27818 "ElementalDemo Causes Invalid Rendering on AMD GPUs" - recent changes to allow mesh particles to write to velocity leave a texture-buffer unbound & then use a uniform value & an if-branch to guard against access but AMD's Mac GL driver notices that the buffer is referenced in the shader but not bound & promptly tries to fallback to Apple's S/W renderer regardless of what the uniform value is. That's legal behaviour for an OpenGL implementation so the C++ code has been changed to allocate and write the current transforms into the buffer for OpenGL when they wouldn't otherwise be provided. This is sufficient to avoid the problem without affecting any other API. Change 2906217 on 2016/03/11 by Nick.Shin re-enabled http network file server it was disabled in CL: #2790193 #jira UE-22166 HTML5 Cook on the fly will launch and then close browser Change 2908203 on 2016/03/14 by Michael.Trepka Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform). Everything but SSF lib. Change 2908553 on 2016/03/14 by Mark.Satterthwaite Force a submit & wait in Metal when contexts are being destroyed to prevent kernel panics in drivers which continue to process the now abandoned command-queue and encounter invalid resources (because we destroy them on shutdown). Change 2908595 on 2016/03/14 by Michael.Trepka Fixed iOS compile error in MetalUniformBuffer.cpp #codereview Mark.Satterthwaite Change 2910106 on 2016/03/15 by Mark.Satterthwaite Use a dispatch_semaphore not an FEvent for Metal free-list synchronisation as the dispatch_worker threads can't be properly setup for FStats and this causes problems. Change 2910107 on 2016/03/15 by Mark.Satterthwaite Fix Metal reporting of GPU memory through the RHI as it is in bytes, not MB. Change 2910138 on 2016/03/15 by Mark.Satterthwaite Properly retain/release dispatch_semaphore for Metal command buffer completion block & allow uniform buffer creation on parallel encoding thread. Change 2911735 on 2016/03/16 by Nick.Shin housekeeping removing extra and inconsistant whitespace as well as making tabs & spaces consistant [CL 2936662 by Josh Adams in Main branch]
2016-04-07 12:59:50 -04:00
return 0;
}
#endif