Skip to content

Commit 6ef7ab4

Browse files
committed
Minor fixes
1 parent 1d98ea5 commit 6ef7ab4

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

.gitea/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ jobs:
192192
with:
193193
bin-dir: "windows-x86_64"
194194
out-dir: "windows-x86_64-gpu-uhd-output"
195-
test-args: "--device UHD --nocpu --nodx"
195+
test-args: "--device UHD --nocpu --nodx -vl 0"
196196
- name: Upload artifacts
197197
uses: actions/upload-artifact@v3
198198
if: always()

.gitea/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ jobs:
388388
with:
389389
bin-dir: "windows-x86_64"
390390
out-dir: "windows-x86_64-gpu-uhd-output"
391-
test-args: "--full --device UHD --nocpu --nodx"
391+
test-args: "--full --device UHD --nocpu --nodx -vl 0"
392392
- name: Upload artifacts
393393
uses: actions/upload-artifact@v3
394394
if: always()

internal/CoreRef.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,8 +1290,8 @@ float Ray::Ref::SampleSphericalTriangle(const fvec4 &P, const fvec4 &p1, const f
12901290

12911291
// Compute the s coordinate as normalized arc length from A to C_s
12921292
const float denom = ((v * p + u * q) * sinf(alpha));
1293-
const float s =
1294-
(1.0f / b) * portable_acosf(clamp(safe_div(((v * q - u * p) * cosf(alpha) - v), denom), -1.0f, 1.0f));
1293+
const float s = safe_div(1.0f, b) *
1294+
portable_acosf(clamp(safe_div(((v * q - u * p) * cosf(alpha) - v), denom), -1.0f, 1.0f));
12951295

12961296
// Compute the third vertex of the sub - triangle
12971297
const fvec4 C_s = slerp(A, C, s);

internal/CoreSIMD.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6586,7 +6586,7 @@ void Ray::NS::Evaluate_LightColor(const fvec<S> P[3], const ray_data_t<S> &ray,
65866586
const float *light_pos = l.sph.pos;
65876587
fvec<S> disk_normal[3] = {light_pos[0] - ray.o[0], light_pos[1] - ray.o[1], light_pos[2] - ray.o[2]};
65886588
const fvec<S> d = normalize(disk_normal);
6589-
const ivec<S> mask = simd_cast(d > l.sph.radius);
6589+
const ivec<S> temp_mask = simd_cast(d > l.sph.radius);
65906590

65916591
const fvec<S> temp = safe_sqrt(d * d - l.sph.radius * l.sph.radius);
65926592
const fvec<S> disk_radius = (temp * l.sph.radius) / d;
@@ -6600,7 +6600,7 @@ void Ray::NS::Evaluate_LightColor(const fvec<S> P[3], const ray_data_t<S> &ray,
66006600
const fvec<S> bsdf_pdf = ray.pdf;
66016601

66026602
const fvec<S> mis_weight = power_heuristic(bsdf_pdf, light_pdf);
6603-
UNROLLED_FOR(i, 3, { where(mask, lcol[i]) *= mis_weight; })
6603+
UNROLLED_FOR(i, 3, { where(temp_mask, lcol[i]) *= mis_weight; })
66046604

66056605
if (l.sph.spot > 0.0f && l.sph.blend > 0.0f) {
66066606
const fvec<S> _dot = -(ray.d[0] * l.sph.dir[0] + ray.d[1] * l.sph.dir[1] + ray.d[2] * l.sph.dir[2]);

internal/PMJ.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ Ray::aligned_vector<Ray::Ref::dvec2> Ray::GeneratePMJSamples(const unsigned int
106106
return Ref::dvec2{uniform_real(gen, dparam_x), uniform_real(gen, dparam_y)};
107107
};
108108

109-
auto generate_new_sample = [&](const int x_pos, const int y_pos, const int candidates) {
109+
auto generate_new_sample = [&](const int sample_x_pos, const int sample_y_pos, const int candidates) {
110110
std::vector<int> valid_offsets_x, valid_offsets_y;
111-
GetValidOffsets(x_pos, y_pos, strata, valid_offsets_x, valid_offsets_y);
111+
GetValidOffsets(sample_x_pos, sample_y_pos, strata, valid_offsets_x, valid_offsets_y);
112112

113113
if (candidates == 1) {
114114
return get_sample_candidate(valid_offsets_x, valid_offsets_y);
115115
} else {
116116
Ref::dvec2 best_candidate = {};
117117
double max_min_dist_sq = 0.0;
118-
for (int i = 0; i < candidates; ++i) {
118+
for (int c = 0; c < candidates; ++c) {
119119
const Ref::dvec2 candidate = get_sample_candidate(valid_offsets_x, valid_offsets_y);
120120

121121
const int x_pos = int(candidate.get<0>() * dim), y_pos = int(candidate.get<1>() * dim);

tests/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ int main(int argc, char *argv[]) {
173173
} else if (strcmp(argv[i], "--arch") == 0 && (++i != argc)) {
174174
preferred_arch[0] = argv[i];
175175
} else if (strcmp(argv[i], "-j") == 0 && (++i != argc)) {
176-
threads_count = atoi(argv[++i]);
176+
threads_count = atoi(argv[i]);
177177
} else if (strncmp(argv[i], "-j", 2) == 0) {
178178
threads_count = atoi(&argv[i][2]);
179179
} else if (strcmp(argv[i], "--time_limit") == 0 && (++i != argc)) {

0 commit comments

Comments
 (0)