1 / 8

GLSL Conformance proposal

GLSL Conformance proposal. December 2004. Overview. GLSL is a complex part of OpenGL 2.0 Portability of shaders across vendors is a concern What is shader portability? 1. Well-formed source code compiles on any system ISVs can write shaders knowing they will compile

velika
Download Presentation

GLSL Conformance proposal

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GLSL Conformance proposal December 2004

  2. Overview • GLSL is a complex part of OpenGL 2.0 • Portability of shaders across vendors is a concern • What is shader portability? • 1. Well-formed source code compiles on any system • ISVs can write shaders knowing they will compile • 2. Compiled source code runs in a reasonably similar manner on any system. • Implementation of the language is similar across systems • 3. The GLSL object API behaves as expected on any system • Loading source code, error behavior, compile or link success and failures, attribute handling etc etc

  3. Well-formed source code compiles on any system • GLSL spec states: Compilers are required to return messages regarding lexically, grammatically or semantically incorrect shaders. • GLSL is a language in development => extensions are possible. • Extensions guided by the GLSL Extension Conventions document in the registry. • Avoids name-space collisions between vendors, between extensions and core • Extensions that alter existing behavior must be explicitly enabled in a shader • Extensions that alter semantics or syntax must be explicitly enabled in a shader This ensures ISVs get early warnings of possible non-portable code.

  4. GLSL front-end • 3Dlabs provides open-source BSD license GLSL front-end. • Front-end consists of pre-processor, lexical analyzer, parser, tree builder and semantic analyzer. • Uses code from NVIDIA for pre-processing, flex, bison and C++. • This front-end helps IHVs comply with the GLSL specification • Compilers are required to return messages regarding lexically, grammatically or semantically incorrect shaders • This front-end is used by multiple vendors. • This front-end is well tested and scrutinized. => high quality. • Bugs reported by those vendors as well as individual hobbyists. • Free support • Questions / suggestions / bug reports get prompt attention • Why do we do this? • To lessen interpretation confusion of a GLSL front-end. • To promote the use by IHVs, which will increase shader portability.

  5. GLSL parser test • 3Dlabs wrote utility to test adherence to the rule: • Compilers are required to return messages regarding lexically, grammatically or semantically incorrect shaders • BSD Open Source license • http://developer.3dlabs.com/openGL2/index.htm • Compiles 170+ shaders each aimed at testing a particular language construct. Compares compilation result to what is expected. • Some tests should compile, some should fail. • Easy to add new tests • Returns info log for each test • Reports a percentage compliance, number of passed, failed and crashed tests

  6. Results • ATI Radeon X800-PRO • Driver Catalyst 4.11 OpenGL 1.5.4707 • Passed 176 • Failed 7 • Score 96% • NVIDIA 6800 Ultra • Driver 66.93 OpenGL 1.5.2 • Passed 86 • Failed 97 • Score 47% • 3Dlabs Wildcat Realizm 100 • Driver 4.03-0199 • Passed 182 • Failed 1 • Score 99%

  7. Wrap up • Shader portability is in the best interest of ISVs and IHVs • Lexical, Syntax and Semantic compliance is the least the ARB should guideto promote shader portability. • 3Dlabs Proposes that the ARB adopts GLSL Parser Test for OpenGL 2.0 compliance.

  8. Questions?

More Related