Add GPUResourceUsage.Staging for both CPU read/write access
This commit is contained in:
@@ -300,7 +300,7 @@ namespace FlaxEngine
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the staging description for this instance.
|
||||
/// Gets the staging upload (CPU write) description for this instance.
|
||||
/// </summary>
|
||||
/// <returns>A staging texture description</returns>
|
||||
public GPUTextureDescription ToStagingUpload()
|
||||
@@ -312,7 +312,7 @@ namespace FlaxEngine
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the staging description for this instance.
|
||||
/// Gets the staging readback (CPU read) description for this instance.
|
||||
/// </summary>
|
||||
/// <returns>A staging texture description</returns>
|
||||
public GPUTextureDescription ToStagingReadback()
|
||||
@@ -323,6 +323,18 @@ namespace FlaxEngine
|
||||
return desc;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the staging (CPU read/write) description for this instance.
|
||||
/// </summary>
|
||||
/// <returns>A staging texture description</returns>
|
||||
public GPUTextureDescription ToStaging()
|
||||
{
|
||||
var desc = this;
|
||||
desc.Flags = GPUTextureFlags.None;
|
||||
desc.Usage = GPUResourceUsage.Staging;
|
||||
return desc;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user