@@ -239,16 +239,16 @@ using AMDGPU
239
239
240
240
function launch_trace_image! (w:: Whitten5 , camera, scene)
241
241
backend = KA. get_backend (w. tiles. contrib_sum)
242
- kernel! = sample_kernel2! (backend)
242
+ kernel! = sample_kernel2! (backend, ( 16 , 16 ) )
243
243
spp_sqr = 1.0f0 / √ Float32 (w. sampler. samples_per_pixel)
244
244
static_filter_table = Mat {size(w.fiter_table)...} (w. fiter_table)
245
245
# open("../trace-tiles.ir", "w") do io
246
246
# @device_code_llvm io kernel!(
247
247
kernel! (
248
- w. pixel, w. tiles, w. tile_size, w. sample_bounds, w. max_depth,
249
- scene, camera, w. sampler, spp_sqr,
250
- static_filter_table, w. filter_radius,
251
- w. resolution, w. crop_bounds, ndrange= ( w. ntiles), workgroupsize = ( 16 , 16 )
248
+ w. pixel, w. tiles, w. tile_size, w. sample_bounds, w. max_depth,
249
+ scene, camera, w. sampler, spp_sqr,
250
+ static_filter_table, w. filter_radius,
251
+ w. resolution, w. crop_bounds, ndrange= w. ntiles
252
252
)
253
253
# end
254
254
KA. synchronize (backend)
@@ -259,15 +259,15 @@ include("./../docs/code/basic-scene.jl")
259
259
260
260
begin
261
261
# Trace.clear!(film)
262
- w = Whitten5 (film; samples_per_pixel= 8 )
262
+ w = Whitten5 (film; samples_per_pixel= 1 , max_depth = 1 )
263
263
@time launch_trace_image! (w, cam, scene)
264
264
Trace. to_framebuffer! (film. framebuffer, w. pixel)
265
265
end
266
266
267
267
begin
268
268
Trace. clear! (film)
269
269
p = []
270
- w_gpu = Trace. to_gpu (ROCArray, Whitten5 (film); preserve= p)
270
+ w_gpu = Trace. to_gpu (ROCArray, Whitten5 (film; samples_per_pixel = 1 , max_depth = 1 ); preserve= p)
271
271
gpu_scene = Trace. to_gpu (ROCArray, scene; preserve= p)
272
272
GC. @preserve p begin
273
273
@time launch_trace_image! (w_gpu, cam, gpu_scene)
0 commit comments