1313#define EII () __oclc_ISA_version != 9010
1414
1515#define RATTR __attribute__((pure))
16+ #define CRATTR __attribute__((pure, target("cube-insts")))
1617#define ERATTR __attribute__((pure, target("extended-image-insts")))
1718#define WATTR
1819#define GATTR __attribute__((const))
@@ -510,14 +511,14 @@ OCKL_MANGLE_T(image_load,3D)(TSHARP i, int4 c)
510511 return my_image_load_3d_v4f32_i32 (c .x , c .y , c .z , LOAD_TSHARP (i ));
511512}
512513
513- RATTR float4
514- OCKL_MANGLE_T (image_load ,CM )(TSHARP i , int2 c , int f )
514+ CRATTR float4
515+ OCKL_MANGLE_T (image_load , CM )(TSHARP i , int2 c , int f )
515516{
516517 return my_image_load_cube_v4f32_i32 (c .x , c .y , f , LOAD_TSHARP (i ));
517518}
518519
519- RATTR float4
520- OCKL_MANGLE_T (image_load ,CMa )(TSHARP i , int4 c , int f )
520+ CRATTR float4
521+ OCKL_MANGLE_T (image_load , CMa )(TSHARP i , int4 c , int f )
521522{
522523 f = LS_ARRAY_FACE (c .z , f );
523524 return my_image_load_cube_v4f32_i32 (c .x , c .y , f , LOAD_TSHARP (i ));
@@ -565,14 +566,14 @@ OCKL_MANGLE_T(image_load_lod,3D)(TSHARP i, int4 c, int l)
565566 return my_image_load_mip_3d_v4f32_i32 (c .x , c .y , c .z , l , LOAD_TSHARP (i ));
566567}
567568
568- RATTR float4
569- OCKL_MANGLE_T (image_load_lod ,CM )(TSHARP i , int2 c , int f , int l )
569+ CRATTR float4
570+ OCKL_MANGLE_T (image_load_lod , CM )(TSHARP i , int2 c , int f , int l )
570571{
571572 return my_image_load_mip_cube_v4f32_i32 (c .x , c .y , f , l , LOAD_TSHARP (i ));
572573}
573574
574- RATTR float4
575- OCKL_MANGLE_T (image_load_lod ,CMa )(TSHARP i , int4 c , int f , int l )
575+ CRATTR float4
576+ OCKL_MANGLE_T (image_load_lod , CMa )(TSHARP i , int4 c , int f , int l )
576577{
577578 f = LS_ARRAY_FACE (c .z , f );
578579 return my_image_load_mip_cube_v4f32_i32 (c .x , c .y , f , l , LOAD_TSHARP (i ));
@@ -614,14 +615,14 @@ OCKL_MANGLE_T(image_loadh,3D)(TSHARP i, int4 c)
614615 return my_image_load_3d_v4f16_i32 (c .x , c .y , c .z , LOAD_TSHARP (i ));
615616}
616617
617- RATTR half4
618- OCKL_MANGLE_T (image_loadh ,CM )(TSHARP i , int2 c , int f )
618+ CRATTR half4
619+ OCKL_MANGLE_T (image_loadh , CM )(TSHARP i , int2 c , int f )
619620{
620621 return my_image_load_cube_v4f16_i32 (c .x , c .y , f , LOAD_TSHARP (i ));
621622}
622623
623- RATTR half4
624- OCKL_MANGLE_T (image_loadh ,CMa )(TSHARP i , int4 c , int f )
624+ CRATTR half4
625+ OCKL_MANGLE_T (image_loadh , CMa )(TSHARP i , int4 c , int f )
625626{
626627 f = LS_ARRAY_FACE (c .z , f );
627628 return my_image_load_cube_v4f16_i32 (c .x , c .y , f , LOAD_TSHARP (i ));
@@ -657,14 +658,14 @@ OCKL_MANGLE_T(image_loadh_lod,3D)(TSHARP i, int4 c, int l)
657658 return my_image_load_mip_3d_v4f16_i32 (c .x , c .y , c .z , l , LOAD_TSHARP (i ));
658659}
659660
660- RATTR half4
661- OCKL_MANGLE_T (image_loadh_lod ,CM )(TSHARP i , int2 c , int f , int l )
661+ CRATTR half4
662+ OCKL_MANGLE_T (image_loadh_lod , CM )(TSHARP i , int2 c , int f , int l )
662663{
663664 return my_image_load_mip_cube_v4f16_i32 (c .x , c .y , f , l , LOAD_TSHARP (i ));
664665}
665666
666- RATTR half4
667- OCKL_MANGLE_T (image_loadh_lod ,CMa )(TSHARP i , int4 c , int f , int l )
667+ CRATTR half4
668+ OCKL_MANGLE_T (image_loadh_lod , CMa )(TSHARP i , int4 c , int f , int l )
668669{
669670 f = LS_ARRAY_FACE (c .z , f );
670671 return my_image_load_mip_cube_v4f16_i32 (c .x , c .y , f , l , LOAD_TSHARP (i ));
@@ -950,8 +951,8 @@ OCKL_MANGLE_T(image_sample,3D)(TSHARP i, SSHARP s, float4 c)
950951 return my_image_sample_3d_v4f32_f32 (c .x , c .y , c .z , LOAD_TSHARP (i ), LOAD_SSHARP (s ));
951952}
952953
953- RATTR float4
954- OCKL_MANGLE_T (image_sample ,CM )(TSHARP i , SSHARP s , float4 c )
954+ CRATTR float4
955+ OCKL_MANGLE_T (image_sample , CM )(TSHARP i , SSHARP s , float4 c )
955956{
956957 CUBE_PREP (c );
957958 if (EII ())
@@ -960,8 +961,8 @@ OCKL_MANGLE_T(image_sample,CM)(TSHARP i, SSHARP s, float4 c)
960961 return my_image_sample_cube_v4f32_f32 (c .x , c .y , c .z , LOAD_TSHARP (i ), LOAD_SSHARP (s ));
961962}
962963
963- RATTR float4
964- OCKL_MANGLE_T (image_sample ,CMa )(TSHARP i , SSHARP s , float4 c )
964+ CRATTR float4
965+ OCKL_MANGLE_T (image_sample , CMa )(TSHARP i , SSHARP s , float4 c )
965966{
966967 CUBE_PREP (c );
967968 c .z = SAMPLE_ARRAY_FACE (c .w , c .z );
@@ -1068,15 +1069,15 @@ OCKL_MANGLE_T(image_sample_lod,3D)(TSHARP i, SSHARP s, float4 c, float l)
10681069 return my_image_sample_l_3d_v4f32_f32 (c .x , c .y , c .z , l , LOAD_TSHARP (i ), LOAD_SSHARP (s ));
10691070}
10701071
1071- RATTR float4
1072- OCKL_MANGLE_T (image_sample_lod ,CM )(TSHARP i , SSHARP s , float4 c , float l )
1072+ CRATTR float4
1073+ OCKL_MANGLE_T (image_sample_lod , CM )(TSHARP i , SSHARP s , float4 c , float l )
10731074{
10741075 CUBE_PREP (c );
10751076 return my_image_sample_l_cube_v4f32_f32 (c .x , c .y , c .z , l , LOAD_TSHARP (i ), LOAD_SSHARP (s ));
10761077}
10771078
1078- RATTR float4
1079- OCKL_MANGLE_T (image_sample_lod ,CMa )(TSHARP i , SSHARP s , float4 c , float l )
1079+ CRATTR float4
1080+ OCKL_MANGLE_T (image_sample_lod , CMa )(TSHARP i , SSHARP s , float4 c , float l )
10801081{
10811082 CUBE_PREP (c );
10821083 c .z = SAMPLE_ARRAY_FACE (c .w , c .z );
@@ -1135,8 +1136,8 @@ OCKL_MANGLE_T(image_sampleh,3D)(TSHARP i, SSHARP s, float4 c)
11351136 return my_image_sample_3d_v4f16_f32 (c .x , c .y , c .z , LOAD_TSHARP (i ), LOAD_SSHARP (s ));
11361137}
11371138
1138- RATTR half4
1139- OCKL_MANGLE_T (image_sampleh ,CM )(TSHARP i , SSHARP s , float4 c )
1139+ CRATTR half4
1140+ OCKL_MANGLE_T (image_sampleh , CM )(TSHARP i , SSHARP s , float4 c )
11401141{
11411142 CUBE_PREP (c );
11421143 if (EII ())
@@ -1145,8 +1146,8 @@ OCKL_MANGLE_T(image_sampleh,CM)(TSHARP i, SSHARP s, float4 c)
11451146 return my_image_sample_cube_v4f16_f32 (c .x , c .y , c .z , LOAD_TSHARP (i ), LOAD_SSHARP (s ));
11461147}
11471148
1148- RATTR half4
1149- OCKL_MANGLE_T (image_sampleh ,CMa )(TSHARP i , SSHARP s , float4 c )
1149+ CRATTR half4
1150+ OCKL_MANGLE_T (image_sampleh , CMa )(TSHARP i , SSHARP s , float4 c )
11501151{
11511152 CUBE_PREP (c );
11521153 c .z = SAMPLE_ARRAY_FACE (c .w , c .z );
@@ -1225,15 +1226,15 @@ OCKL_MANGLE_T(image_sampleh_lod,3D)(TSHARP i, SSHARP s, float4 c, float l)
12251226 return my_image_sample_l_3d_v4f16_f32 (c .x , c .y , c .z , l , LOAD_TSHARP (i ), LOAD_SSHARP (s ));
12261227}
12271228
1228- RATTR half4
1229- OCKL_MANGLE_T (image_sampleh_lod ,CM )(TSHARP i , SSHARP s , float4 c , float l )
1229+ CRATTR half4
1230+ OCKL_MANGLE_T (image_sampleh_lod , CM )(TSHARP i , SSHARP s , float4 c , float l )
12301231{
12311232 CUBE_PREP (c );
12321233 return my_image_sample_l_cube_v4f16_f32 (c .x , c .y , c .z , l , LOAD_TSHARP (i ), LOAD_SSHARP (s ));
12331234}
12341235
1235- RATTR half4
1236- OCKL_MANGLE_T (image_sampleh_lod ,CMa )(TSHARP i , SSHARP s , float4 c , float l )
1236+ CRATTR half4
1237+ OCKL_MANGLE_T (image_sampleh_lod , CMa )(TSHARP i , SSHARP s , float4 c , float l )
12371238{
12381239 CUBE_PREP (c );
12391240 c .z = SAMPLE_ARRAY_FACE (c .w , c .z );
0 commit comments