Skip to content

Fix native backends#8900

Merged
SimonDarksideJ merged 1 commit intoMonoGame:developfrom
FlyingOakGames:native
Jul 14, 2025
Merged

Fix native backends#8900
SimonDarksideJ merged 1 commit intoMonoGame:developfrom
FlyingOakGames:native

Conversation

@ThomasFOG
Copy link
Contributor

@ThomasFOG ThomasFOG commented Jul 14, 2025

I'm looking into getting the native backends up and running again (just getting it to run on Windows without linkage issues).

@sepcnt I don't where you're at, and I assume that you're running into the same issues.

@ThomasFOG ThomasFOG marked this pull request as ready for review July 14, 2025 20:41
@SimonDarksideJ SimonDarksideJ merged commit fa9d68a into MonoGame:develop Jul 14, 2025
19 of 22 checks passed
@sepcnt
Copy link
Contributor

sepcnt commented Jul 15, 2025

It did fix some issues, however, I am afraid that it is not an optimal solution.
Instead of changing the string type, I removed the StringInterop module totally, since we cannot do stackalloc and CoAlloc on other platforms.
You can check my branch https://github.com/sepcnt/MonoGame/tree/desktopvk
It now only left 8 unit tests across multiple platforms and remains full compatibility.

I am now running into some issues with the shader compiler and still waiting for assistance.

sepcnt added a commit to sepcnt/MonoGame that referenced this pull request Jul 15, 2025
@ThomasFOG ThomasFOG deleted the native branch July 15, 2025 08:09
@ThomasFOG
Copy link
Contributor Author

We'll see where this goes! Just wanted to give you the heads up because I needed this to work in the meantime. Looking forward to all the fixes.

@sepcnt
Copy link
Contributor

sepcnt commented Jul 15, 2025

I made a PR now: #8903

@tomspilman
Copy link
Member

Instead of changing the string type, I removed the StringInterop module totally, since we cannot do stackalloc and CoAlloc on other platforms.

I added this specifically just 3 weeks ago. What was the issue?

@sepcnt
Copy link
Contributor

sepcnt commented Jul 15, 2025

Instead of changing the string type, I removed the StringInterop module totally, since we cannot do stackalloc and CoAlloc on other platforms.

I added this specifically just 3 weeks ago. What was the issue?

It allocates up to 4x memory and may mess up UTF8 conversion.

@tomspilman
Copy link
Member

It allocates up to 4x memory

I don't see the concern with the extra memory. We're not a word processor passing 1000s of words of strings. It won't be noticed and is a small memory trade off for less CPU work passing strings at runtime.

may mess up UTF8 conversion.

How could it do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants