Open
Description
Release Type: GitHub
Version: master and 4.2.0.2381
Platform(s): Windows Vulkan
Describe the bug
When creating the GameProfiler it uses the FastTextRenderer which causes a crash due to trying to use WriteDiscard.
To Reproduce
Steps to reproduce the behavior:
- Add default GameProfiler class to an empty project
- Set the Graphics API to Vulkan in the csproj
- watch the shaders compile
- crash when running
Expected behavior
It should either:
- add an error for Vulkan in the GameProfiler class that explains it as incompatible
- Use an alternative to FastTextRenderer for Vulkan
Log and callstacks
[CustomGame]: Error: Unexpected exception. System.InvalidOperationException: Can't use WriteDiscard on Graphics API that doesn't support renaming
at Stride.Graphics.CommandList.MapSubresource(GraphicsResource resource, Int32 subResourceIndex, MapMode mapMode, Boolean doNotWait, Int32 offsetInBytes, Int32 lengthInBytes)
at Stride.Graphics.FastTextRenderer.End(GraphicsContext graphicsContext)
at Stride.Profiling.GameProfilingSystem.Draw(GameTime gameTime) in D:\dev\GitControlledProjects\stride\sources\engine\Stride.Engine\Profiling\GameProfilingSystem.cs:line 391
at Stride.Games.GameSystemCollection.Draw(GameTime gameTime)
at Stride.Games.GameBase.Draw(GameTime gameTime)
at Stride.Games.GameBase.RawTick(TimeSpan elapsedTimePerUpdate, Int32 updateCount, Single drawInterpolationFactor, Boolean drawFrame)
at Stride.Games.GameBase.RawTickProducer()
System.InvalidOperationException: Can't use WriteDiscard on Graphics API that doesn't support renaming
at Stride.Graphics.CommandList.MapSubresource(GraphicsResource resource, Int32 subResourceIndex, MapMode mapMode, Boolean doNotWait, Int32 offsetInBytes, Int32 lengthInBytes)
at Stride.Graphics.FastTextRenderer.End(GraphicsContext graphicsContext)
at Stride.Profiling.GameProfilingSystem.Draw(GameTime gameTime) in D:\dev\GitControlledProjects\stride\sources\engine\Stride.Engine\Profiling\GameProfilingSystem.cs:line 391
at Stride.Games.GameSystemCollection.Draw(GameTime gameTime)
at Stride.Games.GameBase.Draw(GameTime gameTime)
at Stride.Games.GameBase.RawTick(TimeSpan elapsedTimePerUpdate, Int32 updateCount, Single drawInterpolationFactor, Boolean drawFrame)
at Stride.Games.GameBase.RawTickProducer()