Skip to content

Commit 3aa46ff

Browse files
Weizhen Huangbrechtvl
authored andcommitted
Cleanup: Cycles: remove unused ccl_loop_no_unroll
Was added in 6121c28501eff722717fb8b777f6004fb6d4e152 to ensure compiling on OpenCL, now the definition is empty on all platforms Pull Request: https://projects.blender.org/blender/blender/pulls/131100
1 parent 886c14c commit 3aa46ff

File tree

7 files changed

+7
-20
lines changed

7 files changed

+7
-20
lines changed

src/kernel/device/cuda/compat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ typedef unsigned long long uint64_t;
5252
#define ccl_ray_data ccl_private
5353
#define ccl_may_alias
5454
#define ccl_restrict __restrict__
55-
#define ccl_loop_no_unroll
5655
#define ccl_align(n) __align__(n)
5756
#define ccl_optional_struct_init
5857

src/kernel/device/hip/compat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ typedef unsigned long long uint64_t;
4545
#define ccl_ray_data ccl_private
4646
#define ccl_may_alias
4747
#define ccl_restrict __restrict__
48-
#define ccl_loop_no_unroll
4948
#define ccl_align(n) __align__(n)
5049
#define ccl_optional_struct_init
5150

src/kernel/device/metal/compat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ using namespace metal::raytracing;
5858
#endif
5959
#define ccl_may_alias
6060
#define ccl_restrict __restrict
61-
#define ccl_loop_no_unroll
6261
#define ccl_align(n) alignas(n)
6362
#define ccl_optional_struct_init
6463

src/kernel/device/oneapi/compat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
#define ccl_device_noinline_cpu ccl_device
4848
#define ccl_device_inline_method ccl_device
4949
#define ccl_restrict __restrict__
50-
#define ccl_loop_no_unroll
5150
#define ccl_optional_struct_init
5251
#define ccl_private
5352
#define ccl_ray_data ccl_private

src/kernel/device/optix/compat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ typedef unsigned long long uint64_t;
5252
#define ccl_ray_data ccl_private
5353
#define ccl_may_alias
5454
#define ccl_restrict __restrict__
55-
#define ccl_loop_no_unroll
5655
#define ccl_align(n) __align__(n)
5756

5857
/* Zero initialize structs to help the compiler figure out scoping */

src/kernel/svm/voronoi.h

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,7 @@ ccl_device VoronoiOutput voronoi_f1(ccl_private const VoronoiParams &params, con
660660
float4 targetPosition = zero_float4();
661661
for (int u = -1; u <= 1; u++) {
662662
for (int k = -1; k <= 1; k++) {
663-
ccl_loop_no_unroll for (int j = -1; j <= 1; j++)
664-
{
663+
for (int j = -1; j <= 1; j++) {
665664
for (int i = -1; i <= 1; i++) {
666665
float4 cellOffset = make_float4(i, j, k, u);
667666
float4 pointPosition = cellOffset + hash_float4_to_float4(cellPosition + cellOffset) *
@@ -696,8 +695,7 @@ ccl_device VoronoiOutput voronoi_smooth_f1(ccl_private const VoronoiParams &para
696695
float h = -1.0f;
697696
for (int u = -2; u <= 2; u++) {
698697
for (int k = -2; k <= 2; k++) {
699-
ccl_loop_no_unroll for (int j = -2; j <= 2; j++)
700-
{
698+
for (int j = -2; j <= 2; j++) {
701699
for (int i = -2; i <= 2; i++) {
702700
float4 cellOffset = make_float4(i, j, k, u);
703701
float4 pointPosition = cellOffset + hash_float4_to_float4(cellPosition + cellOffset) *
@@ -739,8 +737,7 @@ ccl_device VoronoiOutput voronoi_f2(ccl_private const VoronoiParams &params, con
739737
float4 positionF2 = zero_float4();
740738
for (int u = -1; u <= 1; u++) {
741739
for (int k = -1; k <= 1; k++) {
742-
ccl_loop_no_unroll for (int j = -1; j <= 1; j++)
743-
{
740+
for (int j = -1; j <= 1; j++) {
744741
for (int i = -1; i <= 1; i++) {
745742
float4 cellOffset = make_float4(i, j, k, u);
746743
float4 pointPosition = cellOffset + hash_float4_to_float4(cellPosition + cellOffset) *
@@ -781,8 +778,7 @@ ccl_device float voronoi_distance_to_edge(ccl_private const VoronoiParams &param
781778
float minDistance = FLT_MAX;
782779
for (int u = -1; u <= 1; u++) {
783780
for (int k = -1; k <= 1; k++) {
784-
ccl_loop_no_unroll for (int j = -1; j <= 1; j++)
785-
{
781+
for (int j = -1; j <= 1; j++) {
786782
for (int i = -1; i <= 1; i++) {
787783
float4 cellOffset = make_float4(i, j, k, u);
788784
float4 vectorToPoint = cellOffset +
@@ -802,8 +798,7 @@ ccl_device float voronoi_distance_to_edge(ccl_private const VoronoiParams &param
802798
minDistance = FLT_MAX;
803799
for (int u = -1; u <= 1; u++) {
804800
for (int k = -1; k <= 1; k++) {
805-
ccl_loop_no_unroll for (int j = -1; j <= 1; j++)
806-
{
801+
for (int j = -1; j <= 1; j++) {
807802
for (int i = -1; i <= 1; i++) {
808803
float4 cellOffset = make_float4(i, j, k, u);
809804
float4 vectorToPoint = cellOffset +
@@ -835,8 +830,7 @@ ccl_device float voronoi_n_sphere_radius(ccl_private const VoronoiParams &params
835830
float minDistance = FLT_MAX;
836831
for (int u = -1; u <= 1; u++) {
837832
for (int k = -1; k <= 1; k++) {
838-
ccl_loop_no_unroll for (int j = -1; j <= 1; j++)
839-
{
833+
for (int j = -1; j <= 1; j++) {
840834
for (int i = -1; i <= 1; i++) {
841835
float4 cellOffset = make_float4(i, j, k, u);
842836
float4 pointPosition = cellOffset + hash_float4_to_float4(cellPosition + cellOffset) *
@@ -856,8 +850,7 @@ ccl_device float voronoi_n_sphere_radius(ccl_private const VoronoiParams &params
856850
float4 closestPointToClosestPoint = zero_float4();
857851
for (int u = -1; u <= 1; u++) {
858852
for (int k = -1; k <= 1; k++) {
859-
ccl_loop_no_unroll for (int j = -1; j <= 1; j++)
860-
{
853+
for (int j = -1; j <= 1; j++) {
861854
for (int i = -1; i <= 1; i++) {
862855
if (i == 0 && j == 0 && k == 0 && u == 0) {
863856
continue;

src/util/defines.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868

6969
# define ccl_restrict __restrict
7070
# define ccl_optional_struct_init
71-
# define ccl_loop_no_unroll
7271
# define ccl_attr_maybe_unused [[maybe_unused]]
7372
# define __KERNEL_WITH_SSE_ALIGN__
7473

0 commit comments

Comments
 (0)