Skip to content
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

Game doesn't build after adding ImmediateDebugRenderFeature in stride 4.2.0.2122 #132

Open
Mawpius opened this issue Apr 12, 2024 · 9 comments

Comments

@Mawpius
Copy link

Mawpius commented Apr 12, 2024

adding ImmediateDebugRenderFeature to render features in a new project in stride 4.2.0.2122 causes build to fail:
System.AggregateException: 'One or more errors occurred. (Could not compile shader. See error messages.[(0,0)]: Error: E1202: The mixin [PrimitiveShader] in [Mix0] dependency is not in the module )'
works fine in stride 4.2.0.2121

@RaymondEllis
Copy link

Same issues here.
I am able to use Stride 4.2.0.2122, but must use Stride.CommunityToolkit 1.0.0-preview.32 it's broken in preview 37+

@VaclavElias
Copy link
Collaborator

Thank you for checking @RaymondEllis. Are you also referencing the issue with the ImmediateDebugRenderFeature?

@RaymondEllis
Copy link

Yup, After adding game.AddDebugShapes(); looks like it's throwing the exception after render feature initialize.
I have mine setup similar to Example08_DebugShapes.

@VaclavElias
Copy link
Collaborator

I tested the Example08_DebugShapes example and it works for me. I just changed this

from

<ProjectReference Include="..\..\..\src\Stride.CommunityToolkit\Stride.CommunityToolkit.csproj" />

to

<ProjectReference Include="..\..\..\src\Stride.CommunityToolkit.Windows\Stride.CommunityToolkit.Windows.csproj" />

If you are using code-only, you should use now a new NuGet Stride.CommunityToolkit.Windows, OR you need to add additional bits to your project, which you can find here, specifically:

  • <RuntimeIdentifier>win-x64</RuntimeIdentifier>
  • package reference <PackageReference Include="Stride.Core.Assets.CompilerApp" Version="4.2.0.2122" IncludeAssets="build;buildTransitive" />

New package Stride.CommunityToolkit.Windows is doing those 2 bits for you.

image

I am preparing now a new PR, which will fix all the code-only examples by adding that Stride.CommunityToolkit.Windows reference. Also, I am updating code-only docs to explain this change.

@RaymondEllis
Copy link

Thanks.
Does this mean CommunityToolkit is not cross platform?

@VaclavElias
Copy link
Collaborator

@Doprez, please correct me if I am wrong.

With the latest update I made, Stride.CommunityToolkit library should be cross platform, however, to build Stride projects, including code-only, you need to use also Stride.Core.Assets.CompilerApp.exe (part of the Stride.Core.Assets.CompilerApp NuGet package) which isn't currently cross platform and it is triggered, when you build a project or run the game for the first time.

Stride.Core.Assets.CompilerApp.exe creates/compiles some assets based on the OS.

Note, this is just a preview and we are trying to figure out things. The ultimate plan is that the library Stride.CommunityToolkit should be cross platform.

@Doprez
Copy link
Collaborator

Doprez commented Apr 30, 2024

If I remember corectly last time I tried to build it was the CompilerApp that failed the build. I know Jkao has done a ton of work that I am eager for them to push to the main repo but I know they are taking a break right now due to the amount of effort put into this so far.

Its also important to note that it is likely the same issue that prevents Stride from building on Linux but that should still allow you to build for Linux.

@ArieLeo
Copy link

ArieLeo commented Jun 5, 2024

I'm also getting error on this, the moment i add ImmediateDebugRenderFeature into the compositor it break the rendering.
image

System.AggregateException: One or more errors occurred. (Could not compile shader. See error messages.[(0,0)]: Error: E1202: The mixin [PrimitiveShader] in [Mix0] dependency is not in the module
)
---> System.InvalidOperationException: Could not compile shader. See error messages.[(0,0)]: Error: E1202: The mixin [PrimitiveShader] in [Mix0] dependency is not in the module
at Stride.Rendering.EffectSystem.CheckResult(LoggerResult compilerResult) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Rendering\Rendering\EffectSystem.cs:line 181
at Stride.Rendering.EffectSystem.CreateEffect(String effectName, EffectBytecodeCompilerResult effectBytecodeCompilerResult, CompilerResults compilerResult) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Rendering\Rendering\EffectSystem.cs:line 203
at Stride.Rendering.EffectSystem.<>c__DisplayClass20_0.b__0(Task1 x) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Rendering\Rendering\EffectSystem.cs:line 164 at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at Stride.Shaders.Compiler.TaskOrResult1.WaitForResult() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Shaders\Compiler\TaskOrResult.cs:line 37
at Stride.Rendering.DynamicEffectInstance.ChooseEffect(GraphicsDevice graphicsDevice) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Rendering\Rendering\DynamicEffectInstance.cs:line 60
at Stride.Rendering.EffectInstance.UpdateEffect(GraphicsDevice graphicsDevice)
at DebugShapes.ImmediateDebugRenderFeature.InitializeCore()
at Stride.Rendering.RenderFeature.Initialize(RenderContext context) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Rendering\Rendering\RenderFeature.cs:line 45
at Stride.Rendering.RenderSystem.Initialize(RenderContext context) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Rendering\Rendering\RenderSystem.cs:line 474
at Stride.Rendering.Compositing.GraphicsCompositor.InitializeCore() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Engine\Rendering\Compositing\GraphicsCompositor.cs:line 94
at Stride.Rendering.RendererCoreBase.Initialize(RenderContext context) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Rendering\Rendering\RendererCoreBase.cs:line 119
at Stride.Rendering.RendererCoreBase.EnsureContext(RenderContext context) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Rendering\Rendering\RendererCoreBase.cs:line 247
at Stride.Rendering.RendererCoreBase.PreDrawCoreInternal(RenderDrawContext context) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Rendering\Rendering\RendererCoreBase.cs:line 230
at Stride.Rendering.RendererBase.Draw(RenderDrawContext context) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Rendering\Rendering\RendererBase.cs:line 50
at Stride.Engine.SceneSystem.Draw(GameTime gameTime) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\engine\Stride.Engine\Engine\SceneSystem.cs:line 234
at Stride.Games.GameSystemCollection.Draw(GameTime gameTime)
at Stride.Games.GameBase.Draw(GameTime gameTime)
at Stride.Editor.EditorGame.Game.EditorServiceGame.Draw(GameTime gameTime) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\editor\Stride.Editor\EditorGame\Game\EditorServiceGame.cs:line 214

@ArieLeo
Copy link

ArieLeo commented Jun 17, 2024

@Doprez Tested manually on release build, copying the shaders into the stride.rendering packages fixed this issue

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

No branches or pull requests

5 participants