Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ Our [Roadmap](https://doc.stride3d.net/latest/en/contributors/roadmap.html) comm
- **Desktop development with C++** with:
- **Windows 11 SDK (10.0.22621.0)** or a later version (should be enabled by default)
- **MSVC v143 - VS2022 C++ x64/x86 build tools (Latest)** (should be enabled by default)
- **MSVC v143 - VS2022 C++ ARM64 build tools (Latest)**
- **MSVC v143 - VS2022 C++ ARM64 build tools (Latest)** *(not enabled by default)*
- **C++/CLI support for v143 build tools (Latest)** *(not enabled by default)*
- *Optional* (to target iOS/Android): **.NET Multi-platform App UI development** and the **Android SDK setup** individual component (enabled by default). Then, in Visual Studio, go to `Tools > Android > Android SDK Manager` and install **NDK** (version 20.1+) from the `Tools` tab.
- *Optional* (to build the VSIX package): **Visual Studio extension development**
- *Optional* (to enable windows arm64 builds) [toggle setting to true](https://github.com/stride3d/stride/blob/1925a7bdb9e5627428fab43de36a911f69fcdf7c/sources/native/Stride.Native.targets#L30)

> [!NOTE]
> The installation of Visual Studio with the required components may require up to **14 GB of disk space**, depending on your system and selected components.
Expand Down
2 changes: 1 addition & 1 deletion sources/native/Stride.Native.targets
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!--<StrideNativeOutputPath>$([MSBuild]::MakeRelative('$(OutputPath)', '$(StridePackageStridePlatformBin)\'))</StrideNativeOutputPath>-->
<AllowedOutputExtensionsInPackageBuildOutputFolder>.so; .a; $(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>

<StrideNativeWindowsArm64Enabled Condition="'$(StrideNativeWindowsArm64Enabled)' == ''">true</StrideNativeWindowsArm64Enabled>
<StrideNativeWindowsArm64Enabled Condition="'$(StrideNativeWindowsArm64Enabled)' == ''">false</StrideNativeWindowsArm64Enabled>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't that change forces to set to True when releasing nuget packages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean? Do you mean, does this get affected by the team city builds?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I .. think so, since by default is true then it's generating arm64 dll files without any additional paramateres. I'm just afraid that's gonna require some additional modification.

Copy link
Collaborator

@Jklawreszuk Jklawreszuk Mar 29, 2025

Choose a reason for hiding this comment

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

My proposal would be something like this

Suggested change
<StrideNativeWindowsArm64Enabled Condition="'$(StrideNativeWindowsArm64Enabled)' == ''">false</StrideNativeWindowsArm64Enabled>
<StrideNativeWindowsArm64Enabled Condition="'$(StrideNativeWindowsArm64Enabled)' == ''">true</StrideNativeWindowsArm64Enabled>
<StrideNativeWindowsArm64Enabled Condition="'$(StrideNativeWindowsArm64Enabled)' == '' AND '$(Configuration)' != 'Release'">false</StrideNativeWindowsArm64Enabled>

Copy link
Collaborator

@Jklawreszuk Jklawreszuk Mar 29, 2025

Choose a reason for hiding this comment

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

Would be great if someone else comment If I'm correct

Copy link
Collaborator

@Jklawreszuk Jklawreszuk Mar 30, 2025

Choose a reason for hiding this comment

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

If it's easy to configure in TC then why not ,otherwise I'd go with my change (i.e if value is NaN then set true, then if is not relase, dont geneerate arm files)

Copy link
Collaborator

Choose a reason for hiding this comment

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

It could be irritating that the debug build works and once you switch to release it breaks. I'd prefer passing the parameter explicitly to TC build.

Copy link
Collaborator

Choose a reason for hiding this comment

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

makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Im not very familiar with conditionals in targets files. If we make the change through TC then would my current change be ok currently or would it cause a problem?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It should be ok. I think the file we should modify is build/Stride.build which contains a property BuildProperties, adding StrideNativeWindowsArm64Enabled=true should enable it for command line / TC builds.

</PropertyGroup>

<Choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,18 +507,26 @@ public override String ToString()
}
}


/// <summary>
/// Utility class binding DirectXTex utility methods
/// </summary>
internal class Utilities
{

#if StrideNativeWindowsArm64Enabled
private const CharSet _defaultCharSet = CharSet.Ansi;
#else
private const CharSet _defaultCharSet = CharSet.Auto;
#endif

[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]
private extern static void dxtComputePitch(DXGI_FORMAT fmt, int width, int height, out int rowPitch, out int slicePitch, CP_FLAGS flags);

[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity]
[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = _defaultCharSet), SuppressUnmanagedCodeSecurity]
private extern static uint dxtLoadDDSFile(string filePath, DDS_FLAGS flags, out TexMetadata metadata, IntPtr image);

[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity]
[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = _defaultCharSet), SuppressUnmanagedCodeSecurity]
private extern static uint dxtLoadTGAFile(string filePath, out TexMetadata metadata, IntPtr image);

[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]
Expand All @@ -545,10 +553,10 @@ internal class Utilities
[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]
private extern static uint dxtDecompressArray(DxtImage[] cImages, int nimages, ref TexMetadata metadata, DXGI_FORMAT format, IntPtr images);

[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity]
[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = _defaultCharSet), SuppressUnmanagedCodeSecurity]
private extern static uint dxtSaveToDDSFile(ref DxtImage dxtImage, DDS_FLAGS flags, string szFile);

[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity]
[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = _defaultCharSet), SuppressUnmanagedCodeSecurity]
private extern static uint dxtSaveToDDSFileArray(DxtImage[] dxtImages, int nimages, ref TexMetadata metadata, DDS_FLAGS flags, string szFile);

[DllImport("DxtWrapper", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]
Expand Down