Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix C compilation #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions ffx-spd/ffx_spd.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,14 @@ ASU1 mips // optional: if -1, calculate based on rect width and height
numWorkGroupsAndMips[0] = (dispatchThreadGroupCountXY[0]) * (dispatchThreadGroupCountXY[1]);

if (mips >= 0) {
numWorkGroupsAndMips[1] = AU1(mips);
numWorkGroupsAndMips[1] = (AU1)(mips);
} else { // calculate based on rect width and height
AU1 resolution = AMaxU1(rectInfo[2], rectInfo[3]);
numWorkGroupsAndMips[1] = AU1((AMinF1(AFloorF1(ALog2F1(AF1(resolution))), AF1(12))));
numWorkGroupsAndMips[1] = (AU1)((AMinF1(AFloorF1(ALog2F1((AF1)(resolution))), (AF1)(12))));
}
}

#ifdef __cplusplus
A_STATIC void SpdSetup(
outAU2 dispatchThreadGroupCountXY, // CPU side: dispatch thread group count xy
outAU2 workGroupOffset, // GPU side: pass in as constant
Expand All @@ -358,6 +359,7 @@ A_STATIC void SpdSetup(
) {
SpdSetup(dispatchThreadGroupCountXY, workGroupOffset, numWorkGroupsAndMips, rectInfo, -1);
}
#endif // #ifdef __cplusplus
#endif // #ifdef A_CPU
//==============================================================================================================================
// NON-PACKED VERSION
Expand Down