Programming GPUs for general computing
Electronic Engineering Times Asia
June 1, 2005
[ 3D GRAPHICS ]
As the programmability and performance of modern GPUs increase, many application developers are looking to graphics hardware to solve computationally intensive problems previously performed on general-purpose CPUs. Despite the promise of general-purpose GPU computing, traditional graphics API still abstract the GPU as a rendering device, involving textures, triangles and pixels. Mapping an algorithm to use these primitives is not a simple operation, even for the most advanced graphics developers.
Fortunately, GPU-based computing is conceptually straightforward, and a variety of high-level languages and software tools can simplify GPU programming. First, however, the developer must understand how a GPU is used in rendering and then identify the components that can be used for computation.
When rendering a frame, the GPU receives geometry data from the host system in the form of triangle vertices. These vertices are processed by a programmable vertex processor that performs any per-triangle computation, such as geometric transformations or lighting calculations. Next, the triangles are converted by a fixed-function rasterizer unit into individual "fragments" to be drawn on the screen. Before they are written to the screen, each fragment goes to a programmable fragment processor that computes the final color value.
Read More >
Electronic Engineering Times Asia