Skip to content

Hlsl bxdfs 2 #811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 237 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
237 commits
Select commit Hold shift + click to select a range
34ee35c
some test bxdfs using concepts and templates
keptsecret Nov 25, 2024
f6752c6
some corrections
keptsecret Nov 25, 2024
42fcb2a
anisotropic concept
keptsecret Nov 26, 2024
81e56f4
concepts for existing stuff
keptsecret Nov 26, 2024
1e73953
more templated stuff, new type trait dimensions
keptsecret Nov 27, 2024
6253da8
template conditionalabs
keptsecret Nov 27, 2024
d13cad4
completed adapting functions?
keptsecret Nov 28, 2024
7110c50
added bxdf concept
keptsecret Nov 28, 2024
98a0be1
fresnel function templates
keptsecret Nov 29, 2024
eef66c6
lambertian, oren nayar brdf
keptsecret Nov 29, 2024
eec8486
removed dimensions, extended rank/extent to vectors/matrix
keptsecret Dec 2, 2024
fcadc22
impl geom_smith and ndf funcs
keptsecret Dec 2, 2024
9742aa1
more bxdfs, fix concepts
keptsecret Dec 3, 2024
8433133
restructure existing bxdfs
keptsecret Dec 4, 2024
bafe623
ggx brdf
keptsecret Dec 5, 2024
3ad9f44
some bsdfs
keptsecret Dec 5, 2024
bc13d1f
beckmann bsdf, bug fixes
keptsecret Dec 6, 2024
f56476e
typedefs in concepts
keptsecret Dec 9, 2024
fe7c882
ndfs as structs()
keptsecret Dec 9, 2024
a12d8d1
redid microfacet_to_light_transform as all structs
keptsecret Dec 10, 2024
328c7ea
fixed missing type
keptsecret Dec 10, 2024
aeafa07
changed geom smith to templated structs
keptsecret Dec 10, 2024
91ca79e
adjusted BxDF concept, new impl BxDF structs
keptsecret Dec 11, 2024
3401783
refactored brdfs
keptsecret Dec 11, 2024
3115423
corrected concept macro usage
keptsecret Dec 11, 2024
b244c12
finished beckmann+ggx bsdfs, fixed typos
keptsecret Dec 12, 2024
e8d5aa3
changes for cpp compat
keptsecret Dec 13, 2024
8158aea
Merge branch 'master' into hlsl_bxdfs
keptsecret Dec 13, 2024
d632b3a
moved math functions to tgmath
keptsecret Dec 16, 2024
3df4851
Merge branch 'master' into hlsl_bxdfs
keptsecret Dec 16, 2024
ffaaf87
rsqrt not in stl
keptsecret Dec 16, 2024
aae9a58
update to pr801/803 #1
keptsecret Dec 16, 2024
c3c97e1
funcs use with c++
keptsecret Dec 16, 2024
b308bff
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Dec 16, 2024
2c2b368
hlsl bxdf test example init
keptsecret Dec 17, 2024
67993ad
fixed include
keptsecret Dec 17, 2024
35cd97a
merge fixes from branch
keptsecret Dec 17, 2024
4f230e8
use correct examples
keptsecret Dec 17, 2024
029116f
fixed cpp compat types
keptsecret Dec 17, 2024
aa91c06
some bug fixes
keptsecret Dec 17, 2024
362d8cd
more bug,typo fixes
keptsecret Dec 18, 2024
7734550
fixed bsdf bugs
keptsecret Dec 19, 2024
05ef0e8
merge math fixes and latest example
keptsecret Dec 19, 2024
0abf434
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Dec 20, 2024
2aa51eb
use bit_cast instead of reinterpret_cast
keptsecret Dec 20, 2024
b53c605
fix concepts
keptsecret Dec 20, 2024
16209a8
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Dec 20, 2024
5a3e7e6
fix aniso inter create
keptsecret Dec 20, 2024
cbdb9f6
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Dec 20, 2024
785291d
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Dec 23, 2024
1286459
fixed all? bugs
keptsecret Dec 23, 2024
3616dcf
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Dec 24, 2024
3b78a06
more bug fixes
keptsecret Dec 25, 2024
5bfdf2f
lots more typo fixes
keptsecret Dec 25, 2024
ecdbbf7
final? bxdf concept, bug fixes
keptsecret Dec 26, 2024
ca8905e
update examples merge conflict
keptsecret Jan 3, 2025
9d2a2f3
bug fixes
keptsecret Jan 3, 2025
b83fae6
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Jan 3, 2025
2539b13
use simpler getcolumn method
keptsecret Jan 3, 2025
796c65b
more brdf bug fixes and example update
keptsecret Jan 6, 2025
9ad1be4
bug fixes, microfacet_transform needs rechecking
keptsecret Jan 6, 2025
567875c
bug fixes #2 (I think)
keptsecret Jan 8, 2025
2239a5e
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Jan 8, 2025
6fc78a4
latest example
keptsecret Jan 9, 2025
a4012dc
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Jan 9, 2025
ac23035
uniform sampling, update embed cmakelists
keptsecret Jan 10, 2025
ccaa0a5
fix cmake, include bugs
keptsecret Jan 10, 2025
cf6c5c2
changed ior, spectral_type usage in bxdf + concept
keptsecret Jan 13, 2025
1d3f291
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Jan 14, 2025
d79346b
pcg hash
keptsecret Jan 14, 2025
2217e81
pcg hash in cmakelist
keptsecret Jan 14, 2025
a4fff1c
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Jan 14, 2025
e413e78
fix aniso microfacet cache create bug
keptsecret Jan 15, 2025
8052ada
bug fixes for ggx dielectric, clamp
keptsecret Jan 16, 2025
d176107
calculation fixes
keptsecret Jan 16, 2025
1a1327f
use param structs for eval/quotient_and_pdf funcs
keptsecret Jan 17, 2025
1cedf68
update to latest
keptsecret Jan 20, 2025
bde6e60
some bug fixes
keptsecret Jan 20, 2025
3618e4c
more typo bug fixes
keptsecret Jan 20, 2025
5a00f7d
fix some calculations, ray dir info type
keptsecret Jan 21, 2025
35ded62
fix not reading variables to param struct
keptsecret Jan 22, 2025
7d8e982
duplicate variable bug fix
keptsecret Jan 22, 2025
6e5c569
latest example: chi2
keptsecret Jan 24, 2025
2125aab
fix examples conflict?
keptsecret Jan 24, 2025
a0d356b
update example, conflict
keptsecret Jan 27, 2025
a1d18d3
fix extent/rank type trait definition order
keptsecret Jan 27, 2025
aceb799
fix c++ compile
keptsecret Jan 27, 2025
a0dddce
bxdf traits, bug fixes
keptsecret Jan 29, 2025
772c9b6
latest unit tests
keptsecret Jan 30, 2025
c4de151
latest test #2
keptsecret Jan 30, 2025
d00533a
tack merge example
keptsecret Jan 30, 2025
90e39d1
Merge branch 'new_tgmath' into hlsl_bxdfs_tgmath_premerge
keptsecret Jan 31, 2025
4bf43e3
fixes to get smooth dielectric working
keptsecret Jan 31, 2025
ce0001f
fix merge conflict
keptsecret Feb 3, 2025
edca69a
pcg prng as structs
keptsecret Feb 12, 2025
967ec9e
fix pcg bug
keptsecret Feb 12, 2025
0b4e33a
Merge branch 'hlsl_bxdfs' into hlsl_bxdfs_tgmath_premerge
keptsecret Feb 12, 2025
97a22af
update to master
keptsecret Feb 21, 2025
0497410
Merge branch 'hlsl_bxdfs' into hlsl_bxdfs_tgmath_premerge
keptsecret Feb 21, 2025
18e8437
fix type traits conflict
keptsecret Feb 25, 2025
4c91597
update master, resolve conflicts
keptsecret Feb 25, 2025
de3e5f2
merge in fixes to complete bxdfs
keptsecret Feb 25, 2025
1337646
quick fix for compiling params in dxc
keptsecret Feb 27, 2025
2fe105d
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Feb 27, 2025
d3b3c59
refactor changes to interaction, cache, new fresnel funcs
keptsecret Feb 27, 2025
6ad2965
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Feb 27, 2025
705c4e9
fixes to match new bxdf params
keptsecret Feb 28, 2025
0d4e8ab
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Feb 28, 2025
660b0fc
merge functions.hlsl fixes, resolve conflicts
keptsecret Mar 3, 2025
6fcccfe
fix any/all bugs, typos
keptsecret Mar 3, 2025
d1a37bd
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Mar 4, 2025
dc739aa
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Mar 4, 2025
7953914
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Mar 4, 2025
d31a92b
removed condNegate, use flipSign
keptsecret Mar 4, 2025
721978e
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Mar 4, 2025
78fb433
Merge branch 'maths_for_bxdfs_hlsl' into hlsl_bxdfs
keptsecret Mar 5, 2025
dc9db3e
added concept macro for checking type alias
keptsecret Mar 5, 2025
cc031f6
Merge branch 'master' into hlsl_bxdfs
keptsecret Mar 6, 2025
6ca571e
more bug fixes #6
keptsecret Mar 7, 2025
39a8a9b
minor fixes, infinity use
keptsecret Mar 7, 2025
656b069
Merge branch 'master' into hlsl_bxdfs
keptsecret Mar 10, 2025
b02f8e6
condAbsOrMax in param struct
keptsecret Mar 11, 2025
6662daa
update examples
keptsecret Mar 17, 2025
9712b8d
merge maths branch, fix conflict
keptsecret Mar 19, 2025
8c65555
merge master, fix conflicts
keptsecret Apr 2, 2025
e0ccc9e
some style changes, refactor sampling funcs
keptsecret Apr 2, 2025
b2b7794
new equal func for vectors
keptsecret Apr 2, 2025
e8a9756
Merge branch 'master' into hlsl_bxdfs
keptsecret Apr 2, 2025
bc68c22
refactor fresnel funcs usage
keptsecret Apr 3, 2025
2b8bbbb
getters for interaction, samples
keptsecret Apr 3, 2025
2e368ab
getters for microfacet cache
keptsecret Apr 4, 2025
bd52332
added vector spec for flipSign
keptsecret Apr 4, 2025
bff0aa6
added rng wrapper for 2d/3d uints
keptsecret Apr 4, 2025
deda14a
added OpSelect intrinsic for mix, fix mix behavior with bool
keptsecret Apr 4, 2025
576b814
changes to uniform rand wrapper
keptsecret Apr 14, 2025
268b573
moved quotient_pdf to sampling namespace, split bxdf files
keptsecret Apr 14, 2025
7162a29
fixes to mix, flipSign constraints
keptsecret Apr 14, 2025
540919b
changes to oriented eta, reflect, refract
keptsecret Apr 15, 2025
ac70036
changes to reflectrefract, fresnel funcs
keptsecret Apr 15, 2025
4c7dfa6
change VNDF usage to structs
keptsecret Apr 15, 2025
b982f2c
compute microfacet normals as structs
keptsecret Apr 15, 2025
a0334a0
renamed light sample concept
keptsecret Apr 16, 2025
79ef0d7
changes to microfacet cache member funcs
keptsecret Apr 16, 2025
cc5fab5
added isotropic generate
keptsecret Apr 16, 2025
f99933b
fix surface interaction, microfacet cache concepts + default concepts
keptsecret Apr 16, 2025
f2f9210
minor bug fix
keptsecret Apr 16, 2025
493bc49
minor changes
keptsecret Apr 17, 2025
4b87a4a
renamed some typedefs
keptsecret Apr 17, 2025
31f2af8
moved typedefs, template params dependencies into bxdfs
keptsecret Apr 17, 2025
927ef68
make param struct per bxdf
keptsecret Apr 18, 2025
1cc205d
minor fix to bxdf concepts
keptsecret Apr 18, 2025
f523ef3
initial examples_tests submodule change
May 27, 2025
87e11e5
clean up the `nbl::hlsl::shapes` namespace a bit
May 28, 2025
0824014
new classes to replace IMeshBuffer and IMesh
May 28, 2025
3cf9d25
add a general polygon geometry
May 28, 2025
3c5e81f
correct typos and allow different geometries in a collection
May 28, 2025
7f65993
add a set transform callback to `exportForBLAS` this lets us know the…
May 28, 2025
65e9b72
add important methods and metadata for the `SDataViewBase::encodedDat…
May 28, 2025
f37cca7
add all missing data streams from ICPUMeshBuffer to IPolygonGeometry
May 28, 2025
4c7fcb7
Move the requirement for the Position View to be formatted from `IGeo…
May 28, 2025
30adb9c
correct header name to `ICPUPolygonGeometry` and implement `IAsset` m…
May 28, 2025
a0a006c
implement visitor properly
May 28, 2025
30e3bed
add the element encode/decode functions for `IGeometry::SDataView`
May 28, 2025
57f8905
excise Mesh and MeshBuffer from the asset namespace, reassign Asset T…
May 28, 2025
3001e24
correct a slight encapsulation leak
May 28, 2025
07e7176
get rid of now useless metadata classes
May 28, 2025
c9e8ca8
start cleaning up the mesh manipulator into a geometry manipulator
May 28, 2025
6a64ede
remove the renderpass independent pipeline from nbl::asset::
May 28, 2025
fef2ebc
Mesh Packers don't make much sense anymore with programmable vertex p…
May 28, 2025
7f1302c
add ICPUGeometryCollection
May 29, 2025
18adf44
hoist most of the BLAS geometry export out of IGeometryCollection
May 29, 2025
40a8df3
implement ICPUMorphTargets
May 29, 2025
2c9b860
start removing unnecessary things from PolygonGeometryManipulator
May 29, 2025
c91f2d7
correct typos, get stuff compiling
May 29, 2025
0a37d24
fight for more compilation
May 29, 2025
fd87ce7
outline some ideas about dealing with indexing schemes
May 29, 2025
144299d
finalize my indexing abstraction logic
May 31, 2025
0215b88
cauterize more stuff, start working on the Geometry Creator
May 31, 2025
b5830e7
correct a bunch of typos
May 31, 2025
c077d6e
get one step closer to compiling
Jun 3, 2025
e217665
OBJ should really be a scene loader in the future (just no lights)
Jun 3, 2025
8f1564a
in thre interest of thread safety we should not have default manipula…
Jun 3, 2025
c0dffe3
get Nabla compiling
Jun 3, 2025
cb6d148
update submodule pointer
Jun 3, 2025
7077a04
remove last remnanst, and turn off STL /PLY writers for now to let CI…
Jun 3, 2025
99efe2a
fix include bug of beziers.hlsl tested with CAD playground example
Jun 3, 2025
1f51c33
Merge pull request #885 from Devsh-Graphics-Programming/master
devshgraphicsprogramming Jun 3, 2025
2aa2395
a cry for help to @AnastaZIuk
Jun 4, 2025
7f85f18
on road to rework examples PCH and cleaning build system a bit, updat…
AnastaZIuk Jun 11, 2025
2227505
wipe _NBL_APP_NAME_ define reference from nbl/application_templates/M…
AnastaZIuk Jun 11, 2025
afac36d
update examples_tests submodule
AnastaZIuk Jun 11, 2025
ef0f206
add missing EXCLUDE_FROM_ALL for examples_tests
AnastaZIuk Jun 11, 2025
c18c8ae
create NBL_ADJUST_FOLDERS and use for a few namespaces to group targe…
AnastaZIuk Jun 11, 2025
c02e5b1
add `Container – Build Examples` step to .github/workflows/build-nabl…
AnastaZIuk Jun 11, 2025
4dedfd6
EXCLUDE_FROM_ALL nite, correct building examples and installing targets
AnastaZIuk Jun 12, 2025
30eff84
implement cube geometry creation
Jun 16, 2025
d654a25
get stuff to compile
Jun 16, 2025
aae0623
remove cruft
Jun 16, 2025
bb6f9e5
add conversion operator from SBufferRange to SBufferBinding
Jun 16, 2025
fa02163
implement `fast_affine.hlsl`
Jun 16, 2025
5b066f8
get stuff to compile
Jun 16, 2025
16b7c53
fix geometry memory issues
Jun 16, 2025
8ed377a
implement rectangle and disk
Jun 16, 2025
65c2047
fix bad (reverse) implementation of checking validity of `SDataView`
Jun 16, 2025
569839e
add `IGPUPolygonGeometry` and attempt AssetConverter implementation f…
Jun 17, 2025
1403f33
improve `CAssetConverter` to take into account that not every `asset_…
Jun 17, 2025
4eef9f9
get assetConverter to work on `IGPUPolygonGeometry`
Jun 17, 2025
2798fba
sync validation TODO
Jun 17, 2025
f143d0b
add explicit constructors to `hlsl::matrix` which can cast between ma…
Jun 18, 2025
ad27a61
Implement allPreviousStages and allLaterStages
Jun 18, 2025
776fb12
Merge remote-tracking branch 'remotes/origin/master' into mesh_loaders
Jun 18, 2025
1f52d2f
bring new Assets in line with Stageless Shaders API change
Jun 18, 2025
b8c42b2
get as many examples working as possible after the merge
Jun 18, 2025
5462fe3
Ready for Arek to work his magic
Jun 19, 2025
3fa43e2
something should be on screen but my `fast_affine.hlsl` is busted
Jun 19, 2025
4c8c47b
Merge branch 'mesh_loaders' of github.com:Devsh-Graphics-Programming/…
Jun 19, 2025
1dc258e
Add itself as next stage and previous stage for all pipeline stages
Jun 19, 2025
c42afec
pull Matt and resolve conflicts
AnastaZIuk Jun 19, 2025
961cbdf
update examples_tests submodule
AnastaZIuk Jun 19, 2025
f2f5d01
Add -1 to maxVertex
Jun 20, 2025
1d9658e
fix bugs in geometry creator and Indexing callback for triangle Fan
Jun 20, 2025
3c75ba5
turns out `CGLSLCompiler::preprocessShader` didn't quite work right f…
Jun 21, 2025
101ffbc
Merge remote-tracking branch 'remotes/origin/mlBuildUpdates' into mes…
Jun 21, 2025
68bd6a9
document the `MonoAssetManagerAndBuiltinResourceApplication.hpp` conu…
Jun 21, 2025
7b0e90d
Split `MonoAssetManagerAndBuiltinResourceApplication.hpp` in two, add…
Jun 21, 2025
380fefd
update submodule pointer
Jun 21, 2025
aae6cd9
@yasinvolved can start testing now
Jun 22, 2025
2922244
update examples_tests submodule
Jun 23, 2025
5ba8711
add some more invalid usage validation so we don't crash as often
Jun 23, 2025
3357c41
get 61 kinda working again
Jun 23, 2025
688b950
merge mesh_loaders, fix conflicts
keptsecret Jun 25, 2025
f0491a9
update example test
keptsecret Jun 25, 2025
b6be78f
fix phmap_deserialization.h and phmap_serialization.h after API chang…
Jun 25, 2025
5ad312c
make patch default constructors `constexpr`
Jun 25, 2025
4ac25e5
merge mesh_loaders, fix conflict
keptsecret Jun 26, 2025
5d74015
latest example
keptsecret Jun 26, 2025
d24ac0e
fixed a few typo bugs
keptsecret Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/build-nabla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,31 @@ jobs:
--preset ci-build-dynamic-${{ matrix.vendor }} `
-t run-compiler-explorer --config ${{ matrix.config }}

- name: Container – Install NSC
- name: Container – Build Examples
id: build-examples
continue-on-error: true
run: |
docker exec orphan `
${{ env.entry }} ${{ env.cmd }} -Command cmake --build `
--preset ci-build-dynamic-${{ matrix.vendor }} `
-t examples_tests\all --config ${{ matrix.config }} `
-- -k 0

- name: Container – Install Nabla
run: |
docker exec orphan `
${{ env.entry }} ${{ env.cmd }} -Command cmake --install `
${{ env.binary }} --config ${{ matrix.config }} `
--component Runtimes --prefix ${{ env.install }}
--prefix ${{ env.install }}

- name: Container – Install Examples
id: install-examples
continue-on-error: true
run: |
docker exec orphan `
${{ env.entry }} ${{ env.cmd }} -Command cmake --install `
${{ env.binary }} --config ${{ matrix.config }} `
--component Executables --prefix ${{ env.install }}
${{ env.binary }}\examples_tests --config ${{ matrix.config }} `
--prefix ${{ env.install }}

- name: Container – Save NSC Image
run: |
Expand Down
2 changes: 2 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ nbl_adjust_definitions()
add_custom_target(3rdparty)
add_dependencies(3rdparty ${NBL_3RDPARTY_TARGETS})

NBL_ADJUST_FOLDERS(3rdaprty)

nbl_install_dir("${CMAKE_CURRENT_SOURCE_DIR}/parallel-hashmap/parallel_hashmap")

# parent scope exports, must be at the end of the file
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/Vulkan-Headers
Submodule Vulkan-Headers updated 61 files
+9 −51 .github/workflows/ci.yml
+0 −1 BUILD.gn
+12 −39 CMakeLists.txt
+0 −108 Makefile.release
+2 −4 include/vk_video/vulkan_video_codec_av1std.h
+1 −1 include/vk_video/vulkan_video_codec_av1std_decode.h
+0 −143 include/vk_video/vulkan_video_codec_av1std_encode.h
+1 −1 include/vk_video/vulkan_video_codec_h264std.h
+1 −1 include/vk_video/vulkan_video_codec_h264std_decode.h
+1 −1 include/vk_video/vulkan_video_codec_h264std_encode.h
+1 −1 include/vk_video/vulkan_video_codec_h265std.h
+1 −1 include/vk_video/vulkan_video_codec_h265std_decode.h
+1 −1 include/vk_video/vulkan_video_codec_h265std_encode.h
+1 −1 include/vk_video/vulkan_video_codecs_common.h
+1 −1 include/vulkan/vk_platform.h
+164 −3,825 include/vulkan/vulkan.cppm
+1 −1 include/vulkan/vulkan.h
+8,922 −10,617 include/vulkan/vulkan.hpp
+1 −1 include/vulkan/vulkan_android.h
+10 −20 include/vulkan/vulkan_beta.h
+844 −3,052 include/vulkan/vulkan_core.h
+1 −1 include/vulkan/vulkan_directfb.h
+1,248 −1,951 include/vulkan/vulkan_enums.hpp
+190 −654 include/vulkan/vulkan_extension_inspection.hpp
+57 −57 include/vulkan/vulkan_format_traits.hpp
+1 −1 include/vulkan/vulkan_fuchsia.h
+12,153 −14,855 include/vulkan/vulkan_funcs.hpp
+1 −1 include/vulkan/vulkan_ggp.h
+1,548 −3,245 include/vulkan/vulkan_handles.hpp
+472 −2,485 include/vulkan/vulkan_hash.hpp
+19 −48 include/vulkan/vulkan_hpp_macros.hpp
+1 −1 include/vulkan/vulkan_ios.h
+1 −1 include/vulkan/vulkan_macos.h
+7 −48 include/vulkan/vulkan_metal.h
+3,671 −5,665 include/vulkan/vulkan_raii.hpp
+1 −1 include/vulkan/vulkan_screen.h
+167 −239 include/vulkan/vulkan_shared.hpp
+404 −1,451 include/vulkan/vulkan_static_assertions.hpp
+56,080 −72,159 include/vulkan/vulkan_structs.hpp
+452 −1,247 include/vulkan/vulkan_to_string.hpp
+1 −1 include/vulkan/vulkan_vi.h
+15 −356 include/vulkan/vulkan_video.hpp
+1 −1 include/vulkan/vulkan_wayland.h
+1 −1 include/vulkan/vulkan_win32.h
+1 −1 include/vulkan/vulkan_xcb.h
+1 −1 include/vulkan/vulkan_xlib.h
+1 −1 include/vulkan/vulkan_xlib_xrandr.h
+2 −2 registry/apiconventions.py
+10 −15 registry/cgenerator.py
+12 −47 registry/generator.py
+5 −6 registry/parse_dependency.py
+7 −50 registry/reg.py
+4 −31 registry/spec_tools/conventions.py
+1 −2 registry/spec_tools/util.py
+2 −2 registry/stripAPI.py
+28,987 −33,074 registry/validusage.json
+7 −134 registry/video.xml
+1,233 −4,219 registry/vk.xml
+6 −6 registry/vkconventions.py
+1 −1 tests/CMakeLists.txt
+1 −1 tests/integration/CMakeLists.txt
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ option(NBL_PCH "Enable pre-compiled header" ON)
option(NBL_FAST_MATH "Enable fast low-precision math" ON)
option(NBL_BUILD_EXAMPLES "Enable building examples" ON)
option(NBL_BUILD_MITSUBA_LOADER "Enable nbl::ext::MitsubaLoader?" OFF) # TODO: once it compies turn this ON by default!
option(NBL_BUILD_IMGUI "Enable nbl::ext::ImGui?" OFF)
option(NBL_BUILD_IMGUI "Enable nbl::ext::ImGui?" ON)

option(NBL_BUILD_OPTIX "Enable nbl::ext::OptiX?" OFF)
if(NBL_COMPILE_WITH_CUDA)
Expand Down Expand Up @@ -271,7 +271,7 @@ add_subdirectory(src/nbl)
add_subdirectory("${NBL_PYTHON_MODULE_ROOT_PATH}" tests) # Python Framework
if(NBL_BUILD_EXAMPLES)
file(LOCK "${CMAKE_CURRENT_SOURCE_DIR}/examples_tests" DIRECTORY GUARD PROCESS RESULT_VARIABLE NBL_LOCK TIMEOUT 60)
add_subdirectory(examples_tests)
add_subdirectory(examples_tests EXCLUDE_FROM_ALL)
file(LOCK "${CMAKE_CURRENT_SOURCE_DIR}/examples_tests" DIRECTORY RELEASE RESULT_VARIABLE NBL_LOCK)
endif()
add_subdirectory(tools)
Expand Down
186 changes: 40 additions & 146 deletions cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,131 +16,50 @@ include_guard(GLOBAL)

include(ProcessorCount)

function(nbl_handle_dll_definitions _TARGET_ _SCOPE_)
if(NOT TARGET Nabla)
message(FATAL_ERROR "Internal error, Nabla target must be defined!")
endif()

if(NOT TARGET ${_TARGET_})
message(FATAL_ERROR "Internal error, requsted \"${_TARGET_}\" is not defined!")
endif()

if(NBL_COMPILER_DYNAMIC_RUNTIME)
set(_NABLA_OUTPUT_DIR_ "${NBL_ROOT_PATH_BINARY}/src/nbl/$<CONFIG>/devshgraphicsprogramming.nabla")

target_compile_definitions(${_TARGET_} ${_SCOPE_}
_NABLA_DLL_NAME_="$<PATH:REMOVE_EXTENSION,$<TARGET_FILE_NAME:Nabla>>";_NABLA_OUTPUT_DIR_="${_NABLA_OUTPUT_DIR_}"
)
endif()

target_compile_definitions(${_TARGET_} ${_SCOPE_}
_DXC_DLL_="${DXC_DLL}"
)
endfunction()

function(nbl_handle_runtime_lib_properties _TARGET_)
if(NOT TARGET ${_TARGET_})
message(FATAL_ERROR "Internal error, requsted \"${_TARGET_}\" is not defined!")
endif()

set_target_properties(${_TARGET_} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>$<$<BOOL:${NBL_COMPILER_DYNAMIC_RUNTIME}>:DLL>")
endfunction()

# Macro creating project for an executable
# Project and target get its name from directory when this macro gets executed (truncating number in the beginning of the name and making all lower case)
# Created because of common cmake code for examples and tools
macro(nbl_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDES _EXTRA_LIBS)
get_filename_component(_NBL_PROJECT_DIRECTORY_ "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
include("scripts/nbl/projectTargetName") # sets EXECUTABLE_NAME

if(MSVC)
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${EXECUTABLE_NAME})
endif()
get_filename_component(EXECUTABLE_NAME ${_NBL_PROJECT_DIRECTORY_} NAME)
string(REGEX REPLACE "^[0-9]+\." "" EXECUTABLE_NAME ${EXECUTABLE_NAME})
string(TOLOWER ${EXECUTABLE_NAME} EXECUTABLE_NAME)
string(MAKE_C_IDENTIFIER ${EXECUTABLE_NAME} EXECUTABLE_NAME)

project(${EXECUTABLE_NAME})
set_directory_properties(PROPERTIES VS_STARTUP_PROJECT ${EXECUTABLE_NAME})

set(NBL_EXECUTABLE_SOURCES
main.cpp
${_EXTRA_SOURCES}
)

if(ANDROID)
add_library(${EXECUTABLE_NAME} SHARED main.cpp ${_EXTRA_SOURCES})
add_library(${EXECUTABLE_NAME} SHARED ${NBL_EXECUTABLE_SOURCES})
else()
set(NBL_EXECUTABLE_SOURCES
main.cpp
${_EXTRA_SOURCES}
)

add_executable(${EXECUTABLE_NAME} ${NBL_EXECUTABLE_SOURCES})
nbl_handle_runtime_lib_properties(${EXECUTABLE_NAME})
endif()

nbl_handle_dll_definitions(${EXECUTABLE_NAME} PUBLIC)

target_compile_definitions(${EXECUTABLE_NAME} PUBLIC _NBL_APP_NAME_="${EXECUTABLE_NAME}")

if("${EXECUTABLE_NAME}" STREQUAL commonpch)
add_dependencies(${EXECUTABLE_NAME} Nabla)
else()
string(FIND "${_NBL_PROJECT_DIRECTORY_}" "${NBL_ROOT_PATH}/examples_tests" _NBL_FOUND_)

if(NOT "${_NBL_FOUND_}" STREQUAL "-1") # the call was made for a target defined in examples_tests, request common api PCH
if(NOT TARGET ${NBL_EXECUTABLE_COMMON_API_TARGET})
message(FATAL_ERROR "Internal error, NBL_EXECUTABLE_COMMON_API_TARGET target must be defined to create an example target!")
endif()

add_dependencies(${EXECUTABLE_NAME} ${NBL_EXECUTABLE_COMMON_API_TARGET})
target_link_libraries(${EXECUTABLE_NAME} PUBLIC ${NBL_EXECUTABLE_COMMON_API_TARGET})
target_precompile_headers("${EXECUTABLE_NAME}" REUSE_FROM "${NBL_EXECUTABLE_COMMON_API_TARGET}")
endif()
endif()

target_include_directories(${EXECUTABLE_NAME}
PUBLIC "${NBL_ROOT_PATH}/examples_tests/common"
PUBLIC "${NBL_ROOT_PATH_BINARY}/include"
PUBLIC ../../include # in macro.. relative to what? TODO: correct
PRIVATE ${_EXTRA_INCLUDES}
)
target_link_libraries(${EXECUTABLE_NAME} PUBLIC Nabla ${_EXTRA_LIBS})

add_compile_options(${_EXTRA_OPTIONS})

if(NBL_SANITIZE_ADDRESS)
if(MSVC)
target_compile_options(${EXECUTABLE_NAME} PUBLIC /fsanitize=address)
else()
target_compile_options(${EXECUTABLE_NAME} PUBLIC -fsanitize=address)
endif()
endif()

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# add_compile_options("-msse4.2 -mfpmath=sse") ????
add_compile_options(
"$<$<CONFIG:DEBUG>:-fstack-protector-all>"
)

set(COMMON_LINKER_OPTIONS "-msse4.2 -mfpmath=sse -fuse-ld=gold")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${COMMON_LINKER_OPTIONS}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${COMMON_LINKER_OPTIONS} -fstack-protector-strong")
if (NBL_GCC_SANITIZE_ADDRESS)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address")
endif()
if (NBL_GCC_SANITIZE_THREAD)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=thread")
endif()
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.1)
add_compile_options(-Wno-error=ignored-attributes)
endif()
endif()

nbl_adjust_flags(TARGET ${EXECUTABLE_NAME} MAP_RELEASE Release MAP_RELWITHDEBINFO RelWithDebInfo MAP_DEBUG Debug)
nbl_adjust_definitions() # macro defined in root CMakeLists
add_definitions(-D_NBL_PCH_IGNORE_PRIVATE_HEADERS)
nbl_adjust_definitions()

set_target_properties(${EXECUTABLE_NAME} PROPERTIES DEBUG_POSTFIX _d)
set_target_properties(${EXECUTABLE_NAME} PROPERTIES RELWITHDEBINFO_POSTFIX _rwdi)
set_target_properties(${EXECUTABLE_NAME}
PROPERTIES
add_compile_options(${_EXTRA_OPTIONS})
add_definitions(-D_NBL_PCH_IGNORE_PRIVATE_HEADERS) # TODO: wipe when we finally make Nabla PCH work as its supposed to
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
DEBUG_POSTFIX _d
RELWITHDEBINFO_POSTFIX _rwdi
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_SOURCE_DIR}/bin"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${PROJECT_SOURCE_DIR}/bin"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${PROJECT_SOURCE_DIR}/bin"
VS_DEBUGGER_WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/bin" # for visual studio
VS_DEBUGGER_WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
)
if(MSVC)
# nothing special
Expand Down Expand Up @@ -248,66 +167,28 @@ macro(nbl_create_executable_project _EXTRA_SOURCES _EXTRA_OPTIONS _EXTRA_INCLUDE
nbl_project_process_test_module()
endmacro()

# TODO this macro needs more love
macro(nbl_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUDES LIB_OPTIONS DEF_OPTIONS)
set(LIB_NAME "NblExt${EXT_NAME}")
project(${LIB_NAME})

add_library(${LIB_NAME} ${LIB_SOURCES})

target_include_directories(${LIB_NAME}
PUBLIC $<TARGET_PROPERTY:Nabla,INCLUDE_DIRECTORIES>
PRIVATE ${LIB_INCLUDES}
)

if(NBL_EMBED_BUILTIN_RESOURCES)
get_target_property(_BUILTIN_RESOURCES_INCLUDE_SEARCH_DIRECTORY_ nblBuiltinResourceData BUILTIN_RESOURCES_INCLUDE_SEARCH_DIRECTORY)

target_include_directories(${LIB_NAME}
PUBLIC ${_BUILTIN_RESOURCES_INCLUDE_SEARCH_DIRECTORY_}
)
endif()

add_dependencies(${LIB_NAME} Nabla)
target_link_libraries(${LIB_NAME} PUBLIC Nabla)
target_compile_options(${LIB_NAME} PUBLIC ${LIB_OPTIONS})
target_compile_definitions(${LIB_NAME} PUBLIC ${DEF_OPTIONS})

nbl_handle_dll_definitions(${LIB_NAME} PUBLIC)
nbl_handle_runtime_lib_properties(${LIB_NAME})

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(
"$<$<CONFIG:DEBUG>:-fstack-protector-all>"
)

set(COMMON_LINKER_OPTIONS "-msse4.2 -mfpmath=sse -fuse-ld=gold")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${COMMON_LINKER_OPTIONS}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${COMMON_LINKER_OPTIONS} -fstack-protector-strong -fsanitize=address")
endif()
target_include_directories(${LIB_NAME} PRIVATE ${LIB_INCLUDES})

nbl_adjust_flags(TARGET ${LIB_NAME} MAP_RELEASE Release MAP_RELWITHDEBINFO RelWithDebInfo MAP_DEBUG Debug)
nbl_adjust_definitions() # macro defined in root CMakeLists
nbl_adjust_definitions()

set_target_properties(${LIB_NAME} PROPERTIES DEBUG_POSTFIX "")
set_target_properties(${LIB_NAME} PROPERTIES RELWITHDEBINFO_POSTFIX _rwdb)
set_target_properties(${LIB_NAME}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
target_compile_options(${LIB_NAME} PUBLIC ${LIB_OPTIONS})
target_compile_definitions(${LIB_NAME} PUBLIC ${DEF_OPTIONS})
set_target_properties(${LIB_NAME} PROPERTIES
DEBUG_POSTFIX _d
RELWITHDEBINFO_POSTFIX _rwdi
)
if(MSVC)
set_target_properties(${LIB_NAME}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_SOURCE_DIR}/bin"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${PROJECT_SOURCE_DIR}/bin"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${PROJECT_SOURCE_DIR}/bin"
VS_DEBUGGER_WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/bin" # seems like has no effect
)
endif()

if(LIB_HEADERS)
nbl_install_file_spec(${LIB_HEADERS} "nbl/ext/${EXT_NAME}")
endif()
endif()

nbl_install_lib_spec(${LIB_NAME} "nbl/ext/${EXT_NAME}")

Expand Down Expand Up @@ -1334,4 +1215,17 @@ macro(NBL_DOCKER)
RESULT_VARIABLE DOCKER_EXIT_CODE
OUTPUT_VARIABLE DOCKER_OUTPUT_VAR
)
endmacro()
endmacro()

function(NBL_ADJUST_FOLDERS NS)
NBL_GET_ALL_TARGETS(TARGETS)
foreach(T IN LISTS TARGETS)
get_target_property(NBL_FOLDER ${T} FOLDER)

if(NBL_FOLDER)
set_target_properties(${T} PROPERTIES FOLDER "nabla/${NS}/${NBL_FOLDER}")
else()
set_target_properties(${T} PROPERTIES FOLDER "nabla/${NS}")
endif()
endforeach()
endfunction()
11 changes: 6 additions & 5 deletions include/nbl/application_templates/BasicMultiQueueApplication.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// Copyright (C) 2023-2023 - DevSH Graphics Programming Sp. z O.O.
// This file is part of the "Nabla Engine".
// For conditions of distribution and use, see copyright notice in nabla.h
#ifndef _NBL_EXAMPLES_APPLICATION_TEMPLATES_BASIC_MULTI_QUEUE_APPLICATION_HPP_INCLUDED_
#define _NBL_EXAMPLES_APPLICATION_TEMPLATES_BASIC_MULTI_QUEUE_APPLICATION_HPP_INCLUDED_
#ifndef _NBL_APPLICATION_TEMPLATES_BASIC_MULTI_QUEUE_APPLICATION_HPP_INCLUDED_
#define _NBL_APPLICATION_TEMPLATES_BASIC_MULTI_QUEUE_APPLICATION_HPP_INCLUDED_


// Build on top of the previous one
#include "MonoDeviceApplication.hpp"
#include "nbl/application_templates/MonoDeviceApplication.hpp"


namespace nbl::application_templates
{
Expand Down Expand Up @@ -263,5 +265,4 @@ class BasicMultiQueueApplication : public virtual MonoDeviceApplication
};

}

#endif // _CAMERA_IMPL_
#endif

This file was deleted.

Loading
Loading