1 Reply
      Latest reply on Nov 21, 2019 2:46 AM by Stainless
      Stainless Level 1 Level 1 (0 points)

        Hi Guys,

         

        Got an issue that is halting progress. I have dug around on the internet and other than finding a couple of people who are having the same issue, no sign of a solution.

         

        When I bind a shader for the first time, it creates a RenderPassDescriptor and caches it.

         

        The vertex descriptor looks fine.

         

         

        You can see it has a float4 at offset 0 of size 16 bytes, and a float2 at offset 16 of size 8 bytes

         

        When I create the render pipeline it all goes wrong.

         

         

        My float4 now has size of 24 bytes, and my float2 now has size of 16 bytes

         

        When it gets to the draw call I get the validation layer exception that confirms this,

         

        validateFunctionArguments:3485: failed assertion `Vertex Function(VShader): argument vertexBuffer.0[0] from buffer(0) with offset(0) and length(16) has space for 16 bytes, but argument has a length(24).'

         

         

         

        Has anyone come across this before?

         

        Cheers guys