QShader::NativeShaderInfo Struct

struct QShader::NativeShaderInfo

有关本地着色器代码的附加元数据。更多

公共变量

QMap<int, int> extraBufferBindings
int flags

详细描述

描述有关本地着色器代码的信息(如果适用)。如果从 SPIR-V 翻译涉及在生成的着色器中引入额外的 "神奇 "输入、输出或资源,这就与某些着色器语言的某些着色器阶段相关。这些附加功能可能取决于原始源代码(即各种 GLSL 语言结构或内置功能的使用),因此需要以动态方式说明生成的着色器代码中是否添加了某些功能。

举例来说,一个细分控制着色器有一个按补丁(而不是按顶点)输出的变量。这将转化为金属计算着色器输出(除其他外)到 spvPatchOut 缓冲区。但如果不使用按补丁输出变量,这个缓冲区根本就不会存在。该结构体中的数据可以说明着色器代码是否依赖于这样一个缓冲区。

注意: 这是一个 RHI API,兼容性保证有限,详情请查看QShader

成员变量文档

QMap<int, int> NativeShaderInfo::extraBufferBindings

int NativeShaderInfo::flags

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.