Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions devices/rtx/device/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ set(VISRTX_CUDA_COMPILE_OPTIONS
"-Xcudafe=--diag_suppress=20012"
# Silence the multitude of warnings about deprecated/to be removed GPU architectures
"-Wno-deprecated-gpu-targets"
# CUDA 13+ CCCL requires MSVC standard conforming preprocessor
"$<$<CXX_COMPILER_ID:MSVC>:-Xcompiler=/Zc:preprocessor>"
# Debug info support
"$<$<CONFIG:DEBUG>:-O0;-lineinfo>" # -G would be nice for debug, but does not work with glm...
"$<$<CONFIG:RELWITHDEBINFO>:-lineinfo>"
Expand Down
5 changes: 5 additions & 0 deletions devices/rtx/device/gpu/sampleLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
#include <cmath>
#include <limits>

// Windows.h is draw in by thread_search.cuh, so we need to undef OPAQUE
#ifdef OPAQUE
#undef OPAQUE
#endif

namespace visrtx {

// Light sampling result containing direction, distance, radiance and PDF
Expand Down
16 changes: 8 additions & 8 deletions devices/rtx/external/glm/include/glm/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> sign(vec<L, T, Q> const& x);
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> sign(vec<L, T, Q> const& x);

/// Returns a value equal to the nearest integer that is less then or equal to x.
///
Expand Down Expand Up @@ -306,13 +306,13 @@ namespace glm
/// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
/// @endcode
template<typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeT mix(genTypeT x, genTypeT y, genTypeU a);
GLM_FUNC_DECL GLM_CONSTEXPR genTypeT mix(genTypeT x, genTypeT y, genTypeU a);

template<length_t L, typename T, typename U, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, U, Q> const& a);
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, U, Q> const& a);

template<length_t L, typename T, typename U, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, U a);
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, U a);

/// Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType.
///
Expand Down Expand Up @@ -404,7 +404,7 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL int floatBitsToInt(float const& v);
GLM_FUNC_DECL int floatBitsToInt(float v);

/// Returns a signed integer value representing
/// the encoding of a floating-point value. The floatingpoint
Expand All @@ -424,7 +424,7 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL uint floatBitsToUint(float const& v);
GLM_FUNC_DECL uint floatBitsToUint(float v);

/// Returns a unsigned integer value representing
/// the encoding of a floating-point value. The floatingpoint
Expand All @@ -446,7 +446,7 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL float intBitsToFloat(int const& v);
GLM_FUNC_DECL float intBitsToFloat(int v);

/// Returns a floating-point value corresponding to a signed
/// integer encoding of a floating-point value.
Expand All @@ -470,7 +470,7 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL float uintBitsToFloat(uint const& v);
GLM_FUNC_DECL float uintBitsToFloat(uint v);

/// Returns a floating-point value corresponding to a
/// unsigned integer encoding of a floating-point value.
Expand Down
221 changes: 113 additions & 108 deletions devices/rtx/external/glm/include/glm/detail/_swizzle.hpp

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions devices/rtx/external/glm/include/glm/detail/_swizzle_func.hpp
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
#pragma once

#define GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, CONST, A, B) \
vec<2, T, Q> A ## B() CONST \
GLM_FUNC_QUALIFIER vec<2, T, Q> A ## B() CONST \
{ \
return vec<2, T, Q>(this->A, this->B); \
}

#define GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, CONST, A, B, C) \
vec<3, T, Q> A ## B ## C() CONST \
GLM_FUNC_QUALIFIER vec<3, T, Q> A ## B ## C() CONST \
{ \
return vec<3, T, Q>(this->A, this->B, this->C); \
}

#define GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, CONST, A, B, C, D) \
vec<4, T, Q> A ## B ## C ## D() CONST \
GLM_FUNC_QUALIFIER vec<4, T, Q> A ## B ## C ## D() CONST \
{ \
return vec<4, T, Q>(this->A, this->B, this->C, this->D); \
}

#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(T, P, L, CONST, A, B) \
template<typename T> \
vec<L, T, Q> vec<L, T, Q>::A ## B() CONST \
GLM_FUNC_QUALIFIER vec<L, T, Q> vec<L, T, Q>::A ## B() CONST \
{ \
return vec<2, T, Q>(this->A, this->B); \
}

#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(T, P, L, CONST, A, B, C) \
template<typename T> \
vec<3, T, Q> vec<L, T, Q>::A ## B ## C() CONST \
GLM_FUNC_QUALIFIER vec<3, T, Q> vec<L, T, Q>::A ## B ## C() CONST \
{ \
return vec<3, T, Q>(this->A, this->B, this->C); \
}

#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(T, P, L, CONST, A, B, C, D) \
template<typename T> \
vec<4, T, Q> vec<L, T, Q>::A ## B ## C ## D() CONST \
GLM_FUNC_QUALIFIER vec<4, T, Q> vec<L, T, Q>::A ## B ## C ## D() CONST \
{ \
return vec<4, T, Q>(this->A, this->B, this->C, this->D); \
}
Expand Down
68 changes: 68 additions & 0 deletions devices/rtx/external/glm/include/glm/detail/_vectorize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ namespace detail
{
return vec<1, T, Q>(Func(a.x, b.x));
}

template<typename Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<1, T, Q> call(Fct Func, vec<1, T, Q> const& a, vec<1, T, Q> const& b)
{
return vec<1, T, Q>(Func(a.x, b.x));
}
};

template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
Expand All @@ -61,6 +67,12 @@ namespace detail
{
return vec<2, T, Q>(Func(a.x, b.x), Func(a.y, b.y));
}

template<typename Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<2, T, Q> call(Fct Func, vec<2, T, Q> const& a, vec<2, T, Q> const& b)
{
return vec<2, T, Q>(Func(a.x, b.x), Func(a.y, b.y));
}
};

template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
Expand All @@ -70,6 +82,12 @@ namespace detail
{
return vec<3, T, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z));
}

template<class Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<3, T, Q> call(Fct Func, vec<3, T, Q> const& a, vec<3, T, Q> const& b)
{
return vec<3, T, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z));
}
};

template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
Expand All @@ -79,6 +97,12 @@ namespace detail
{
return vec<4, T, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w));
}

template<class Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<4, T, Q> call(Fct Func, vec<4, T, Q> const& a, vec<4, T, Q> const& b)
{
return vec<4, T, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w));
}
};

template<template<length_t L, typename T, qualifier Q> class vec, length_t L, typename T, qualifier Q>
Expand All @@ -91,6 +115,11 @@ namespace detail
{
return vec<1, T, Q>(Func(a.x, b));
}
template<class Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<1, T, Q> call(Fct Func, vec<1, T, Q> const& a, T b)
{
return vec<1, T, Q>(Func(a.x, b));
}
};

template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
Expand All @@ -100,6 +129,12 @@ namespace detail
{
return vec<2, T, Q>(Func(a.x, b), Func(a.y, b));
}

template<class Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<2, T, Q> call(Fct Func, vec<2, T, Q> const& a, T b)
{
return vec<2, T, Q>(Func(a.x, b), Func(a.y, b));
}
};

template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
Expand All @@ -109,6 +144,12 @@ namespace detail
{
return vec<3, T, Q>(Func(a.x, b), Func(a.y, b), Func(a.z, b));
}

template<class Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<3, T, Q> call(Fct Func, vec<3, T, Q> const& a, T b)
{
return vec<3, T, Q>(Func(a.x, b), Func(a.y, b), Func(a.z, b));
}
};

template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
Expand All @@ -118,6 +159,11 @@ namespace detail
{
return vec<4, T, Q>(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b));
}
template<class Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<4, T, Q> call(Fct Func, vec<4, T, Q> const& a, T b)
{
return vec<4, T, Q>(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b));
}
};

template<length_t L, typename T, qualifier Q>
Expand All @@ -130,6 +176,12 @@ namespace detail
{
return vec<1, int, Q>(Func(a.x, b.x));
}

template<class Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<1, int, Q> call(Fct Func, vec<1, T, Q> const& a, vec<1, int, Q> const& b)
{
return vec<1, int, Q>(Func(a.x, b.x));
}
};

template<typename T, qualifier Q>
Expand All @@ -139,6 +191,11 @@ namespace detail
{
return vec<2, int, Q>(Func(a.x, b.x), Func(a.y, b.y));
}
template<class Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<2, int, Q> call(Fct Func, vec<2, T, Q> const& a, vec<2, int, Q> const& b)
{
return vec<2, int, Q>(Func(a.x, b.x), Func(a.y, b.y));
}
};

template<typename T, qualifier Q>
Expand All @@ -148,6 +205,11 @@ namespace detail
{
return vec<3, int, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z));
}
template<class Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<3, int, Q> call(Fct Func, vec<3, T, Q> const& a, vec<3, int, Q> const& b)
{
return vec<3, int, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z));
}
};

template<typename T, qualifier Q>
Expand All @@ -157,6 +219,12 @@ namespace detail
{
return vec<4, int, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w));
}

template<class Fct>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<4, int, Q> call(Fct Func, vec<4, T, Q> const& a, vec<4, int, Q> const& b)
{
return vec<4, int, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w));
}
};
}//namespace detail
}//namespace glm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace detail
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x)
{
GLM_STATIC_ASSERT(
std::numeric_limits<genFIType>::is_iec559 || std::numeric_limits<genFIType>::is_signed,
std::numeric_limits<genFIType>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits<genFIType>::is_signed,
"'abs' only accept floating-point and integer scalar or vector inputs");

return x >= genFIType(0) ? x : -x;
Expand All @@ -28,7 +28,7 @@ namespace detail
template<>
struct compute_abs<float, true>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static float call(float x)
GLM_FUNC_QUALIFIER static float call(float x)
{
return fabsf(x);
}
Expand Down
Loading
Loading