Skip to content

Commit dc10958

Browse files
committed
Merge branch 'master' into more_fft_utils
2 parents 6a22158 + de58ac2 commit dc10958

File tree

7 files changed

+13
-23
lines changed

7 files changed

+13
-23
lines changed

3rdparty/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,6 @@ target_include_directories(SPIRV PUBLIC "${GLSLANG_GENERATED_INCLUDEDIR}")
161161
set(SHADERC_SKIP_TESTS ON CACHE INTERNAL "Skip shaderc tests?")
162162
set(SHADERC_SKIP_INSTALL ON CACHE INTERNAL "Install shaderc?")
163163

164-
# if it doesn't work without the `touch` on Linux, then fetch the latest submodule head of shaderc and try again
165-
# https://github.com/google/shaderc/issues/568
166-
if (UNIX)
167-
file(WRITE ${THIRD_PARTY_SOURCE_DIR}/shaderc/libshaderc/libshaderc_combined.a "")
168-
endif()
169164
add_subdirectory(shaderc shaderc EXCLUDE_FROM_ALL)
170165

171166
# libjpeg-turbo
@@ -471,7 +466,6 @@ set(NBL_3RDPARTY_TARGETS
471466
simdjson
472467
nlohmann_json
473468
glslang
474-
OGLCompiler
475469
OSDependent
476470
MachineIndependent
477471
GenericCodeGen
@@ -497,9 +491,6 @@ endif()
497491
if (NBL_BUILD_IMGUI)
498492
list(APPEND NBL_3RDPARTY_TARGETS imgui implot imtestsuite imtestengine imguizmo)
499493
endif()
500-
if(ENABLE_HLSL)
501-
list(APPEND NBL_3RDPARTY_TARGETS HLSL)
502-
endif()
503494

504495
foreach(trgt IN LISTS NBL_3RDPARTY_TARGETS)
505496
if(NBL_DYNAMIC_MSVC_RUNTIME)

3rdparty/glslang

3rdparty/shaderc

Submodule shaderc updated 76 files

include/nbl/asset/ICPUBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ICPUBuffer final : public asset::IBuffer, public IPreHashed
2727
public:
2828
struct SCreationParams : asset::IBuffer::SCreationParams
2929
{
30-
size_t size;
30+
size_t size; // WHY IS THIS SHADOWING THE `asset::IBuffer::SCreationParams` !?
3131
void* data = nullptr;
3232
size_t alignment = _NBL_SIMD_ALIGNMENT;
3333
core::smart_refctd_ptr<core::refctd_memory_resource> memoryResource = nullptr;

src/nbl/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,6 @@ if(NBL_STATIC_BUILD)
712712
nbl_install_lib(glslang)
713713
nbl_install_lib(GenericCodeGen)
714714
nbl_install_lib(MachineIndependent)
715-
nbl_install_lib(HLSL)
716715
nbl_install_lib(jpeg-static)
717716
if (_NBL_COMPILE_WITH_OPEN_EXR_)
718717
nbl_install_lib(OpenEXR)
@@ -726,7 +725,6 @@ if(NBL_STATIC_BUILD)
726725
nbl_install_lib(SPIRV)
727726
nbl_install_lib(SPIRV-Tools-static) # TODO: make this function/macro work with alias target
728727
nbl_install_lib(SPIRV-Tools-opt)
729-
nbl_install_lib(OGLCompiler)
730728
nbl_install_lib(OSDependent)
731729
nbl_install_lib(zlibstatic)
732730
nbl_install_lib(simdjson)

src/nbl/asset/utils/CGLSLCompiler.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ namespace nbl::asset::impl
103103
{
104104
auto res_str = std::move(result.contents);
105105
//employ encloseWithinExtraInclGuards() in order to prevent infinite loop of (not necesarilly direct) self-inclusions while other # directives (incl guards among them) are disabled
106-
CGLSLCompiler::disableAllDirectivesExceptIncludes(res_str);
107-
disableGlDirectives(res_str);
108-
res_str = CGLSLCompiler::encloseWithinExtraInclGuards(std::move(res_str), m_maxInclCnt, name.string().c_str());
106+
//CGLSLCompiler::disableAllDirectivesExceptIncludes(res_str);
107+
//disableGlDirectives(res_str);
108+
//res_str = CGLSLCompiler::encloseWithinExtraInclGuards(std::move(res_str), m_maxInclCnt, name.string().c_str());
109109

110110
res->content_length = res_str.size();
111111
res->content = new char[res_str.size() + 1u];
@@ -145,8 +145,8 @@ std::string CGLSLCompiler::preprocessShader(std::string&& code, IShader::E_SHADE
145145
insertion << "#define " << define.identifier << " " << define.definition << "\n";
146146
insertIntoStart(code,std::move(insertion));
147147
}
148-
disableAllDirectivesExceptIncludes(code);
149-
disableGlDirectives(code);
148+
//disableAllDirectivesExceptIncludes(code);
149+
//disableGlDirectives(code);
150150
shaderc::Compiler comp;
151151
shaderc::CompileOptions options;
152152
options.SetTargetSpirv(shaderc_spirv_version_1_6);
@@ -164,8 +164,8 @@ std::string CGLSLCompiler::preprocessShader(std::string&& code, IShader::E_SHADE
164164
}
165165

166166
auto resolvedString = std::string(res.cbegin(), std::distance(res.cbegin(), res.cend()));
167-
reenableDirectives(resolvedString);
168-
reenableGlDirectives(resolvedString);
167+
//reenableDirectives(resolvedString);
168+
//reenableGlDirectives(resolvedString);
169169
return resolvedString;
170170
}
171171

src/nbl/video/utilities/CAssetConverter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,13 +1703,14 @@ class GetDependantVisit<ICPUDescriptorSet> : public GetDependantVisitBase<ICPUDe
17031703
outInfo.info.buffer.size = std::get<0>(argTuple).size;
17041704
}
17051705
}
1706-
if constexpr (std::is_same_v<DepType,ICPUImage>)
1706+
if constexpr (std::is_same_v<DepType,ICPUImageView>)
17071707
{
17081708
outInfo.info.image.imageLayout = std::get<0>(argTuple);
17091709
if (type==IDescriptor::E_TYPE::ET_COMBINED_IMAGE_SAMPLER)
17101710
{
17111711
assert(lastCombinedSampler);
1712-
outInfo.info.combinedImageSampler = std::get<1>(argTuple);
1712+
outInfo.info.combinedImageSampler.sampler = smart_refctd_ptr<IGPUSampler>(lastCombinedSampler);
1713+
lastCombinedSampler = nullptr; // for debuggability
17131714
}
17141715
}
17151716
return true;

0 commit comments

Comments
 (0)