mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 18:15:25 +00:00
24 lines
685 B
C#
24 lines
685 B
C#
|
using System;
|
||
|
|
||
|
namespace Ryujinx.Graphics.Gpu
|
||
|
{
|
||
|
static class TextureHelper
|
||
|
{
|
||
|
public static ISwizzle GetSwizzle(Texture Texture, int Width, int Bpp)
|
||
|
{
|
||
|
switch (Texture.Swizzle)
|
||
|
{
|
||
|
case TextureSwizzle.Pitch:
|
||
|
case TextureSwizzle.PitchColorKey:
|
||
|
return new LinearSwizzle(Texture.Pitch, Bpp);
|
||
|
|
||
|
case TextureSwizzle.BlockLinear:
|
||
|
case TextureSwizzle.BlockLinearColorKey:
|
||
|
return new BlockLinearSwizzle(Width, Bpp, Texture.BlockHeight);
|
||
|
}
|
||
|
|
||
|
throw new NotImplementedException(Texture.Swizzle.ToString());
|
||
|
}
|
||
|
}
|
||
|
}
|