mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-05 17:39:53 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b4d93cb71 | |||
| a7dae8dd7d | |||
| dc3f719fa1 |
@@ -9,7 +9,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<SharpEmuVersion>0.0.3-release.2</SharpEmuVersion>
|
<SharpEmuVersion>0.0.3-hotfix-2</SharpEmuVersion>
|
||||||
<Version>$(SharpEmuVersion)</Version>
|
<Version>$(SharpEmuVersion)</Version>
|
||||||
|
|
||||||
<RepoRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)'))</RepoRoot>
|
<RepoRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)'))</RepoRoot>
|
||||||
|
|||||||
@@ -10179,12 +10179,7 @@ internal static unsafe class VulkanVideoPresenter
|
|||||||
}
|
}
|
||||||
|
|
||||||
var size = (ulong)Math.Max(guestBuffer.Length, sizeof(uint));
|
var size = (ulong)Math.Max(guestBuffer.Length, sizeof(uint));
|
||||||
if (guestBuffer.BaseAddress > ulong.MaxValue - size)
|
var endAddress = checked(guestBuffer.BaseAddress + size);
|
||||||
{
|
|
||||||
return CreateTransientGlobalBufferResource(guestBuffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
var endAddress = guestBuffer.BaseAddress + size;
|
|
||||||
GuestBufferAllocation? allocation = null;
|
GuestBufferAllocation? allocation = null;
|
||||||
foreach (var candidate in _guestBufferAllocations)
|
foreach (var candidate in _guestBufferAllocations)
|
||||||
{
|
{
|
||||||
@@ -10419,14 +10414,9 @@ internal static unsafe class VulkanVideoPresenter
|
|||||||
}
|
}
|
||||||
|
|
||||||
var size = (ulong)Math.Max(buffer.Length, sizeof(uint));
|
var size = (ulong)Math.Max(buffer.Length, sizeof(uint));
|
||||||
if (buffer.BaseAddress > ulong.MaxValue - size - 3)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var alignedStart = buffer.BaseAddress &
|
var alignedStart = buffer.BaseAddress &
|
||||||
~(GuestStorageBufferOffsetAlignment - 1);
|
~(GuestStorageBufferOffsetAlignment - 1);
|
||||||
var paddedEnd = (buffer.BaseAddress + size + 3) & ~3UL;
|
var paddedEnd = checked(buffer.BaseAddress + size + 3) & ~3UL;
|
||||||
ranges.Add((
|
ranges.Add((
|
||||||
alignedStart,
|
alignedStart,
|
||||||
paddedEnd));
|
paddedEnd));
|
||||||
|
|||||||
Reference in New Issue
Block a user