Skip to content

Demo crash on M1 macbook #28

Open
Open
@Asuka109

Description

@Asuka109

I refer to the article to compile demo.

clang++ \
  -c ./src/main.cxx \
  -o ./3d-game-shaders-for-beginners.o \
  -std=gnu++11 \
  -g \
  -O2 \
  -I/opt/homebrew/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/include \
  -I/Users/xxx/repositories/panda3d/built/include

clang++ \
  ./3d-game-shaders-for-beginners.o \
  -o ./3d-game-shaders-for-beginners \
  -L/Users/xxx/repositories/panda3d/built/lib \
  -lp3framework \
  -lpanda \
  -lpandafx \
  -lpandaexpress \
  -lpandaphysics \
  -lp3dtoolconfig \
  -lp3dtool \
  -lp3direct \
  -lpthread

Here I use the Panda3D SDK compiled from the source code.

It looks good when I run it, and I can switch between different framebuffer textures.

But once I use the mouse to move the view, the program crashes in a few frames.

demonstration % ./3d-game-shaders-for-beginners
Warning: unable to auto-locate config files in directory named by "<auto>etc".
:audio: NullAudioManager
:util: Reading /Users/xxx/repositories/3d-game-shaders-for-beginners/demonstration/panda3d-prc-file.prc
:util(error): Unable to make directory /panda3d, caching disabled.
Known pipe types:
  CocoaGraphicsPipe
(all display modules loaded.)
:display:gsg:glgsg(warning): Shader shaders/fragment/geometry-buffer-0.frag produced the following warnings:
WARNING: Output of vertex shader 'vertexInShadowSpaces' not read by fragment shader
WARNING: Output of vertex shader 'vertexColor' not read by fragment shader
WARNING: Output of vertex shader 'diffuseCoord' not read by fragment shader
WARNING: Could not find fragment shader output 'p3d_FragData' to match FragDataBinding request.

:display:gsg:glgsg(warning): Shader shaders/fragment/geometry-buffer-1.frag produced the following warnings:
WARNING: Output of vertex shader 'vertexInShadowSpaces' not read by fragment shader
WARNING: Output of vertex shader 'vertexColor' not read by fragment shader
WARNING: Could not find fragment shader output 'p3d_FragData' to match FragDataBinding request.

:display:gsg:glgsg(warning): Shader shaders/fragment/geometry-buffer-2.frag produced the following warnings:
WARNING: Output of vertex shader 'normalCoord' not read by fragment shader
WARNING: Output of vertex shader 'vertexNormal' not read by fragment shader
WARNING: Output of vertex shader 'binormal' not read by fragment shader
WARNING: Output of vertex shader 'tangent' not read by fragment shader
WARNING: Output of vertex shader 'vertexInShadowSpaces' not read by fragment shader
WARNING: Could not find fragment shader output 'p3d_FragData' to match FragDataBinding request.

2021-05-18 21:04:01.081 3d-game-shaders-for-beginners[14248:12635934] GLDRendererMetal command buffer completion error: Error Domain=MTLCommandBufferErrorDomain Code=2 "Caused GPU Hang Error (IOAF code 3)" UserInfo={NSLocalizedDescription=Caused GPU Hang Error (IOAF code 3)}
2021-05-18 21:04:04.464 3d-game-shaders-for-beginners[14248:12635929] GLDRendererMetal command buffer completion error: Error Domain=MTLCommandBufferErrorDomain Code=2 "Caused GPU Hang Error (IOAF code 3)" UserInfo={NSLocalizedDescription=Caused GPU Hang Error (IOAF code 3)}
2021-05-18 21:04:04.467 3d-game-shaders-for-beginners[14248:12635929] GLDRendererMetal command buffer completion error: Error Domain=MTLCommandBufferErrorDomain Code=4 "Ignored (for causing prior/excessive GPU errors) (IOAF code 4)" UserInfo={NSLocalizedDescription=Ignored (for causing prior/excessive GPU errors) (IOAF code 4)}
zsh: abort      ./3d-game-shaders-for-beginners

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions