Previous | Next --- Slide 14 of 74
Back to Lecture Thumbnails
gsamp

Shader functions define how the surface of a fragment should look like. The function above returns the color of a pixel given these inputs, for every pixel on the screen. This is the same operation over different inputs, which naturally leads to parallelization.

shivalgo

Here, uniform and varying types are similar to the ISPC types? So underneath the GLSL, is there an ISPC SPMD type architecture? I thought ISPC only ran on CPUs and not on GPUs.

sirej

Graphics shaders are SPMD type programming where you have the same program that you want to run on a set of pixels or vertices. It's not the same as ISPC but they have some similar programming semantics like uniform and varying: see http://www.lighthouse3d.com/tutorials/glsl-12-tutorial/uniform-variables/ , http://www.lighthouse3d.com/tutorials/glsl-12-tutorial/varying-variables/ . These programming constructs seem useful for SPMD style programming and I wonder where this design originated.

terribilis

It looks like OpenGL is a language that was either created by or is sponsored by Nvidia. Is it a new iteration of Cuda then? Also Really interesting to gain an understanding of how fast these GPUs are when considering the real-time rendering you see in video games.

mcu

@terribilis OpenGL is an API maintained by the Khronos Group since the mid-'00s; it was originally created in the early '90s by SGI. GLSL is part of that API; while OpenGL as a whole specifies an interface for GPU-accelerated rendering, GLSL is used for specifying shaders that will run on the GPU. GLSL is NOT descended from CUDA

@shivalgo @sirej As for ISPC, Matt Pharr (the person who originally wrote the compiler) referred to it as 'SPMD over SIMD', referring to the way that ISPC uses an SPMD abstraction layer on top of the underlying SIMD + multithreading implementation layer, which I think explains why ISPC and GPU code can have similar abstractions in that way. The term uniform in ISPC actually came from RSL, the RenderMan Shading Language (which I think originated from Pixar), although RSL itself was apparently not the originator of the term, so it has some even earlier history.

Please log in to leave a comment.