Skip to content

Discuss diagnostic behavior for lambda captures #428

Description

@bob80905

Consider the below shader:

RWByteAddressBuffer g0 : register(u0);

[numthreads(1,1,1)]
void main(uint3 tid : SV_DispatchThreadID)
{
    RWByteAddressBuffer buf = g0;
    auto fn = [=]() { buf.Store(0, 42); };    
    fn();
}

Should the compiler reject compiling this shader?
This issue tracks the decision of whether or not to include lambda captures in the HLSL language.
This work is part of the De C++-ification effort.
We need to decide whether or not to include this feature in the language to know how this feature interacts with local resources.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions