Skip to content

This is the March 2021 Update (v2.2.0) #418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 6, 2021
Merged

This is the March 2021 Update (v2.2.0) #418

merged 10 commits into from
Mar 6, 2021

Conversation

Perksey
Copy link
Member

@Perksey Perksey commented Mar 5, 2021

  • Add memory pooling for Input State Capture extensions
  • Add Input State Capture stability and robustness improvements
  • Update to Vulkan 1.2.171
  • Update to latest OpenGL as of 22nd February 2021
  • Update to latest OpenCL as of 2nd March 2021
  • Fix window disposal/reset bugs
  • Fix a build toolchain issue where packages released in Debug mode (NuGet Packages in debug build? #416)
  • Fix a string marshalling issue & OpenAL regression (Regression in Silk.OpenAL #414)

@Perksey Perksey marked this pull request as ready for review March 5, 2021 22:43
@Perksey Perksey requested a review from HurricanKai March 5, 2021 22:45
@Perksey
Copy link
Member Author

Perksey commented Mar 5, 2021

Ready for review & merge.

Copy link
Member

@HurricanKai HurricanKai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Some comments here and there, but I believe we can push this out as is.
(Also note, in 2.3 or 2.4 we could provide .NET 6 builds)

pull_request:
paths:
- 'src/**/*'
# don't trust changes to the build system on external PRs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? pretty sure this just means on what files it triggers, we could still have changes to the build system and just a single change to src/ is required for it to run too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, we should investigate this in the future. I don't think external changes actually have any sensitive info such as the token, but you never know...

}
}
}
using System;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No clue what happened in this file, I'm assuming it's fine

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this development on Linux, it's probably some terminator mismatch. Benign and we have it in some other places too.

- Add memory pooling for Input State Capture extensions
- Add Input State Capture stability and robustness improvements
- Update to Vulkan 1.2.171
- Update to latest OpenGL as of 22nd February 2021
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this date correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup

@@ -211,6 +211,8 @@ public static void FreeString(nint ptr, NativeStringEncoding encoding = NativeSt
}
}

#nullable enable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 a first step for sure 😄


/// <summary>
/// Reads a null-terminated string from unmanaged memory, with the given native encoding.
/// </summary>
/// <param name="input">A pointer to memory containing a null-terminated string.</param>
/// <param name="encoding">The encoding of the string in memory.</param>
/// <returns>The string read from memory.</returns>
public static string PtrToString(nint input, NativeStringEncoding encoding = NativeStringEncoding.Ansi)
public static string? PtrToString(nint input, NativeStringEncoding encoding = NativeStringEncoding.Ansi)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the unfortunate things with using nint, we can't use [return: NotNullIfNotNull("input")]

}
}

// TODO in 3.0 rent these too! right now the capture extensions are very expensive
public GamepadState[] Gamepads { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another reason all public APIs should just use (RO)Memory

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's exactly why this needs to be done in 3.0 because I really want to switch this over to use ROMemory

@@ -42,25 +42,25 @@ public static class ArbDirectStateAccessOverloads
thisApi.ClearNamedBufferData(buffer, internalformat, format, type, in data.GetPinnableReference());
}

public static unsafe void ClearNamedBufferData<T0>(this ArbDirectStateAccess thisApi, [Flow(FlowDirection.In)] uint buffer, [Flow(FlowDirection.In)] InternalFormat internalformat, [Flow(FlowDirection.In)] ARB format, [Flow(FlowDirection.In)] ARB type, [Flow(FlowDirection.In)] ReadOnlySpan<T0> data) where T0 : unmanaged
public static unsafe void ClearNamedBufferData<T0>(this ArbDirectStateAccess thisApi, [Flow(FlowDirection.In)] uint buffer, [Flow(FlowDirection.In)] SizedInternalFormat internalformat, [Flow(FlowDirection.In)] ARB format, [Flow(FlowDirection.In)] ARB type, [Flow(FlowDirection.In)] ReadOnlySpan<T0> data) where T0 : unmanaged
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upstream break?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep :/

namespace Silk.NET.Vulkan.Extensions.KHR
{
[Extension("VK_KHR_synchronization2")]
public unsafe partial class KhrSynchronization2 : NativeExtension<Vk>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@@ -83,5 +83,7 @@ public enum AccessFlags : int
AccessCommandPreprocessReadBitNV = 131072,
[NativeName("Name", "VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV")]
AccessCommandPreprocessWriteBitNV = 262144,
[NativeName("Name", "VK_ACCESS_NONE_KHR")]
AccessNoneKhr = 0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, interesting 🤔

@Perksey Perksey merged commit 0cc1f41 into master Mar 6, 2021
@Perksey Perksey deleted the hotfix/mar21-fixes branch March 6, 2021 13:27
@Perksey
Copy link
Member Author

Perksey commented Mar 20, 2021

@savariya28 Hello?

Perksey added a commit that referenced this pull request Mar 25, 2022
Merge pull request #418 from Ultz/hotfix/mar21-fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants