Skip to content

Commit

Permalink
builtin: fix cmake
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Cheraghi <[email protected]>
  • Loading branch information
alichraghi committed Sep 11, 2024
1 parent 16fc27d commit f816d46
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ SVertexAttributes main()
{
using namespace ::nbl::hlsl::glsl;

spirv::Position.xy = SurfaceTransform::applyToNDC((SurfaceTransform::FLAG_BITS)SwapchainTransform,pos[gl_VertexIndex()]);
spirv::Position.z = 0.f;
spirv::Position.w = 1.f;
spirv::builtin::Position.xy = SurfaceTransform::applyToNDC((SurfaceTransform::FLAG_BITS)SwapchainTransform,pos[gl_VertexIndex()]);
spirv::builtin::Position.z = 0.f;
spirv::builtin::Position.w = 1.f;

SVertexAttributes retval;
retval.uv = tc[gl_VertexIndex()];
Expand Down
1 change: 1 addition & 0 deletions include/nbl/config/BuildConfigOptions.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
#define SPIRV_BUILTIN_RESOURCES_DIRECTORY_PATH "@SPIRV_BUILTIN_RESOURCES_DIRECTORY_PATH@"
#define BOOST_BUILTIN_RESOURCES_DIRECTORY_PATH "@BOOST_BUILTIN_RESOURCES_DIRECTORY_PATH@"
#define DEVICEGEN_BUILTIN_RESOURCES_DIRECTORY_PATH "@DEVICEGEN_BUILTIN_RESOURCES_DIRECTORY_PATH@"
#define NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED "@NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED@"

// DDL exports
#cmakedefine _NBL_SHARED_BUILD_
Expand Down
6 changes: 1 addition & 5 deletions src/nbl/builtin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,6 @@ add_custom_target(SprivIntrinsics DEPENDS "${NBL_OUTPUT_FILE}")

if(NBL_EMBED_BUILTIN_RESOURCES)
LIST_BUILTIN_RESOURCE(NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED "core.hlsl")
ADD_CUSTOM_BUILTIN_RESOURCES(sprivIntrinsicsGenBuiltinResourceData NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED "${NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR}" "nbl/builtin/hlsl/spirv_intrinsics" "nbl::builtin" "${CMAKE_CURRENT_BINARY_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/src" "STATIC" "INTERNAL")
ADD_CUSTOM_BUILTIN_RESOURCES(sprivIntrinsicsGenBuiltinResourceData NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED "${NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR}" "nbl/builtin/hlsl/spirv_intrinsics" "nbl::builtin::hlsl::spirv_intrinsics" "${CMAKE_CURRENT_BINARY_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include/nbl/builtin/hlsl/spirv_intrinsics" "STATIC" "INTERNAL")
add_dependencies(sprivIntrinsicsGenBuiltinResourceData SprivIntrinsics)
endif()

set(NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR
"${NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR}"
PARENT_SCOPE)
3 changes: 3 additions & 0 deletions src/nbl/system/ISystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "spirv/builtin/CArchive.h"
#include "boost/builtin/CArchive.h"
#include "nbl/devicegen/builtin/CArchive.h"
#include "nbl/builtin/hlsl/spirv_intrinsics/CArchive.h"
#endif // NBL_EMBED_BUILTIN_RESOURCES

#include "nbl/system/CArchiveLoaderZip.h"
Expand All @@ -25,12 +26,14 @@ ISystem::ISystem(core::smart_refctd_ptr<ISystem::ICaller>&& caller) : m_dispatch
mount(core::make_smart_refctd_ptr<spirv::builtin::CArchive>(nullptr));
mount(core::make_smart_refctd_ptr<boost::builtin::CArchive>(nullptr));
mount(core::make_smart_refctd_ptr<nbl::devicegen::builtin::CArchive>(nullptr));
mount(core::make_smart_refctd_ptr<nbl::builtin::hlsl::spirv_intrinsics::CArchive>(nullptr));
#else
// TODO: absolute default entry paths? we should do something with it
mount(core::make_smart_refctd_ptr<nbl::system::CMountDirectoryArchive>(NBL_BUILTIN_RESOURCES_DIRECTORY_PATH, nullptr, this), "nbl/builtin");
mount(core::make_smart_refctd_ptr<nbl::system::CMountDirectoryArchive>(SPIRV_BUILTIN_RESOURCES_DIRECTORY_PATH, nullptr, this), "spirv");
mount(core::make_smart_refctd_ptr<nbl::system::CMountDirectoryArchive>(BOOST_BUILTIN_RESOURCES_DIRECTORY_PATH, nullptr, this), "boost");
mount(core::make_smart_refctd_ptr<nbl::system::CMountDirectoryArchive>(DEVICEGEN_BUILTIN_RESOURCES_DIRECTORY_PATH, nullptr, this), "nbl/video");
mount(core::make_smart_refctd_ptr<nbl::system::CMountDirectoryArchive>(NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED, nullptr, this), "nbl/builtin/hlsl/spirv_intrinsics");
#endif
}

Expand Down

0 comments on commit f816d46

Please sign in to comment.