https://bugs.freedesktop.org/show_bug.cgi?id=109617

Jan Vesely <jan.ves...@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.ves...@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.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to