TL;DR
This paper introduces a unified shader programming environment in C++ that leverages C++ features for GPU code specialization, enabling familiar programming techniques and efficient code generation for real-time graphics.
Contribution
It presents a novel approach to GPU code specialization by reusing C++ features, facilitating unified host and GPU programming with efficient code translation.
Findings
Supports GPU code specialization within C++ using attribute and virtual function features.
Enables writing host and GPU code together with familiar C++ techniques.
Produces efficient C++ and HLSL code through source-to-source translation.
Abstract
Modern unified programming models (such as CUDA and SYCL) that combine host (CPU) code and GPU code into the same programming language, same file, and same lexical scope lack adequate support for GPU code specialization, which is a key optimization in real-time graphics. Furthermore, current methods used to implement specialization do not translate to a unified environment. In this paper, we create a unified shader programming environment in C++ that provides first-class support for specialization by co-opting C++'s attribute and virtual function features and reimplementing them with alternate semantics to express the services required. By co-opting existing features, we enable programmers to use familiar C++ programming techniques to write host and GPU code together, while still achieving efficient generated C++ and HLSL code via our source-to-source translator.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
