@@ -4,24 +4,24 @@ void gfx_cc_get_features(uint64_t shader_id0, uint32_t shader_id1, struct CCFeat
4
4
for (int i = 0 ; i < 2 ; i++) {
5
5
for (int j = 0 ; j < 2 ; j++) {
6
6
for (int k = 0 ; k < 4 ; k++) {
7
- cc_features->c [i][j][k] = ( shader_id0 >> ( i * 32 + j * 16 + k * 4 )) & 0xf ;
7
+ cc_features->c [i][j][k] = shader_id0 >> i * 32 + j * 16 + k * 4 & 0xf ;
8
8
}
9
9
}
10
10
}
11
11
12
- cc_features->opt_alpha = (shader_id1 & SHADER_OPT_ALPHA ) != 0 ;
13
- cc_features->opt_fog = (shader_id1 & SHADER_OPT_FOG ) != 0 ;
14
- cc_features->opt_texture_edge = (shader_id1 & SHADER_OPT_TEXTURE_EDGE ) != 0 ;
15
- cc_features->opt_noise = (shader_id1 & SHADER_OPT_NOISE ) != 0 ;
16
- cc_features->opt_2cyc = (shader_id1 & SHADER_OPT_2CYC ) != 0 ;
17
- cc_features->opt_alpha_threshold = (shader_id1 & SHADER_OPT_ALPHA_THRESHOLD ) != 0 ;
18
- cc_features->opt_invisible = (shader_id1 & SHADER_OPT_INVISIBLE ) != 0 ;
19
- cc_features->opt_grayscale = (shader_id1 & SHADER_OPT_GRAYSCALE ) != 0 ;
12
+ cc_features->opt_alpha = (shader_id1 & SHADER_OPT (ALPHA) ) != 0 ;
13
+ cc_features->opt_fog = (shader_id1 & SHADER_OPT (FOG) ) != 0 ;
14
+ cc_features->opt_texture_edge = (shader_id1 & SHADER_OPT (TEXTURE_EDGE) ) != 0 ;
15
+ cc_features->opt_noise = (shader_id1 & SHADER_OPT (NOISE) ) != 0 ;
16
+ cc_features->opt_2cyc = (shader_id1 & SHADER_OPT (_2CYC) ) != 0 ;
17
+ cc_features->opt_alpha_threshold = (shader_id1 & SHADER_OPT (ALPHA_THRESHOLD) ) != 0 ;
18
+ cc_features->opt_invisible = (shader_id1 & SHADER_OPT (INVISIBLE) ) != 0 ;
19
+ cc_features->opt_grayscale = (shader_id1 & SHADER_OPT (GRAYSCALE) ) != 0 ;
20
20
21
- cc_features->clamp [0 ][0 ] = ( shader_id1 & SHADER_OPT_TEXEL0_CLAMP_S );
22
- cc_features->clamp [0 ][1 ] = ( shader_id1 & SHADER_OPT_TEXEL0_CLAMP_T );
23
- cc_features->clamp [1 ][0 ] = ( shader_id1 & SHADER_OPT_TEXEL1_CLAMP_S );
24
- cc_features->clamp [1 ][1 ] = ( shader_id1 & SHADER_OPT_TEXEL1_CLAMP_T );
21
+ cc_features->clamp [0 ][0 ] = shader_id1 & SHADER_OPT (TEXEL0_CLAMP_S );
22
+ cc_features->clamp [0 ][1 ] = shader_id1 & SHADER_OPT (TEXEL0_CLAMP_T );
23
+ cc_features->clamp [1 ][0 ] = shader_id1 & SHADER_OPT (TEXEL1_CLAMP_S );
24
+ cc_features->clamp [1 ][1 ] = shader_id1 & SHADER_OPT (TEXEL1_CLAMP_T );
25
25
26
26
cc_features->used_textures [0 ] = false ;
27
27
cc_features->used_textures [1 ] = false ;
@@ -56,21 +56,20 @@ void gfx_cc_get_features(uint64_t shader_id0, uint32_t shader_id1, struct CCFeat
56
56
cc_features->do_multiply [c][1 ] = cc_features->c [c][1 ][1 ] == SHADER_0 && cc_features->c [c][1 ][3 ] == SHADER_0;
57
57
cc_features->do_mix [c][0 ] = cc_features->c [c][0 ][1 ] == cc_features->c [c][0 ][3 ];
58
58
cc_features->do_mix [c][1 ] = cc_features->c [c][1 ][1 ] == cc_features->c [c][1 ][3 ];
59
- cc_features->color_alpha_same [c] =
60
- ((shader_id0 >> c * 32 ) & 0xffff ) == ((shader_id0 >> (c * 32 + 16 )) & 0xffff );
59
+ cc_features->color_alpha_same [c] = (shader_id0 >> c * 32 & 0xffff ) == (shader_id0 >> c * 32 + 16 & 0xffff );
61
60
}
62
61
63
- if (cc_features->used_textures [0 ] && ( shader_id1 & SHADER_OPT_TEXEL0_MASK )) {
62
+ if (cc_features->used_textures [0 ] && shader_id1 & SHADER_OPT (TEXEL0_MASK )) {
64
63
cc_features->used_masks [0 ] = true ;
65
64
}
66
- if (cc_features->used_textures [1 ] && ( shader_id1 & SHADER_OPT_TEXEL1_MASK )) {
65
+ if (cc_features->used_textures [1 ] && shader_id1 & SHADER_OPT (TEXEL1_MASK )) {
67
66
cc_features->used_masks [1 ] = true ;
68
67
}
69
68
70
- if (cc_features->used_textures [0 ] && ( shader_id1 & SHADER_OPT_TEXEL0_BLEND )) {
69
+ if (cc_features->used_textures [0 ] && shader_id1 & SHADER_OPT (TEXEL0_BLEND )) {
71
70
cc_features->used_blend [0 ] = true ;
72
71
}
73
- if (cc_features->used_textures [1 ] && ( shader_id1 & SHADER_OPT_TEXEL1_BLEND )) {
72
+ if (cc_features->used_textures [1 ] && shader_id1 & SHADER_OPT (TEXEL1_BLEND )) {
74
73
cc_features->used_blend [1 ] = true ;
75
74
}
76
75
}
0 commit comments