fa9a08369e
If we aren't wrapping the inlined function body in a loop, there's no need to add a scopeless Block; we've already got one. This doesn't affect the final output meaningfully--it just suppresses a newline--but it's one fewer IRNode allocation. Change-Id: Ib7b0014e908586d8acfcf6c23520873fad31d0b7 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345163 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
24 lines
620 B
Metal
24 lines
620 B
Metal
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
using namespace metal;
|
|
struct Inputs {
|
|
};
|
|
struct Outputs {
|
|
float4 sk_FragColor [[color(0)]];
|
|
};
|
|
fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
|
Outputs _outputStruct;
|
|
thread Outputs* _out = &_outputStruct;
|
|
_out->sk_FragColor.x = 1.0;
|
|
_out->sk_FragColor.y = 1.0;
|
|
_out->sk_FragColor.z = 1.0;
|
|
_out->sk_FragColor.w = 1.0;
|
|
|
|
_out->sk_FragColor.x = 1.0;
|
|
_out->sk_FragColor.y = 1.0;
|
|
_out->sk_FragColor.z = 1.0;
|
|
_out->sk_FragColor.w = 1.0;
|
|
|
|
return *_out;
|
|
}
|