Add some missing changes
This commit is contained in:
committed by
Wojtek Figat
parent
afed5a30bc
commit
69a1e007a6
@@ -244,6 +244,7 @@ bool GPUBuffer::DownloadData(BytesContainer& result)
|
||||
// Ensure not running on main thread
|
||||
if (IsInMainThread())
|
||||
{
|
||||
// TODO: support mesh data download from GPU on a main thread during rendering
|
||||
LOG(Warning, "Cannot download GPU buffer data on a main thread. Use staging readback buffer or invoke this function from another thread.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -218,6 +218,13 @@ public:
|
||||
/// <param name="value">The clear value.</param>
|
||||
virtual void ClearUA(GPUTexture* texture, const uint32 value[4]) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Clears an unordered access texture with a float value.
|
||||
/// </summary>
|
||||
/// <param name="texture">The texture to clear.</param>
|
||||
/// <param name="value">The clear value.</param>
|
||||
virtual void ClearUA(GPUTexture* texture, const Vector4& value) = 0;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -95,7 +95,6 @@ public:
|
||||
/// <summary>
|
||||
/// Determines whether this mesh is using 16 bit index buffer, otherwise it's 32 bit.
|
||||
/// </summary>
|
||||
/// <returns>True if this mesh is using 16 bit index buffer, otherwise 32 bit index buffer.</returns>
|
||||
API_PROPERTY() FORCE_INLINE bool Use16BitIndexBuffer() const
|
||||
{
|
||||
return _use16BitIndexBuffer;
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#include "Engine/Graphics/RenderTargetPool.h"
|
||||
#include "Engine/Engine/Engine.h"
|
||||
|
||||
// How many frames keep cached buffers for temporal or optional effects?
|
||||
#define LAZY_FRAMES_COUNT 4
|
||||
|
||||
RenderBuffers::RenderBuffers(const SpawnParams& params)
|
||||
: ScriptingObject(params)
|
||||
{
|
||||
@@ -35,8 +38,7 @@ void RenderBuffers::Prepare()
|
||||
if (VolumetricFog)
|
||||
{
|
||||
ASSERT(VolumetricFogHistory);
|
||||
|
||||
if (frameIndex - LastFrameVolumetricFog >= 4)
|
||||
if (frameIndex - LastFrameVolumetricFog >= LAZY_FRAMES_COUNT)
|
||||
{
|
||||
RenderTargetPool::Release(VolumetricFog);
|
||||
VolumetricFog = nullptr;
|
||||
@@ -48,7 +50,7 @@ void RenderBuffers::Prepare()
|
||||
}
|
||||
}
|
||||
#define UPDATE_LAZY_KEEP_RT(name) \
|
||||
if (name && frameIndex - LastFrame##name >= 4) \
|
||||
if (name && frameIndex - LastFrame##name >= LAZY_FRAMES_COUNT) \
|
||||
{ \
|
||||
RenderTargetPool::Release(name); \
|
||||
name = nullptr; \
|
||||
|
||||
Reference in New Issue
Block a user