Trying to run a build that has a compute shader on Samsung Galaxy 6 and I'm getting an error: "GLSL link error: The number of vertex shader storage blocks (2) is greater than the maximum number allowed (0)". This is the code I'm using in the shader: Code (CSharp): #pragma kernel CSPointsCompute #define GROUP_SIZE 128 struct GPoint { float3 pos; float3 direction; }; uniform RWStructuredBuffer<GPoint> _gPoints; [numthreads(GROUP_SIZE,1,1)] void CSPointsCompute(uint3 id : SV_DispatchThreadID) { int i = id.x; GPoint p = _gPoints[i]; p.pos += float3(-0.01f, 0, 0); _gPoints[i] = p; } I have another vertex/frag shader that uses x2 buffers as well in that project: Code (CSharp): Shader "GG/PointRender" { Properties{ _MainTex("Base (RGB)", 2D) = "white" { } _Color(" Color", Color) = (1, 0.5, 0.5, 1) } SubShader{ Pass { Tags{ "RenderType" = "Transparent" } ZTest Off ZWrite Off Cull Off Blend SrcAlpha One CGPROGRAM // Upgrade NOTE: excluded shader from OpenGL ES 2.0 because it does not contain a surface program or both vertex and fragment programs. #pragma exclude_renderers gles #pragma vertex star_vertex #pragma fragment frag #pragma target 5.0 struct GPoint { float3 pos; float3 direction; } ; uniform StructuredBuffer<GPoint> points; uniform StructuredBuffer<float3> quadPoints; sampler2D _MainTex; float4 _Color; struct v2f { float4 pos : SV_POSITION; float2 uv : TEXCOORD0; float4 color: COLOR; } ; // vertex shader with no inputs // uses the system values SV_VertexID and SV_InstanceID to read from compute buffers v2f star_vertex(uint id : SV_VertexID, uint inst : SV_InstanceID) { v2f o; float3 worldPosition = points[inst].pos; float3 quadPoint = quadPoints[id]; o.pos = mul(UNITY_MATRIX_P, mul(UNITY_MATRIX_V, float4(worldPosition, 1.0f)) + float4(quadPoint, 0.0f)); o.uv = quadPoints[id] + 0.5f; o.color = _Color; return o; } float4 frag(v2f i) : COLOR { float4 texCol = tex2Dbias(_MainTex, float4(i.uv, 0.0f, -1.0f)); float4 partCol = i.color; return float4 (1.0f - (1.0f - texCol.rgb) * (1.0f - partCol.rgb), texCol.a); } ENDCG } } FallBack "Diffuse" }
Late reply, but in case someone finds this via Google (like I did). I have a similar problem on Samsung galaxy S6, it looks like the device does not support StructuredBuffers in vertex shaders. The separate compute shader works fine, though. See also https://forum.unity.com/threads/how-structuredbuffer-can-be-used-in-shaders-for-android.532240/