test
This commit is contained in:
parent
3e3de18976
commit
372d7f2ee4
@ -134,7 +134,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo
|
|||||||
_state.NonIncrementing = meth.SecOp == SecOp.NonIncMethod;
|
_state.NonIncrementing = meth.SecOp == SecOp.NonIncMethod;
|
||||||
break;
|
break;
|
||||||
case SecOp.ImmdDataMethod:
|
case SecOp.ImmdDataMethod:
|
||||||
Send(gpuVa, meth.MethodAddress, meth.ImmdData, meth.MethodSubchannel, true);
|
// Send(gpuVa, meth.MethodAddress, meth.ImmdData, meth.MethodSubchannel, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -228,6 +228,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
_3dClass.Write(offset, argument);
|
_3dClass.Write(offset, argument);
|
||||||
|
//_2dClass.Write(offset, argument);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
_computeClass.Write(offset, argument);
|
_computeClass.Write(offset, argument);
|
||||||
|
@ -141,7 +141,7 @@ namespace Ryujinx.Graphics.Gpu
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
//return false;
|
||||||
FormatInfo formatInfo = new(format, 1, 1, bytesPerPixel, 4);
|
FormatInfo formatInfo = new(format, 1, 1, bytesPerPixel, 4);
|
||||||
|
|
||||||
TextureInfo info = new(
|
TextureInfo info = new(
|
||||||
|
@ -10,6 +10,7 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Xml.Schema;
|
||||||
using VSyncMode = Ryujinx.Common.Configuration.VSyncMode;
|
using VSyncMode = Ryujinx.Common.Configuration.VSyncMode;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||||
@ -304,15 +305,16 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||||||
|
|
||||||
while (_isRunning)
|
while (_isRunning)
|
||||||
{
|
{
|
||||||
|
//continue;
|
||||||
long ticks = PerformanceCounter.ElapsedTicks;
|
long ticks = PerformanceCounter.ElapsedTicks;
|
||||||
|
|
||||||
if (_swapInterval == 0)
|
if (_swapInterval == 0)
|
||||||
{
|
{
|
||||||
Compose();
|
Compose();
|
||||||
|
|
||||||
_device.System?.SignalVsync();
|
//_device.System?.SignalVsync();
|
||||||
|
|
||||||
_nextFrameEvent.WaitOne(17);
|
_nextFrameEvent.WaitOne(2);//17
|
||||||
lastTicks = ticks;
|
lastTicks = ticks;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -355,6 +357,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int l = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Compose()
|
public void Compose()
|
||||||
@ -392,6 +395,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||||||
}
|
}
|
||||||
|
|
||||||
PostFrameBuffer(layer, item);
|
PostFrameBuffer(layer, item);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (acquireStatus != Status.NoBufferAvailaible && acquireStatus != Status.InvalidOperation)
|
else if (acquireStatus != Status.NoBufferAvailaible && acquireStatus != Status.InvalidOperation)
|
||||||
{
|
{
|
||||||
@ -399,10 +403,17 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static int xx = 0;
|
||||||
private void PostFrameBuffer(Layer layer, BufferItem item)
|
private void PostFrameBuffer(Layer layer, BufferItem item)
|
||||||
{
|
{
|
||||||
int frameBufferWidth = item.GraphicBuffer.Object.Width;
|
TextureCallbackInformation textureCallbackInformation = new()
|
||||||
|
{
|
||||||
|
Layer = layer,
|
||||||
|
Item = item,
|
||||||
|
};
|
||||||
|
if (xx == 0)
|
||||||
|
{
|
||||||
|
int frameBufferWidth = item.GraphicBuffer.Object.Width;
|
||||||
int frameBufferHeight = item.GraphicBuffer.Object.Height;
|
int frameBufferHeight = item.GraphicBuffer.Object.Height;
|
||||||
|
|
||||||
int nvMapHandle = item.GraphicBuffer.Object.Buffer.Surfaces[0].NvMapHandle;
|
int nvMapHandle = item.GraphicBuffer.Object.Buffer.Surfaces[0].NvMapHandle;
|
||||||
@ -412,7 +423,8 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||||||
nvMapHandle = item.GraphicBuffer.Object.Buffer.NvMapId;
|
nvMapHandle = item.GraphicBuffer.Object.Buffer.NvMapId;
|
||||||
}
|
}
|
||||||
|
|
||||||
ulong bufferOffset = (ulong)item.GraphicBuffer.Object.Buffer.Surfaces[0].Offset;
|
|
||||||
|
ulong bufferOffset = (ulong)item.GraphicBuffer.Object.Buffer.Surfaces[0].Offset;
|
||||||
|
|
||||||
NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(layer.Owner, nvMapHandle);
|
NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(layer.Owner, nvMapHandle);
|
||||||
|
|
||||||
@ -446,44 +458,49 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||||||
aspectRatio.ToFloatX(),
|
aspectRatio.ToFloatX(),
|
||||||
aspectRatio.ToFloatY());
|
aspectRatio.ToFloatY());
|
||||||
|
|
||||||
TextureCallbackInformation textureCallbackInformation = new()
|
|
||||||
{
|
|
||||||
Layer = layer,
|
|
||||||
Item = item,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_device.Gpu.Window.EnqueueFrameThreadSafe(
|
|
||||||
layer.Owner,
|
if (_device.Gpu.Window.EnqueueFrameThreadSafe(
|
||||||
frameBufferAddress,
|
layer.Owner,
|
||||||
frameBufferWidth,
|
frameBufferAddress,
|
||||||
frameBufferHeight,
|
frameBufferWidth,
|
||||||
0,
|
frameBufferHeight,
|
||||||
false,
|
0,
|
||||||
gobBlocksInY,
|
false,
|
||||||
format,
|
gobBlocksInY,
|
||||||
bytesPerPixel,
|
format,
|
||||||
crop,
|
bytesPerPixel,
|
||||||
AcquireBuffer,
|
crop,
|
||||||
ReleaseBuffer,
|
AcquireBuffer,
|
||||||
textureCallbackInformation))
|
ReleaseBuffer,
|
||||||
{
|
textureCallbackInformation))
|
||||||
if (item.Fence.FenceCount == 0)
|
|
||||||
{
|
{
|
||||||
_device.Gpu.Window.SignalFrameReady();
|
if (item.Fence.FenceCount == 0)
|
||||||
_device.Gpu.GPFifo.Interrupt();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
item.Fence.RegisterCallback(_device.Gpu, (x) =>
|
|
||||||
{
|
{
|
||||||
_device.Gpu.Window.SignalFrameReady();
|
_device.Gpu.Window.SignalFrameReady();
|
||||||
_device.Gpu.GPFifo.Interrupt();
|
_device.Gpu.GPFifo.Interrupt();
|
||||||
});
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item.Fence.RegisterCallback(_device.Gpu, (x) =>
|
||||||
|
{
|
||||||
|
_device.Gpu.Window.SignalFrameReady();
|
||||||
|
_device.Gpu.GPFifo.Interrupt();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ReleaseBuffer(textureCallbackInformation);
|
||||||
|
}
|
||||||
|
xx++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ReleaseBuffer(textureCallbackInformation);
|
ReleaseBuffer(textureCallbackInformation);
|
||||||
|
xx++;
|
||||||
|
if (xx > 1000)
|
||||||
|
{ xx = 0; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user