Skip to content

FastTextRenderer crashes on Vulkan #2810

Open
@Doprez

Description

@Doprez

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:

  1. Add default GameProfiler class to an empty project
  2. Set the Graphics API to Vulkan in the csproj
  3. watch the shaders compile
  4. 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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions