Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
842cb26ba5 | ||
|
e235d5e7bb | ||
|
ed0b10c81f |
@@ -50,8 +50,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
public int InvalidatedSequence;
|
public int InvalidatedSequence;
|
||||||
public Texture CachedTexture;
|
public Texture CachedTexture;
|
||||||
public Sampler CachedSampler;
|
public Sampler CachedSampler;
|
||||||
public int ScaleIndex;
|
|
||||||
public TextureUsageFlags UsageFlags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TextureState[] _textureState;
|
private TextureState[] _textureState;
|
||||||
@@ -535,14 +533,12 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
// The texture is already bound.
|
// The texture is already bound.
|
||||||
state.CachedTexture.SynchronizeMemory();
|
state.CachedTexture.SynchronizeMemory();
|
||||||
|
|
||||||
if ((state.ScaleIndex != index || state.UsageFlags != usageFlags) &&
|
if ((usageFlags & TextureUsageFlags.NeedsScaleValue) != 0 &&
|
||||||
UpdateScale(state.CachedTexture, usageFlags, index, stage))
|
UpdateScale(state.CachedTexture, usageFlags, index, stage))
|
||||||
{
|
{
|
||||||
ITexture hostTextureRebind = state.CachedTexture.GetTargetTexture(bindingInfo.Target);
|
ITexture hostTextureRebind = state.CachedTexture.GetTargetTexture(bindingInfo.Target);
|
||||||
|
|
||||||
state.Texture = hostTextureRebind;
|
state.Texture = hostTextureRebind;
|
||||||
state.ScaleIndex = index;
|
|
||||||
state.UsageFlags = usageFlags;
|
|
||||||
|
|
||||||
_context.Renderer.Pipeline.SetTextureAndSampler(stage, bindingInfo.Binding, hostTextureRebind, state.Sampler);
|
_context.Renderer.Pipeline.SetTextureAndSampler(stage, bindingInfo.Binding, hostTextureRebind, state.Sampler);
|
||||||
}
|
}
|
||||||
@@ -573,7 +569,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
{
|
{
|
||||||
bool textureOrSamplerChanged = state.Texture != hostTexture || state.Sampler != hostSampler;
|
bool textureOrSamplerChanged = state.Texture != hostTexture || state.Sampler != hostSampler;
|
||||||
|
|
||||||
if ((state.ScaleIndex != index || state.UsageFlags != usageFlags || textureOrSamplerChanged) &&
|
if ((usageFlags & TextureUsageFlags.NeedsScaleValue) != 0 &&
|
||||||
UpdateScale(texture, usageFlags, index, stage))
|
UpdateScale(texture, usageFlags, index, stage))
|
||||||
{
|
{
|
||||||
hostTexture = texture?.GetTargetTexture(bindingInfo.Target);
|
hostTexture = texture?.GetTargetTexture(bindingInfo.Target);
|
||||||
@@ -583,9 +579,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
if (textureOrSamplerChanged)
|
if (textureOrSamplerChanged)
|
||||||
{
|
{
|
||||||
state.Texture = hostTexture;
|
state.Texture = hostTexture;
|
||||||
state.ScaleIndex = index;
|
|
||||||
state.UsageFlags = usageFlags;
|
|
||||||
|
|
||||||
state.Sampler = hostSampler;
|
state.Sampler = hostSampler;
|
||||||
|
|
||||||
_context.Renderer.Pipeline.SetTextureAndSampler(stage, bindingInfo.Binding, hostTexture, hostSampler);
|
_context.Renderer.Pipeline.SetTextureAndSampler(stage, bindingInfo.Binding, hostTexture, hostSampler);
|
||||||
@@ -666,7 +659,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
cachedTexture?.SignalModified();
|
cachedTexture?.SignalModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((state.ScaleIndex != scaleIndex || state.UsageFlags != usageFlags) &&
|
if ((usageFlags & TextureUsageFlags.NeedsScaleValue) != 0 &&
|
||||||
UpdateScale(state.CachedTexture, usageFlags, scaleIndex, stage))
|
UpdateScale(state.CachedTexture, usageFlags, scaleIndex, stage))
|
||||||
{
|
{
|
||||||
ITexture hostTextureRebind = state.CachedTexture.GetTargetTexture(bindingInfo.Target);
|
ITexture hostTextureRebind = state.CachedTexture.GetTargetTexture(bindingInfo.Target);
|
||||||
@@ -674,8 +667,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
Format format = bindingInfo.Format == 0 ? cachedTexture.Format : bindingInfo.Format;
|
Format format = bindingInfo.Format == 0 ? cachedTexture.Format : bindingInfo.Format;
|
||||||
|
|
||||||
state.Texture = hostTextureRebind;
|
state.Texture = hostTextureRebind;
|
||||||
state.ScaleIndex = scaleIndex;
|
|
||||||
state.UsageFlags = usageFlags;
|
|
||||||
|
|
||||||
_context.Renderer.Pipeline.SetImage(bindingInfo.Binding, hostTextureRebind, format);
|
_context.Renderer.Pipeline.SetImage(bindingInfo.Binding, hostTextureRebind, format);
|
||||||
}
|
}
|
||||||
@@ -713,7 +704,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
texture?.SignalModified();
|
texture?.SignalModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((state.ScaleIndex != scaleIndex || state.UsageFlags != usageFlags || state.Texture != hostTexture) &&
|
if ((usageFlags & TextureUsageFlags.NeedsScaleValue) != 0 &&
|
||||||
UpdateScale(texture, usageFlags, scaleIndex, stage))
|
UpdateScale(texture, usageFlags, scaleIndex, stage))
|
||||||
{
|
{
|
||||||
hostTexture = texture?.GetTargetTexture(bindingInfo.Target);
|
hostTexture = texture?.GetTargetTexture(bindingInfo.Target);
|
||||||
@@ -722,8 +713,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||||||
if (state.Texture != hostTexture)
|
if (state.Texture != hostTexture)
|
||||||
{
|
{
|
||||||
state.Texture = hostTexture;
|
state.Texture = hostTexture;
|
||||||
state.ScaleIndex = scaleIndex;
|
|
||||||
state.UsageFlags = usageFlags;
|
|
||||||
|
|
||||||
Format format = bindingInfo.Format;
|
Format format = bindingInfo.Format;
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
|||||||
private const ushort FileFormatVersionMajor = 1;
|
private const ushort FileFormatVersionMajor = 1;
|
||||||
private const ushort FileFormatVersionMinor = 2;
|
private const ushort FileFormatVersionMinor = 2;
|
||||||
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
||||||
private const uint CodeGenVersion = 14;
|
private const uint CodeGenVersion = 3525;
|
||||||
|
|
||||||
private const string SharedTocFileName = "shared.toc";
|
private const string SharedTocFileName = "shared.toc";
|
||||||
private const string SharedDataFileName = "shared.data";
|
private const string SharedDataFileName = "shared.data";
|
||||||
|
@@ -248,7 +248,7 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||||||
this.Copy(Attribute(index + 12), w);
|
this.Copy(Attribute(index + 12), w);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.GpPassthrough)
|
if (Config.GpPassthrough && !Config.GpuAccessor.QueryHostSupportsGeometryShaderPassthrough())
|
||||||
{
|
{
|
||||||
int inputVertices = Config.GpuAccessor.QueryPrimitiveTopology().ToInputVertices();
|
int inputVertices = Config.GpuAccessor.QueryPrimitiveTopology().ToInputVertices();
|
||||||
|
|
||||||
|
@@ -235,6 +235,32 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres
|
|||||||
return GetAddrInfoRequestImpl(context, outputBufferPosition, outputBufferSize, true, optionsBufferPosition, optionsBufferSize);
|
return GetAddrInfoRequestImpl(context, outputBufferPosition, outputBufferSize, true, optionsBufferPosition, optionsBufferSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[CommandHipc(14)] // 5.0.0+
|
||||||
|
// ResolverSetOptionRequest(buffer<unknown, 5, 0>, u64 unknown, u64 pid_placeholder, pid) -> (i32 ret, u32 bsd_errno)
|
||||||
|
public ResultCode ResolverSetOptionRequest(ServiceCtx context)
|
||||||
|
{
|
||||||
|
ulong bufferPosition = context.Request.SendBuff[0].Position;
|
||||||
|
ulong bufferSize = context.Request.SendBuff[0].Size;
|
||||||
|
|
||||||
|
ulong unknown = context.RequestData.ReadUInt64();
|
||||||
|
|
||||||
|
byte[] buffer = new byte[bufferSize];
|
||||||
|
|
||||||
|
context.Memory.Read(bufferPosition, buffer);
|
||||||
|
|
||||||
|
// TODO: Parse and use options.
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceSfdnsres, new { unknown });
|
||||||
|
|
||||||
|
NetDbError netDbErrorCode = NetDbError.Success;
|
||||||
|
GaiError errno = GaiError.Success;
|
||||||
|
|
||||||
|
context.ResponseData.Write((int)errno);
|
||||||
|
context.ResponseData.Write((int)netDbErrorCode);
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
private static ResultCode GetHostByNameRequestImpl(
|
private static ResultCode GetHostByNameRequestImpl(
|
||||||
ServiceCtx context,
|
ServiceCtx context,
|
||||||
ulong inputBufferPosition,
|
ulong inputBufferPosition,
|
||||||
@@ -615,7 +641,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres
|
|||||||
{
|
{
|
||||||
context.ResponseData.Write((int)netDbErrorCode);
|
context.ResponseData.Write((int)netDbErrorCode);
|
||||||
context.ResponseData.Write((int)errno);
|
context.ResponseData.Write((int)errno);
|
||||||
context.ResponseData.Write((int)serializedSize);
|
context.ResponseData.Write(serializedSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user