paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Metamorphic Shader Fusion for Testing Graphics Shader Compilers

蜕变式着色器融合:面向图形着色器编译器的测试
ICSE 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)2023匹配度 2/10 · 该论文属于图形着色器编译器的蜕变测试,核心是编译器测试与优化缺陷发现,与用户关注的 PL↔AI/LLM、静态分析、浮点程序分析及贝叶斯程序分析等方向无直接交叉。虽然涉及工业编译器和问题驱动的缺陷发现,但不匹配研究画像的核心问题。引用 15 inbox
Dongwei Xiao, Zhibo Liu, Shuai Wang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 FSHADER,用着色器融合等四种蜕变关系测试图形着色器编译器,发现大量错误编译与优化缺陷。

图形着色器编译器负责将高层着色器程序编译优化为 GPU 机器码,其缺陷会导致渲染错误,进而影响 VR、游戏、自动驾驶等生产场景。本文提出 FSHADER,一个面向着色器编译器的蜕变测试(MT)框架:它通过四种精心设计的蜕变关系变异输入着色器程序,核心思路是融合两个着色器程序,并比较融合程序的渲染结果与分别渲染后再融合的图像之间的一致性,从而暴露错误的编译与优化行为。作者在覆盖 Intel、AMD、Nvidia、ARM、Apple 五家 GPU 厂商的 12 个着色器编译器上开展评估,成功发现超过 16K 个触发错误的输入,并人工定位与刻画了出错的优化位置,代表性缺陷已获开发者确认。

问题
着色器编译器在编译优化高层着色器程序时可能产生错误渲染输出,这类缺陷会影响 VR、游戏、自动驾驶等依赖图形渲染的生产场景。
方法
FSHADER 采用蜕变测试,设计四种蜕变关系对输入着色器程序进行变异,特别是将两个着色器程序融合,并检查融合程序的渲染图像与分别渲染后再融合的图像之间的视觉一致性。
评估
在覆盖 Intel、AMD、Nvidia、ARM、Apple 五家 GPU 厂商的 12 个着色器编译器上评估,发现超过 16K 个触发错误的输入,人工定位并刻画有缺陷的优化位置,代表性缺陷获开发者确认。
原文摘要(Abstract)

Computer graphics are powered by graphics APIs (e.g., OpenGL, Direct3D) and their associated shader compilers, which render high-quality images by compiling and optimizing user-written high-level shader programs into GPU machine code. Graphics rendering is extensively used in production scenarios like virtual reality (VR), gaming, autonomous driving, and robotics. Despite the development by industrial manufacturers such as Intel, Nvidia, and AMD, shader compilers - like traditional software - may produce ill-rendered outputs. In turn, these errors may result in negative results, from poor user experience in entertainment to accidents in driving assistance systems. This paper introduces FSHADER, a metamorphic testing (MT) framework designed specifically for shader compilers to uncover erroneous compilations and optimizations. FSHADER tests shader compilers by mutating input shader programs via four carefully-designed metamorphic relations (MRs). In particular, FSHADER fuses two shader programs via an MR and checks the visual consistency between the image rendered from the fused shader program with the output of fusing individually rendered images. Our study of 12 shader compilers covers five mainstream GPU vendors, including Intel, AMD, Nvidia, ARM, and Apple. We successfully uncover over 16K error-triggering inputs that generate incorrect rendering outputs. We manually locate and characterize buggy optimization places, and developers have confirmed representative bugs.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{XiaoLW23,
  title = {Metamorphic Shader Fusion for Testing Graphics Shader Compilers},
  author = {Dongwei Xiao and Zhibo Liu and Shuai Wang},
  booktitle = {ICSE},
  year = {2023},
  doi = {10.1109/icse48619.2023.00201}
}