Texture.ConvertToHostCompatibleFormat(): dispose of result
in Astc decode branch
This commit is contained in:
parent
f3c73c77a9
commit
1928beff73
1 changed files with 25 additions and 22 deletions
|
@ -793,6 +793,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
// - ASTC is usually not supported on desktop cards.
|
// - ASTC is usually not supported on desktop cards.
|
||||||
// - BC4/BC5 is not supported on 3D textures.
|
// - BC4/BC5 is not supported on 3D textures.
|
||||||
if (!_context.Capabilities.SupportsAstcCompression && Format.IsAstc())
|
if (!_context.Capabilities.SupportsAstcCompression && Format.IsAstc())
|
||||||
|
{
|
||||||
|
using (result)
|
||||||
{
|
{
|
||||||
if (!AstcDecoder.TryDecodeToRgba8P(
|
if (!AstcDecoder.TryDecodeToRgba8P(
|
||||||
result.Memory,
|
result.Memory,
|
||||||
|
@ -820,6 +822,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
|
|
||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (!_context.Capabilities.SupportsEtc2Compression && Format.IsEtc2())
|
else if (!_context.Capabilities.SupportsEtc2Compression && Format.IsEtc2())
|
||||||
{
|
{
|
||||||
switch (Format)
|
switch (Format)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue