aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Graphics3d/Texture/TextureHelper.cs
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2019-03-03 19:45:25 -0600
committerjduncanator <1518948+jduncanator@users.noreply.github.com>2019-03-04 12:45:25 +1100
commit1f554c1093dde6a4d3ed80fae2675abfb6c12fac (patch)
treebbbdfb87999168288777ac404081f3e49c7440ae /Ryujinx.Graphics/Graphics3d/Texture/TextureHelper.cs
parent8e71ea0812f6b56ff819dbda951b463bcb5eb8dc (diff)
Do naming refactoring on Ryujinx.Graphics (#611)
* Renaming part 1 * Renaming part 2 * Renaming part 3 * Renaming part 4 * Renaming part 5 * Renaming part 6 * Renaming part 7 * Renaming part 8 * Renaming part 9 * Renaming part 10 * General cleanup * Thought I got all of these * Apply #595 * Additional renaming * Tweaks from feedback * Rename files
Diffstat (limited to 'Ryujinx.Graphics/Graphics3d/Texture/TextureHelper.cs')
-rw-r--r--Ryujinx.Graphics/Graphics3d/Texture/TextureHelper.cs46
1 files changed, 23 insertions, 23 deletions
diff --git a/Ryujinx.Graphics/Graphics3d/Texture/TextureHelper.cs b/Ryujinx.Graphics/Graphics3d/Texture/TextureHelper.cs
index 33ccb0aa..1de81008 100644
--- a/Ryujinx.Graphics/Graphics3d/Texture/TextureHelper.cs
+++ b/Ryujinx.Graphics/Graphics3d/Texture/TextureHelper.cs
@@ -7,47 +7,47 @@ namespace Ryujinx.Graphics.Texture
{
static class TextureHelper
{
- public static ISwizzle GetSwizzle(GalImage Image)
+ public static ISwizzle GetSwizzle(GalImage image)
{
- int BlockWidth = ImageUtils.GetBlockWidth (Image.Format);
- int BlockHeight = ImageUtils.GetBlockHeight (Image.Format);
- int BlockDepth = ImageUtils.GetBlockDepth (Image.Format);
- int BytesPerPixel = ImageUtils.GetBytesPerPixel(Image.Format);
+ int blockWidth = ImageUtils.GetBlockWidth (image.Format);
+ int blockHeight = ImageUtils.GetBlockHeight (image.Format);
+ int blockDepth = ImageUtils.GetBlockDepth (image.Format);
+ int bytesPerPixel = ImageUtils.GetBytesPerPixel(image.Format);
- int Width = BitUtils.DivRoundUp(Image.Width, BlockWidth);
- int Height = BitUtils.DivRoundUp(Image.Height, BlockHeight);
- int Depth = BitUtils.DivRoundUp(Image.Depth, BlockDepth);
+ int width = BitUtils.DivRoundUp(image.Width, blockWidth);
+ int height = BitUtils.DivRoundUp(image.Height, blockHeight);
+ int depth = BitUtils.DivRoundUp(image.Depth, blockDepth);
- if (Image.Layout == GalMemoryLayout.BlockLinear)
+ if (image.Layout == GalMemoryLayout.BlockLinear)
{
- int AlignMask = Image.TileWidth * (64 / BytesPerPixel) - 1;
+ int alignMask = image.TileWidth * (64 / bytesPerPixel) - 1;
- Width = (Width + AlignMask) & ~AlignMask;
+ width = (width + alignMask) & ~alignMask;
return new BlockLinearSwizzle(
- Width,
- Height,
- Depth,
- Image.GobBlockHeight,
- Image.GobBlockDepth,
- BytesPerPixel);
+ width,
+ height,
+ depth,
+ image.GobBlockHeight,
+ image.GobBlockDepth,
+ bytesPerPixel);
}
else
{
- return new LinearSwizzle(Image.Pitch, BytesPerPixel, Width, Height);
+ return new LinearSwizzle(image.Pitch, bytesPerPixel, width, height);
}
}
public static (MemoryManager Memory, long Position) GetMemoryAndPosition(
- IMemory Memory,
- long Position)
+ IMemory memory,
+ long position)
{
- if (Memory is NvGpuVmm Vmm)
+ if (memory is NvGpuVmm vmm)
{
- return (Vmm.Memory, Vmm.GetPhysicalAddress(Position));
+ return (vmm.Memory, vmm.GetPhysicalAddress(position));
}
- return ((MemoryManager)Memory, Position);
+ return ((MemoryManager)memory, position);
}
}
}