Skip to content

Commit 7664479

Browse files
committed
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla into gpgpuimgui
2 parents ebe211d + 0de8b27 commit 7664479

File tree

10 files changed

+546
-147
lines changed

10 files changed

+546
-147
lines changed

3rdparty/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ option(_NBL_COMPILE_WITH_OPEN_EXR_ "Build with OpenEXR library" ON)
202202
# here is where _NBL_COMPILE_WITH_OPEN_EXR_ plays a role - when disabled OpenEXR won't be built and linked
203203
# but it's core
204204

205+
# for new build system it doesn't matter since we no more fetch content stuff, temporary to fix current master CMake clones
206+
set(OPENEXR_DEFLATE_REPO "[email protected]:ebiggers/libdeflate.git" CACHE STRING "Repo path for libdeflate source" FORCE)
207+
set(OPENEXR_IMATH_REPO "[email protected]:AcademySoftwareFoundation/Imath.git" CACHE STRING "Repo for auto-build of Imath" FORCE)
208+
205209
set(_OLD_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
206210
set(_OLD_BUILD_STATIC_LIBS ${BUILD_STATIC_LIBS})
207211
set(_OLD_BUILD_TESTING ${BUILD_TESTING})

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ git clone [email protected]:Devsh-Graphics-Programming/Nabla.git <target directory>
151151

152152
#### Force HTTPS protocol (optional)
153153

154-
We support cloning Nabla with **ssh only**, however you can still force clone with https for whole repository and it's all submodules by overriding project git config setup.
154+
We support cloning Nabla with **ssh only**, however you can still clone Nabla and it's all submodules with https by overriding global git configuration (sorry, must be global for it to work, currently we don't have smart scripts to change local configuration for each nested submodule).
155155

156156
```powershell
157157
git init
158-
git config --project protocol.*.allow always
159-
git config --project url."https://github.com/".insteadOf "[email protected]:"
158+
git config --global protocol.*.allow always
159+
git config --global url."https://github.com/".insteadOf "[email protected]:"
160160
git remote add origin https://github.com/Devsh-Graphics-Programming/Nabla.git
161161
git fetch origin master
162162
git checkout master

include/nbl/builtin/hlsl/complex.hlsl

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,24 @@ complex_t<Scalar> polar(const Scalar r, const Scalar theta)
361361
return retVal;
362362
}
363363

364+
365+
// --------------------------------------------- Some more functions that come in handy --------------------------------------
366+
// Fast mul by i
367+
template<typename Scalar>
368+
complex_t<Scalar> rotateLeft(NBL_CONST_REF_ARG(complex_t<Scalar>) value)
369+
{
370+
complex_t<Scalar> retVal = { -value.imag(), value.real() };
371+
return retVal;
372+
}
373+
374+
// Fast mul by -i
375+
template<typename Scalar>
376+
complex_t<Scalar> rotateRight(NBL_CONST_REF_ARG(complex_t<Scalar>) value)
377+
{
378+
complex_t<Scalar> retVal = { value.imag(), -value.real() };
379+
return retVal;
380+
}
381+
364382
}
365383
}
366384

@@ -378,23 +396,4 @@ NBL_REGISTER_OBJ_TYPE(complex_t<float64_t2>,::nbl::hlsl::alignment_of_v<float64_
378396
NBL_REGISTER_OBJ_TYPE(complex_t<float64_t3>,::nbl::hlsl::alignment_of_v<float64_t3>)
379397
NBL_REGISTER_OBJ_TYPE(complex_t<float64_t4>,::nbl::hlsl::alignment_of_v<float64_t4>)
380398

381-
382-
383-
--------------------------------------------- Some more functions that come in handy --------------------------------------
384-
// Fast mul by i
385-
template<typename Scalar>
386-
complex_t<Scalar> rotateLeft(NBL_CONST_REF_ARG(complex_t<Scalar>) value)
387-
{
388-
complex_t<Scalar> retVal = {- value.imag(), value.real()};
389-
return retVal;
390-
}
391-
392-
// Fast mul by -i
393-
template<typename Scalar>
394-
complex_t<Scalar> rotateRight(NBL_CONST_REF_ARG(complex_t<Scalar>) value)
395-
{
396-
complex_t<Scalar> retVal = {value.imag(), -value.real()};
397-
return retVal;
398-
}
399-
400399
#endif

include/nbl/builtin/hlsl/glsl_compat/core.hlsl

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -219,44 +219,16 @@ T bitfieldExtract( T val, uint32_t offsetBits, uint32_t numBits )
219219
return impl::bitfieldExtract<T, is_signed<T>::value, is_integral<T>::value>::__call(val,offsetBits,numBits);
220220
}
221221

222-
namespace impl
223-
{
224-
225-
template<typename T>
226-
struct bitfieldInsert
227-
{
228-
static T __call( T base, T insert, uint32_t offset, uint32_t count )
229-
{
230-
return spirv::bitFieldInsert<T>( base, insert, offset, count );
231-
}
232-
};
233-
234-
} //namespace impl
235-
236222
template<typename T>
237-
T bitfieldInsert( T base, T insert, uint32_t offset, uint32_t bits )
223+
T bitfieldInsert(T base, T insert, uint32_t offset, uint32_t bits)
238224
{
239-
return impl::bitfieldInsert<T>::__call(base, insert, offset, bits);
225+
return spirv::bitFieldInsert<T>(base, insert, offset, bits);
240226
}
241227

242-
namespace impl
243-
{
244-
245-
template<typename T>
246-
struct bitfieldReverse
247-
{
248-
static T __call( T base )
249-
{
250-
return spirv::bitFieldReverse<T>( base );
251-
}
252-
};
253-
254-
} //namespace impl
255-
256228
template<typename T>
257-
T bitfieldReverse( T value )
229+
T bitfieldReverse(T value)
258230
{
259-
return impl::bitfieldReverse<T>::__call(value);
231+
return spirv::bitFieldReverse<T>(value);
260232
}
261233

262234
#endif

include/nbl/logging_macros.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#if defined(NBL_LOG) || defined(NBL_LOG_ERROR)
2+
#error redefinition of NBL_LOG/NBL_LOG_ERROR. did you forgot to undefine logging macros somewhere? #include "nbl/undefine_logging_macros.h"
3+
#elif !defined(_GIT_INFO_H_INCLUDED_)
4+
#error logging macros require git meta info, include "git_info.h"
5+
#else
6+
#define NBL_LOG(SEVERITY, FORMAT, ...) NBL_LOG_FUNCTION(FORMAT" [%s][%s - %s:%d]", SEVERITY, __VA_ARGS__, nbl::gtml::nabla_git_info.commitShortHash, __FUNCTION__, __FILE__, __LINE__);
7+
#define NBL_LOG_ERROR(FORMAT, ...) NBL_LOG(nbl::system::ILogger::ELL_ERROR, FORMAT, __VA_ARGS__)
8+
#endif

include/nbl/undef_logging_macros.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#undef NBL_LOG
2+
#undef NBL_LOG_ERROR
3+
#undef NBL_LOG_FUNCTION

0 commit comments

Comments
 (0)