Skip to content

Commit 3c5614f

Browse files
committed
Upped LDS stack size to 16
1 parent 19e29cb commit 3c5614f

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

RadeonRays/src/kernelcache/kernels_cl.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2487,7 +2487,7 @@ static const char g_intersect_bvh2_lds_opencl[]= \
24872487
" \n"\
24882488
"#define GROUP_SIZE 64 \n"\
24892489
"#define STACK_SIZE 32 \n"\
2490-
"#define LDS_STACK_SIZE 8 \n"\
2490+
"#define LDS_STACK_SIZE 16 \n"\
24912491
" \n"\
24922492
"// BVH node \n"\
24932493
"typedef struct \n"\
@@ -2699,13 +2699,10 @@ static const char g_intersect_bvh2_lds_opencl[]= \
26992699
" const float3 invDir = safe_invdir(my_ray); \n"\
27002700
" const float3 oxInvDir = -my_ray.o.xyz * invDir; \n"\
27012701
" \n"\
2702-
" // Intersection parametric distance \n"\
2703-
" float closest_t = my_ray.o.w; \n"\
2704-
" \n"\
27052702
" // Current node address \n"\
27062703
" uint addr = 0; \n"\
2707-
" // Current closest address \n"\
2708-
" uint closest_addr = INVALID_ADDR; \n"\
2704+
" // Intersection parametric distance \n"\
2705+
" const float closest_t = my_ray.o.w; \n"\
27092706
" \n"\
27102707
" uint stack_bottom = STACK_SIZE * index; \n"\
27112708
" uint sptr = stack_bottom; \n"\

RadeonRays/src/kernels/CL/intersect_bvh2_lds.cl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ TYPE DEFINITIONS
3434

3535
#define GROUP_SIZE 64
3636
#define STACK_SIZE 32
37-
#define LDS_STACK_SIZE 8
37+
#define LDS_STACK_SIZE 16
3838

3939
// BVH node
4040
typedef struct
@@ -246,13 +246,10 @@ KERNEL void occluded_main(
246246
const float3 invDir = safe_invdir(my_ray);
247247
const float3 oxInvDir = -my_ray.o.xyz * invDir;
248248

249-
// Intersection parametric distance
250-
float closest_t = my_ray.o.w;
251-
252249
// Current node address
253250
uint addr = 0;
254-
// Current closest address
255-
uint closest_addr = INVALID_ADDR;
251+
// Intersection parametric distance
252+
const float closest_t = my_ray.o.w;
256253

257254
uint stack_bottom = STACK_SIZE * index;
258255
uint sptr = stack_bottom;

0 commit comments

Comments
 (0)