@@ -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 _1082 = {};
21
+ constant float3 _1081 = {};
22
22
23
23
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
24
24
template <typename Tx, typename Ty>
@@ -133,7 +133,7 @@ float4 filterRadialGradient(thread const float2& colorTexCoord, thread const tex
133
133
_595 = ts.y ;
134
134
}
135
135
float t = _595;
136
- color = colorTexture.sample (colorTextureSmplr, (uvOrigin + float2 (fast::clamp (t, 0.0 , 1.0 ) , 0.0 )), level (0.0 ));
136
+ color = colorTexture.sample (colorTextureSmplr, (uvOrigin + float2 (t , 0.0 )), level (0.0 ));
137
137
}
138
138
return color;
139
139
}
@@ -146,19 +146,19 @@ float4 filterBlur(thread const float2& colorTexCoord, thread const texture2d<flo
146
146
float3 gaussCoeff = filterParams1.xyz ;
147
147
float gaussSum = gaussCoeff.x ;
148
148
float4 color = colorTexture.sample (colorTextureSmplr, colorTexCoord, level (0.0 )) * gaussCoeff.x ;
149
- float2 _640 = gaussCoeff.xy * gaussCoeff.yz ;
150
- gaussCoeff = float3 (_640 .x , _640 .y , gaussCoeff.z );
149
+ float2 _639 = gaussCoeff.xy * gaussCoeff.yz ;
150
+ gaussCoeff = float3 (_639 .x , _639 .y , gaussCoeff.z );
151
151
for (int i = 1 ; i <= support; i += 2 )
152
152
{
153
153
float gaussPartialSum = gaussCoeff.x ;
154
- float2 _660 = gaussCoeff.xy * gaussCoeff.yz ;
155
- gaussCoeff = float3 (_660 .x , _660 .y , gaussCoeff.z );
154
+ float2 _659 = gaussCoeff.xy * gaussCoeff.yz ;
155
+ gaussCoeff = float3 (_659 .x , _659 .y , gaussCoeff.z );
156
156
gaussPartialSum += gaussCoeff.x ;
157
157
float2 srcOffset = srcOffsetScale * (float (i) + (gaussCoeff.x / gaussPartialSum));
158
158
color += ((colorTexture.sample (colorTextureSmplr, (colorTexCoord - srcOffset), level (0.0 )) + colorTexture.sample (colorTextureSmplr, (colorTexCoord + srcOffset), level (0.0 ))) * gaussPartialSum);
159
159
gaussSum += (2.0 * gaussPartialSum);
160
- float2 _700 = gaussCoeff.xy * gaussCoeff.yz ;
161
- gaussCoeff = float3 (_700 .x , _700 .y , gaussCoeff.z );
160
+ float2 _699 = gaussCoeff.xy * gaussCoeff.yz ;
161
+ gaussCoeff = float3 (_699 .x , _699 .y , gaussCoeff.z );
162
162
}
163
163
return color / float4 (gaussSum);
164
164
}
@@ -361,34 +361,34 @@ float3 compositeScreen(thread const float3& destColor, thread const float3& srcC
361
361
static inline __attribute__ ((always_inline))
362
362
float3 compositeSelect(thread const bool3& cond, thread const float3& ifTrue, thread const float3& ifFalse)
363
363
{
364
- float _766 ;
364
+ float _765 ;
365
365
if (cond.x )
366
366
{
367
- _766 = ifTrue.x ;
367
+ _765 = ifTrue.x ;
368
368
}
369
369
else
370
370
{
371
- _766 = ifFalse.x ;
371
+ _765 = ifFalse.x ;
372
372
}
373
- float _777 ;
373
+ float _776 ;
374
374
if (cond.y )
375
375
{
376
- _777 = ifTrue.y ;
376
+ _776 = ifTrue.y ;
377
377
}
378
378
else
379
379
{
380
- _777 = ifFalse.y ;
380
+ _776 = ifFalse.y ;
381
381
}
382
- float _788 ;
382
+ float _787 ;
383
383
if (cond.z )
384
384
{
385
- _788 = ifTrue.z ;
385
+ _787 = ifTrue.z ;
386
386
}
387
387
else
388
388
{
389
- _788 = ifFalse.z ;
389
+ _787 = ifFalse.z ;
390
390
}
391
- return float3 (_766, _777, _788 );
391
+ return float3 (_765, _776, _787 );
392
392
}
393
393
394
394
static inline __attribute__ ((always_inline))
@@ -433,16 +433,16 @@ float3 compositeSoftLight(thread const float3& destColor, thread const float3& s
433
433
static inline __attribute__ ((always_inline))
434
434
float compositeDivide(thread const float & num, thread const float & denom)
435
435
{
436
- float _802 ;
436
+ float _801 ;
437
437
if (denom != 0.0 )
438
438
{
439
- _802 = num / denom;
439
+ _801 = num / denom;
440
440
}
441
441
else
442
442
{
443
- _802 = 0.0 ;
443
+ _801 = 0.0 ;
444
444
}
445
- return _802 ;
445
+ return _801 ;
446
446
}
447
447
448
448
static inline __attribute__ ((always_inline))
@@ -452,25 +452,25 @@ float3 compositeRGBToHSL(thread const float3& rgb)
452
452
float xMin = fast::min (fast::min (rgb.x , rgb.y ), rgb.z );
453
453
float c = v - xMin;
454
454
float l = mix (xMin, v, 0.5 );
455
- float3 _908 ;
455
+ float3 _907 ;
456
456
if (rgb.x == v)
457
457
{
458
- _908 = float3 (0.0 , rgb.yz );
458
+ _907 = float3 (0.0 , rgb.yz );
459
459
}
460
460
else
461
461
{
462
- float3 _921 ;
462
+ float3 _920 ;
463
463
if (rgb.y == v)
464
464
{
465
- _921 = float3 (2.0 , rgb.zx );
465
+ _920 = float3 (2.0 , rgb.zx );
466
466
}
467
467
else
468
468
{
469
- _921 = float3 (4.0 , rgb.xy );
469
+ _920 = float3 (4.0 , rgb.xy );
470
470
}
471
- _908 = _921 ;
471
+ _907 = _920 ;
472
472
}
473
- float3 terms = _908 ;
473
+ float3 terms = _907 ;
474
474
float param = ((terms.x * c) + terms.y ) - terms.z ;
475
475
float param_1 = c;
476
476
float h = 1.0471975803375244140625 * compositeDivide (param, param_1);
@@ -642,17 +642,17 @@ float4 calculateColor(thread const float2& fragCoord, thread const texture2d<flo
642
642
float2 param_17 = fragCoord;
643
643
int param_18 = compositeOp;
644
644
color = composite (param_15, destTexture, destTextureSmplr, param_16, param_17, param_18);
645
- float3 _1364 = color.xyz * color.w ;
646
- color = float4 (_1364 .x , _1364 .y , _1364 .z , color.w );
645
+ float3 _1363 = color.xyz * color.w ;
646
+ color = float4 (_1363 .x , _1363 .y , _1363 .z , color.w );
647
647
return color;
648
648
}
649
649
650
- 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& _1510 [[buffer(2)]], const device bTiles& _1603 [[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]])
650
+ 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& _1509 [[buffer(2)]], const device bTiles& _1602 [[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]])
651
651
{
652
652
int2 tileCoord = int2 (gl_WorkGroupID.xy );
653
653
int2 firstTileSubCoord = int2 (gl_LocalInvocationID.xy ) * int2 (1 , 4 );
654
654
int2 firstFragCoord = (tileCoord * int2 (uTileSize)) + firstTileSubCoord;
655
- int tileIndex = _1510 .iFirstTileMap [tileCoord.x + (uFramebufferTileSize.x * tileCoord.y )];
655
+ int tileIndex = _1509 .iFirstTileMap [tileCoord.x + (uFramebufferTileSize.x * tileCoord.y )];
656
656
if ((tileIndex < 0 ) && (uLoadAction != 0 ))
657
657
{
658
658
return ;
@@ -685,8 +685,8 @@ kernel void main0(constant int2& uFramebufferTileSize [[buffer(3)]], constant in
685
685
{
686
686
int2 tileSubCoord = firstTileSubCoord + int2 (0 , subY_1);
687
687
float2 fragCoord = float2 (firstFragCoord + int2 (0 , subY_1)) + float2 (0.5 );
688
- int alphaTileIndex = int (_1603 .iTiles [(tileIndex * 4 ) + 2 ] << uint (8 )) >> 8 ;
689
- uint tileControlWord = _1603 .iTiles [(tileIndex * 4 ) + 3 ];
688
+ int alphaTileIndex = int (_1602 .iTiles [(tileIndex * 4 ) + 2 ] << uint (8 )) >> 8 ;
689
+ uint tileControlWord = _1602 .iTiles [(tileIndex * 4 ) + 3 ];
690
690
uint colorEntry = tileControlWord & 65535u ;
691
691
int tileCtrl = int ((tileControlWord >> uint (16 )) & 255u );
692
692
if (alphaTileIndex >= 0 )
@@ -726,7 +726,7 @@ kernel void main0(constant int2& uFramebufferTileSize [[buffer(3)]], constant in
726
726
float4 srcColor = calculateColor (param_10, uColorTexture0, uColorTexture0Smplr, uMaskTexture0, uMaskTexture0Smplr, uColorTexture0, uColorTexture0Smplr, uGammaLUT, uGammaLUTSmplr, param_11, param_12, param_13, param_14, param_15, param_16, param_17, param_18, param_19, param_20, param_21);
727
727
destColors[subY_1] = (destColors[subY_1] * (1.0 - srcColor.w )) + srcColor;
728
728
}
729
- tileIndex = int (_1603 .iTiles [(tileIndex * 4 ) + 0 ]);
729
+ tileIndex = int (_1602 .iTiles [(tileIndex * 4 ) + 0 ]);
730
730
}
731
731
for (int subY_2 = 0 ; subY_2 < 4 ; subY_2++)
732
732
{
0 commit comments