Graphics Hardware Cathode Ray Tube (CRT)
1 2 3 4 5 6 Monitor (CRT, LCD,…)
Graphics accelerator
Scan controller
Video Memory (frame buffer) 1. Filament (generate heat) Display/Graphics Processor 2. Cathode (emit electrons) CPU/Memory/Disk … 3. Control grid (control intensity) 4. Focus 5. Deflector 6. Phosphor coating
Color CRT LED
3 electron guns, 3 color phosphor dots at each pixel
Color = (red, green, blue) Black = (0,0,0) White = (1,1,1) Red = 0 to 100% Red = (1,0,0) Green = 0 to 100% Green = (0,1,0) Blue = 0 to 100% Blue = (0,0,1) …
1 LCD Plasma Panels
Raster Display graphics How to draw a picture?
Digital Display
Based on (analog) raster-scan TV technology
The screen (and a picture) consists of discrete pixels, and each pixel has one or multiple phosphor dots
We have only one electron gun but many pixels in a picture need to be lit simultaneously…
2 Refresh Random Scan Order
Refresh – the electron gun needs to come back to Old way: No pixels - The electron gun hit the pixel again before it fades out draws straight lines from location to
An appropriate fresh rate depends on the property of location on the screen (vector graphics) phosphor coating Phosphor persistence: the time it takes for the a.k.a. calligraphic display, emitted light to decay to 1/10 of the original intensity Random scan device, vector drawing display
Typical refresh rate: 60 – 80 times per second (Hz) Use either display list or (What will happen if refreshing is too slow or too storage tube technology fast?)
Raster Scan Order Raster Scan Order
What we do now: the electron gun will The electron gun will scan through the scan through the pixels from left to pixels from left to right, top to bottom right, top to bottom (scanline by (scanline by scanline) scanline)
Horizontal retrace
3 Raster Scan Order Progressive vs. Interlace
The electron gun will scan through the Progressive: Scan every scan line pixels from left to right, top to bottom Interlace: Scan only every other scan (scanline by scanline) line (e ven ->odd> odd ->e> even ->odd> odd …) - so the refresh rate becomes twice as fast
Vertical retrace 0 Even scan 1 2 3 Odd scan 4 5
Standards Raster Scan Control
NTSC: Interlaced, 525 line, 59.94Hz, Scan Controller (video adaptor) and frame 4:3 buffer
DTV: Digit al ve rsion of NTSC , 480i , 4 :3 x Scan controller y HDTV: commonly 720p, 60Hz, 16:9
Blu-ray: 1080p
Other standards? DAC Frame buffer
4 Frame Buffer Color is expensive …
Frame buffer: the memory to hold the pixel intensity At least used to be values The more color you want, the more bits you Properties of a frame buffer that affect the graphics will need for each pixel performance: Exercise: 1024 x 1280 screen with Size: screen resolution Depth: color level 24 bits per pixel, how large is the frame 1 bit/pixel: black and white buffer? 8 bits/pixel: 256 levels of gray 1024 x 1280 x 24 / 8 = 4M Byte 24 bits/pixel: 16 million colors
Speed: refresh speed @30fps = 120MB/sec
Color Lookup Table A simple graphics system
Say I am a poor man … I only have 3 bits per pixel Frame buffer can be part But I insist on having high quality pictures … Scan of the main memory Controller Use Color Look Up Table (LUT)
R G B Frame 0 CPU Main Memory 1 buffer 2 You can still have 24 bits 3 in each of the color table 4 5 entries System bus 6 24 bit wide 7 3 bits/pixel frame buffer Problem?
5 Dedicated memory Graphics Accelerator
Video memory: On-board frame buffer: Graphics Memory/ much faster to access Frame buffer Scan Frame A dedicated processor Graphics Scan Controller buffer for graphics processing Processor Controller
CPU Main Memory CPU Main Memory
System bus System bus
CPUs vs. GPUs Graphics Accelerator
6 The Graphics Pipeline
Graphics Bus Interface Graphics Bus Interface (2)
PCI based technology PCI Bus becomes the bottleneck! Many devices are using it
GaphicsMemoGraphics Memory/ Other There is a lot of stuff needs to be Frame buffer Peripherals transmitted from main memory to graphics Graphics Scan memory (geometry, textures, etc) Processor Controller PCI Bus – 132 MB/s Example: 2M triangle, 90 Bytes each – 180MB > 132 MB (PCI bandwidth) System Bus – 800MB/s
CPU Main Memory
7 Accelerated Graphics Port (AGP) AGP
A dedicated bus that allows direct access of main memory AGP 1x is four times as fast compared to PCI! (now we have AGP 8x) Grappy/hics Memory/ Other Frame buffer Peripherals No more llblocal bus congestion! Graphics Scan More geometry can be processed! Processor Controller PCI Bus – 132 MB/s Direct execution of many graphics AGP 1x: 518 MB/s operations from main memory Fast!!!
CPU Main Memory
PCI Express Reading and Lab0
Bandwidth?
Textbook Chapter 1, 2
AGP in fo: http: //deve loper. in te l.com /tec hno logy/ agp
Lab 0: Compile and run the sample OpenGL program posted on the class web site
8