9ea48e3965
GLSL only allows one-dimensional arrays. This CL lowers SkSL's array dimensionality limit from eight to one, and fixes all the tests that this breaks. The rest of the code still technically supports arbitrarily-deep array dimensionality; there are many opportunities for code cleanup and simplification in followup CLs. Change-Id: I0fc31e4626649ec69d40c5f5597b3924de298df0 Bug: skia:11026 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340339 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
18 lines
446 B
Metal
18 lines
446 B
Metal
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
using namespace metal;
|
|
struct Uniforms {
|
|
float arr[3];
|
|
};
|
|
struct Inputs {
|
|
};
|
|
struct Outputs {
|
|
float4 sk_FragColor [[color(0)]];
|
|
};
|
|
|
|
fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
|
Outputs _outputStruct;
|
|
thread Outputs* _out = &_outputStruct;
|
|
return *_out;
|
|
}
|