Update OutParams unit test to demonstrate SkSL failure.
Swizzles in combination with out params are currently broken in SkSL. They are fixed in the followup CL at http://review.skia.org/319917 Change-Id: I22d9436a15631e6ee2acf9fc312a8634cf3b5407 Bug: skia:10756 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319918 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
ad6aeace6e
commit
7a6935a528
@ -31,33 +31,41 @@ void main() {
|
|||||||
half2 h2; out_half2(h2);
|
half2 h2; out_half2(h2);
|
||||||
half3 h3; out_half3(h3);
|
half3 h3; out_half3(h3);
|
||||||
half4 h4; out_half4(h4);
|
half4 h4; out_half4(h4);
|
||||||
|
out_half2(h3.xz);
|
||||||
|
out_half4(h4.zwxy);
|
||||||
sk_FragColor = half4(h, h2.x, h3.x, h4.x);
|
sk_FragColor = half4(h, h2.x, h3.x, h4.x);
|
||||||
|
|
||||||
half2x2 h2x2; out_half2x2(h2x2);
|
half2x2 h2x2; out_half2x2(h2x2);
|
||||||
half3x3 h3x3; out_half3x3(h3x3);
|
half3x3 h3x3; out_half3x3(h3x3);
|
||||||
half4x4 h4x4; out_half4x4(h4x4);
|
half4x4 h4x4; out_half4x4(h4x4);
|
||||||
|
out_half3(h3x3[1]);
|
||||||
|
out_half(h4x4[3].w);
|
||||||
sk_FragColor = half4(h2x2[0][0], h3x3[0][0], h4x4[0][0], 1);
|
sk_FragColor = half4(h2x2[0][0], h3x3[0][0], h4x4[0][0], 1);
|
||||||
|
|
||||||
int i; out_int (i);
|
int i; out_int (i);
|
||||||
int2 i2; out_int2(i2);
|
int2 i2; out_int2(i2);
|
||||||
int3 i3; out_int3(i3);
|
int3 i3; out_int3(i3);
|
||||||
int4 i4; out_int4(i4);
|
int4 i4; out_int4(i4);
|
||||||
|
out_int3(i4.xyz);
|
||||||
sk_FragColor = half4(i, i2.x, i3.x, i4.x);
|
sk_FragColor = half4(i, i2.x, i3.x, i4.x);
|
||||||
|
|
||||||
float f; out_float (f);
|
float f; out_float (f);
|
||||||
float2 f2; out_float2(f2);
|
float2 f2; out_float2(f2);
|
||||||
float3 f3; out_float3(f3);
|
float3 f3; out_float3(f3);
|
||||||
float4 f4; out_float4(f4);
|
float4 f4; out_float4(f4);
|
||||||
|
out_float2(f3.xy);
|
||||||
sk_FragColor = half4(half(f), half(f2.x), half(f3.x), half(f4.x));
|
sk_FragColor = half4(half(f), half(f2.x), half(f3.x), half(f4.x));
|
||||||
|
|
||||||
float2x2 f2x2; out_float2x2(f2x2);
|
float2x2 f2x2; out_float2x2(f2x2);
|
||||||
float3x3 f3x3; out_float3x3(f3x3);
|
float3x3 f3x3; out_float3x3(f3x3);
|
||||||
float4x4 f4x4; out_float4x4(f4x4);
|
float4x4 f4x4; out_float4x4(f4x4);
|
||||||
|
out_float(f2x2[0][0]);
|
||||||
sk_FragColor = half4(half(f2x2[0][0]), half(f3x3[0][0]), half(f4x4[0][0]), 1);
|
sk_FragColor = half4(half(f2x2[0][0]), half(f3x3[0][0]), half(f4x4[0][0]), 1);
|
||||||
|
|
||||||
bool b; out_bool (b);
|
bool b; out_bool (b);
|
||||||
bool2 b2; out_bool2(b2);
|
bool2 b2; out_bool2(b2);
|
||||||
bool3 b3; out_bool3(b3);
|
bool3 b3; out_bool3(b3);
|
||||||
bool4 b4; out_bool4(b4);
|
bool4 b4; out_bool4(b4);
|
||||||
|
out_bool2(b4.xw);
|
||||||
sk_FragColor = half4(half(b), half(b2.x), half(b3.x), half(b4.x));
|
sk_FragColor = half4(half(b), half(b2.x), half(b3.x), half(b4.x));
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,3 @@
|
|||||||
|
### Compilation failed:
|
||||||
|
|
||||||
|
|
||||||
out vec4 sk_FragColor;
|
|
||||||
void main() {
|
|
||||||
sk_FragColor = vec4(1.0, 2.0, 3.0, 4.0);
|
|
||||||
sk_FragColor = vec4(mat2(2.0)[0][0], mat3(3.0)[0][0], mat4(4.0)[0][0], 1.0);
|
|
||||||
sk_FragColor = vec4(1.0, 2.0, 3.0, 4.0);
|
|
||||||
sk_FragColor = vec4(1.0, 2.0, 3.0, 4.0);
|
|
||||||
sk_FragColor = vec4(mat2(2.0)[0][0], mat3(3.0)[0][0], mat4(4.0)[0][0], 1.0);
|
|
||||||
sk_FragColor = vec4(1.0, bvec2(false).x ? 1.0 : 0.0, bvec3(true).x ? 1.0 : 0.0, bvec4(false).x ? 1.0 : 0.0);
|
|
||||||
}
|
|
||||||
|
@ -1,19 +1,3 @@
|
|||||||
#include <metal_stdlib>
|
### Compilation failed:
|
||||||
#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 = float4(1.0, 2.0, 3.0, 4.0);
|
|
||||||
_out->sk_FragColor = float4(float2x2(2.0)[0][0], float3x3(3.0)[0][0], float4x4(4.0)[0][0], 1.0);
|
|
||||||
_out->sk_FragColor = float4(1.0, 2.0, 3.0, 4.0);
|
|
||||||
_out->sk_FragColor = float4(1.0, 2.0, 3.0, 4.0);
|
|
||||||
_out->sk_FragColor = float4(float2x2(2.0)[0][0], float3x3(3.0)[0][0], float4x4(4.0)[0][0], 1.0);
|
|
||||||
_out->sk_FragColor = float4(1.0, bool2(false).x ? 1.0 : 0.0, bool3(true).x ? 1.0 : 0.0, bool4(false).x ? 1.0 : 0.0);
|
|
||||||
return *_out;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user