Skip to content

Commit f816d46

Browse files
committed
builtin: fix cmake
Signed-off-by: Ali Cheraghi <[email protected]>
1 parent 16fc27d commit f816d46

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

include/nbl/builtin/hlsl/ext/FullScreenTriangle/default.vert.hlsl

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ SVertexAttributes main()
2626
{
2727
using namespace ::nbl::hlsl::glsl;
2828

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

3333
SVertexAttributes retval;
3434
retval.uv = tc[gl_VertexIndex()];

include/nbl/config/BuildConfigOptions.h.in

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
#define SPIRV_BUILTIN_RESOURCES_DIRECTORY_PATH "@SPIRV_BUILTIN_RESOURCES_DIRECTORY_PATH@"
8787
#define BOOST_BUILTIN_RESOURCES_DIRECTORY_PATH "@BOOST_BUILTIN_RESOURCES_DIRECTORY_PATH@"
8888
#define DEVICEGEN_BUILTIN_RESOURCES_DIRECTORY_PATH "@DEVICEGEN_BUILTIN_RESOURCES_DIRECTORY_PATH@"
89+
#define NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED "@NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED@"
8990

9091
// DDL exports
9192
#cmakedefine _NBL_SHARED_BUILD_

src/nbl/builtin/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,6 @@ add_custom_target(SprivIntrinsics DEPENDS "${NBL_OUTPUT_FILE}")
346346

347347
if(NBL_EMBED_BUILTIN_RESOURCES)
348348
LIST_BUILTIN_RESOURCE(NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED "core.hlsl")
349-
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")
349+
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")
350350
add_dependencies(sprivIntrinsicsGenBuiltinResourceData SprivIntrinsics)
351351
endif()
352-
353-
set(NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR
354-
"${NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR}"
355-
PARENT_SCOPE)

src/nbl/system/ISystem.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "spirv/builtin/CArchive.h"
77
#include "boost/builtin/CArchive.h"
88
#include "nbl/devicegen/builtin/CArchive.h"
9+
#include "nbl/builtin/hlsl/spirv_intrinsics/CArchive.h"
910
#endif // NBL_EMBED_BUILTIN_RESOURCES
1011

1112
#include "nbl/system/CArchiveLoaderZip.h"
@@ -25,12 +26,14 @@ ISystem::ISystem(core::smart_refctd_ptr<ISystem::ICaller>&& caller) : m_dispatch
2526
mount(core::make_smart_refctd_ptr<spirv::builtin::CArchive>(nullptr));
2627
mount(core::make_smart_refctd_ptr<boost::builtin::CArchive>(nullptr));
2728
mount(core::make_smart_refctd_ptr<nbl::devicegen::builtin::CArchive>(nullptr));
29+
mount(core::make_smart_refctd_ptr<nbl::builtin::hlsl::spirv_intrinsics::CArchive>(nullptr));
2830
#else
2931
// TODO: absolute default entry paths? we should do something with it
3032
mount(core::make_smart_refctd_ptr<nbl::system::CMountDirectoryArchive>(NBL_BUILTIN_RESOURCES_DIRECTORY_PATH, nullptr, this), "nbl/builtin");
3133
mount(core::make_smart_refctd_ptr<nbl::system::CMountDirectoryArchive>(SPIRV_BUILTIN_RESOURCES_DIRECTORY_PATH, nullptr, this), "spirv");
3234
mount(core::make_smart_refctd_ptr<nbl::system::CMountDirectoryArchive>(BOOST_BUILTIN_RESOURCES_DIRECTORY_PATH, nullptr, this), "boost");
3335
mount(core::make_smart_refctd_ptr<nbl::system::CMountDirectoryArchive>(DEVICEGEN_BUILTIN_RESOURCES_DIRECTORY_PATH, nullptr, this), "nbl/video");
36+
mount(core::make_smart_refctd_ptr<nbl::system::CMountDirectoryArchive>(NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED, nullptr, this), "nbl/builtin/hlsl/spirv_intrinsics");
3437
#endif
3538
}
3639

0 commit comments

Comments
 (0)