mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-05 01:28:56 +02:00
misc: chore: Use explicit types & fix object creation
This commit is contained in:
@@ -557,7 +557,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
|
||||
// All views must be recreated against the new storage.
|
||||
|
||||
foreach (var view in _views)
|
||||
foreach (Texture view in _views)
|
||||
{
|
||||
Logger.Debug?.Print(LogClass.Gpu, $" Recreating view {Info.Width}x{Info.Height} {Info.FormatInfo.Format}.");
|
||||
view.ScaleFactor = scale;
|
||||
@@ -574,7 +574,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
ScaleMode = newScaleMode;
|
||||
|
||||
foreach (var view in _views)
|
||||
foreach (Texture view in _views)
|
||||
{
|
||||
view.ScaleMode = newScaleMode;
|
||||
}
|
||||
@@ -837,7 +837,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
|
||||
if (_context.DiskTextureStorage.IsActive && !_forRender)
|
||||
{
|
||||
TextureInfoOverride? importOverride = _context.DiskTextureStorage.ImportTexture(out var importedTexture, this, result.Memory.ToArray());
|
||||
TextureInfoOverride? importOverride = _context.DiskTextureStorage.ImportTexture(out MemoryOwner<byte> importedTexture, this, result.Memory.ToArray());
|
||||
|
||||
if (importOverride.HasValue)
|
||||
{
|
||||
@@ -988,7 +988,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
using (result)
|
||||
{
|
||||
var converted = PixelConverter.ConvertR4G4ToR4G4B4A4(result.Span, width);
|
||||
MemoryOwner<byte> converted = PixelConverter.ConvertR4G4ToR4G4B4A4(result.Span, width);
|
||||
|
||||
if (_context.Capabilities.SupportsR4G4B4A4Format)
|
||||
{
|
||||
@@ -1751,7 +1751,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
lock (_poolOwners)
|
||||
{
|
||||
foreach (var owner in _poolOwners)
|
||||
foreach (TexturePoolOwner owner in _poolOwners)
|
||||
{
|
||||
owner.Pool.ForceRemove(this, owner.ID, deferred);
|
||||
}
|
||||
@@ -1781,7 +1781,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
ulong address = 0;
|
||||
|
||||
foreach (var owner in _poolOwners)
|
||||
foreach (TexturePoolOwner owner in _poolOwners)
|
||||
{
|
||||
if (address == 0 || address == owner.GpuAddress)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user