skip to main content
research-article
Public Access

A system for rapid exploration of shader optimization choices

Published:11 July 2016Publication History
Skip Abstract Section

Abstract

We present Spire, a shading language and compiler framework that facilitates rapid exploration of shader optimization choices (such as frequency reduction and algorithmic approximation) afforded by modern real-time graphics engines. Our design combines ideas from rate-based shader programming with new language features that expand the scope of shader execution beyond traditional GPU hardware pipelines, and enable a diverse set of shader optimizations to be described by a single mechanism: overloading shader terms at various spatio-temporal computation rates provided by the pipeline. In contrast to prior work, neither the shading language's design, nor our compiler framework's implementation, is specific to the capabilities of any one rendering pipeline, thus Spire establishes architectural separation between the shading system and the implementation of modern rendering engines (allowing different rendering pipelines to utilize its services). We demonstrate use of Spire to author complex shaders that are portable across different rendering pipelines and to rapidly explore shader optimization decisions that span multiple compute and graphics passes and even offline asset preprocessing. We further demonstrate the utility of Spire by developing a shader level-of-detail library and shader auto-tuning system on top of its abstractions, and demonstrate rapid, automatic re-optimization of shaders for different target hardware platforms.

Skip Supplemental Material Section

Supplemental Material

a112.mp4

mp4

240.4 MB

References

  1. Ansel, J., Chan, C., Wong, Y. L., Olszewski, M., Zhao, Q., Edelman, A., and Amarasinghe, S. 2009. Petabricks: A language and compiler for algorithmic choice. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, ACM, New York, NY, USA, PLDI '09, 38--49. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Austin, C., and Reiners, D. 2005. Renaissance: A functional shading language. In Proceedings of Graphics Hardware 2005, ACM, New York, NY, USA, 1--8.Google ScholarGoogle Scholar
  3. Bauer, M., Treichler, S., Slaughter, E., and Aiken, A. 2012. Legion: Expressing locality and independence with logical regions. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis, IEEE Computer Society Press, SC '12, 66:1--66:11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bungie, 2014. Destiny computer game. Available at http://www.destinythegame.com.Google ScholarGoogle Scholar
  5. Clarberg, P., Toth, R., Hasselgren, J., Nilsson, J., and Akenine-Möller, T. 2014. Amfs: Adaptive multi-frequency shading for future graphics processors. ACM Trans. Graph. 33, 4 (July), 141:1--141:12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Epic Games, 2015. Unreal Engine 4 documentation. Available at http://docs.unrealengine.com.Google ScholarGoogle Scholar
  7. Epic Games, 2015. Unreal Engine 4 Marketplace Web Site. http://www.unrealengine.com/marketplace.Google ScholarGoogle Scholar
  8. Fatahalian, K., Horn, D. R., Knight, T. J., Leem, L., Houston, M., Park, J. Y., Erez, M., Ren, M., Aiken, A., Dally, W. J., and Hanrahan, P. 2006. Sequoia: programming the memory hierarchy. In Proceedings of the 2006 ACM/IEEE conference on Supercomputing, ACM, SC '06. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Foley, T., and Hanrahan, P. 2011. Spark: modular, compos-able shaders for graphics hardware. ACM Trans. Graph. 30, 4 (July), 107:1--107:12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Hanrahan, P., and Lawson, J. 1990. A language for shading and lighting calculations. SIGGRAPH Comput. Graph. 24, 4 (Sept.), 289--298. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. He, Y., Gu, Y., and Fatahalian, K. 2014. Extending the graphics pipeline with adaptive, multi-rate shading. ACM Trans. Graph. 33, 4 (July), 142:1--142:12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. He, Y., Foley, T., Tatarchuk, N., and Fatahalian, K. 2015. A system for rapid, automatic shader level-of-detail. ACM Trans. Graph. 34, 6 (Oct.), 187:1--187:12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Kavan, L., Bargteil, A. W., and Sloan, P.-P. 2011. Least squares vertex baking. In Proceedings of the Twenty-second Eurographics Conference on Rendering, Eurographics Association, Aire-la-Ville, Switzerland, Switzerland, EGSR '11, 1319--1326. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Kessenich, J., Baldwin, D., and Rost, R., 2014. The OpenGL shading language language version 4.4. Available at https://www.opengl.org.Google ScholarGoogle Scholar
  15. Lalonde, P., and Schenk, E. 2002. Shader-driven compilation of rendering assets. ACM Trans. Graph. 21, 3 (July), 713--720. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Mark, W. R., Glanville, R. S., Akeley, K., and Kilgard, M. J. 2003. Cg: A system for programming graphics hardware in a c-like language. ACM Trans. Graph. 22, 3 (July), 896--907. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. McCool, M. D. 2000. SMASH: A next-generation API for programmable graphics accelerators. Tech. Rep. CS-2000-14, University of Waterloo, August.Google ScholarGoogle Scholar
  18. Microsoft, 2016. HLSL shader model 5 documentation. Available at https://msdn.microsoft.com.Google ScholarGoogle Scholar
  19. Patney, A., Tzeng, S., Seitz, Jr., K. A., and Owens, J. D. 2015. Piko: A framework for authoring programmable graphics pipelines. ACM Trans. Graph. 34, 4 (July), 147:1--147:13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Proudfoot, K., Mark, W. R., Tzvetkov, S., and Hanrahan, P. 2001. A real-time procedural shading system for programmable graphics hardware. In Proceedings of SIGGRAPH 01, Annual Conference Series, ACM, New York, NY, USA, 159--170. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Ragan-Kelley, J., Adams, A., Paris, S., Levoy, M., Amarasinghe, S., and Durand, F. 2012. Decoupling algorithms from schedules for easy optimization of image processing pipelines. ACM Trans. Graph. 31, 4 (July), 32:1--32:12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Shopf, J., 2009. Mixed resolution rendering. Game Developers Conference 2009 slides.Google ScholarGoogle Scholar
  23. Sitthi-Amorn, P., Modly, N., Weimer, W., and Lawrence, J. 2011. Genetic programming for shader simplification. ACM Trans. Graph. 30, 6 (Dec.), 152:1--152:12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Sugerman, J., Fatahalian, K., Boulos, S., Akeley, K., and Hanrahan, P. 2009. GRAMPS: A programming model for graphics pipelines. ACM Transactions on Graphics 28, 1, 4:1--4:11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Vaidyanathan, K., Salvi, M., Toth, R., Foley, T., Akenine-Möller, T., Nilsson, J., Munkberg, J., Hasselgren, J., Sugihara, M., Clarberg, P., Janczak, T., and Lefohn, A. 2014. Coarse pixel shading. In High Performance Graphics 2014, 10.Google ScholarGoogle Scholar
  26. Wang, R., Yang, X., Yuan, Y., Chen, W., Bala, K., and Bao, H. 2014. Automatic shader simplification using surface signal approximation. ACM Trans. Graph. 33, 6 (Nov.), 226:1--226:11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Yang, L., Sander, P. V., and Lawrence, J. 2008. Geometry-aware framebuffer level of detail. In Proceedings of the Nineteenth Eurographics Conference on Rendering, Eurographics Association, EGSR'08, 1183--1188. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A system for rapid exploration of shader optimization choices

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM Transactions on Graphics
      ACM Transactions on Graphics  Volume 35, Issue 4
      July 2016
      1396 pages
      ISSN:0730-0301
      EISSN:1557-7368
      DOI:10.1145/2897824
      Issue’s Table of Contents

      Copyright © 2016 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 11 July 2016
      Published in tog Volume 35, Issue 4

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader