Closed Bavitharan closed 7 months ago
This is due to a tricky issue that we recently uncovered with the way that we handle uniform buffers. At some point in our logic, we're allocating a buffer that is slightly too big for the size of the uniform values we are passing in.
In previous OS versions, this silently worked, even though the buffer size was wrong. In more recent OS versions, this now fails at runtime.
We're working to fix this.
Thank you for your response. I am waiting for solution.
I has same problem,and i fixed it。This bug is in : ShaderUniformSettings.appendBufferSpace,i rewrite this function to fixed it.
@wbtvc Please give more details.
as fast fix you can increase uniformBuffer here https://github.com/BradLarson/GPUImage3/blob/master/framework/Source/ShaderUniformSettings.swift#L194
length: uniformValues.count * 6,
but it is wrong way, i do not now how fix it correctly :)
Temporary fix.
Change the following in Vignette.metal from:
typedef struct {
float2 vignetteCenter;
float3 vignetteColor;
float vignetteStart;
float vignetteEnd;
} VignetteUniform;
to:
typedef struct {
float vignetteStart;
float vignetteEnd;
float2 vignetteCenter;
float3 vignetteColor;
} VignetteUniform;
See #91 for permanent fix
validateFunctionArguments:3485: failed assertion `Fragment Function(vignetteFragment): argument uniform[0] from buffer(1) with offset(0) and length(40) has space for 40 bytes, but argument has a length(48).'