Prologue to Illustrations Equipment and GPUs.


109 views
Uploaded on:
Category: Food / Beverages
Description
Prologue to Design Equipment and GPUs Yannick Francken Tom Mertens Outline Definition Inspiration History of Representation Equipment Illustrations Pipeline Vertex and Part Shaders Advanced Design Equipment Stream Programming GPU Stream Programming Dialects Practice More Data
Transcripts
Slide 1

Prologue to Graphics Hardware and GPUs Yannick Francken Tom Mertens

Slide 2

Overview Definition Motivation History of Graphics Hardware Graphics Pipeline Vertex and Fragment Shaders Modern Graphics Hardware Stream Programming GPU Stream Programming Languages Exercise More Information

Slide 3

Definition Logical Representation of Visual Information Output Signal

Slide 5

Motivation Real Time: 15 – 60 fps High Resolution

Slide 6

Motivation High CPU load Physics, AI, sound, system, … Graphics interest: Fast memory access Many lookups [ vertices, typical, compositions, … ] High transfer speed use A couple GB/s required in general cases! Expansive number of failures Flops = Floating Point Operations [ ADD, MUL, SUB, … ] Illustration: network vector items (16 MUL + 12 ADD) x (#vertices + #normals) x fps = (28 Flops) x (6.000.000) x 30 ≈ 5GFlops Conclusion: Real time design needs supporting equipment!

Slide 7

History of Graphics Hardware … - mid ’90s SGI centralized servers and workstations PC: just 2D representation equipment mid ’90s Consumer 3D design equipment (PC) 3dfx, nVidia, Matrox, ATI, … Triangle rasterization (just) Cheap: pushed by amusement industry 1999 PC-card with TnL [ Transform and Lighting ] nVIDIA GeForce: Graphics Processing Unit (GPU) PC-card more effective than specific workstations Modern illustrations equipment Graphics pipeline mostly programmable Leaders: ATI and nVidia “ATI Radeon X1950” and “nVidia GeForce 8800” Game consoles like GPUs (Xbox)

Slide 8

Graphics Pipeline LOD determination Frustum Culling Portal Culling … Application Modelview/Projection tr. Clipping Lighting Division by w Primitive Assembly Viewport change Backface winnowing Geometry Processing Scan Conversion Fragment Shading [Color and Texture interpol.] Frame Buffer Ops [Z-support, Alpha Blending,…] Rasterization Output to Device Output

Slide 9

Graphics Pipeline LOD choice Frustum Culling Portal Culling … Application Programmable Clipping Division by w Primitive Assembly Viewport change Backface separating VERTEX SHADER Geometry Processing Scan Conversion Rasterization FRAGMENT SHADER Output to Device Output

Slide 10

( x, y, z, w ) ( nx, ny, nz ) ( s, t, r, q ) ( r, g, b, a ) ( x’, y’, z’, w’ ) ( nx’, ny’, nz’ ) ( s’, t’, r’, q’ ) ( r’, g’, b’, a’ ) VERTEX SHADER ( x, y ) ( r’, g’, b’, a’ ) ( depth’ ) ( x, y ) ( r, g, b, a ) ( profundity ) FRAGMENT SHADER Vertex and Fragment Shaders

Slide 11

Modern Graphics Hardware GPU = Graphics Processing Unit Vector processor Operates on 4 tuples Position ( x, y, z, w ) Color ( red, green, blue, alpha ) Texture Coordinates ( s, t, r, q ) 4 tuple operations, 1 clock cycle SIMD [ Single Instruction Multiple Data ] ADD, MUL, SUB, DIV, MADD, …

Slide 12

Modern Graphics Hardware Pipelining Number of stages Parallelism Number of parallel procedures Parallelism + pipelining Number of parallel pipelines 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3

Slide 13

Modern Graphics Hardware Parallelism + pipelining: ATI Radeon 9700 4 vertex pipelines 8 pixel pipelines

Slide 14

Modern Graphics Hardware Features of ATI Radeon X1900 XTX Core speed 650 Mhz 48 pixel shader processors 8 vertex shader processors 51 GB/s memory transfer speed 512 MB memory

Slide 15

Modern Graphics Hardware High Memory Bandwidth Graphics Card High transmission capacity 51GB/s GPU 650Mhz Graphics memory ½ GB Output AGP transport 2GB/s Parallel Processes Processor Chip Main memory 1GB AGP memory ½GB High transmission capacity 77GB/s CPU 3Ghz 3GB/s Cache ½MB

Slide 16

Stream Programming Input: stream of information records Output: stream(s) of information records Kernel: works successively on the information records, getting to one record at once! Perused Only Memory: record autonomous read just memory

Slide 17

GPU Stream Programming Vertex Shader Input and yield streams Vertices, normals, hues, surface directions Read just memory Uniform variables Uniform = steady per stream Textures, skims, ints, exhibits, … Fragment Shader Input and yield streams Pixels Z-qualities Read just memory See above

Slide 18

Languages Assembly Cg [ C for Graphics ] HLSL [ High Level Shading Language ] GLSL [ OpenGL Shading Language ] Sh BrookGPU

Slide 19

Specialized Instruction Set DP4: 4 tuple speck poduct RSQ: complementary square root MAD: increase and include DPH: homogeneous spot item SCS: sine and cosine LRP: straight insert TEX: composition map … Nowadays, “not” utilized straightforwardly any longer Generated by abnormal state dialect compilers !!ARBvp1.0 ATTRIB pos = vertex.position; PARAM mat[4] = { state.matrix.mvp }; # Transform by link of the # MODELVIEW and PROJECTION # grids. DP4 result.position.x, mat[0], pos; DP4 result.position.y, mat[1], pos; DP4 result.position.z, mat[2], pos; DP4 result.position.w, mat[3], pos; # Pass the essential shading through w/o # lighting. MOV result.color, vertex.color; END Assembly

Slide 20

High level programming dialect Static restrictive hops if, while, for, … Data subordinate contingent bounced SIMD Fragment shader: just productive if there should be an occurrence of intelligent project stream! No pointers! struct appdata { float4 position : POSITION ; float3 typical : NORMAL ; float3 shading : DIFFUSE ; float3 VertexColor : SPECULAR ; }; struct vfconn { float4 HPOS : POSITION ; float4 COL0 : COLOR0 ; }; vfconn principle( appdata IN, uniform float4 Kd, uniform float4x4 mvp ) { vfconn OUT; OUT.HPOS = mul( mvp, IN.position); OUT.COL0.xyz = Kd.xyz * IN.VertexColor.xyz; OUT.COL0.w = 1.0; return OUT; } Cg/HLSL/GLSL

Slide 21

Shader code implanted in C++/C++ Code … vsh = SH_BEGIN_VERTEX_PROGRAM { ShInputNormal3f ordinary; ShInputPosition4f p; ShOutputPoint4f ov; ShOutputNormal3f on; ShOutputVector3f lvv; ShOutputPosition4f opd; opd = Globals::mvp | p; on = standardize( Globals::mv | typical ); ov = - standardize( Globals::mv | p ); lvv = standardize( Globals::lightPos – ( Globals::mv | p) ( 0,1,2 ) ); } SH_END_PROGRAM; fsh = SH_BEGIN_FRAGMENT_PROGRAM { ShInputVector4f v; ShInputNormal3f n; ShInputVector3f lvv; ShInputPosition4f p; ShOutputColor3f out; out( 0,1,2 ) = Globals::color * dot( standardize( n ), standardize( lvv ) ); } SH_END_PROGRAM; Sh

Slide 22

GPGPU Language General Purpose GPU Language Brook: Streaming augmentation of C BrookGPU: GPU port of Brook No PC representation learning needed! part void k( glide s<>, float3 f, drift a[10][10], out buoy o<> ); coast a<100>; skim b<100>; skim c<10,10>; streamRead( a, data1 ); streamRead( b, data2 ); streamRead( c, data3 );/Call bit "k" k( a, 3.2f, c, b ); streamWrite( b, result ) BrookGPU

Slide 23

Screenshots nVidia Toolkit [ Reflection-Bump Mapping ]

Slide 24

Screenshots Far Cry [ UBISOFT ]

Slide 25

Screenshots NPR [ ATI Research Group ]

Slide 26

Exercise Vertex Shader in Cg Free Form Deformation Framework accessible on site Vertex Shader

Slide 27

More Information nVidia http://developer.nvidia.com/ATI http://www.ati.com/designer/General Purpose GPU Programming http://www.gpgpu.org GPU Programming and Architecture http://www.cis

Recommended
View more...