PSU Capstone Project Candidate: ARB_vertex_program Compiler - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

PSU Capstone Project Candidate: ARB_vertex_program Compiler

Description:

First generation of programmable hardware was released 4 years ago ... Allow offloading of complex effects from the host CPU to the ... Nintendo DS ' ... – PowerPoint PPT presentation

Number of Views:86
Avg rating:3.0/5.0
Slides: 11
Provided by: webCe
Category:

less

Transcript and Presenter's Notes

Title: PSU Capstone Project Candidate: ARB_vertex_program Compiler


1
PSU Capstone Project Candidate
ARB_vertex_program Compiler
October 10th, 2005
Ian Romanick (idr_at_us.ibm.com)
2
Project Vertex program compiler
  • Modern graphics hardware is becoming more
    flexible and general
  • First generation of programmable hardware was
    released 4 years ago (Radeon 8500 Geforce3).
  • Three complete generations later, and approaching
    complete generality.

3
Why vertex programs?
  • Allow offloading of complex effects from the host
    CPU to the graphics processor (GPU).
  • Processing data on GPU can eliminate need to
    transfer data each frame.
  • New opportunities for hardware optimization.
  • Exposed via APIs such as OpenGL or DirectX.
  • Serveral common extensions to OpenGL.
  • ARB_vertex_program, ARB_vertex_shader,
    NV_vertex_program
  • Core feature in OpenGL 2.0.
  • Core feature in DirectX 8.1 and later.

4
Vertex program demo
  • All calculations happen in the vertex program.
  • Only the position of the gravity point is
    modified each frame.
  • Compute distance from vertex to gravity source
  • ADD R1, program.local30, -vertex.position
    vector from vertex to gravity
  • DP3 R2, R1, R1 dot product
  • RSQ R2, R2.x square root distance
  • MUL R2, R2, program.local31.xxxx scale
    by the gravity factor
  • MAD R3, R1, R2, vertex.position Displace
    vertex by gravity
  • Continue with typical modelview/projection
  • DP4 result.position.x, state.matrix.mvp.row0,
    R3 object x MVP -gt clip
  • DP4 result.position.y, state.matrix.mvp.row1,
    R3
  • DP4 result.position.z, state.matrix.mvp.row2,
    R3
  • DP4 result.position.w, state.matrix.mvp.row3,
    R3
  • MOV result.color, vertex.color copy input
    color to output color

5
Not all GPUs run vertex programs
  • All pre-2001 GPUs and some later GPUs don't
    support vertex programs.
  • Embedded GPUs save chip space by using host CPU
    for vertex programs.
  • Example Sony PSP, Nintendo DS
  • Integrated GPUs (embedded in motherboard
    chipset) often don't support vertex programs.
  • Example Intel i945G

6
OpenGL on Linux
  • All open-source 3D drivers for Linux are based on
    Mesa.
  • Mesa supports ARB_vertex_program.
  • Programs are compiled to byte code (not Java).
  • At run-time, byte code is...interpreted!
  • Painfullly slow!
  • No cards supported by open-source drivers have
    native vertex program support.
  • To achieve acceptable performance, a compiler
    targeted for the host CPU is needed.

7
Project requirements
  • Write compiler back-end for ARB_vertex_program.
  • Front-end already exists.
  • Only target one common CPU (e.g., x86, x86-64,
    PowerPC, etc.)
  • Project done when some agreed upon set of
    programs compiles and runs correctly.
  • Performance need not be optimial.

8
Skills needed / Assistance Provided
  • Strong C programming skills.
  • Compiler skills...remember CS322???
  • Working knowledge of SIMD computing a big plus.
  • OpenGL knowledge is a plus, but not requiremed.
  • Can meet with students on weekly basis or anytime
    via e-mail / IRC.
  • Assist understanding existing code.
  • Assist with instruction set issues.
  • Can provide samples and tests.
  • All required documentation available on the web.

9
Questions?
10
Legal Statement
  • This work represents the views of the author(s)
    and does not necessarily reflect the views of IBM
    Corporation.
  • The following terms are trademarks or registered
    trademarks of International Business Machines
    Corporation in the United States and/or other
    countries IBM (logo). A full list of U.S.
    trademarks owned by IBM may be found at
    http//www.ibm.com/legal/copytrade.shtml.
  • OpenGL is a trademark of SGI.
  • DirectX is a trademark of Microsoft.
  • Linux is a registered trademark of Linus
    Torvalds.
  • Other company, product, and service names may be
    trademarks or service marks of others.
Write a Comment
User Comments (0)
About PowerShow.com