Skip to content

Cannot use groupshared in a compute shader #472

@sascha-holl

Description

@sascha-holl

Trying to compile the simple compute shader

[numthreads(256, 1, 1)]
void test(uint GI: SV_GroupIndex)
{
    groupshared float tmp[256];
}

via

ComputePass::create(
	mpDevice,
	ProgramDesc().addShaderLibrary("RenderPasses/MyRenderPass/test.slang").csEntry("test").setShaderModel(ShaderModel::SM6_7),
	defines,
	false
);

I end up with the error

Falcor\Source\RenderPasses\MyRenderPass\test.slang(4): error 31201: modifier 'groupshared' is not allowed here.
groupshared float tmp[256];
^~~~~~~~~~~

Is groupshared not supported yet? Or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions