Skip to content

Commit 09ceaf6

Browse files
committed
fixing CLang build, save work
1 parent dbff78d commit 09ceaf6

File tree

6 files changed

+23
-9
lines changed

6 files changed

+23
-9
lines changed

cmake/adjust/template/vendor/CXX_Clang.cmake

+7
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,21 @@ set(NBL_CXX_RELWITHDEBINFO_COMPILE_OPTIONS "")
1515

1616
# Global
1717
list(APPEND NBL_CXX_COMPILE_OPTIONS
18+
-Wno-everything # TMP
1819
-Wextra
1920
-fno-strict-aliasing
2021
-msse4.2
22+
-maes
2123
-mfpmath=sse
2224
-Wextra
2325
-Wno-sequence-point
2426
-Wno-unused-parameter
2527
-Wno-unused-but-set-parameter
28+
-Wno-c++98-compat
29+
-Wno-c++98-compat-pedantic
30+
-Wno-padded
31+
-Wno-unsafe-buffer-usage
32+
-Wno-switch-enum
2633
-Wno-error=ignored-attributes
2734
-Wno-error=unused-function
2835
-Wno-error=unused-variable

cmake/adjust/template/vendor/C_Clang.cmake

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@ set(NBL_C_RELWITHDEBINFO_COMPILE_OPTIONS "")
1515

1616
# Global
1717
list(APPEND NBL_C_COMPILE_OPTIONS
18+
-Wno-everything # TMP
1819
-Wextra
1920
-fno-strict-aliasing
2021
-msse4.2
21-
-mfpmath=sse
22-
-maes
22+
-maes
23+
-mfpmath=sse
2324
-Wextra
2425
-Wno-sequence-point
2526
-Wno-unused-parameter
2627
-Wno-unused-but-set-parameter
28+
-Wno-c++98-compat
29+
-Wno-c++98-compat-pedantic
30+
-Wno-padded
31+
-Wno-unsafe-buffer-usage
32+
-Wno-switch-enum
2733
-Wno-error=ignored-attributes
2834
-Wno-error=unused-function
2935
-Wno-error=unused-variable

include/nbl/asset/IDescriptorSetLayout.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ class IDescriptorSetLayout : public IDescriptorSetLayoutBase
330330
bindings[i].binding = i;
331331
bindings[i].type = type;
332332
bindings[i].createFlags = SBinding::E_CREATE_FLAGS::ECF_NONE;
333-
bindings[i].stageFlags = stageAccessFlags ? stageAccessFlags[i]:asset::IShader::ESS_ALL_OR_LIBRARY;
333+
bindings[i].stageFlags = stageAccessFlags ? stageAccessFlags[i]:asset::IShader::E_SHADER_STAGE::ESS_ALL_OR_LIBRARY;
334334
bindings[i].count = counts ? counts[i]:1u;
335335
bindings[i].samplers = nullptr;
336336
}
@@ -354,7 +354,7 @@ class IDescriptorSetLayout : public IDescriptorSetLayoutBase
354354
for (uint32_t b = 0u; b < bindingCnt; ++b)
355355
{
356356
auto bindingNumber = m_descriptorRedirects[t].m_bindingNumbers[b];
357-
CBindingRedirect::template binding_number_t otherBindingNumber(CBindingRedirect::Invalid);
357+
CBindingRedirect::binding_number_t otherBindingNumber(CBindingRedirect::Invalid);
358358
// TODO: std::find instead?
359359
for (uint32_t ob = 0u; ob < otherBindingCnt; ++ob)
360360
{

include/nbl/asset/IRenderpass.h

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class NBL_API2 IRenderpass
8181
{
8282
bool valid() const;
8383
};
84+
8485
// The arrays pointed to by this array must be terminated by `DepthStencilAttachmentsEnd` value, which implicitly satisfies a few VUIDs
8586
constexpr static inline SDepthStencilAttachmentDescription DepthStencilAttachmentsEnd = {};
8687
const SDepthStencilAttachmentDescription* depthStencilAttachments = &DepthStencilAttachmentsEnd;

include/nbl/asset/utils/CSPIRVIntrospector.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -326,18 +326,18 @@ class NBL_API2 CSPIRVIntrospector : public core::Uncopyable
326326
template<bool C=!Mutable>
327327
inline std::enable_if_t<C,bool> isLastMemberRuntimeSized() const
328328
{
329-
if (type->memberCount)
330-
return type->memberTypes()[type->memberCount-1].count.front().isRuntimeSized();
329+
if (this->type->memberCount)
330+
return this->type->memberTypes()[this->type->memberCount-1].count.front().isRuntimeSized();
331331
return false;
332332
}
333333
template<bool C=!Mutable>
334334
inline std::enable_if_t<C,size_t> getRuntimeSize(const size_t lastMemberElementCount) const
335335
{
336336
if (isLastMemberRuntimeSized())
337337
{
338-
const auto& lastMember = type->memberTypes()[type->memberCount-1];
338+
const auto& lastMember = this->type->memberTypes()[this->type->memberCount-1];
339339
assert(!lastMember.count.front().isSpecConstantID);
340-
return sizeWithoutLastMember+lastMemberElementCount*type->memberStrides()[type->memberCount-1];
340+
return sizeWithoutLastMember+lastMemberElementCount* this->type->memberStrides()[this->type->memberCount-1];
341341
}
342342
return sizeWithoutLastMember;
343343
}

include/nbl/builtin/hlsl/cpp_compat/impl/intrinsics_impl.hlsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ struct nClamp_helper<T>
598598
using return_t = T;
599599
static inline return_t __call(const T x, const T _min, const T _max)
600600
{
601-
return nMin_helper::_call(nMax_helper::_call(x, _min), _max);
601+
return nMin_helper<T>::_call(nMin_helper<T>::_call(x, _min), _max);
602602
}
603603
};
604604

0 commit comments

Comments
 (0)