@@ -18,7 +18,7 @@ struct bTiles
18
18
19
19
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(16u , 4u , 1u );
20
20
21
- constant float3 _1151 = {};
21
+ constant float3 _1149 = {};
22
22
23
23
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
24
24
template <typename Tx, typename Ty>
@@ -126,23 +126,23 @@ float4 filterRadialGradient(thread const float2& colorTexCoord, thread const tex
126
126
float c = dot (dP, dP) - (radii.x * radii.x );
127
127
float discrim = (b * b) - (a * c);
128
128
float4 color = float4 (0.0 );
129
- if (abs ( discrim) >= 9.9999997473787516355514526367188e-06 )
129
+ if (discrim != 0.0 )
130
130
{
131
131
float2 ts = float2 ((float2 (1.0 , -1.0 ) * sqrt (discrim)) + float2 (b)) / float2 (a);
132
132
if (ts.x > ts.y )
133
133
{
134
134
ts = ts.yx ;
135
135
}
136
- float _611 ;
136
+ float _609 ;
137
137
if (ts.x >= 0.0 )
138
138
{
139
- _611 = ts.x ;
139
+ _609 = ts.x ;
140
140
}
141
141
else
142
142
{
143
- _611 = ts.y ;
143
+ _609 = ts.y ;
144
144
}
145
- float t = _611 ;
145
+ float t = _609 ;
146
146
color = colorTexture.sample (colorTextureSmplr, (uvOrigin + float2 (t, 0.0 )), level (0.0 ));
147
147
}
148
148
return color;
@@ -156,19 +156,19 @@ float4 filterBlur(thread const float2& colorTexCoord, thread const texture2d<flo
156
156
float3 gaussCoeff = filterParams1.xyz ;
157
157
float gaussSum = gaussCoeff.x ;
158
158
float4 color = colorTexture.sample (colorTextureSmplr, colorTexCoord, level (0.0 )) * gaussCoeff.x ;
159
- float2 _655 = gaussCoeff.xy * gaussCoeff.yz ;
160
- gaussCoeff = float3 (_655 .x , _655 .y , gaussCoeff.z );
159
+ float2 _653 = gaussCoeff.xy * gaussCoeff.yz ;
160
+ gaussCoeff = float3 (_653 .x , _653 .y , gaussCoeff.z );
161
161
for (int i = 1 ; i <= support; i += 2 )
162
162
{
163
163
float gaussPartialSum = gaussCoeff.x ;
164
- float2 _675 = gaussCoeff.xy * gaussCoeff.yz ;
165
- gaussCoeff = float3 (_675 .x , _675 .y , gaussCoeff.z );
164
+ float2 _673 = gaussCoeff.xy * gaussCoeff.yz ;
165
+ gaussCoeff = float3 (_673 .x , _673 .y , gaussCoeff.z );
166
166
gaussPartialSum += gaussCoeff.x ;
167
167
float2 srcOffset = srcOffsetScale * (float (i) + (gaussCoeff.x / gaussPartialSum));
168
168
color += ((colorTexture.sample (colorTextureSmplr, (colorTexCoord - srcOffset), level (0.0 )) + colorTexture.sample (colorTextureSmplr, (colorTexCoord + srcOffset), level (0.0 ))) * gaussPartialSum);
169
169
gaussSum += (2.0 * gaussPartialSum);
170
- float2 _715 = gaussCoeff.xy * gaussCoeff.yz ;
171
- gaussCoeff = float3 (_715 .x , _715 .y , gaussCoeff.z );
170
+ float2 _713 = gaussCoeff.xy * gaussCoeff.yz ;
171
+ gaussCoeff = float3 (_713 .x , _713 .y , gaussCoeff.z );
172
172
}
173
173
return color / float4 (gaussSum);
174
174
}
@@ -389,34 +389,34 @@ float3 compositeScreen(thread const float3& destColor, thread const float3& srcC
389
389
static inline __attribute__ ((always_inline))
390
390
float3 compositeSelect(thread const bool3& cond, thread const float3& ifTrue, thread const float3& ifFalse)
391
391
{
392
- float _835 ;
392
+ float _833 ;
393
393
if (cond.x )
394
394
{
395
- _835 = ifTrue.x ;
395
+ _833 = ifTrue.x ;
396
396
}
397
397
else
398
398
{
399
- _835 = ifFalse.x ;
399
+ _833 = ifFalse.x ;
400
400
}
401
- float _846 ;
401
+ float _844 ;
402
402
if (cond.y )
403
403
{
404
- _846 = ifTrue.y ;
404
+ _844 = ifTrue.y ;
405
405
}
406
406
else
407
407
{
408
- _846 = ifFalse.y ;
408
+ _844 = ifFalse.y ;
409
409
}
410
- float _857 ;
410
+ float _855 ;
411
411
if (cond.z )
412
412
{
413
- _857 = ifTrue.z ;
413
+ _855 = ifTrue.z ;
414
414
}
415
415
else
416
416
{
417
- _857 = ifFalse.z ;
417
+ _855 = ifFalse.z ;
418
418
}
419
- return float3 (_835, _846, _857 );
419
+ return float3 (_833, _844, _855 );
420
420
}
421
421
422
422
static inline __attribute__ ((always_inline))
@@ -461,16 +461,16 @@ float3 compositeSoftLight(thread const float3& destColor, thread const float3& s
461
461
static inline __attribute__ ((always_inline))
462
462
float compositeDivide(thread const float & num, thread const float & denom)
463
463
{
464
- float _871 ;
464
+ float _869 ;
465
465
if (denom != 0.0 )
466
466
{
467
- _871 = num / denom;
467
+ _869 = num / denom;
468
468
}
469
469
else
470
470
{
471
- _871 = 0.0 ;
471
+ _869 = 0.0 ;
472
472
}
473
- return _871 ;
473
+ return _869 ;
474
474
}
475
475
476
476
static inline __attribute__ ((always_inline))
@@ -480,25 +480,25 @@ float3 compositeRGBToHSL(thread const float3& rgb)
480
480
float xMin = fast::min (fast::min (rgb.x , rgb.y ), rgb.z );
481
481
float c = v - xMin;
482
482
float l = mix (xMin, v, 0.5 );
483
- float3 _977 ;
483
+ float3 _975 ;
484
484
if (rgb.x == v)
485
485
{
486
- _977 = float3 (0.0 , rgb.yz );
486
+ _975 = float3 (0.0 , rgb.yz );
487
487
}
488
488
else
489
489
{
490
- float3 _990 ;
490
+ float3 _988 ;
491
491
if (rgb.y == v)
492
492
{
493
- _990 = float3 (2.0 , rgb.zx );
493
+ _988 = float3 (2.0 , rgb.zx );
494
494
}
495
495
else
496
496
{
497
- _990 = float3 (4.0 , rgb.xy );
497
+ _988 = float3 (4.0 , rgb.xy );
498
498
}
499
- _977 = _990 ;
499
+ _975 = _988 ;
500
500
}
501
- float3 terms = _977 ;
501
+ float3 terms = _975 ;
502
502
float param = ((terms.x * c) + terms.y ) - terms.z ;
503
503
float param_1 = c;
504
504
float h = 1.0471975803375244140625 * compositeDivide (param, param_1);
@@ -672,17 +672,17 @@ float4 calculateColor(thread const float2& fragCoord, thread const texture2d<flo
672
672
float2 param_19 = fragCoord;
673
673
int param_20 = compositeOp;
674
674
color = composite (param_17, destTexture, destTextureSmplr, param_18, param_19, param_20);
675
- float3 _1437 = color.xyz * color.w ;
676
- color = float4 (_1437 .x , _1437 .y , _1437 .z , color.w );
675
+ float3 _1435 = color.xyz * color.w ;
676
+ color = float4 (_1435 .x , _1435 .y , _1435 .z , color.w );
677
677
return color;
678
678
}
679
679
680
- kernel void main0(constant int2& uFramebufferTileSize [[buffer(3)]], constant int& uLoadAction [[buffer(4)]], constant int2& uTextureMetadataSize [[buffer(7)]], constant float2& uFramebufferSize [[buffer(0)]], constant float2& uTileSize [[buffer(1)]], constant float4& uClearColor [[buffer(5)]], constant float2& uColorTextureSize0 [[buffer(8)]], constant float2& uMaskTextureSize0 [[buffer(9)]], const device bFirstTileMap& _1601 [[buffer(2)]], const device bTiles& _1692 [[buffer(6)]], texture2d<float, access::read_write> uDestImage [[texture(0)]], texture2d<float> uTextureMetadata [[texture(1)]], texture2d<float> uColorTexture0 [[texture(2)]], texture2d<float> uMaskTexture0 [[texture(3)]], texture2d<float> uGammaLUT [[texture(4)]], sampler uTextureMetadataSmplr [[sampler(0)]], sampler uColorTexture0Smplr [[sampler(1)]], sampler uMaskTexture0Smplr [[sampler(2)]], sampler uGammaLUTSmplr [[sampler(3)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]])
680
+ kernel void main0(constant int2& uFramebufferTileSize [[buffer(3)]], constant int& uLoadAction [[buffer(4)]], constant int2& uTextureMetadataSize [[buffer(7)]], constant float2& uFramebufferSize [[buffer(0)]], constant float2& uTileSize [[buffer(1)]], constant float4& uClearColor [[buffer(5)]], constant float2& uColorTextureSize0 [[buffer(8)]], constant float2& uMaskTextureSize0 [[buffer(9)]], const device bFirstTileMap& _1599 [[buffer(2)]], const device bTiles& _1690 [[buffer(6)]], texture2d<float, access::read_write> uDestImage [[texture(0)]], texture2d<float> uTextureMetadata [[texture(1)]], texture2d<float> uColorTexture0 [[texture(2)]], texture2d<float> uMaskTexture0 [[texture(3)]], texture2d<float> uGammaLUT [[texture(4)]], sampler uTextureMetadataSmplr [[sampler(0)]], sampler uColorTexture0Smplr [[sampler(1)]], sampler uMaskTexture0Smplr [[sampler(2)]], sampler uGammaLUTSmplr [[sampler(3)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]])
681
681
{
682
682
int2 tileCoord = int2 (gl_WorkGroupID.xy );
683
683
int2 firstTileSubCoord = int2 (gl_LocalInvocationID.xy ) * int2 (1 , 4 );
684
684
int2 firstFragCoord = (tileCoord * int2 (uTileSize)) + firstTileSubCoord;
685
- int tileIndex = _1601 .iFirstTileMap [tileCoord.x + (uFramebufferTileSize.x * tileCoord.y )];
685
+ int tileIndex = _1599 .iFirstTileMap [tileCoord.x + (uFramebufferTileSize.x * tileCoord.y )];
686
686
if ((tileIndex < 0 ) && (uLoadAction != 0 ))
687
687
{
688
688
return ;
@@ -717,8 +717,8 @@ kernel void main0(constant int2& uFramebufferTileSize [[buffer(3)]], constant in
717
717
{
718
718
int2 tileSubCoord = firstTileSubCoord + int2 (0 , subY_1);
719
719
float2 fragCoord = float2 (firstFragCoord + int2 (0 , subY_1)) + float2 (0.5 );
720
- int alphaTileIndex = int (_1692 .iTiles [(tileIndex * 4 ) + 2 ] << uint (8 )) >> 8 ;
721
- uint tileControlWord = _1692 .iTiles [(tileIndex * 4 ) + 3 ];
720
+ int alphaTileIndex = int (_1690 .iTiles [(tileIndex * 4 ) + 2 ] << uint (8 )) >> 8 ;
721
+ uint tileControlWord = _1690 .iTiles [(tileIndex * 4 ) + 3 ];
722
722
uint colorEntry = tileControlWord & 65535u ;
723
723
int tileCtrl = int ((tileControlWord >> uint (16 )) & 255u );
724
724
if (alphaTileIndex >= 0 )
@@ -762,7 +762,7 @@ kernel void main0(constant int2& uFramebufferTileSize [[buffer(3)]], constant in
762
762
float4 srcColor = calculateColor (param_12, uColorTexture0, uColorTexture0Smplr, uMaskTexture0, uMaskTexture0Smplr, uColorTexture0, uColorTexture0Smplr, uGammaLUT, uGammaLUTSmplr, param_13, param_14, param_15, param_16, param_17, param_18, param_19, param_20, param_21, param_22, param_23, param_24, param_25);
763
763
destColors[subY_1] = (destColors[subY_1] * (1.0 - srcColor.w )) + srcColor;
764
764
}
765
- tileIndex = int (_1692 .iTiles [(tileIndex * 4 ) + 0 ]);
765
+ tileIndex = int (_1690 .iTiles [(tileIndex * 4 ) + 0 ]);
766
766
}
767
767
for (int subY_2 = 0 ; subY_2 < 4 ; subY_2++)
768
768
{
0 commit comments