Top Banner
CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
55

CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

Mar 15, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

CS 380 - GPU and GPGPU ProgrammingLecture 16: GPU Texturing 6

Markus Hadwiger, KAUST

Page 2: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

2

Reading Assignment #9 (until Mar. 30)

Read (required):

• Hardware Virtual Texturing, Graham Sellers,from SIGGRAPH 2013 course “Rendering Massive Virtual Worlds”

https://cesiumjs.org/massiveworlds/downloads/Graham/Hardware_Virtual_Textures.pptx

• Distributed Texture Memory in a Multi-GPU Environment,Moerschell and Owens, Graphics Hardware 2006

http://www.idav.ucdavis.edu/publications/print_pub?pub_id=886

Read (optional):

• Virtual Texturing in Software and Hardware, van Waveren et al.,SIGGRAPH 2012 course notes + slides

http://www.jurajobert.com/data/Virtual_Texturing_in_Software_and_Hardware_course_notes.pdf

http://mrelusive.com/publications/presentations/2012_siggraph/Virtual_Texturing_in_Software_and_Hardware_final.pdf

Page 3: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

3

Quiz #3: March 30

Organization• First 30 min of lecture

• No material (book, notes, ...) allowed

Content of questions• Lectures (both actual lectures and slides)

• Reading assigments

• Programming assignments (algorithms, methods)

• Solve short practical examples

Page 4: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

4

Virtual Texturing

Rage / id Tech 5 (id Software)

Page 5: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

Divide texture up into tiles• Commit only used tiles to memory

• Store data in separate physical texture

Virtual Texture

Physical Texture

Virtual Texturing

Page 6: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

Memory requirements set by number of resident tiles, not texture dimensions

RGBA8, 1024x1024, 64 tiles

Virtual Physical

Memory 4096 kB 1536 kB

Virtual Texturing

Page 7: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

Use indirection table to map virtual to physical• This is also known as a page table

Virtual Texturing

Page 8: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

GPU Virtual Memory

texture(sampler, uv);

Texture Unit

uv

virtual address

Memory Controller

Page Table

Physical Memory

virtualaddress

physical address

physical address data

data

data

Page 9: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

9

Page 10: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

10

Page 11: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

11

Virtual Texturing

Example #3:

id Tech 5 Megatextures, id Software

Rage

Page 12: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 13: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

Markus Hadwiger, KAUST 13

Page 14: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 15: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 16: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 17: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

17

Virtual Texturing

Fourth example:

Petascale Volume Rendering• Interactive Volume Exploration of Petascale Microscopy Data Streams Using

a Visualization-Driven Virtual Memory Approach,Hadwiger et al., IEEE SciVis 2012

http://dx.doi.org/10.1109/TVCG.2012.240

Page 18: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

Petascale Volume Rendering

Markus Hadwiger, KAUST 18

multi-resolutionpage directory

Page 19: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

19

Virtual Texturing

Fifth example:

Distributed Texture Memory in a Multi-GPU Environment• Moerschell and Owens, Graphics Hardware 2006

http://www.idav.ucdavis.edu/publications/print_pub?pub_id=886

Page 20: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 21: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 22: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 23: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 24: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 25: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 26: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 27: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 28: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 29: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 30: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 31: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 32: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 33: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 34: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 35: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 36: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 37: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 38: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 39: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 40: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 41: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 42: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 43: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 44: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 45: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 46: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 47: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 48: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 49: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 50: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 51: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 52: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 53: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 54: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST
Page 55: CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 · CS 380 - GPU and GPGPU Programming Lecture 16: GPU Texturing 6 Markus Hadwiger, KAUST

Thank you.

• AMD

• Aaron Lefohn

• id Software

• Adam Moerschell and John Owens