Don't throw an exception in the layer handling

This commit is contained in:
Thog 2019-01-23 19:38:33 +01:00
commit 207b996c81
No known key found for this signature in database
GPG key ID: 0CD291558FAFDBC6

View file

@ -1,3 +1,4 @@
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.Gal; using Ryujinx.Graphics.Gal;
using Ryujinx.Graphics.Memory; using Ryujinx.Graphics.Memory;
using Ryujinx.Graphics.Texture; using Ryujinx.Graphics.Texture;
@ -80,9 +81,10 @@ namespace Ryujinx.Graphics
{ {
ImageType Type = ImageTypes[Position]; ImageType Type = ImageTypes[Position];
// FIXME(thog): I'm actually unsure if we should allow other image type, gpu testing needs to be done here.
if (Type != ImageType.Texture && Type != ImageType.TextureArrayLayer) if (Type != ImageType.Texture && Type != ImageType.TextureArrayLayer)
{ {
throw new InvalidOperationException(); Logger.PrintWarning(LogClass.Gpu, $"Possible invalid layer type detected! (ImageType.{Type})");
} }
return true; return true;