[Mesa-dev] [Bug 109617] [oland, clover, llvm5] While-If Problem with Booleans
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Feb 12 22:49:00 UTC 2019
https://bugs.freedesktop.org/show_bug.cgi?id=109617
Jan Vesely <jan.vesely at rutgers.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |99553
Summary|Gallium OpenCL: While-If |[oland, clover, llvm5]
|Problem with Booleans |While-If Problem with
| |Booleans
--- Comment #1 from Jan Vesely <jan.vesely at rutgers.edu> ---
please don't use text upload sites. either post in a comment or add as an
attachment.
kernel code:
#ifndef TEST_KERNEL_CL
#define TEST_KERNEL_CL
__kernel void
test_kernel_1(__global float4 *result)
{
bool flag = false;
//uint flag = false;
uint gid = get_global_id(0);
float rnd;
uint i = 0;
#define VARIANT 1
#if (VARIANT == 1)
while ((i < 2) && (flag == false)){
rnd = sin((float)(gid + i)) + 0.1;
if ((rnd * rnd)<=0.5){flag=true;}
i++;
}
#elif (VARIANT == 2)
for (i = 0; i < 2; i++){
if (flag == false){
rnd = sin((float)(gid + i)) + 0.1;
if ((rnd * rnd)<=0.5){flag=true; i++; break;}
}
}
#endif
if(flag){
result[gid].x = rnd;
}
result[gid].y = (float)i;
}
#endif
Referenced Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=99553
[Bug 99553] Tracker bug for runnning OpenCL applications on Clover
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190212/e86afff8/attachment.html>
More information about the mesa-dev
mailing list