Skip to content

Commit 388de5f

Browse files
authored
Correct type for double log10 (shader-slang#4550)
Fixes shader-slang#4549
1 parent 40a4022 commit 388de5f

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

prelude/slang-cpp-scalar-intrinsics.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ double F64_cosh(double f);
266266
double F64_tanh(double f);
267267
double F64_log2(double f);
268268
double F64_log(double f);
269-
double F64_log10(float f);
269+
double F64_log10(double f);
270270
double F64_exp2(double f);
271271
double F64_exp(double f);
272272
double F64_abs(double f);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//TEST(compute):COMPARE_COMPUTE:-cpu -output-using-type
2+
3+
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
4+
RWStructuredBuffer<int> outputBuffer;
5+
6+
[numthreads(4, 1, 1)]
7+
void computeMain(in uint i : SV_GroupIndex)
8+
{
9+
outputBuffer[i] = int(log10(double(i) + 1.0) * 100);
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type: int32_t
2+
0
3+
30
4+
47
5+
60

0 commit comments

Comments
 (0)