- Qt 6.9
- Qt GUI
- C++ Classes
- NativeShaderInfo
- Qt 6.9.3 Reference Documentation

# QShader::NativeShaderInfo Struct

struct QShader::NativeShaderInfo

Additional metadata about the native shader code. More...

- List of all members, including inherited members

## Public Variables

QMap<int, int> | extraBufferBindings
int | flags

## Detailed Description

Describes information about the native shader code, if applicable. This becomes relevant with certain shader languages for certain shader stages, in case the translation from SPIR-V involves the introduction of additional, "magic" inputs, outputs, or resources in the generated shader. Such additions may be dependent on the original source code (i.e. the usage of various GLSL language constructs or built-ins), and therefore it needs to be indicated in a dynamic manner if certain features got added to the generated shader code.

As an example, consider a tessellation control shader with a per-patch (not per-vertex) output variable. This is translated to a Metal compute shader outputting (among others) into an spvPatchOut buffer. But this buffer would not be present at all if per-patch output variables were not used. The fact that the shader code relies on such a buffer present can be indicated by the data in this struct.

Note: This is a RHI API with limited compatibility guarantees, see QShader for details.

## Member Variable Documentation

### QMap<int, int> NativeShaderInfo::extraBufferBindings

### int NativeShaderInfo::flags