NativeShaderInfo Struct

struct QShader ::NativeShaderInfo

Additional metadata about the native shader code. 更多...

公共变量

QMap<int, int> extraBufferBindings
int flags

详细描述

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.

注意: This is a RHI API with limited compatibility guarantees, see QShader 了解细节。

成员变量文档编制

QMap < int , int > NativeShaderInfo:: extraBufferBindings

int NativeShaderInfo:: flags