Skip to content

Commit 7d16cb2

Browse files
committed
fixed problems from merging master
1 parent 073a9f3 commit 7d16cb2

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

include/nbl/builtin/hlsl/bxdf/fresnel.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ struct iridescent_helper
617617
NBL_UNROLL for (int m=1; m<=2; ++m)
618618
{
619619
Cm *= r123p;
620-
Sm = hlsl::promote<vector_type>(2.0) * evalSensitivity(hlsl::promote<vector_type>(m)*D, hlsl::promote<vector_type>(m)*(phi23p+phi21p));
620+
Sm = hlsl::promote<vector_type>(2.0) * evalSensitivity(hlsl::promote<vector_type>(scalar_type(m))*D, hlsl::promote<vector_type>(scalar_type(m))*(phi23p+phi21p));
621621
I += Cm*Sm;
622622
}
623623

@@ -631,7 +631,7 @@ struct iridescent_helper
631631
NBL_UNROLL for (int m=1; m<=2; ++m)
632632
{
633633
Cm *= r123s;
634-
Sm = hlsl::promote<vector_type>(2.0) * evalSensitivity(hlsl::promote<vector_type>(m)*D, hlsl::promote<vector_type>(m) *(phi23s+phi21s));
634+
Sm = hlsl::promote<vector_type>(2.0) * evalSensitivity(hlsl::promote<vector_type>(scalar_type(m))*D, hlsl::promote<vector_type>(scalar_type(m)) *(phi23s+phi21s));
635635
I += Cm*Sm;
636636
}
637637

include/nbl/builtin/hlsl/cpp_compat/promote.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct Promote
2222
};
2323

2424
template<typename To, typename From> NBL_PARTIAL_REQ_TOP(concepts::Vectorial<To> && (concepts::IntegralLikeScalar<From> || concepts::FloatingPointLikeScalar<From>) && is_same_v<typename vector_traits<To>::scalar_type, From>)
25-
struct Promote<To, From NBL_PARTIAL_REQ_BOT(concepts::Vectorial<To> && is_scalar_v<From> && is_same_v<typename vector_traits<To>::scalar_type, From>) >
25+
struct Promote<To, From NBL_PARTIAL_REQ_BOT(concepts::Vectorial<To> && (concepts::IntegralLikeScalar<From> || concepts::FloatingPointLikeScalar<From>) && is_same_v<typename vector_traits<To>::scalar_type, From>) >
2626
{
2727
NBL_CONSTEXPR_FUNC To operator()(const From v)
2828
{

include/nbl/builtin/hlsl/spirv_intrinsics/core.hlsl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,6 @@ template<typename BooleanVector>
347347
[[vk::ext_instruction(spv::OpAny)]]
348348
enable_if_t<is_vector_v<BooleanVector>&& is_same_v<typename vector_traits<BooleanVector>::scalar_type, bool>, bool> any(BooleanVector vec);
349349

350-
// If Condition is a vector, ResultType must be a vector with the same number of components. Using (p -> q) = (~p v q)
351-
template<typename Condition, typename ResultType NBL_FUNC_REQUIRES(concepts::Boolean<Condition> && (! concepts::Vector<Condition> || (concepts::Vector<ResultType> && (extent_v<Condition> == extent_v<ResultType>))))
352-
[[vk::ext_instruction(spv::OpSelect)]]
353-
ResultType select(Condition condition, ResultType object1, ResultType object2);
354-
355350
template<typename T NBL_FUNC_REQUIRES(concepts::UnsignedIntegral<T>)
356351
[[vk::ext_instruction(spv::OpIAddCarry)]]
357352
AddCarryOutput<T> addCarry(T operand1, T operand2);

0 commit comments

Comments
 (0)