[Mesa-dev] [Bug 109603] nir_instr_as_deref: Assertion `parent && parent->type == nir_instr_type_deref' failed.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Feb 10 18:20:54 UTC 2019


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

--- Comment #1 from xbx <xavierb at gmail.com> ---
the hlsl code it was compiled from:

RWBuffer<uint>   Weights : register(u0);

struct SCtx
{
    uint        iList   ;
        uint    LightId ;
        float   LightW  ;
};

void LoadLight(in out SCtx C)
{
        const uint LightIdW = Weights[C.iList];
        C.LightId       = LightIdW & 0xFFFFFF;
        C.LightW        = float(LightIdW >> 24)/255.;
}

void GoToNextLight(in out SCtx C, uint LightId)
{
    if (LightId != C.LightId)
        return;
    C.iList++;
        LoadLight(C);
}

groupshared     uint    Group_DstLightIdWs[16 * 32];

[numthreads(32,1,1)]
void main(uint iMerge : SV_DispatchThreadID)
{
    const uint  iListSrc0                       = 4 * iMerge;
        const uint      iDstLightIdW_Start = 16 * iMerge;

        SCtx    Ctxs[4];

        [loop]
        for (uint iDstLightIdW = 0; iDstLightIdW<16; iDstLightIdW++) {
                uint    LightId = Ctxs[0].LightId;
                Group_DstLightIdWs[iDstLightIdW_Start + iDstLightIdW] =
LightId;
                for (uint iListSrc = 0; iListSrc < 4; iListSrc++) {
                        GoToNextLight(Ctxs[iListSrc], LightId);
                }
        }

    if (iMerge < 123) {
                for (uint iDstLightIdW = 0; iDstLightIdW<16; iDstLightIdW++) {
                        Weights[iDstLightIdW_Start+iDstLightIdW] =
Group_DstLightIdWs[iDstLightIdW_Start+iDstLightIdW];
                }
        }
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190210/599d4bcf/attachment-0001.html>


More information about the mesa-dev mailing list