Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
32450d45de | ||
|
ed7a0474c6 |
32
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
32
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -1,26 +1,27 @@
|
|||||||
name: Bug Report
|
name: Bug Report
|
||||||
description: File a bug report
|
description: File a bug report
|
||||||
title: "[Bug] <title>"
|
title: "[Bug]"
|
||||||
labels: bug
|
labels: bug
|
||||||
body:
|
body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: issue
|
id: issue
|
||||||
attributes:
|
attributes:
|
||||||
label: Description of Issue
|
label: Description of the issue
|
||||||
description: What's the issue you encountered?
|
description: What's the issue you encountered?
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: repro
|
id: repro
|
||||||
attributes:
|
attributes:
|
||||||
label: Reproduction Steps
|
label: Reproduction steps
|
||||||
description: How can the issue be reproduced?
|
description: How can the issue be reproduced?
|
||||||
|
placeholder: Describe each step as precisely as possible
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: log
|
id: log
|
||||||
attributes:
|
attributes:
|
||||||
label: Log File
|
label: Log file
|
||||||
description: A log file will help our developers to better diagnose and fix the issue.
|
description: A log file will help our developers to better diagnose and fix the issue.
|
||||||
placeholder: Logs files can be found under "Logs" folder in Ryujinx program folder. You can drag and drop the log on to the text area
|
placeholder: Logs files can be found under "Logs" folder in Ryujinx program folder. You can drag and drop the log on to the text area
|
||||||
validations:
|
validations:
|
||||||
@@ -29,55 +30,44 @@ body:
|
|||||||
id: os
|
id: os
|
||||||
attributes:
|
attributes:
|
||||||
label: OS
|
label: OS
|
||||||
placeholder: "Example: Windows 10"
|
placeholder: "e.g. Windows 10"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: input
|
||||||
id: ryujinx-version
|
id: ryujinx-version
|
||||||
attributes:
|
attributes:
|
||||||
label: Ryujinx version
|
label: Ryujinx version
|
||||||
placeholder: |
|
placeholder: "e.g. 1.0.470"
|
||||||
- *(e.g. 1.0.470)*
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: input
|
||||||
id: game-version
|
id: game-version
|
||||||
attributes:
|
attributes:
|
||||||
label: Game version
|
label: Game version
|
||||||
placeholder: |
|
placeholder: "e.g. 1.1.1"
|
||||||
- *(e.g. 1.1.1)*
|
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: input
|
- type: input
|
||||||
id: cpu
|
id: cpu
|
||||||
attributes:
|
attributes:
|
||||||
label: CPU
|
label: CPU
|
||||||
placeholder: |
|
placeholder: "e.g. i7-6700"
|
||||||
- *(e.g. i7-6700)*
|
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: input
|
- type: input
|
||||||
id: gpu
|
id: gpu
|
||||||
attributes:
|
attributes:
|
||||||
label: GPU
|
label: GPU
|
||||||
placeholder: |
|
placeholder: "e.g. NVIDIA RTX 2070"
|
||||||
- *(e.g. NVIDIA RTX 2070)*
|
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: input
|
- type: input
|
||||||
id: ram
|
id: ram
|
||||||
attributes:
|
attributes:
|
||||||
label: RAM
|
label: RAM
|
||||||
placeholder: |
|
placeholder: "e.g. 16GB"
|
||||||
- *(e.g. 16GB)*
|
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: checkboxes
|
|
||||||
attributes:
|
|
||||||
label: Applied Mods?
|
|
||||||
options:
|
|
||||||
- label: "Yes"
|
|
||||||
required: false
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: mods
|
id: mods
|
||||||
attributes:
|
attributes:
|
||||||
|
6
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
6
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: Feature Request
|
name: Feature Request
|
||||||
description: Suggest a new feature for Ryujinx.
|
description: Suggest a new feature for Ryujinx.
|
||||||
title: "[Feature Request] <title>"
|
title: "[Feature Request]"
|
||||||
body:
|
body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: overview
|
id: overview
|
||||||
@@ -12,14 +12,14 @@ body:
|
|||||||
- type: textarea
|
- type: textarea
|
||||||
id: details
|
id: details
|
||||||
attributes:
|
attributes:
|
||||||
label: Smaller Details
|
label: Smaller details
|
||||||
description: These may include specific methods of implementation etc.
|
description: These may include specific methods of implementation etc.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: request
|
id: request
|
||||||
attributes:
|
attributes:
|
||||||
label: Nature of Request
|
label: Nature of request
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
name: Missing CPU Instruction
|
name: Missing CPU Instruction
|
||||||
description: CPU Instruction is missing in Ryujinx.
|
description: CPU Instruction is missing in Ryujinx.
|
||||||
title: "[CPU] <title>"
|
title: "[CPU]"
|
||||||
labels: [cpu, not-implemented]
|
labels: [cpu, not-implemented]
|
||||||
body:
|
body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
@@ -5,7 +5,7 @@ body:
|
|||||||
- type: textarea
|
- type: textarea
|
||||||
id: instruction
|
id: instruction
|
||||||
attributes:
|
attributes:
|
||||||
label: Service Call
|
label: Service call
|
||||||
description: What service call is missing?
|
description: What service call is missing?
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
@@ -39,7 +39,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
BufferUsageFlags.VertexBufferBit |
|
BufferUsageFlags.VertexBufferBit |
|
||||||
BufferUsageFlags.TransformFeedbackBufferBitExt;
|
BufferUsageFlags.TransformFeedbackBufferBitExt;
|
||||||
|
|
||||||
private readonly PhysicalDevice _physicalDevice;
|
|
||||||
private readonly Device _device;
|
private readonly Device _device;
|
||||||
|
|
||||||
private readonly IdList<BufferHolder> _buffers;
|
private readonly IdList<BufferHolder> _buffers;
|
||||||
@@ -48,9 +47,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
|
|
||||||
public StagingBuffer StagingBuffer { get; }
|
public StagingBuffer StagingBuffer { get; }
|
||||||
|
|
||||||
public BufferManager(VulkanRenderer gd, PhysicalDevice physicalDevice, Device device)
|
public BufferManager(VulkanRenderer gd, Device device)
|
||||||
{
|
{
|
||||||
_physicalDevice = physicalDevice;
|
|
||||||
_device = device;
|
_device = device;
|
||||||
_buffers = new IdList<BufferHolder>();
|
_buffers = new IdList<BufferHolder>();
|
||||||
StagingBuffer = new StagingBuffer(gd, this);
|
StagingBuffer = new StagingBuffer(gd, this);
|
||||||
@@ -114,7 +112,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
allocateFlagsAlt = DefaultBufferMemoryAltFlags;
|
allocateFlagsAlt = DefaultBufferMemoryAltFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
var allocation = gd.MemoryAllocator.AllocateDeviceMemory(_physicalDevice, requirements, allocateFlags, allocateFlagsAlt);
|
var allocation = gd.MemoryAllocator.AllocateDeviceMemory(requirements, allocateFlags, allocateFlagsAlt);
|
||||||
|
|
||||||
if (allocation.Memory.Handle == 0UL)
|
if (allocation.Memory.Handle == 0UL)
|
||||||
{
|
{
|
||||||
|
@@ -9,34 +9,36 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
private ulong MaxDeviceMemoryUsageEstimate = 16UL * 1024 * 1024 * 1024;
|
private ulong MaxDeviceMemoryUsageEstimate = 16UL * 1024 * 1024 * 1024;
|
||||||
|
|
||||||
private readonly Vk _api;
|
private readonly Vk _api;
|
||||||
|
private readonly PhysicalDevice _physicalDevice;
|
||||||
private readonly Device _device;
|
private readonly Device _device;
|
||||||
private readonly List<MemoryAllocatorBlockList> _blockLists;
|
private readonly List<MemoryAllocatorBlockList> _blockLists;
|
||||||
|
private readonly int _blockAlignment;
|
||||||
|
private readonly PhysicalDeviceMemoryProperties _physicalDeviceMemoryProperties;
|
||||||
|
|
||||||
private int _blockAlignment;
|
public MemoryAllocator(Vk api, PhysicalDevice physicalDevice, Device device, uint maxMemoryAllocationCount)
|
||||||
|
|
||||||
public MemoryAllocator(Vk api, Device device, uint maxMemoryAllocationCount)
|
|
||||||
{
|
{
|
||||||
_api = api;
|
_api = api;
|
||||||
|
_physicalDevice = physicalDevice;
|
||||||
_device = device;
|
_device = device;
|
||||||
_blockLists = new List<MemoryAllocatorBlockList>();
|
_blockLists = new List<MemoryAllocatorBlockList>();
|
||||||
_blockAlignment = (int)Math.Min(int.MaxValue, MaxDeviceMemoryUsageEstimate / (ulong)maxMemoryAllocationCount);
|
_blockAlignment = (int)Math.Min(int.MaxValue, MaxDeviceMemoryUsageEstimate / (ulong)maxMemoryAllocationCount);
|
||||||
|
|
||||||
|
_api.GetPhysicalDeviceMemoryProperties(_physicalDevice, out _physicalDeviceMemoryProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MemoryAllocation AllocateDeviceMemory(
|
public MemoryAllocation AllocateDeviceMemory(
|
||||||
PhysicalDevice physicalDevice,
|
|
||||||
MemoryRequirements requirements,
|
MemoryRequirements requirements,
|
||||||
MemoryPropertyFlags flags = 0)
|
MemoryPropertyFlags flags = 0)
|
||||||
{
|
{
|
||||||
return AllocateDeviceMemory(physicalDevice, requirements, flags, flags);
|
return AllocateDeviceMemory(requirements, flags, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MemoryAllocation AllocateDeviceMemory(
|
public MemoryAllocation AllocateDeviceMemory(
|
||||||
PhysicalDevice physicalDevice,
|
|
||||||
MemoryRequirements requirements,
|
MemoryRequirements requirements,
|
||||||
MemoryPropertyFlags flags,
|
MemoryPropertyFlags flags,
|
||||||
MemoryPropertyFlags alternativeFlags)
|
MemoryPropertyFlags alternativeFlags)
|
||||||
{
|
{
|
||||||
int memoryTypeIndex = FindSuitableMemoryTypeIndex(_api, physicalDevice, requirements.MemoryTypeBits, flags, alternativeFlags);
|
int memoryTypeIndex = FindSuitableMemoryTypeIndex(requirements.MemoryTypeBits, flags, alternativeFlags);
|
||||||
if (memoryTypeIndex < 0)
|
if (memoryTypeIndex < 0)
|
||||||
{
|
{
|
||||||
return default;
|
return default;
|
||||||
@@ -65,20 +67,16 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
return newBl.Allocate(size, alignment, map);
|
return newBl.Allocate(size, alignment, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int FindSuitableMemoryTypeIndex(
|
private int FindSuitableMemoryTypeIndex(
|
||||||
Vk api,
|
|
||||||
PhysicalDevice physicalDevice,
|
|
||||||
uint memoryTypeBits,
|
uint memoryTypeBits,
|
||||||
MemoryPropertyFlags flags,
|
MemoryPropertyFlags flags,
|
||||||
MemoryPropertyFlags alternativeFlags)
|
MemoryPropertyFlags alternativeFlags)
|
||||||
{
|
{
|
||||||
int bestCandidateIndex = -1;
|
int bestCandidateIndex = -1;
|
||||||
|
|
||||||
api.GetPhysicalDeviceMemoryProperties(physicalDevice, out var properties);
|
for (int i = 0; i < _physicalDeviceMemoryProperties.MemoryTypeCount; i++)
|
||||||
|
|
||||||
for (int i = 0; i < properties.MemoryTypeCount; i++)
|
|
||||||
{
|
{
|
||||||
var type = properties.MemoryTypes[i];
|
var type = _physicalDeviceMemoryProperties.MemoryTypes[i];
|
||||||
|
|
||||||
if ((memoryTypeBits & (1 << i)) != 0)
|
if ((memoryTypeBits & (1 << i)) != 0)
|
||||||
{
|
{
|
||||||
|
@@ -55,7 +55,6 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
|
|
||||||
public unsafe TextureStorage(
|
public unsafe TextureStorage(
|
||||||
VulkanRenderer gd,
|
VulkanRenderer gd,
|
||||||
PhysicalDevice physicalDevice,
|
|
||||||
Device device,
|
Device device,
|
||||||
TextureCreateInfo info,
|
TextureCreateInfo info,
|
||||||
float scaleFactor,
|
float scaleFactor,
|
||||||
@@ -118,7 +117,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
if (foreignAllocation == null)
|
if (foreignAllocation == null)
|
||||||
{
|
{
|
||||||
gd.Api.GetImageMemoryRequirements(device, _image, out var requirements);
|
gd.Api.GetImageMemoryRequirements(device, _image, out var requirements);
|
||||||
var allocation = gd.MemoryAllocator.AllocateDeviceMemory(physicalDevice, requirements, DefaultImageMemoryFlags);
|
var allocation = gd.MemoryAllocator.AllocateDeviceMemory(requirements, DefaultImageMemoryFlags);
|
||||||
|
|
||||||
if (allocation.Memory.Handle == 0UL)
|
if (allocation.Memory.Handle == 0UL)
|
||||||
{
|
{
|
||||||
@@ -173,7 +172,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
|
|
||||||
var info = NewCreateInfoWith(ref _info, format, _info.BytesPerPixel);
|
var info = NewCreateInfoWith(ref _info, format, _info.BytesPerPixel);
|
||||||
|
|
||||||
storage = new TextureStorage(_gd, default, _device, info, ScaleFactor, _allocationAuto);
|
storage = new TextureStorage(_gd, _device, info, ScaleFactor, _allocationAuto);
|
||||||
|
|
||||||
_aliasedStorages.Add(format, storage);
|
_aliasedStorages.Add(format, storage);
|
||||||
}
|
}
|
||||||
|
@@ -280,7 +280,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
supportedSampleCounts,
|
supportedSampleCounts,
|
||||||
portabilityFlags);
|
portabilityFlags);
|
||||||
|
|
||||||
MemoryAllocator = new MemoryAllocator(Api, _device, properties.Limits.MaxMemoryAllocationCount);
|
MemoryAllocator = new MemoryAllocator(Api, _physicalDevice, _device, properties.Limits.MaxMemoryAllocationCount);
|
||||||
|
|
||||||
CommandBufferPool = VulkanInitialization.CreateCommandBufferPool(Api, _device, Queue, QueueLock, queueFamilyIndex);
|
CommandBufferPool = VulkanInitialization.CreateCommandBufferPool(Api, _device, Queue, QueueLock, queueFamilyIndex);
|
||||||
|
|
||||||
@@ -290,7 +290,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
|
|
||||||
BackgroundResources = new BackgroundResources(this, _device);
|
BackgroundResources = new BackgroundResources(this, _device);
|
||||||
|
|
||||||
BufferManager = new BufferManager(this, _physicalDevice, _device);
|
BufferManager = new BufferManager(this, _device);
|
||||||
|
|
||||||
_syncManager = new SyncManager(this, _device);
|
_syncManager = new SyncManager(this, _device);
|
||||||
_pipeline = new PipelineFull(this, _device);
|
_pipeline = new PipelineFull(this, _device);
|
||||||
@@ -388,7 +388,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
|
|
||||||
internal TextureStorage CreateTextureStorage(TextureCreateInfo info, float scale)
|
internal TextureStorage CreateTextureStorage(TextureCreateInfo info, float scale)
|
||||||
{
|
{
|
||||||
return new TextureStorage(this, _physicalDevice, _device, info, scale);
|
return new TextureStorage(this, _device, info, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteBuffer(BufferHandle buffer)
|
public void DeleteBuffer(BufferHandle buffer)
|
||||||
|
Reference in New Issue
Block a user