Skip to content

Commit

Permalink
Fix broken first-bounce random seed
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusikkala committed Oct 11, 2022
1 parent 61abf6b commit 8212058
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 18 deletions.
2 changes: 1 addition & 1 deletion external/fuchsia_radix_sort
Submodule fuchsia_radix_sort updated 64 files
+39 −0 .clang-format
+40 −32 CMakeLists.txt
+4 −2 include/radix_sort/radix_sort_vk.h
+1 −1 include/radix_sort/radix_sort_vk_devaddr.h
+84 −5 lib/radix_sort_vk.c
+0 −0 lib/radix_sort_vk_ext.h
+0 −0 lib/shaders/bufref.h
+20 −0 lib/shaders/constants.h
+5 −22 lib/shaders/fill.comp
+162 −178 lib/shaders/histogram.comp
+1 −9 lib/shaders/init.comp
+48 −78 lib/shaders/prefix.comp
+358 −0 lib/shaders/prefix.h
+3 −14 lib/shaders/prefix_limits.h
+0 −0 lib/shaders/push.h
+1,651 −0 lib/shaders/scatter.comp
+309 −0 lib/target.c
+13 −4 lib/target.h
+1 −1 lib/target_requirements.c
+0 −0 lib/target_requirements.h
+64 −0 lib/targets/amd/gcn3/u32/header.c
+64 −0 lib/targets/amd/gcn3/u64/header.c
+63 −0 lib/targets/arm/bifrost4/u32/header.c
+63 −0 lib/targets/arm/bifrost4/u64/header.c
+63 −0 lib/targets/arm/bifrost8/u32/header.c
+63 −0 lib/targets/arm/bifrost8/u64/header.c
+64 −0 lib/targets/intel/gen8/u32/header.c
+64 −0 lib/targets/intel/gen8/u64/header.c
+64 −0 lib/targets/nvidia/sm35/u32/header.c
+64 −0 lib/targets/nvidia/sm35/u64/header.c
+0 −353 platforms/vk/shaders/prefix.h
+0 −1,706 platforms/vk/shaders/scatter.glsl
+0 −36 platforms/vk/shaders/scatter_0_even.comp
+0 −36 platforms/vk/shaders/scatter_0_odd.comp
+0 −36 platforms/vk/shaders/scatter_1_even.comp
+0 −36 platforms/vk/shaders/scatter_1_odd.comp
+0 −92 platforms/vk/target.c
+0 −34 platforms/vk/targets/vendors/amd/gcn3/u32/config.h
+0 −92 platforms/vk/targets/vendors/amd/gcn3/u32/header.c
+0 −34 platforms/vk/targets/vendors/amd/gcn3/u64/config.h
+0 −96 platforms/vk/targets/vendors/amd/gcn3/u64/header.c
+0 −45 platforms/vk/targets/vendors/arm/bifrost4/u32/config.h
+0 −91 platforms/vk/targets/vendors/arm/bifrost4/u32/header.c
+0 −45 platforms/vk/targets/vendors/arm/bifrost4/u64/config.h
+0 −96 platforms/vk/targets/vendors/arm/bifrost4/u64/header.c
+0 −46 platforms/vk/targets/vendors/arm/bifrost8/u32/config.h
+0 −92 platforms/vk/targets/vendors/arm/bifrost8/u32/header.c
+0 −46 platforms/vk/targets/vendors/arm/bifrost8/u64/config.h
+0 −96 platforms/vk/targets/vendors/arm/bifrost8/u64/header.c
+0 −39 platforms/vk/targets/vendors/intel/gen8/u32/config.h
+0 −93 platforms/vk/targets/vendors/intel/gen8/u32/header.c
+0 −39 platforms/vk/targets/vendors/intel/gen8/u64/config.h
+0 −97 platforms/vk/targets/vendors/intel/gen8/u64/header.c
+0 −34 platforms/vk/targets/vendors/nvidia/sm35/u32/config.h
+0 −93 platforms/vk/targets/vendors/nvidia/sm35/u32/header.c
+0 −34 platforms/vk/targets/vendors/nvidia/sm35/u64/config.h
+0 −97 platforms/vk/targets/vendors/nvidia/sm35/u64/header.c
+0 −0 tests/radix_sort_vk_bench/cpu_sort.cc
+0 −0 tests/radix_sort_vk_bench/find_target_name.c
+0 −0 tests/radix_sort_vk_bench/find_target_name.h
+0 −0 tests/radix_sort_vk_bench/main.c
+3 −3 tests/radix_sort_vk_bench/radix_sort_vk_bench.c
+0 −0 tests/radix_sort_vk_bench/radix_sort_vk_bench.h
+0 −0 tests/radix_sort_vk_bench/tests/radix_sort_vk_bench_unittests.cc
2 changes: 1 addition & 1 deletion shader/random_sampler.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ random_sampler init_random_sampler(
uvec4 coord, uvec3 size
){
random_sampler rsampler;
rsampler.seed = coord;
rsampler.seed = pcg4d(coord);
return rsampler;
}

Expand Down
2 changes: 1 addition & 1 deletion shader/sampling_sobol_owen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ vec4 get_shuffled_scrambled_sobol_pt(sobol_sampler ssampler, uint bounce)
sobol_sampler init_sobol_sampler(uvec4 seed)
{
sobol_sampler ssampler;
ssampler.seed = seed;
ssampler.seed = pcg4d(seed);
return ssampler;
}
#endif
8 changes: 3 additions & 5 deletions src/aabb_scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,10 @@ void aabb_scene::init_acceleration_structures(const char* timer_name)
vk::BuildAccelerationStructureFlagBitsKHR::ePreferFastTrace|
vk::BuildAccelerationStructureFlagBitsKHR::eAllowUpdate,
vk::BuildAccelerationStructureModeKHR::eBuild,
{},
{},
VK_NULL_HANDLE,
VK_NULL_HANDLE,
1,
&geom,
{},
{}
&geom
);

vk::AccelerationStructureBuildSizesInfoKHR size_info =
Expand Down
1 change: 1 addition & 0 deletions src/context.hh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "render_target.hh"
#include <set>
#include <map>
#include <memory>
#include <chrono>
#include <functional>

Expand Down
8 changes: 3 additions & 5 deletions src/mesh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ void build_acceleration_structure(
vk::AccelerationStructureTypeKHR::eBottomLevel,
{},
vk::BuildAccelerationStructureModeKHR::eBuild,
{},
{},
VK_NULL_HANDLE,
VK_NULL_HANDLE,
1,
&geom,
{},
{}
&geom
);

if(static_as)
Expand Down
8 changes: 3 additions & 5 deletions src/scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,10 @@ void scene::init_tlas(size_t i)
vk::BuildAccelerationStructureFlagBitsKHR::ePreferFastTrace|
vk::BuildAccelerationStructureFlagBitsKHR::eAllowUpdate,
vk::BuildAccelerationStructureModeKHR::eBuild,
{},
{},
VK_NULL_HANDLE,
VK_NULL_HANDLE,
1,
&geom,
{},
{}
&geom
);

vk::AccelerationStructureBuildSizesInfoKHR size_info =
Expand Down

0 comments on commit 8212058

Please sign in to comment.