forked from MeloNX/MeloNX
Update packages and fix descriptor address issue
This commit is contained in:
parent
d9099429f2
commit
2ba59b2ce9
@ -33,15 +33,15 @@
|
||||
<PackageVersion Include="OpenTK.Windowing.GraphicsLibraryFramework" Version="4.8.1" />
|
||||
<PackageVersion Include="Ryujinx.Audio.OpenAL.Dependencies" Version="1.21.0.1" />
|
||||
<PackageVersion Include="Ryujinx.Graphics.Nvdec.Dependencies" Version="5.0.1-build13" />
|
||||
<PackageVersion Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Version="1.2.0" />
|
||||
<PackageVersion Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Version="1.2.3" />
|
||||
<PackageVersion Include="Ryujinx.GtkSharp" Version="3.24.24.59-ryujinx" />
|
||||
<PackageVersion Include="Ryujinx.SDL2-CS" Version="2.28.1-build28" />
|
||||
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
|
||||
<PackageVersion Include="shaderc.net" Version="0.1.0" />
|
||||
<PackageVersion Include="SharpZipLib" Version="1.4.2" />
|
||||
<PackageVersion Include="Silk.NET.Vulkan" Version="2.16.0" />
|
||||
<PackageVersion Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.16.0" />
|
||||
<PackageVersion Include="Silk.NET.Vulkan.Extensions.KHR" Version="2.16.0" />
|
||||
<PackageVersion Include="Silk.NET.Vulkan" Version="2.22.0" />
|
||||
<PackageVersion Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.22.0" />
|
||||
<PackageVersion Include="Silk.NET.Vulkan.Extensions.KHR" Version="2.22.0" />
|
||||
<PackageVersion Include="SixLabors.ImageSharp" Version="1.0.4" />
|
||||
<PackageVersion Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta11" />
|
||||
<PackageVersion Include="SPB" Version="0.0.4-build28" />
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
4E80AA212CD705DD00029585 /* SDL in Frameworks */ = {isa = PBXBuildFile; productRef = 4E80AA202CD705DD00029585 /* SDL */; };
|
||||
4E80AA632CD7122800029585 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E80AA622CD7122800029585 /* GameController.framework */; };
|
||||
CA5941A82CE3142E00C2BC10 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E80AA622CD7122800029585 /* GameController.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@ -104,7 +104,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4E80AA632CD7122800029585 /* GameController.framework in Frameworks */,
|
||||
CA5941A82CE3142E00C2BC10 /* GameController.framework in Frameworks */,
|
||||
4E80AA212CD705DD00029585 /* SDL in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -485,6 +485,10 @@
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
||||
@ -525,6 +529,10 @@
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
||||
|
Binary file not shown.
@ -54,12 +54,9 @@ struct ContentView: View {
|
||||
}
|
||||
|
||||
func start(displayid: UInt32) {
|
||||
setupVirtualController()
|
||||
|
||||
if theWindow == nil {
|
||||
// Ensure theWindow is set
|
||||
theWindow = UIApplication.shared.windows.first
|
||||
}
|
||||
|
||||
|
||||
|
||||
let config = Ryujinx.Configuration(
|
||||
gamepath: game!.path,
|
||||
@ -72,9 +69,19 @@ struct ContentView: View {
|
||||
inputids: ["1-47150005-05ac-0000-0100-00004f066d01"],
|
||||
ryufullscreen: true
|
||||
)
|
||||
|
||||
|
||||
// Start the emulation
|
||||
do {
|
||||
if theWindow == nil {
|
||||
// Ensure theWindow is set
|
||||
theWindow = UIApplication.shared.windows.first
|
||||
}
|
||||
setupVirtualController()
|
||||
|
||||
try Ryujinx().start(with: config)
|
||||
|
||||
|
||||
} catch {
|
||||
print("Error \(error.localizedDescription)")
|
||||
}
|
||||
|
@ -48,32 +48,58 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
}
|
||||
|
||||
public unsafe void UpdateBuffers(int setIndex, int baseBinding, ReadOnlySpan<DescriptorBufferInfo> bufferInfo, DescriptorType type)
|
||||
{
|
||||
|
||||
// DEBUG: Validate inputs
|
||||
if (bufferInfo.Length == 0)
|
||||
{
|
||||
Console.WriteLine("bufferInfo is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
// DEBUG: Check if _descriptorSets and _holder.Device are properly initialized
|
||||
if (_descriptorSets == null || _descriptorSets.Length <= setIndex)
|
||||
{
|
||||
throw new Exception("Descriptor set at the specified index is null or out of range.");
|
||||
}
|
||||
|
||||
if (_holder?.Device == null)
|
||||
{
|
||||
throw new Exception("_holder.Device is null or uninitialized.");
|
||||
}
|
||||
|
||||
// DEBUG: Check each DescriptorBufferInfo in the span
|
||||
foreach (var info in bufferInfo)
|
||||
{
|
||||
if (info.Buffer.Handle == 0)
|
||||
{
|
||||
if (bufferInfo.Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
fixed (DescriptorBufferInfo* pBufferInfo = bufferInfo)
|
||||
{
|
||||
var writeDescriptorSet = new WriteDescriptorSet
|
||||
{
|
||||
SType = StructureType.WriteDescriptorSet,
|
||||
DstSet = _descriptorSets[setIndex],
|
||||
DstBinding = (uint)baseBinding,
|
||||
DescriptorType = type,
|
||||
DescriptorCount = (uint)bufferInfo.Length,
|
||||
PBufferInfo = pBufferInfo,
|
||||
};
|
||||
|
||||
_holder.Api.UpdateDescriptorSets(_holder.Device, 1, writeDescriptorSet, 0, null);
|
||||
}
|
||||
throw new Exception("One of the buffers in bufferInfo is null or uninitialized.");
|
||||
}
|
||||
}
|
||||
|
||||
// Proceed if all checks pass
|
||||
fixed (DescriptorBufferInfo* pBufferInfo = bufferInfo)
|
||||
{
|
||||
var writeDescriptorSet = new WriteDescriptorSet
|
||||
{
|
||||
SType = StructureType.WriteDescriptorSet,
|
||||
DstSet = _descriptorSets[setIndex],
|
||||
DstBinding = (uint)baseBinding,
|
||||
DescriptorType = type,
|
||||
DescriptorCount = (uint)bufferInfo.Length,
|
||||
PBufferInfo = pBufferInfo
|
||||
};
|
||||
|
||||
// Update descriptor sets
|
||||
_holder.Api.UpdateDescriptorSets(_holder.Device, 1, writeDescriptorSet, 0, null);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe void UpdateImage(int setIndex, int bindingIndex, DescriptorImageInfo imageInfo, DescriptorType type)
|
||||
{
|
||||
if (imageInfo.ImageView.Handle != 0UL)
|
||||
{
|
||||
|
||||
var writeDescriptorSet = new WriteDescriptorSet
|
||||
{
|
||||
SType = StructureType.WriteDescriptorSet,
|
||||
@ -90,11 +116,22 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
public unsafe void UpdateImages(int setIndex, int baseBinding, ReadOnlySpan<DescriptorImageInfo> imageInfo, DescriptorType type)
|
||||
{
|
||||
|
||||
// DEBUG: Check if imageInfo is Empty
|
||||
if (imageInfo.Length == 0)
|
||||
{
|
||||
|
||||
Console.WriteLine("Error: imageInfo is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
// DEBUG: Check the values inside imageInfo
|
||||
foreach (var info in imageInfo)
|
||||
{
|
||||
Console.WriteLine($"Buffer Handle: {info.ImageView.Handle}");
|
||||
}
|
||||
|
||||
|
||||
fixed (DescriptorImageInfo* pImageInfo = imageInfo)
|
||||
{
|
||||
var writeDescriptorSet = new WriteDescriptorSet
|
||||
@ -107,6 +144,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
PImageInfo = pImageInfo,
|
||||
};
|
||||
|
||||
|
||||
|
||||
_holder.Api.UpdateDescriptorSets(_holder.Device, 1, writeDescriptorSet, 0, null);
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
_textures.AsSpan().Fill(initialImageInfo);
|
||||
_images.AsSpan().Fill(initialImageInfo);
|
||||
|
||||
if (gd.Capabilities.SupportsNullDescriptors)
|
||||
if (gd.Capabilities.SupportsNullDescriptors && !OperatingSystem.IsIOS())
|
||||
{
|
||||
// If null descriptors are supported, we can pass null as the handle.
|
||||
_dummyBuffer = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user