cpt-max / MonoGame-Shader-Samples

Compute, Tessellation and Geometry Shader Samples for MonoGame
46 stars 4 forks source link

On my mac with m1 chip I get this error. Application runs, shaders is compiled. DispatchCompute MaxCap. #4

Closed SameplayerDE closed 1 year ago

SameplayerDE commented 1 year ago

Unhandled exception. System.ArgumentOutOfRangeException: MaxCapacity must be one or greater. (Parameter 'maxCapacity') at System.Text.StringBuilder..ctor(Int32 capacity, Int32 maxCapacity) at MonoGame.OpenGL.GL.GetShaderInfoLog(Int32 shaderId) at Microsoft.Xna.Framework.Graphics.Shader.GetShaderHandle() at Microsoft.Xna.Framework.Graphics.ShaderProgramCache.Link(Shader vertexShader, Shader pixelShader, Shader hullShader, Shader domainShader, Shader geometryShader, Shader computeShader) at Microsoft.Xna.Framework.Graphics.ShaderProgramCache.GetProgram(Shader vertexShader, Shader pixelShader, Shader hullShader, Shader domainShader, Shader geometryShader, Shader computeShader) at Microsoft.Xna.Framework.Graphics.GraphicsDevice.ActivateShaderProgram() at Microsoft.Xna.Framework.Graphics.GraphicsDevice.ApplyComputeState() at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformDispatchCompute(Int32 threadGroupCountX, Int32 threadGroupCountY, Int32 threadGroupCountZ) at VoxelRayCast.Game1.ComputeRays() in /Users/A104592699/RiderProjects/BachelorVoxelRefactor/VoxelRayCast/Game1.cs:line 784 at VoxelRayCast.Game1.Update(GameTime gameTime) in /Users/A104592699/RiderProjects/BachelorVoxelRefactor/VoxelRayCast/Game1.cs:line 578 at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) at Program.

$(String[] args) in /Users/A104592699/RiderProjects/BachelorVoxelRefactor/VoxelRayCast/Program.cs:line 25

Das ist die Zeile:

GraphicsDevice.DispatchCompute(groupCount, 1, 1); //groupCount ist hier immer größer 1

https://github.com/SameplayerDE/BachelorVoxelRefactor/tree/master/VoxelRayCast

cpt-max commented 1 year ago

MacOS doesn't support OpenGL 4.3, so there is no hope of getting compute shaders working via OpenGL.