Copyright © 2007-2015 Curt Hill Video Hardware Evolution

Embed Size (px)

DESCRIPTION

Copyright © Curt Hill Discussion It was unacceptable for the eyesight to have only a CGA, but often both were used Both of these put the memory of their displays above 640K and below 1M This did cause contention for memory Both the CPU and the display adapter accessed this memory

Citation preview

Copyright Curt Hill Video Hardware Evolution Copyright Curt Hill Original IBM PC The first IBM PC used one or both of the following adaptors: MDA or CGA The MDA Only did monochrome Had a very nice sharp display Could only display ASCII characters, no graphics The CGA Was able to do graphics and color Usually fuzzy and shaky compared to the MDA AKA Scuz-graph Copyright Curt Hill Discussion It was unacceptable for the eyesight to have only a CGA, but often both were used Both of these put the memory of their displays above 640K and below 1M This did cause contention for memory Both the CPU and the display adapter accessed this memory Copyright Curt Hill Text In text mode they stored two bytes per character One byte was the character to display The other an attribute character: On MDA Blinking Intensity Reverse video On CGA foreground and background colors Copyright Curt Hill CGA Graphics The CGA had several modes of operation: four text and three graphics Since it had fixed amount of memory it was a tradeoff between number of colors and number of characters in text mode or resolution vs. number of colors in graphics mode They could be manipulated by ROM BIOS services INT 10 or by directly going after the memory Copyright Curt Hill Hercules There was also a Hercules Graphics Card card It was monochrome, but handled graphics with better resolution than Scuz-graph Was easy to read yet had decent graphics There were other third party cards as well Copyright Curt Hill Followup Cards EGA (Enhanced) This was the first readable graphics display Introduced with the AT MCGA (Multi Color Graphics Array) PS/2s only An also ran Copyright Curt Hill VGA (Video Graphics Array) Last hurrah for IBM as far as setting the standards Some descendent of VGA is now the standard Both of these require substantial memory on the controller card - more than will fit between 640K and 1M Copyright Curt Hill Compatibility Both EGA and VGA maintained upward compatibility by honoring all the old modes and adding new ones What has increased with the memory on the controller card is the number of pixels and the colors The RGB format usually stores 4 bytes per pixel Red, Green, Blue, Transparency Each of these is in range An alternative is to use the word to choose from palettes Copyright Curt Hill GPU The above works well for simple graphics Not so much for 3D virtual reality Instead of the CPU doing all the work of converting a scene to an array of pixels let a Graphics Processor do the grunt work This starts in the 1990s Traditional GPU Architecture GPUs have a specialized pipeline of about five stages Vertex Triangle Shading Depth Framebuffer Copyright Curt Hill Vertex Start with a series of points This describes the corner points of a triangle mesh outline of the world that is seen It is 3D in nature Each point is represented by an (x,y,z) triple to locate it in three space Copyright Curt Hill Triangles Assemble the points into triangles Each object defines the surface of that object The object may be in independent coordinate systems They then have to be transformed into a common coordinate system Copyright Curt Hill Paolo Uccello Copyright Curt Hill A chalice in a perspective study Approximately 1450 Shading The light illuminating each triangle is now computed Must use the texture shade that covers each triangle The lighting sources are located For each triangle we must determine how the light strikes that surface from each light source Copyright Curt Hill Depth Into the scene the point of view is fixed This is the camera by which the user views the world We must determine what can and cannot be seen Hidden line elimination This step extensively used 4 by 4 matrix operations Copyright Curt Hill Framebuffer Convert the transformed, textured, still visible triangles into pixels AKA rendering or rasterization This is now displayed on the screen Copyright Curt Hill Typical architecture Copyright Curt Hill SGI Infinite Reality 1997 The Change GPUs have since moved to more generalized structures Instead of a few specialized pipelines many general cores The various tasks in the pipeline are not that complicated Follows the trend of moving from specialized controllers with their own custom circuitry moving to simple CPUs with programming Copyright Curt Hill Evolution of nVidia 1995 NV1 1 million transistors 50K triangles/second 1 million pixel operations/sec 16 bit color 1999 GeForce 256 22 million 15M triangles/second 23M pixel operations/sec 32 bit color 2001 GeForce 3 57 million 100M triangles/second 1G pixel operations/sec Vertex/Pixel shaders Copyright Curt Hill Bigger and Faster 2002 GeForce4 63 million 2003 GeForce FX 130 million 200M triangles/second 2G pixel operations/sec 2004 GeForce 6 222 million 600M triangles/second 12.8G pixel operations/sec 2005 GeForce 7 302 million Copyright Curt Hill Evolving 2006 GeForce 8 754 million CUDA based GPU computing GPUs become more general computing engines 2008 GeForce GTX 280 1.4 billion 933 GFLOPS with 1.3 GHz clock 240 stream processors 1GB DRAM Copyright Curt Hill GeForce GTX stream multi- processors Each contain 8 streaming processors Copyright Curt Hill Stream Multiprocessor 32 bit IEEE floating point 32 and 64 bit integer registers Copyright Curt Hill Programming Model Partition load into block of threads Does not run until resources are available Always runs to completion Hardware thread scheduling Any thread that is idle can be used Context switching is easy and can occur on any cycle Copyright Curt Hill How are CPUs and GPUs different? CPUs Low latency Low throughput Complicated and unpredictable tasks GPUs High latency High throughput Simple and predictable tasks Why do we not care about latency in GPUs? Copyright Curt Hill Again CPUs minimize delays Use caching to accomplish CPU always does well to run out of the cache GPUs use many more transistors to add to computational power Very little cache CPU 4-16 threads GPU tens of thousands Copyright Curt Hill How do we manage thousands of threads? There are normally dispatch and synchronization issues Single Instruction Multiple Data threads Each thread is doing exactly the same thing but on different data Thousands of threads on hundreds of cores Managed and scheduled by hardware Copyright Curt Hill Common Graphics Languages OpenGL was started by Silicon Graphics Inc (SGI) Microsoft developed the Directs which include: DirectDraw DirectX Direct3D Intels Accelerated Graphics Port (AGP) AMDs 3DNow Graphics Languages The GPU does not have much of a language parser So these languages look more like a machine language They allow for: Locating geometric shapes in 3-space Applying textures on these shapes Determining the 3-space location and orientation of the viewer Providing lighting Copyright Curt Hill OpenGL Example void main() { InitializeAWindowPlease(); glClearColor (0.0, 0.0, 0.0, 0.0); glClear (GL_COLOR_BUFFER_BIT); glColor3f (1.0, 1.0, 1.0); glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0); glBegin(GL_POLYGON); glVertex3f (0.25, 0.25, 0.0); glVertex3f (0.75, 0.25, 0.0); glVertex3f (0.75, 0.75, 0.0); glVertex3f (0.25, 0.75, 0.0); glEnd(); glFlush(); UpdateTheWindowAndCheckForEvents(); } Commentary This uses a C library for OpenGL calls Each function call sends a discrete piece of information to the video card Copyright Curt Hill CUDA Compute Unified Device Architecture Programming model and platform Developed by nVidia Uses the GPU as a parallel computing platform Not for rendering graphics Use C/C++/FORTRAN to program the GPU Part of the GPGPU trend General Purpose GPU computing Copyright Curt Hill Finally Graphic progress has been about several things Offloading the work from a general CPU to a specialized GPU Raising the language from describing pixels to describing geometric objects The evolution of the GPU has been at least as dramatic as the CPU Not as well publicized Copyright Curt Hill