Font Size: a A A

High Level Shading Language And Its Optimizing Compilation

Posted on:2005-01-30Degree:MasterType:Thesis
Country:ChinaCandidate:H XuFull Text:PDF
GTID:2168360122467577Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
We are now in the era of programmable GPUs. The programmable GPU permits developers to write vertex shaders and fragment shaders running on it, to replace the fixed function pipeline, and to employ custom rendering algorithms. With its continually enhanced hardware capabilities, the programmable GPU extends its applicable fields without a break. Aside from real-time rendering, the programmable GPU is also used in the fields of off-line rendering and scientific computation.Programmable GPUs support two kinds of developing languages, namely, low-level shading language and high-level shading language. Like assembly language, LLSL can be used to write high performance shaders. But the heavy dependence on specific hardware and the difficulty to learn and use hamper it from being effectively used. On the other hand, HLSL is hardware independent, easy to use and rich in reusable shader resources and thus quickly becomes the first choice for graphics developers. There are three major HLSLs, namely, Cg, DirectX HLSL and OpenGL glslang. The broad application and openness of OpenGL make glslang a valuable subject for research.This paper therefore focuses on glsang and its optimizing compiling technologies. We have implemented an optimizing compiler called gcx which can translate glslang shaders to corresponding OpenGL LLSL shaders.This paper could be divided into two parts. In the first part, after introducing the programmable GPU and LLSL, we study OpenGL glslang comprehensively. In the second part, we study optimizing compiling technologies related to glslang. Gcx supports two kinds of backends. One supports branch instructions. The other doesn't. And they both lack features common to general purpose microprocessors such as logic instructions and indirect memory access. To tackle these problems, gcx employs branch result combining, loop unrolling, procedure integration and other techniques vastly.Programmable GPUs and HLSL are still developing rapidly. On the one hand, programmable GPUs are envolving towards general stream processors. On the other hand, HLSL is also envolving towards a general stream programming language. Consequently, the study of HLSL and its optimizing compilation is of great significance to catch this trend.
Keywords/Search Tags:Programmable GPU, Stream Processor, Compiler, Optimizing Compilation, Real-time rendering, Shader, LLSL, HLSL
PDF Full Text Request
Related items