Skip to content

Feature Request: static void variables to represent OpUntypedVariable #794

@devshgraphicsprogramming

Description

Is your feature request related to a problem? Please describe.

To write Inline SPIR-V for example for the EXT descriptor Heap extension, one must declare an untyped variable without a data type.

I know it seems weird to have a variable of unknown size, but the spec for the extension says

Data Type is optional. It is the type of the object in memory. Data Type must be specified if Storage Class is Function, Private, or Workgroup. Refer to the client API for other storage classes. If Storage Class is required to be explicitly laid out, then Data Type must be explicitly laid out.

Descriptor Heap's Resource and Sample heaps are defined as data-type-less untyped variables in the UniformConstant storage class in the SPIR-V examples.

I can foresee future extensions, relying on such data type less untyped variables.

Describe the solution you'd like

Allow

static void var;

only if ext_storage_class attribute is present.

Describe alternatives you've considered

Just implementing Descriptor Heaps isn't a solution because I'm asking for good Untyped Pointer support in Inline SPIR-V.

Additional context

Here's what I'm trying to achieve
https://godbolt.devsh.eu/z/9z9K9q

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions