mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-21 03:02:02 +00:00
Format
This commit is contained in:
parent
009f791879
commit
a9db9f5b27
1 changed files with 10 additions and 9 deletions
|
@ -27,15 +27,16 @@ namespace Ryujinx.Graphics.Metal
|
||||||
_pipeline = pipeline;
|
_pipeline = pipeline;
|
||||||
_info = info;
|
_info = info;
|
||||||
|
|
||||||
var descriptor = new MTLTextureDescriptor();
|
var descriptor = new MTLTextureDescriptor
|
||||||
|
{
|
||||||
descriptor.PixelFormat = FormatTable.GetFormat(Info.Format);
|
PixelFormat = FormatTable.GetFormat(Info.Format),
|
||||||
descriptor.Usage = MTLTextureUsage.ShaderRead;
|
Usage = MTLTextureUsage.ShaderRead,
|
||||||
descriptor.SampleCount = (ulong)Info.Samples;
|
SampleCount = (ulong)Info.Samples,
|
||||||
descriptor.TextureType = Info.Target.Convert();
|
TextureType = Info.Target.Convert(),
|
||||||
descriptor.Width = (ulong)Info.Width;
|
Width = (ulong)Info.Width,
|
||||||
descriptor.Height = (ulong)Info.Height;
|
Height = (ulong)Info.Height,
|
||||||
descriptor.MipmapLevelCount = (ulong)Info.Levels;
|
MipmapLevelCount = (ulong)Info.Levels
|
||||||
|
};
|
||||||
|
|
||||||
if (info.Target == Target.Texture3D)
|
if (info.Target == Target.Texture3D)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue