Skip to content

Commit

Permalink
Restructure global tracked buffer cache
Browse files Browse the repository at this point in the history
  • Loading branch information
iveevi committed Feb 25, 2025
1 parent 5b88869 commit 0f8173c
Show file tree
Hide file tree
Showing 15 changed files with 871 additions and 51 deletions.
3 changes: 2 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ add_subdirectory(ngf)
add_subdirectory(normals)
add_subdirectory(palette)
add_subdirectory(particles)
add_subdirectory(raytracing)
add_subdirectory(raytracing)
add_subdirectory(pathtracing)
22 changes: 18 additions & 4 deletions examples/experimental/ire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,28 @@ auto ftn = procedure <void> ("main") << []()
// arr[1] = vec4(br2.data[14], 1);
};

auto B = procedure("B") << [](vec3 v) -> vec3
{
return sin(v.y);
};

auto A = procedure("A") << [](vec3 v) -> vec3
{
return v * B(v);
};

// TODO: l-value propagation
// TODO: shadertoy example
// TODO: optimization using graphviz for visualization...

int main()
{
ftn.dump();
ftn.graphviz("graph.dot");
dump_lines("EXPERIMENTAL IRE", link(ftn).generate_glsl());
link(ftn).generate_spirv(vk::ShaderStageFlagBits::eCompute);
dump_lines("A", link(A).generate_glsl());
dump_lines("B", link(B).generate_glsl());
dump_lines("A", link(A).generate_glsl());

// ftn.dump();
// ftn.graphviz("graph.dot");
// dump_lines("EXPERIMENTAL IRE", link(ftn).generate_glsl());
// link(ftn).generate_spirv(vk::ShaderStageFlagBits::eCompute);
}
3 changes: 3 additions & 0 deletions examples/pathtracing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add_executable(pathtracing main.cpp shaders.cpp)

target_link_libraries(pathtracing javelin common)
Loading

0 comments on commit 0f8173c

Please # to comment.