|
@@ -50,12 +50,14 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
|
|
internalFormat = (SizedInternalFormat)format.PixelInternalFormat;
|
|
internalFormat = (SizedInternalFormat)format.PixelInternalFormat;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ int levels = Info.GetLevelsClamped();
|
|
|
|
|
+
|
|
|
switch (Info.Target)
|
|
switch (Info.Target)
|
|
|
{
|
|
{
|
|
|
case Target.Texture1D:
|
|
case Target.Texture1D:
|
|
|
GL.TexStorage1D(
|
|
GL.TexStorage1D(
|
|
|
TextureTarget1d.Texture1D,
|
|
TextureTarget1d.Texture1D,
|
|
|
- Info.Levels,
|
|
|
|
|
|
|
+ levels,
|
|
|
internalFormat,
|
|
internalFormat,
|
|
|
Info.Width);
|
|
Info.Width);
|
|
|
break;
|
|
break;
|
|
@@ -63,7 +65,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
|
|
case Target.Texture1DArray:
|
|
case Target.Texture1DArray:
|
|
|
GL.TexStorage2D(
|
|
GL.TexStorage2D(
|
|
|
TextureTarget2d.Texture1DArray,
|
|
TextureTarget2d.Texture1DArray,
|
|
|
- Info.Levels,
|
|
|
|
|
|
|
+ levels,
|
|
|
internalFormat,
|
|
internalFormat,
|
|
|
Info.Width,
|
|
Info.Width,
|
|
|
Info.Height);
|
|
Info.Height);
|
|
@@ -72,7 +74,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
|
|
case Target.Texture2D:
|
|
case Target.Texture2D:
|
|
|
GL.TexStorage2D(
|
|
GL.TexStorage2D(
|
|
|
TextureTarget2d.Texture2D,
|
|
TextureTarget2d.Texture2D,
|
|
|
- Info.Levels,
|
|
|
|
|
|
|
+ levels,
|
|
|
internalFormat,
|
|
internalFormat,
|
|
|
Info.Width,
|
|
Info.Width,
|
|
|
Info.Height);
|
|
Info.Height);
|
|
@@ -81,7 +83,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
|
|
case Target.Texture2DArray:
|
|
case Target.Texture2DArray:
|
|
|
GL.TexStorage3D(
|
|
GL.TexStorage3D(
|
|
|
TextureTarget3d.Texture2DArray,
|
|
TextureTarget3d.Texture2DArray,
|
|
|
- Info.Levels,
|
|
|
|
|
|
|
+ levels,
|
|
|
internalFormat,
|
|
internalFormat,
|
|
|
Info.Width,
|
|
Info.Width,
|
|
|
Info.Height,
|
|
Info.Height,
|
|
@@ -112,7 +114,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
|
|
case Target.Texture3D:
|
|
case Target.Texture3D:
|
|
|
GL.TexStorage3D(
|
|
GL.TexStorage3D(
|
|
|
TextureTarget3d.Texture3D,
|
|
TextureTarget3d.Texture3D,
|
|
|
- Info.Levels,
|
|
|
|
|
|
|
+ levels,
|
|
|
internalFormat,
|
|
internalFormat,
|
|
|
Info.Width,
|
|
Info.Width,
|
|
|
Info.Height,
|
|
Info.Height,
|
|
@@ -122,7 +124,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
|
|
case Target.Cubemap:
|
|
case Target.Cubemap:
|
|
|
GL.TexStorage2D(
|
|
GL.TexStorage2D(
|
|
|
TextureTarget2d.TextureCubeMap,
|
|
TextureTarget2d.TextureCubeMap,
|
|
|
- Info.Levels,
|
|
|
|
|
|
|
+ levels,
|
|
|
internalFormat,
|
|
internalFormat,
|
|
|
Info.Width,
|
|
Info.Width,
|
|
|
Info.Height);
|
|
Info.Height);
|
|
@@ -131,7 +133,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
|
|
case Target.CubemapArray:
|
|
case Target.CubemapArray:
|
|
|
GL.TexStorage3D(
|
|
GL.TexStorage3D(
|
|
|
(TextureTarget3d)All.TextureCubeMapArray,
|
|
(TextureTarget3d)All.TextureCubeMapArray,
|
|
|
- Info.Levels,
|
|
|
|
|
|
|
+ levels,
|
|
|
internalFormat,
|
|
internalFormat,
|
|
|
Info.Width,
|
|
Info.Width,
|
|
|
Info.Height,
|
|
Info.Height,
|