Skip to content

Should GLSL_EXT_structured_descriptor_heap blocks allow omitting block/instance names? #4367

Description

@e4m2
  1. Block names

The extension spec gives examples such as:

resourceheap {
    accelerationStructureKHR myAccelerationStructure;
} myResourceHeapView;

The GLSL spec does not allow omitting the block-name of an interface-block. Current glslang behavior agrees with the base spec but diverges from some of the examples given in the extension spec, producing the following output:

ERROR: <source>:5: '' :  syntax error, unexpected LEFT_BRACE

Are the examples in the extension spec intended to work as-is?

  1. Instance names

It seems that resourceheap and samplerheap blocks currently require an instance name. If no instance name is provided, the following error is printed:

ERROR: <source>:5: 'ResourceHeap' : layout(descriptor_heap) decorated block should be explicitly declared with a run-time sized array type.

Is this intended behavior? I think it would stand to reason to allow omitting the instance name, thus making the following two lines more or less equivalent:

layout(descriptor_heap) uniform texture2D textures[];
resourceheap TextureHeap { texture2D textures[]; };

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions