Skip to content

Commit

Permalink
gpu: fix cl compilation on amd gpus
Browse files Browse the repository at this point in the history
error: call to 'mix' is ambiguous
    float h1 = mix(tile_height(tileHeightImage, plane, sx, sz), tile_height(tileHeightImage, plane, sx + 1, sz), fract(fx, &it));
  • Loading branch information
Adam- committed Dec 31, 2023
1 parent 3fda9ee commit 7935a76
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ float4 hillskew_vertex(read_only image3d_t tileHeightImage, float4 v, int hillsk
int sx = (int)(floor(fx));
int sz = (int)(floor(fz));
float it;
float h1 = mix(tile_height(tileHeightImage, plane, sx, sz), tile_height(tileHeightImage, plane, sx + 1, sz), fract(fx, &it));
float h2 = mix(tile_height(tileHeightImage, plane, sx, sz + 1), tile_height(tileHeightImage, plane, sx + 1, sz + 1), fract(fx, &it));
float h1 = mix((float)tile_height(tileHeightImage, plane, sx, sz), (float)tile_height(tileHeightImage, plane, sx + 1, sz), fract(fx, &it));
float h2 = mix((float)tile_height(tileHeightImage, plane, sx, sz + 1), (float)tile_height(tileHeightImage, plane, sx + 1, sz + 1), fract(fx, &it));
float h3 = mix(h1, h2, fract(fz, &it));
return (float4)(v.x, v.y + (int)(h3)-y, v.z, v.w);
} else {
Expand Down

0 comments on commit 7935a76

Please sign in to comment.