Fix deadlock in asset thumbnails rendering queue when texture streaming fails
#2057
This commit is contained in:
@@ -296,6 +296,7 @@ Task* StreamingTexture::UpdateAllocation(int32 residency)
|
||||
// Setup texture
|
||||
if (texture->Init(desc))
|
||||
{
|
||||
Streaming.Error = true;
|
||||
LOG(Error, "Cannot allocate texture {0}.", ToString());
|
||||
}
|
||||
if (allocatedResidency != 0)
|
||||
|
||||
@@ -223,6 +223,11 @@ void TextureBase::SetTextureGroup(int32 textureGroup)
|
||||
}
|
||||
}
|
||||
|
||||
bool TextureBase::HasStreamingError() const
|
||||
{
|
||||
return _texture.Streaming.Error;
|
||||
}
|
||||
|
||||
BytesContainer TextureBase::GetMipData(int32 mipIndex, int32& rowPitch, int32& slicePitch)
|
||||
{
|
||||
BytesContainer result;
|
||||
|
||||
@@ -148,6 +148,11 @@ public:
|
||||
/// </summary>
|
||||
API_PROPERTY() void SetTextureGroup(int32 textureGroup);
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if texture streaming failed (eg. pixel format is unsupported or texture data cannot be uploaded to GPU due to memory limit).
|
||||
/// </summary>
|
||||
API_PROPERTY() bool HasStreamingError() const;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// Gets the mip data.
|
||||
|
||||
Reference in New Issue
Block a user