【发布时间】:2022-06-11 01:08:47
【问题描述】:
当我在 Alderlake GT1 集成 GPU 上编译和链接我的 GLSL 着色器时,我收到警告:
SIMD32 着色器效率低下
此警告是通过glDebugMessageCallbackARB 机制报告的。
我想调查一下是否可以避免这种低效率,但我不确定如何获取有关此警告的更多信息。
此着色器的驱动程序的完整输出:
WRN [Shader Compiler][Other]{Notification}: VS SIMD8 shader: 11 inst, 0 loops, 40 cycles, 0:0 spills:fills, 1 sends, scheduled with mode top-down, Promoted 0 constants, compacted 176 to 112 bytes.
WRN [API][Performance]{Notification}: SIMD32 shader inefficient
WRN [Shader Compiler][Other]{Notification}: FS SIMD8 shader: 5 inst, 0 loops, 20 cycles, 0:0 spills:fills, 1 sends, scheduled with mode top-down, Promoted 0 constants, compacted 80 to 48 bytes.
WRN [Shader Compiler][Other]{Notification}: FS SIMD16 shader: 5 inst, 0 loops, 28 cycles, 0:0 spills:fills, 1 sends, scheduled with mode top-down, Promoted 0 constants, compacted 80 to 48 bytes.
顺便说一下,消息是在片段着色器编译期间创建的。
我的顶点着色器:
#version 150
in mediump vec2 position;
out lowp vec4 clr;
uniform mediump vec2 rotx;
uniform mediump vec2 roty;
uniform mediump vec2 translation;
uniform lowp vec4 colour;
void main()
{
gl_Position.x = dot( position, rotx ) + translation.x;
gl_Position.y = dot( position, roty ) + translation.y;
gl_Position.z = 1.0;
gl_Position.w = 1.0;
clr = colour;
}
我的片段着色器:
#version 150
in lowp vec4 clr;
out lowp vec4 fragColor;
void main()
{
fragColor = clr;
}
也就是说,我怀疑它是特定于着色器的,因为它似乎报告了我在这个平台上使用的每个着色器?
GL RENDERER: Mesa Intel(R) Graphics (ADL-S GT1)
操作系统: Ubuntu 22.04
GPU: AlderLake-S GT1
API: OpenGL 3.2 核心配置文件
GLSL 版本: 150
【问题讨论】: