mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-28 17:37:11 +02:00
Fix Descriptor Issues
This commit is contained in:
parent
b9163f9fde
commit
0a3b4f71a9
8 changed files with 47 additions and 51 deletions
|
@ -130,6 +130,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
Console.WriteLine($"Buffer Handle: {info.ImageView.Handle}");
|
||||
}
|
||||
Console.WriteLine($"SetIndex: {setIndex}, BaseBinding: {baseBinding}, DescriptorType: {type}, ImageInfo Count: {imageInfo.Length}");
|
||||
|
||||
|
||||
fixed (DescriptorImageInfo* pImageInfo = imageInfo)
|
||||
|
@ -140,7 +141,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
DstSet = _descriptorSets[setIndex],
|
||||
DstBinding = (uint)baseBinding,
|
||||
DescriptorType = type,
|
||||
DescriptorCount = (uint)1,
|
||||
DescriptorCount = (uint)imageInfo.Length,
|
||||
PImageInfo = pImageInfo,
|
||||
};
|
||||
|
||||
|
@ -179,7 +180,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
DstSet = _descriptorSets[setIndex],
|
||||
DstBinding = (uint)(baseBinding + i),
|
||||
DescriptorType = DescriptorType.CombinedImageSampler,
|
||||
DescriptorCount = (uint)count,
|
||||
DescriptorCount = 1,
|
||||
PImageInfo = pImageInfo,
|
||||
};
|
||||
|
||||
|
@ -235,7 +236,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
DstSet = _descriptorSets[setIndex],
|
||||
DstBinding = (uint)baseBinding + i,
|
||||
DescriptorType = type,
|
||||
DescriptorCount = count,
|
||||
DescriptorCount = 1,
|
||||
PTexelBufferView = pTexelBufferView + i,
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -580,9 +580,12 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
texture.Sampler = _dummySampler.GetSampler().Get(cbs).Value;
|
||||
}
|
||||
|
||||
Span<DescriptorImageInfo> singleTexture = textures.Slice(i, 1);
|
||||
dsc.UpdateImages(0, binding + i, singleTexture, DescriptorType.CombinedImageSampler);
|
||||
}
|
||||
|
||||
dsc.UpdateImages(0, binding, textures[..count], DescriptorType.CombinedImageSampler);
|
||||
// dsc.UpdateImages(0, binding, textures[..count], DescriptorType.CombinedImageSampler);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -605,9 +608,11 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
images[i].ImageView = _imageRefs[binding + i]?.Get(cbs).Value ?? default;
|
||||
Span<DescriptorImageInfo> singleImage = images.Slice(i, 1);
|
||||
dsc.UpdateImages(0, binding + i, singleImage, DescriptorType.StorageImage);
|
||||
}
|
||||
|
||||
dsc.UpdateImages(0, binding, images[..count], DescriptorType.StorageImage);
|
||||
// dsc.UpdateImages(0, binding, images[..count], DescriptorType.StorageImage);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -318,7 +318,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
_physicalDevice.IsDeviceExtensionPresent(ExtConditionalRendering.ExtensionName),
|
||||
_physicalDevice.IsDeviceExtensionPresent(ExtExtendedDynamicState.ExtensionName),
|
||||
features2.Features.MultiViewport && !(IsMoltenVk && Vendor == Vendor.Amd), // Workaround for AMD on MoltenVK issue
|
||||
featuresRobustness2.NullDescriptor || IsMoltenVk,
|
||||
featuresRobustness2.NullDescriptor || !IsMoltenVk,
|
||||
_physicalDevice.IsDeviceExtensionPresent(KhrPushDescriptor.ExtensionName),
|
||||
featuresPrimitiveTopologyListRestart.PrimitiveTopologyListRestart,
|
||||
featuresPrimitiveTopologyListRestart.PrimitiveTopologyPatchListRestart,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue