© Copyright 3Dlabs, 1999 - Page 1 - PROPRIETARY & CONFIDENTIAL Virtual Textures Texture Management in Silicon Chris Hall Director, Product Marketing 3Dlabs.

Slides:



Advertisements
Similar presentations
1 Memory hierarchy and paging Electronic Computers M.
Advertisements

Lecture 12 Reduce Miss Penalty and Hit Time
Discussion Week 7 TA: Kyle Dewey. Overview Midterm debriefing Virtual memory Virtual Filesystems / Disk I/O Project #3.
Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
OS Fall’02 Virtual Memory Operating Systems Fall 2002.
1 Copyright © 2012, Elsevier Inc. All rights reserved. Chapter 2 (and Appendix B) Memory Hierarchy Design Computer Architecture A Quantitative Approach,
Virtual Memory Chapter 8.
Operating System Support Focus on Architecture
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
X86 and 3D graphics. Quick Intro to 3D Graphics Glossary: –Vertex – point in 3D space –Triangle – 3 connected vertices –Object – list of triangles that.
Paging and Virtual Memory. Memory management: Review  Fixed partitioning, dynamic partitioning  Problems Internal/external fragmentation A process can.
Memory Management 2010.
Chapter 8 Operating System Support (Continued)
Chapter 3.2 : Virtual Memory
1 Chapter 8 Virtual Memory Virtual memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of main memory.
Virtual Memory Chapter 8.
CS 333 Introduction to Operating Systems Class 9 - Memory Management
Virtual Memory and Paging J. Nelson Amaral. Large Data Sets Size of address space: – 32-bit machines: 2 32 = 4 GB – 64-bit machines: 2 64 = a huge number.
Computer Organization and Architecture
Virtual Memory I Chapter 8.
Reducing Cache Misses 5.1 Introduction 5.2 The ABCs of Caches 5.3 Reducing Cache Misses 5.4 Reducing Cache Miss Penalty 5.5 Reducing Hit Time 5.6 Main.
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Chapter 3 Memory Management: Virtual Memory
Review of Memory Management, Virtual Memory CS448.
CS333 Intro to Operating Systems Jonathan Walpole.
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Cosc 2150: Computer Organization Chapter 6, Part 2 Virtual Memory.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
Copyright © 2013, SAS Institute Inc. All rights reserved. MEMORY CACHE – PERFORMANCE CONSIDERATIONS CLAIRE CATES DISTINGUISHED DEVELOPER
The Memory Hierarchy 21/05/2009Lecture 32_CA&O_Engr Umbreen Sabir.
Memory Management – Page 1 of 49CSCI 4717 – Computer Architecture Memory Management Uni-program – memory split into two parts –One for Operating System.
Fall 2000M.B. Ibáñez Lecture 17 Paging Hardware Support.
Computer Studies (AL) Memory Management Virtual Memory I.
CS 149: Operating Systems March 3 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Chapter 4 Memory Management Virtual Memory.
Accelerating Two-Dimensional Page Walks for Virtualized Systems Jun Ma.
Memory Management Fundamentals Virtual Memory. Outline Introduction Motivation for virtual memory Paging – general concepts –Principle of locality, demand.
The Three C’s of Misses 7.5 Compulsory Misses The first time a memory location is accessed, it is always a miss Also known as cold-start misses Only way.
ECE 526 – Network Processing Systems Design Computer Architecture: traditional network processing systems implementation Chapter 4: D. E. Comer.
Virtual Memory 1 1.
Computer Systems Week 14: Memory Management Amanda Oddie.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Virtual Memory Hardware.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Demand Paging.
Memory Management. Why memory management? n Processes need to be loaded in memory to execute n Multiprogramming n The task of subdividing the user area.
Lectures 8 & 9 Virtual Memory - Paging & Segmentation System Design.
Virtual Memory Pranav Shah CS147 - Sin Min Lee. Concept of Virtual Memory Purpose of Virtual Memory - to use hard disk as an extension of RAM. Personal.
Memory Management – Page 1CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: Memory Management *** Modified – look for Reading:
3/1/2002CSE Virtual Memory Virtual Memory CPU On-chip cache Off-chip cache DRAM memory Disk memory Note: Some of the material in this lecture are.
1 Contents Memory types & memory hierarchy Virtual memory (VM) Page replacement algorithms in case of VM.
Memory Hierarchy— Five Ways to Reduce Miss Penalty.
Memory management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be in main memory.
Computer Architecture Lecture 12: Virtual Memory I
Virtual Memory Chapter 8.
Lecture 11 Virtual Memory
Computer Organization
CE 454 Computer Architecture
Virtual Memory User memory model so far:
CS703 - Advanced Operating Systems
Virtual Memory Chapter 8.
Main Memory Management
Chapter 8: Main Memory.
O.S Lecture 13 Virtual Memory.
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Main Memory Background Swapping Contiguous Allocation Paging
CS399 New Beginnings Jonathan Walpole.
Lecture 29: Virtual Memory-Address Translation
CS703 - Advanced Operating Systems
COMP755 Advanced Operating Systems
Operating Systems: Internals and Design Principles, 6/E
Virtual Memory 1 1.
Presentation transcript:

© Copyright 3Dlabs, Page 1 - PROPRIETARY & CONFIDENTIAL Virtual Textures Texture Management in Silicon Chris Hall Director, Product Marketing 3Dlabs Inc.

© Copyright 3Dlabs, Page 2 A Few Definitions Texture Mapping Texture Map -Bitmap images used to provide extra detail in rendered images A Mipmap Texture -A series of bitmaps containing the same image at different sizes A Texel is a single pixel in a texture Pixel Texel Inverse Address Transform Texture Map Put Nearest Texel into Pixel

© Copyright 3Dlabs, Page 3 Texture Management A non-trivial problem Fitting textures into memory is a classical NP complete CS problem -No easy solution Textures use large amounts of memory -A 256x256 true-color texture uses 384KBytes of memory -Applications tend to use many (100s) textures simultaneously Textures must be resident on card for maximum performance -Up to 8 texels accessed per drawn pixel -~4GB/s of memory bandwidth to read texel data Onboard texture memory is limited, and must be managed -Bitmaps are 2D entities, and must be fitted inside of a 2D texture store -Typically, the textures are square, and sized as a power of 2 Bandwidth between the texture store and main memory is limited -AGP 2X is 512MB/s -AGP 4X is ~1GB/s Free Used

© Copyright 3Dlabs, Page 4 Traditional Solution Software Management Maintain two size-sorted lists of rectangular areas in texture memory -Free List, the “empty” rectangles in texture memory -Used List, the “full” rectangles which currently contain textures Complex sequence to download a new texture Traverse Free List to find correct size rectangle Traverse Used List to find correct size rectangle Traverse Free List to find larger size rectangle Download new texture to free rectangle Traverse Used List to find larger size rectangle Seek to coalesce Free List Rectangles Seek to coalesce Used List Rectangles Discard texture in Used list rectangle Unsuccessful Successful

© Copyright 3Dlabs, Page 5 SW Texture Management Inevitable Problems Wasted Space -We have a 32x32 texture, but the only space available is 128x128 -Memory Fragmentation becomes a big problem Garbage Collection -Should we coalesce blocks that are freed? -Is there an optimal sized block that we should keep uncoalesced? Texture Memory Thrashing -Fitting in new textures of means throwing textures out of the on-board memory that are immediately required again FreeUsed 32x32 Fragmented 128x128 space

© Copyright 3Dlabs, Page 6 SW Texture Management More Problems Texture memory management is a pan- application problem -must be handled by part of the driver that has access to all applications Must download complete textures -Includes all mipmap levels -Software has no way to know which texels will be needed FreeUsed To fit this texture - a lot of shuffling and discarding is needed

© Copyright 3Dlabs, Page 7 An Alternative AGP Texture Execute Avoid the texture memory management issue all together -The host system has “infinite” memory available Poor texture access latency -Texturing pipeline must stall while the texel data is brought across the bus Generates AGP bus traffic each time a texel is used -On-chip caches help, but not enough Texture traffic clashes with vertex traffic -In a typical graphics system, the AGP bus is still being used to transfer vertex data, while texturing is occuring An ineffective solution -Performance cost is too high System Memory On-board Memory AGP Rendering Chip Memory bus Framebuffer Z buffer Little On-board Texture Memory Texture Map loaded in system memory

© Copyright 3Dlabs, Page 8 System Memory Graphics Engine Page Fault DMA On-board Memory AGP GLINT R3 Virtual Texture MMU 128 bit memory bus Virtual Textures 3Dlabs’ unique texture management system On-chip virtual memory management unit - similar to a CPU -Virtual to physical address translation unit -Dedicated page-fault DMA engine fetches pages with no CPU intervention -Handles 256MB Virtual Texture address space Texture Map loaded in system memory Pages cached as they are used. Pages are two dimensional 4Kbytes, 32x32 true color texels Framebuffer Z buffer On-board Memory acts as L2 texture cache

© Copyright 3Dlabs, Page 9 Details of the Paging Mechanism Very much like a CPU Virtual Memory System Operates on 4KB pages -32x32 true-color pixels -Smaller textures can be combined into a single page -True size of data in page is used to determine transfer size on AGP bus Manages up to 256MB of texture data -8 bytes per page of page table overhead -256MB uses 512KB of onboard memory True Demand Paged Texture Management -Textures do not need to be completely resident on the graphics card -Only accessed pages are brought down to the graphics card Textures do not need to be physically contiguous -Not in onboard memory -Not in system memory No CPU Intervention Required -Autonomous DMA engine automatically loads pages into on-board working set

© Copyright 3Dlabs, Page 10 Virtual Textures Significant Load Balancing Benefits A normal graphics board has to download a complete texture as soon as the first texel is accessed -For a 2048x2048x32 texture, that is 16MBytes! With Virtual Texturing, only the accessed pages are downloaded -Avoids large texture download spikes and application “stuttering” Texture being revealed Object moving

© Copyright 3Dlabs, Page 11 Mip-map Level Loading Virtual Textures Score Again Texture loading on demand works for mip-map levels -A far-away object need only load low-resolution mip-map levels If the object never comes close - can result in huge savings -The lowest mip-map levels of even a 2048x2048x32 texture fits in just a few bytes As object gets closer mip-map level pages are smoothly loaded Large Texture Small mip-map level needed when object is far away

© Copyright 3Dlabs, Page 12 Other Virtual Textures Benefits Texture management software becomes trivial Software simply identifies location of texture in host memory to the graphics sub-system No CPU Intervention needed on a page miss -Geometry pipeline doesn’t need to understand whether or not to load a new texture down to the graphics sub-system Ability to (effectively) use textures that are larger than available memory Easily handles thousands of small textures Can be extended to access System Virtual Memory -Interrupt generated upon page fault -ISR causes operating system to page in required data -ISR causes graphics sub-system to load required data

© Copyright 3Dlabs, Page 13 Conclusion Virtual Memory for Graphics Cards The Virtual Textures mechanism is a dramatically improved texture memory management technique. Improved Performance - up to 50% better real world performance over hardware with similar raw fill-rates Simplified Software - fewer bugs, less CPU time Improved usage of available texture memory -Entire textures don’t have to be present -Only used Mipmap levels need to be downloaded Virtual Textures is available today in the Permedia3 Create!, Oxygen VX1, Oxygen GVX1, and the new Oxygen GVX210 products