Skip to content

fix clang warnings #867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
849c92f
fix -Wunreachable-code-break warnings
YasInvolved Apr 11, 2025
6ba57a5
stop using deprecated header (codecvt)
YasInvolved Apr 11, 2025
a28b584
Merge branch 'ali_clang' of github.com:Devsh-Graphics-Programming/Nab…
YasInvolved Apr 25, 2025
3208768
-Wzero-as-null-pointer-constant fixed
YasInvolved Apr 26, 2025
805b139
use nbl:hlsl::isPoT instead of deprecated nbl::core::isPoT
YasInvolved Apr 30, 2025
d115839
initialize variables, replaced logical OR operator placed by mistake …
YasInvolved Apr 30, 2025
3630e39
use bindImageMemory with std::span instead of deprecated pointer + co…
YasInvolved Apr 30, 2025
833cb6e
use hlsl::PoT instead of core::PoT
YasInvolved Apr 30, 2025
cb2907c
use chrono structures instead of unsafe std::localtime
YasInvolved Apr 30, 2025
a47a1a4
fix more deprecation warnings
YasInvolved May 15, 2025
5863dbf
comment out unused variables, fix "use template keyword to treat x as…
YasInvolved May 16, 2025
3f7dd84
use validationsDisable variable
YasInvolved May 16, 2025
261c6d3
remove or comment out unused variables
YasInvolved May 19, 2025
d5419ae
fix uninitialized fields and unused type alias
YasInvolved May 22, 2025
59bef13
correct initialization order in ctor, fix -Wpessimizing-move
YasInvolved May 22, 2025
fef0034
fixed all warnings in ILogicalDevice.cpp + fixed missing brackets and…
YasInvolved May 29, 2025
0e0c86c
fixed ILogger.h
YasInvolved May 31, 2025
6c1fd49
fix blake.h and bitflag.h
YasInvolved May 31, 2025
337d20c
fix -Wpragma-pack, fix -Wmissing-braces
YasInvolved Jun 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/nbl/core/alloc/AddressAllocatorBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace core
// pointer to reserved memory has to be aligned to SIMD types!
assert((reinterpret_cast<size_t>(reservedSpace)&(_NBL_SIMD_ALIGNMENT-1u))==0ull);
assert(maxAllocatableAlignment);
assert(core::isPoT(maxRequestableAlignment)); // this is not a proper alignment value
assert(hlsl::isPoT(maxRequestableAlignment)); // this is not a proper alignment value
#endif // _NBL_DEBUG
}
AddressAllocatorBase(CRTP&& other, void* newReservedSpc)
Expand Down
8 changes: 6 additions & 2 deletions include/nbl/core/hash/blake.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

#include <span>

#define __NBL_CORE_BLAKE3_FUNCTION_STR(x) #x
#define __NBL_CORE_BLAKE3_FUNCTION_STRINGIFY(x) __NBL_CORE_BLAKE3_FUNCTION_STR(x)

namespace nbl::core
{
struct blake3_hash_t final
Expand All @@ -29,7 +32,8 @@ class NBL_API2 blake3_hasher final
// unfortunately there's no concept like StandardLayout or Aggregate for "just structs/classes of non-pointer types" so need to play it safe
constexpr bool ForbiddenType = std::is_compound_v<T> || std::is_enum_v<T> || std::is_class_v<T>;
// use __FUNCTION__ to print something with `T` to the error log
static_assert(!ForbiddenType, __FUNCTION__ "Hashing Specialization for this Type is not implemented!");

static_assert(!ForbiddenType, __NBL_CORE_BLAKE3_FUNCTION_STRINGIFY(__FUNCTION__) "Hashing Specialization for this Type is not implemented!");
hasher.update(&input,sizeof(input));
}
};
Expand Down Expand Up @@ -102,7 +106,7 @@ struct hash<nbl::core::blake3_hash_t>
{
auto* as_p_uint64_t = reinterpret_cast<const size_t*>(blake3.data);
size_t retval = as_p_uint64_t[0];
for (auto i=1; i<BLAKE3_OUT_LEN/sizeof(size_t); i++)
for (size_t i=1; i<BLAKE3_OUT_LEN/sizeof(size_t); i++)
retval ^= as_p_uint64_t[i] + 0x9e3779b97f4a7c15ull + (retval << 6) + (retval >> 2);
return retval;
}
Expand Down
6 changes: 3 additions & 3 deletions include/nbl/core/memory/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef __NBL_CORE_MEMORY_H_INCLUDED__
#define __NBL_CORE_MEMORY_H_INCLUDED__

#include "nbl/core/math/intutil.h"
#include "nbl/builtin/hlsl/math/intutil.hlsl"

#include <typeinfo>
#include <cstddef>
Expand Down Expand Up @@ -79,13 +79,13 @@ constexpr inline size_t alignDown(size_t value, size_t alignment)
//! Valid alignments are power of two
constexpr inline bool is_alignment(size_t value)
{
return core::isPoT(value);
return hlsl::isPoT(value);
}

//!
constexpr inline bool is_aligned_to(size_t value, size_t alignment)
{
return core::isPoT(alignment)&&((value&(alignment-1ull))==0ull);
return hlsl::isPoT(alignment)&&((value&(alignment-1ull))==0ull);
}
// clang complains about constexpr so make normal for now (also complains abour reinterpret_cast)
inline bool is_aligned_to(const void* value, size_t alignment)
Expand Down
1 change: 1 addition & 0 deletions include/nbl/core/util/bitflag.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ struct bitflag final
explicit constexpr operator bool() const {return bool(value);}
constexpr bool operator!=(const bitflag<ENUM_TYPE> rhs) const {return value!=rhs.value;}
constexpr bool operator==(const bitflag<ENUM_TYPE> rhs) const {return value==rhs.value;}
auto operator<=>(const bitflag<ENUM_TYPE>& rhs) const = default;
constexpr bool hasFlags(const bitflag<ENUM_TYPE> val) const {return (static_cast<UNDERLYING_TYPE>(value) & static_cast<UNDERLYING_TYPE>(val.value)) == static_cast<UNDERLYING_TYPE>(val.value);}
constexpr bool hasAnyFlag(const bitflag<ENUM_TYPE> val) const {return (static_cast<UNDERLYING_TYPE>(value) & static_cast<UNDERLYING_TYPE>(val.value)) != static_cast<UNDERLYING_TYPE>(0);}
};
Expand Down
5 changes: 3 additions & 2 deletions include/nbl/nblpack.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
#if defined(_MSC_VER) || defined(__GNUC__) || defined(__clang__)
# ifdef _MSC_VER
# pragma warning(disable: 4103)
# elif defined(__clang__)
# pragma clang diagnostic ignored "-Wpragma-pack"
# endif
# ifdef __clang__
# pragma clang diagnostic ignored "-Wpragma-pack"
# endif
# pragma pack( push, packing )
# pragma pack( 1 )
// TODO: Remove PACK_STRUCT from the engine
Expand Down
4 changes: 3 additions & 1 deletion include/nbl/system/IAsyncQueueDispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "nbl/core/declarations.h"

#include "nbl/builtin/hlsl/math/intutil.hlsl"

#include "nbl/system/IThreadHandler.h"
#include "nbl/system/atomic_state.h"

Expand Down Expand Up @@ -416,7 +418,7 @@ template<typename CRTP, typename request_metadata_t, uint32_t BufferSize=256u, t
class IAsyncQueueDispatcher : public IThreadHandler<CRTP,InternalStateType>, protected impl::IAsyncQueueDispatcherBase
{
static_assert(BufferSize>0u, "BufferSize must not be 0!");
static_assert(core::isPoT(BufferSize), "BufferSize must be power of two!");
static_assert(hlsl::isPoT(BufferSize), "BufferSize must be power of two!");

protected:
using base_t = IThreadHandler<CRTP,InternalStateType>;
Expand Down
14 changes: 9 additions & 5 deletions include/nbl/system/ILogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ class ILogger : public core::IReferenceCounted
ELL_ALL = 31
};

inline void log(const std::string_view& fmtString, E_LOG_LEVEL logLevel = ELL_DEBUG, ...)
inline void log(const std::string_view fmtString, unsigned int logLevel = ELL_DEBUG, ...)
{
if (logLevel & m_logLevelMask.value)
{
va_list args;
va_start(args, logLevel);
log_impl(fmtString, logLevel, args);
log_impl(fmtString, static_cast<E_LOG_LEVEL>(logLevel), args);
va_end(args);
}
}
Expand All @@ -60,7 +60,6 @@ class ILogger : public core::IReferenceCounted
using namespace std::literals;
using namespace std::chrono;
auto currentTime = std::chrono::system_clock::now();
const std::time_t t = std::chrono::system_clock::to_time_t(currentTime);

// Since there is no real way in c++ to get current time with microseconds, this is my weird approach
auto time_since_epoch = duration_cast<microseconds>(system_clock::now().time_since_epoch());
Expand All @@ -70,11 +69,14 @@ class ILogger : public core::IReferenceCounted
// This while is for the microseconds which are less that 6 digits long to be aligned with the others
while (time_since_epoch.count() / 100000 == 0) time_since_epoch *= 10;

auto time = std::localtime(&t);
auto local_tp = zoned_time(current_zone(), currentTime).get_local_time();
auto dp = floor<days>(local_tp);
year_month_day date{ dp };
hh_mm_ss time{ local_tp - dp };

constexpr size_t DATE_STR_LENGTH = 28;
std::string timeStr(DATE_STR_LENGTH, '\0');
sprintf(timeStr.data(), "[%02d.%02d.%d %02d:%02d:%02d:%d]", time->tm_mday, time->tm_mon + 1, 1900 + time->tm_year, time->tm_hour, time->tm_min, time->tm_sec, (int)time_since_epoch.count());
sprintf(timeStr.data(), "[%02d.%02d.%d %02d:%02d:%02d:%d]", unsigned(date.day()), unsigned(date.month()), int(date.year()), time.hours().count(), time.minutes().count(), (int)time.seconds().count(), (int)time_since_epoch.count());

std::string messageTypeStr;
switch (logLevel)
Expand All @@ -96,6 +98,8 @@ class ILogger : public core::IReferenceCounted
break;
case ELL_NONE:
return "";
default:
break;
}

va_list testArgs; // copy of va_list since it is not safe to use it twice
Expand Down
4 changes: 3 additions & 1 deletion include/nbl/system/SBuiltinFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ namespace nbl::system
.tm_mday = 9,
.tm_mon = 6,
.tm_year = 9,
.tm_isdst = 0
.tm_wday = 0,
.tm_yday = 0,
.tm_isdst = 0,
};
};
}
Expand Down
3 changes: 2 additions & 1 deletion include/nbl/video/IGPUAccelerationStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "nbl/video/IGPUBuffer.h"

#include "nbl/builtin/hlsl/acceleration_structures.hlsl"
#include "nbl/builtin/hlsl/math/intutil.hlsl"


namespace nbl::video
Expand Down Expand Up @@ -228,7 +229,7 @@ class IGPUBottomLevelAccelerationStructure : public asset::IBottomLevelAccelerat

const size_t vertexSize = asset::getTexelOrBlockBytesize(geometry.vertexFormat);
// TODO: improve in line with the spec https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-03711
const size_t vertexAlignment = core::max(core::roundDownToPoT(vertexSize/asset::getFormatChannelCount(geometry.vertexFormat)),1ull);
const size_t vertexAlignment = core::max(hlsl::roundDownToPoT(vertexSize/asset::getFormatChannelCount(geometry.vertexFormat)),1ull);
// https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkAccelerationStructureGeometryTrianglesDataKHR-vertexStride-03735
if (!core::is_aligned_to(geometry.vertexStride,vertexAlignment))
return false;
Expand Down
2 changes: 1 addition & 1 deletion include/vectorSIMD.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ namespace core
public std::conditional_t<components==4, SIMD_32bitSwizzleAble<vectorSIMDBool<components>, __m128i>, impl::empty_base>
{
typedef impl::vectorSIMDIntBase<vectorSIMDBool<components> > Base;
static_assert(core::isPoT(components)&&components<=16u,"Wrong number of components!\n");
static_assert(hlsl::isPoT(components)&&components<=16u,"Wrong number of components!\n");
public:
using Base::Base;

Expand Down
2 changes: 1 addition & 1 deletion src/nbl/asset/IAssetManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ std::function<void(SAssetBundle&)> nbl::asset::makeAssetGreetFunc(const IAssetMa
{
return [_mgr](SAssetBundle& _asset) {
_mgr->setAssetCached(_asset, true);
auto rng = _asset.getContents();
// auto rng = _asset.getContents();
//assets being in the cache must be immutable
//asset mutability is changed just before insertion by inserting methods of IAssetManager
//for (auto ass : rng)
Expand Down
2 changes: 1 addition & 1 deletion src/nbl/asset/ICPUImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class CFlattenRegionsStreamHashImageFilter : public CMatchedSizeInOutImageFilter
if (!state->scratch.memory)
return false;

const auto& parameters = state->inImage->getCreationParameters();
// const auto& parameters = state->inImage->getCreationParameters();

if (state->scratch.size != state_type::getRequiredScratchByteSize(state->inImage))
return false;
Expand Down
3 changes: 1 addition & 2 deletions src/nbl/asset/interchange/CGLILoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ namespace nbl
return {};

const gli::gl glVersion(gli::gl::PROFILE_GL33);
const auto target = glVersion.translate(texture.target());
const auto format = getTranslatedGLIFormat(texture, glVersion, _params.logger);
IImage::E_TYPE imageType;
IImageView<ICPUImage>::E_TYPE imageViewType;
Expand Down Expand Up @@ -105,6 +104,7 @@ namespace nbl
}
default:
{
imageType = IImage::ET_1D; // suppress -Wsometimes-uninitialized by setting whatever value
imageViewType = ICPUImageView::ET_COUNT;
assert(0);
break;
Expand All @@ -115,7 +115,6 @@ namespace nbl
const bool layersFlag = doesItHaveLayers(imageViewType);

const auto texelBlockDimension = asset::getBlockDimensions(format.first);
const auto texelBlockByteSize = asset::getTexelOrBlockBytesize(format.first);
auto texelBuffer = ICPUBuffer::create({ texture.size() });
auto data = reinterpret_cast<uint8_t*>(texelBuffer->getPointer());

Expand Down
3 changes: 2 additions & 1 deletion src/nbl/asset/interchange/CGraphicsPipelineLoaderMTL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "nbl/system/CFileView.h"

#include "nbl/builtin/MTLdefaults.h"
#include "nbl/builtin/hlsl/math/intutil.hlsl"



Expand Down Expand Up @@ -619,7 +620,7 @@ CGraphicsPipelineLoaderMTL::image_views_set_t CGraphicsPipelineLoaderMTL::loadIm
assert(images[i]->getRegions().size()==1ull);

regions_.push_back(images[i]->getRegions().begin()[0]);
regions_.back().bufferOffset = core::roundUp(regions_.back().bufferOffset, alignment);
regions_.back().bufferOffset = hlsl::roundUp(regions_.back().bufferOffset, alignment);
regions_.back().imageSubresource.baseArrayLayer = (i - CMTLMetadata::CRenderpassIndependentPipeline::EMP_REFL_POSX);

bufSz += images[i]->getImageDataSizeInBytes();
Expand Down
3 changes: 0 additions & 3 deletions src/nbl/asset/interchange/CImageLoaderJPG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,12 @@ asset::SAssetBundle CImageLoaderJPG::loadAsset(system::IFile* _file, const asset
case JCS_CMYK:
_params.logger.log("CMYK color space is unsupported:", system::ILogger::ELL_ERROR, _file->getFileName().string());
return {};
break;
case JCS_YCCK: // this I have no resources on
_params.logger.log("YCCK color space is unsupported: %s", system::ILogger::ELL_ERROR, _file->getFileName().string().c_str());
return {};
break;
default:
_params.logger.log("Can't load as color space is unknown: %s", system::ILogger::ELL_ERROR, _file->getFileName().string().c_str());
return {};
break;
}
cinfo.do_fancy_upsampling = TRUE;

Expand Down
6 changes: 3 additions & 3 deletions src/nbl/asset/interchange/CImageLoaderOpenEXR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ SAssetBundle CImageLoaderOpenEXR::loadAsset(system::IFile* _file, const asset::I
const auto mapOfChannels = data.second;
PerImageData perImageData;

int width;
int height;
int width = 0;
int height = 0;

auto params = perImageData.params;
params.format = specifyIrrlichtEndFormat(mapOfChannels, suffixOfChannels, file.fileName(), _params.logger);
Expand Down Expand Up @@ -562,7 +562,7 @@ bool readHeader(IMF::IStream* nblIStream, SContext& ctx)
return false;

auto& attribs = ctx.attributes;
auto& versionField = ctx.versionField;
// auto& versionField = ctx.versionField;

/*

Expand Down
2 changes: 0 additions & 2 deletions src/nbl/asset/interchange/CPLYMeshWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ void CPLYMeshWriter::writeBinary(const asset::ICPUMeshBuffer* _mbuf, size_t _vtx
for (size_t i = 0u; i < _vtxCount; ++i)
{
core::vectorSIMDf f;
uint32_t ui[4];
if (_vaidToWrite[0])
{
writeAttribBinary(context, mbCopy.get(), 0, i, 3u, flipVectors);
Expand Down Expand Up @@ -356,7 +355,6 @@ void CPLYMeshWriter::writeText(const asset::ICPUMeshBuffer* _mbuf, size_t _vtxCo
for (size_t i = 0u; i < _vtxCount; ++i)
{
core::vectorSIMDf f;
uint32_t ui[4];
if (_vaidToWrite[0])
{
writefunc(0, i, 3u);
Expand Down
9 changes: 5 additions & 4 deletions src/nbl/asset/interchange/CSTLMeshWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// See the original file in irrlicht source for authors
#include "nbl/system/ISystem.h"
#include "nbl/system/IFile.h"
#include <nbl/builtin/hlsl/math/intutil.hlsl>

#include "CSTLMeshWriter.h"
#include "SColor.h"
Expand All @@ -12,10 +13,10 @@ using namespace nbl;
using namespace nbl::asset;

#ifdef _NBL_COMPILE_WITH_STL_WRITER_
constexpr auto POSITION_ATTRIBUTE = 0;
// constexpr auto POSITION_ATTRIBUTE = 0;
constexpr auto COLOR_ATTRIBUTE = 1;
constexpr auto UV_ATTRIBUTE = 2;
constexpr auto NORMAL_ATTRIBUTE = 3;
// constexpr auto UV_ATTRIBUTE = 2;
// constexpr auto NORMAL_ATTRIBUTE = 3;

CSTLMeshWriter::CSTLMeshWriter()
{
Expand Down Expand Up @@ -67,7 +68,7 @@ template <class I>
inline void writeFacesBinary(const asset::ICPUMeshBuffer* buffer, const bool& noIndices, system::IFile* file, uint32_t _colorVaid, IAssetWriter::SAssetWriteContext* context, size_t* fileOffset)
{
auto& inputParams = buffer->getPipeline()->getCachedCreationParams().vertexInput;
bool hasColor = inputParams.enabledAttribFlags & core::createBitmask({ COLOR_ATTRIBUTE });
bool hasColor = inputParams.enabledAttribFlags & hlsl::createBitmask({ COLOR_ATTRIBUTE });
const asset::E_FORMAT colorType = static_cast<asset::E_FORMAT>(hasColor ? inputParams.attributes[COLOR_ATTRIBUTE].format : asset::EF_UNKNOWN);

const uint32_t indexCount = buffer->getIndexCount();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#include <nbl/asset/material_compiler/CMaterialCompilerGLSLBackendCommon.h>

#include <iostream>
#include <nbl/asset/material_compiler/CMaterialCompilerGLSLBackendCommon.h>

#include <nbl/builtin/hlsl/math/intutil.hlsl>

namespace nbl
{
Expand Down Expand Up @@ -303,7 +304,7 @@ class ITraversalGenerator
subres.layerCount = 1u;
subres.baseMipLevel = 0u;
const uint32_t mx = std::max(extent.width, extent.height);
const uint32_t round = core::roundUpToPoT<uint32_t>(mx);
const uint32_t round = hlsl::roundUpToPoT<uint32_t>(mx);
const int32_t lsb = hlsl::findLSB(round);
subres.levelCount = static_cast<uint32_t>(lsb + 1);

Expand Down Expand Up @@ -1232,16 +1233,12 @@ auto CMaterialCompilerGLSLBackendCommon::compile(SContext* _ctx, IR* _ir, E_GENE
{
case EGST_PRESENT:
return 4u;
break;
// When desiring Albedo and Normal Extraction, one needs to use extra registers for albedo, normal and throughput scale
case EGST_PRESENT_WITH_AOV_EXTRACTION:
// TODO: investigate whether using 10-16bit storage (fixed point or half float) makes execution faster, because
// albedo could fit in 1.5 DWORDs as 16bit (or 1 DWORDs as 10 bit), normal+throughput scale in 2 DWORDs as half floats or 16 bit snorm
// and value/pdf is a low dynamic range so half float could be feasible! Giving us a total register count of 5 DWORDs.
return 11u;
break;
default:
break;
}
// only colour contribution
return 3u;
Expand Down Expand Up @@ -1483,7 +1480,7 @@ void material_compiler::CMaterialCompilerGLSLBackendCommon::debugPrint(std::ostr
using namespace tex_prefetch;

const instr_stream::tex_prefetch::prefetch_instr_t& instr = _res.prefetch_stream[tex_prefetch.first + i];
const auto& vtid = instr.s.tex_data.vtid;
// const auto& vtid = instr.s.tex_data.vtid;

_out << "### instr " << i << "\n";
const uint32_t reg_cnt = instr.getRegCnt();
Expand Down Expand Up @@ -1511,9 +1508,6 @@ void material_compiler::CMaterialCompilerGLSLBackendCommon::debugPrint(std::ostr

void material_compiler::CMaterialCompilerGLSLBackendCommon::debugPrintInstr(std::ostream& _out, instr_t instr, const result_t& _res, const SContext* _ctx) const
{
auto texDataStr = [](const instr_stream::STextureData& td) {
return "{ " + std::to_string(reinterpret_cast<const uint64_t&>(td.vtid)) + ", " + std::to_string(reinterpret_cast<const float&>(td.scale)) + " }";
};
auto paramVal3OrRegStr = [](const instr_stream::STextureOrConstant& tc, bool tex) -> std::string {
if (tex)
return std::to_string(tc.prefetch);
Expand Down
1 change: 0 additions & 1 deletion src/nbl/asset/utils/CCompilerSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ core::smart_refctd_ptr<ICPUShader> CCompilerSet::preprocessShader(const ICPUShad
auto resolvedCode = m_GLSLCompiler->preprocessShader(code, stage, preprocessOptions);
return core::make_smart_refctd_ptr<ICPUShader>(resolvedCode.c_str(), stage, IShader::E_CONTENT_TYPE::ECT_GLSL, std::string(shader->getFilepathHint()));
}
break;
case IShader::E_CONTENT_TYPE::ECT_SPIRV:
return core::smart_refctd_ptr<ICPUShader>(const_cast<ICPUShader*>(shader));
default:
Expand Down
Loading