The Programmable Graphics Hardware Pipeline Doug James Asst. Professor CS & Robotics.

Slides:



Advertisements
Similar presentations
Fragment level programmability in OpenGL Evan Hart
Advertisements

COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Lecture 38: Chapter 7: Multiprocessors Today’s topic –Vector processors –GPUs –An example 1.
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Hardware CMSC 435/634. Transform Shade Clip Project Rasterize Texture Z-buffer Interpolate Vertex Fragment Triangle A Graphics Pipeline.
Prepared 5/24/2011 by T. O’Neil for 3460:677, Fall 2011, The University of Akron.
CS-378: Game Technology Lecture #9: More Mapping Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
Why GPUs? Robert Strzodka. 2Overview Computation / Bandwidth / Power CPU – GPU Comparison GPU Characteristics.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics April 19, 2007.
Control Flow Virtualization for General-Purpose Computation on Graphics Hardware Ghulam Lashari Ondrej Lhotak University of Waterloo.
Morphing and Animation GPU Graphics Gary J. Katz University of Pennsylvania CIS 665 Adapted from articles taken from ShaderX 3, 4 and 5 And GPU Gems 1.
GLSL I May 28, 2007 (Adapted from Ed Angel’s lecture slides)
A Crash Course on Programmable Graphics Hardware Li-Yi Wei 2005 at Tsinghua University, Beijing.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 Programming Massively Parallel Processors Chapter.
Status – Week 277 Victor Moya.
ATI GPUs and Graphics APIs Mark Segal. ATI Hardware X1K series 8 SIMD vertex engines, 16 SIMD fragment (pixel) engines 3-component vector + scalar ALUs.
The programmable pipeline Lecture 10 Slide Courtesy to Dr. Suresh Venkatasubramanian.
Mohan Sridharan Based on slides created by Edward Angel GLSL I 1 CS4395: Computer Graphics.
Vertex & Pixel Shaders CPS124 – Computer Graphics Ferdinand Schober.
Cg Overview Cg is the High Level language from NVIDIA for programming GPUs, developed in close collaboration with Microsoft Cg is 100% compatible with.
GPU Tutorial 이윤진 Computer Game 2007 가을 2007 년 11 월 다섯째 주, 12 월 첫째 주.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Cg Kevin Bjorke GDC NVIDIA CONFIDENTIAL A Whole New World with Cg Graphics Program Written in Cg “C” for Graphics Compiled & Optimized Low Level,
Under the Hood: 3D Pipeline. Motherboard & Chipset PCI Express x16.
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
Enhancing GPU for Scientific Computing Some thoughts.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
May 8, 2007Farid Harhad and Alaa Shams CS7080 Over View of the GPU Architecture CS7080 Class Project Supervised by: Dr. Elias Khalaf By: Farid Harhad &
Mapping Computational Concepts to GPUs Mark Harris NVIDIA Developer Technology.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Using Vertex Shader in DirectX 8.1 강 신 진
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Cg Programming Mapping Computational Concepts to GPUs.
1 Dr. Scott Schaefer Programmable Shaders. 2/30 Graphics Cards Performance Nvidia Geforce 6800 GTX 1  6.4 billion pixels/sec Nvidia Geforce 7900 GTX.
The programmable pipeline Lecture 3.
CSE 690: GPGPU Lecture 6: Cg Tutorial Klaus Mueller Computer Science, Stony Brook University.
The GPU Revolution: Programmable Graphics Hardware David Luebke University of Virginia.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Finding Body Parts with Vector Processing Cynthia Bruyns Bryan Feldman CS 252.
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
CS662 Computer Graphics Game Technologies Jim X. Chen, Ph.D. Computer Science Department George Mason University.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
David Luebke 1 11/24/2015 Programmable Graphics Hardware.
A User-Programmable Vertex Engine Erik Lindholm Mark Kilgard Henry Moreton NVIDIA Corporation Presented by Han-Wei Shen.
May 8, 2007Farid Harhad and Alaa Shams CS7080 Overview of the GPU Architecture CS7080 Final Class Project Supervised by: Dr. Elias Khalaf By: Farid Harhad.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
Fateme Hajikarami Spring  What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations.
David Luebke 1 1/25/2016 Programmable Graphics Hardware.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 Programming Massively Parallel Processors Lecture.
09/25/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Shadows Stage 2 outline.
Ray Tracing using Programmable Graphics Hardware
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Mapping Computational Concepts to GPUs Mark Harris NVIDIA.
OpenGL Shading Language
Programmable Graphics Hardware CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia.
GLSL I.  Fixed vs. Programmable  HW fixed function pipeline ▪ Faster ▪ Limited  New programmable hardware ▪ Many effects become possible. ▪ Global.
An Introduction to the Cg Shading Language Marco Leon Brandeis University Computer Science Department.
GLSL Review Monday, Nov OpenGL pipeline Command Stream Vertex Processing Geometry processing Rasterization Fragment processing Fragment Ops/Blending.
Programmable Shaders Dr. Scott Schaefer.
第七课 GPU & GPGPU.
A Crash Course on Programmable Graphics Hardware
Graphics Processing Unit
Deferred Lighting.
Chapter 6 GPU, Shaders, and Shading Languages
Introduction to Programmable Hardware
CS5500 Computer Graphics April 17, 2006 CS5500 Computer Graphics
RADEON™ 9700 Architecture and 3D Performance
© 2012 Elsevier, Inc. All rights reserved.
CS 480/680 Fall 2011 Dr. Frederick C Harris, Jr. Computer Graphics
Presentation transcript:

The Programmable Graphics Hardware Pipeline Doug James Asst. Professor CS & Robotics

Credits Includes many slides from… Bill Mark, “NVIDIA Programmable Graphics Technology,” SIGGRAPH 2002 Course. See for more.

Overview: The Programmable Graphics Hardware Pipeline What is it? Why do we want it? Applications Recent advances How do we use it? Quick tutorial Current research!

What is it? The Programmable Graphics Hardware Pipeline

GPU Programming Model Application Vertex Processor Fragment Processor Assembly & Rasterization Framebuffer Operations Framebuffer GPU CPU Textures

How are current GPU’s different from CPU? 1.GPU is a stream processor Multiple programmable processing units Connected by data flows Application Vertex Processor Fragment Processor Assembly & Rasterization Framebuffer Operations Framebuffer Textures

Separate vertex and fragment programs Application Vertex Processor Fragment Processor Assembly & Rasterization Framebuffer Operations Framebuffer Textures Program

V ertex Processor Program Input vertex attributes Position Normal Bone weights Colour Texture Other ;) … Vertex Attributes 16x4 registers Vertex Program 128 instructions Vertex Output 15x4 registers Uniform Program Parameters 96x4 registers Temporary Registers 12x4 registers GeForce 3 Vertex Prog.

How are current GPU’s different from CPU? 2.Greater variation in basic capabilities Most processors don’t yet support branching Vertex processors don’t support texture mapping Some processors support additional data types

How are current GPU’s different from CPU? 3.Optimized for 4-vector arithmetic Useful for graphics – colors, vectors, texcoords Easy way to get high performance/cost Shading languages have vector data types and operations e.g. Cg has float2, float3, float4 Shading languages have vector data types and operations e.g. Cg has float2, float3, float4 Obvious way to get high performance Obvious way to get high performance Other matrix data types e.g. Cg has float3x3, float3x4, float4x4 Other matrix data types e.g. Cg has float3x3, float3x4, float4x4 Shading languages have vector data types and operations e.g. Cg has float2, float3, float4 Shading languages have vector data types and operations e.g. Cg has float2, float3, float4 Obvious way to get high performance Obvious way to get high performance Other matrix data types e.g. Cg has float3x3, float3x4, float4x4 Other matrix data types e.g. Cg has float3x3, float3x4, float4x4

How are current GPU’s different from CPU? 4.No support for pointers Arrays are first-class data types in Cg 5.No integer data type Cg adds “bool” data type for boolean operations This change isn’t obvious except when declaring vars

Why do we want it? The Programmable Graphics Hardware Pipeline

Frees us from the fixed function pipeline Expands the range of possibilities Real-time cinematic shading Enormous research opportunity

NVIDIA

Procedural Shading

Character Skinning Vertices grouped by common bone influences Groups are arbitrary Weights are arbitrary - Defined by an artist - Function of vertex-bone distances

NPR Rendering Cartoon-style shading

How do we use it? The Programmable Graphics Hardware Pipeline

Quick Cg Tutorial

Let’s use it! The Programmable Graphics Hardware Pipeline

Quick Cg Lab (Diffuse + Specular Shader)

Recent advances The Programmable Graphics Hardware Pipeline

32-bit IEEE floating-point throughout pipeline Framebuffer Textures Fragment processor Vertex processor Interpolants

Hardware supports several other data types Fragment processor also supports: 16-bit “half” floating point 12-bit fixed point These may be faster than 32-bit on some HW Framebuffer/textures also support: Large variety of fixed-point formats E.g., classical 8-bit per component These formats use less memory bandwidth than FP32

Vertex processor capabilities 4-vector FP32 operations, as in GeForce3/4 True data-dependent control flow Conditional branch instruction Subroutine calls, up to 4 deep Jump table (for switch statements) Condition codes New arithmetic instructions (e.g. COS) User clip-plane support

Vertex processor has high resource limits 256 instructions per program (effectively much higher w/branching) 16 temporary 4-vector registers 256 “uniform” parameter registers 2 address registers (4-vector) 6 clip-distance outputs 16 per-vertex attributes (only)

Fragment processor has clean instruction set General and orthogonal instructions Much better than previous generation Same syntax as vertex processor: MUL R0, R1.xyz, R2.yxw; Full set of arithmetic instructions: RCP, RSQ, COS, EXP, …

Fragment processor has flexible texture mapping Texture reads are just another instruction (TEX, TXP, or TXD) Allows computed texture coordinates, nested to arbitrary depth Allows multiple uses of a single texture unit Optional LOD control – specify filter extent Think of it as… A memory-read instruction, with optional user-controlled filtering

Additional fragment processor capabilities Read access to window-space position Read/write access to fragment Z Built-in derivative instructions Partial derivatives w.r.t. screen-space x or y Useful for anti-aliasing Conditional fragment-kill instruction FP32, FP16, and fixed-point data

Fragment processor limitations No branching But, can do a lot with condition codes No indexed reads from registers Use texture reads instead No memory writes

Fragment processor has high resource limits 1024 instructions 512 constants or uniform parameters Each constant counts as one instruction 16 texture units Reuse as many times as desired 8 FP32 x 4 perspective-correct inputs 128-bit framebuffer “color” output (use as 4 x FP32, 8 x FP16, etc…)

Current Research The Programmable Graphics Hardware Pipeline

Current Research GPU is becoming a general purpose stream processor …