Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Accelerating Virtual Texturing Using CUDA
GPU Technology Conference, October 2009, San Jose, California
ELIS
UNIVERSITEITGENT
Charles-Frederik Hollemeersch, Bart Pieters,
Peter Lambert, and Rik Van de Walle
Ghent University - IBBT, ELIS Department/Multimedia Lab,
Gaston Crommenlaan 8 bus 201, B-9050 Ledeberg - Ghent, Belgium
Introduction
§ Increasing texture use requires dynamic loading of textures
§ Traditionally ad-hoc methods are used
o Mipmap streaming
o Clipmapping (Mega Texture)
§ Virtual texturing offers generalized texture streaming
o Up to several gigapixels of texture data
o Works on arbitrary geometry & unwraps
§ Expensive to implement
o Requires frame analysis to determine working set
o Dynamic streaming & compression of tiles needed
o However, several tasks are suitable for parallel processing
References
§ Charles-Frederik Hollemeersch, Bart Pieters, Peter Lambert, and Rik Van de
Walle. (2009). Accelerating virtual texturing using CUDA. In: Wolfgang Engel
GPU Pro - Advanced Rendering Techniques. A K Peters.
Determining the Working Set using CUDA
Preliminary Results
Virtual Texturing: an Overview
§ Based on virtual memory
o Split texture into fixed size pages
o Also uses pages for mipmap levelsTile Uploading & Processing using CUDA
§ Pages are asynchronously uploaded in separate streams
§ Mipmaps are generated (for anisotropic filtering)
§ DXT compression is executed
§ Copy to page texture (Using OpenGL)
Software Architecture
Page Uploader
Page Cache
(CPU)Page Provider
(CPU)Page Store
Renderer
(OpenGL)
Page Resolver
(CUDA)
Page Table
(OpenGL)
Page Translation
Texture (RGBA8)
Page Cache
Texture (DXT)
PageID Buffer
(RGBA8)
(CUDA)
e-mail: [email protected] http://multimedialab.elis.ugent.be
§ Measured on a Intel Core 2 Quad and NVIDIA GeForce GTX
285, averaged over 100 frames
Task Time
Resolve frame 1.2 ms
Regenerate page table 0.7 ms
Upload, mipmap and DXT encode 0.21 ms
Stream 1
Upload “packet”
Stream 2
Copy to GPU
Kernel execution
texSubImage2D
§ Determines the list of pages needed by the current view
§ Analyses buffer rendered using special shader (OpenGL)
To CPU
Kernel 1: Mark this
frame’s used pageIDs
Kernel 2: Pack the list
of pageIDs for transfer
Asynchronous transfer
to the CPU
Page Table
Texture
Rendered Result
Physical Pages
Texture
32-bit virtual pageID
(TileX,TileY,MipLevel)