0 Replies
      Latest reply on Mar 19, 2020 9:39 AM by mousebird
      mousebird Level 1 Level 1 (0 points)

        Has anyone seen this error when debugging a vertex shader in Xcode for Metal?

         

        I'm using an Argument Buffer that looks like this:

        struct VertexTriArgBufferB {

            constant Uniforms *uniforms                   [[ id(WKSUniformArgBuffer) ]];

            constant UniformDrawStateA *uniDrawState      [[ id(WKSUniformDrawStateArgBuffer) ]];

            constant Lighting *lighting                   [[ id(WKSLightingArgBuffer) ]];

            constant RegularTextures *tex                 [[ id(WKSTextureArgBuffer) ]];

        };

         

        Passed in to the vertex shader like so:

        vertex ProjVertexTriB vertexTri_multiTex(

                        VertexTriB vert [[stage_in]],

                        constant VertexTriArgBufferB & vertArgs [[buffer(WKSVertexArgBuffer)]])

        {

        .....

        }

         

        The full error message is:

        Error DYPShaderDebuggerErrorDomain:2:

        Error creating instrumented render pipeline state: Error Domain=AGXMetalA12 Code=3 "buffer(0): Argument buffer participates in modification as well as resource use" UserInfo={NSLocalizedDescription=buffer(0): Argument buffer participates in modification as well as resource use}