Skip to content

Commit faf5ad1

Browse files
committed
small improvements
1 parent a164916 commit faf5ad1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/film-refactor.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,16 +239,16 @@ using AMDGPU
239239

240240
function launch_trace_image!(w::Whitten5, camera, scene)
241241
backend = KA.get_backend(w.tiles.contrib_sum)
242-
kernel! = sample_kernel2!(backend)
242+
kernel! = sample_kernel2!(backend, (16, 16))
243243
spp_sqr = 1.0f0 / Float32(w.sampler.samples_per_pixel)
244244
static_filter_table = Mat{size(w.fiter_table)...}(w.fiter_table)
245245
# open("../trace-tiles.ir", "w") do io
246246
# @device_code_llvm io kernel!(
247247
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
252252
)
253253
# end
254254
KA.synchronize(backend)
@@ -259,15 +259,15 @@ include("./../docs/code/basic-scene.jl")
259259

260260
begin
261261
# Trace.clear!(film)
262-
w = Whitten5(film; samples_per_pixel=8)
262+
w = Whitten5(film; samples_per_pixel=1, max_depth=1)
263263
@time launch_trace_image!(w, cam, scene)
264264
Trace.to_framebuffer!(film.framebuffer, w.pixel)
265265
end
266266

267267
begin
268268
Trace.clear!(film)
269269
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)
271271
gpu_scene = Trace.to_gpu(ROCArray, scene; preserve=p)
272272
GC.@preserve p begin
273273
@time launch_trace_image!(w_gpu, cam, gpu_scene)

0 commit comments

Comments
 (0)