Skip to content

Commit 61a9a3d

Browse files
committed
boost?? __VA_ARGS__ support??? hello????
1 parent 34d1029 commit 61a9a3d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

include/nbl/video/ILogicalDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
571571
{
572572
const ptrdiff_t pos = pool.tellp();
573573
m_extraShaderDefines.push_back(reinterpret_cast<const char*>(pos));
574-
pool << define << " ";
574+
pool << define << "=";
575575
((pool << std::forward<Args>(args)), ...);
576576
}
577577
inline void finalizeShaderDefinePool(std::ostringstream&& pool)

include/nbl/video/SPhysicalDeviceLimits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ struct SPhysicalDeviceLimits
8080
//uint32_t maxDrawIndexedIndexValue;
8181
uint32_t maxDrawIndirectCount = 0u;
8282
float maxSamplerLodBias = 0.0f;
83-
uint8_t maxSamplerAnisotropyLog2 = 0u;
83+
uint32_t maxSamplerAnisotropyLog2 = 0u;
8484
uint32_t maxViewports = 0u;
8585
uint32_t maxViewportDims[2] = {};
8686
float viewportBoundsRange[2] = { 0.0f, 0.0f};

src/nbl/asset/utils/CHLSLCompiler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,12 @@ std::string CHLSLCompiler::preprocessShader(std::string&& code, IShader::E_SHADE
338338
// now define them as "NBL_GLSL_LIMIT_MAX_IMAGE_DIMENSION_1D=32768"
339339
// to match boost wave syntax
340340
// https://www.boost.org/doc/libs/1_82_0/libs/wave/doc/class_reference_context.html#:~:text=Maintain%20defined%20macros-,add_macro_definition,-bool%20add_macro_definition
341-
/* for (auto iter = preprocessOptions.extraDefines.begin(); iter != preprocessOptions.extraDefines.end(); iter++)
342-
context.add_macro_definition(*iter); */
341+
for (auto iter = preprocessOptions.extraDefines.begin(); iter != preprocessOptions.extraDefines.end(); iter++)
342+
context.add_macro_definition(*iter);
343343

344344
// preprocess
345345
std::stringstream stream = std::stringstream();
346-
for (auto i = context.begin(); i != context.end(); i++) {
346+
for (auto i = context.begin(); i != context.end(); i++) {
347347
stream << i->get_value();
348348
std::cout<< i->get_value();
349349
}

0 commit comments

Comments
 (0)