ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

When the Compiler Gives You Errors, Make SFINAE - Keith Stockdale - ACCU 2025 Short Talks

SFINAE

Compiler

sfinae c++

shader programming

HLSL

HLSL unit tests

debugging HLSL

shader programming hlsl

HLSL data

Keith Stockdale

graphics programming bug

ACCU 2025

graphics programming talk

shader code

unit tests in graphics code

how to write shaders

compiler

C++ type traits

hlsl shader

unit testing library

Software

code

programming software

program

Software Developer

software programming

tech talk

short talks

accu

programming

graphics

programmer

c++

Автор: ACCU Conference

Загружено: 2025-11-26

Просмотров: 362

Описание: ACCU Membership: https://tinyurl.com/ydnfkcyn
---

When the Compiler Gives You Errors, Make SFINAE - Keith Stockdale - ACCU 2025 Short Talks
---

HLSL 2021 introduces templates, bringing SFINAE and C++-style type traits into your shader programming toolbox. But when trying to write a unit testing library in HLSL, I hit a compiler bug that broke sizeof on structs containing enums. This talk walks through how I used SFINAE-style techniques and type traits to detect and work around this issue — all inside shader code.

The bug (documented in GitHub issue #5553 for the DirectXShaderCompiler) prevented using sizeof on structs with enums, making it difficult to serialize HLSL data or write meaningful static assertions. But thanks to recent HLSL 2021 features like templates, I implemented a workaround by hoisting enums into a base class and detecting enum presence with template tricks. This gave me a clean way to bypass the limitation and continue writing robust HLSL unit tests.

While HLSL is not C++, it’s becoming more like it. This talk showcases how C++ concepts like SFINAE and type traits can be ported into HLSL, giving graphics programmers better tools for testing, abstraction, and compile-time checks. I also highlight a few quirks in the HLSL compiler’s error handling and static_assert behavior, especially when compared to C++ standards like C++11 and C++17.

If you're writing shader code in HLSL 2021, exploring unit testing strategies, or debugging odd compiler behavior, this lightning talk will help you avoid common pitfalls and inspire you to share your solutions. Don't be a DenverCoder9 — document your bug fixes and workarounds.

Topics covered: HLSL templates, SFINAE, sizeof enum bug, static_assert, DirectXShaderCompiler, serialization, shader compiler errors, and writing unit tests in graphics code.

0:00 - Introduction: Serialization and Offsets
0:29 - Adding Fields and the Hidden Offset Bug
0:44 - sizeof Enum Bug and Compiler Error
1:08 - Surprise! This Isn't C++, It's HLSL
1:28 - HLSL 2021: Templates Arrive
1:43 - Writing Type Traits and enable_if in HLSL
2:10 - Static Assert in HLSL vs C++
2:38 - A Workaround Using Inheritance
3:08 - Don't Be DenverCoder9: Share Your Fixes
3:51 - Conclusion and Talk Preview

Slides: https://accu.org/conf-previous/accu2025/

Join think-cell as a C++ Developer and work on cutting-edge challenges with a focus on code excellence, innovation, and working alongside an international team of experts — apply now to be part of a team shaping the future of business presentations. https://www.think-cell.com/en/career
---

Keith Stockdale

Keith is a Northern Irish senior software engineer who has been working on the Engine and Rendering teams at Rare Ltd for the last 7 years. He primarily works on Engine and Rendering level systems involving General Purpose GPU systems such as GPU particle systems. Keith is enthusiastic about promoting writing good quality code, whether it is running on the CPU on the GPU.

Video Sponsored By JetBrains
---

The ACCU Conference is the annual conference of the ACCU membership, but is open to any and all who wish to attend. The tagline for the ACCU is 'Professionalism in Programming', which captures the whole spectrum of programming languages, tools, techniques and processes involved in advancing our craft. While there remains a core of C and C++ - with many members participating in respective ISO standards bodies - the conference, like the organisation, embraces other language ecosystems and you should expect to see sessions on C#, D, F#, Go, Javascript, Haskell, Java, Kotlin, Lisp, Python, Ruby, Rust, Swift and more.The ACCU Conference is a conference by programmers for programmers about programming.
Discounted rates for members.
ACCU Membership: https://tinyurl.com/ydnfkcyn
2025 Program: https://accu.org/conf-previous/accu2025/
https://accu.org
https://www.accuconference.org/
https://mastodon.social/@ACCUConf
  / accu-conference  
https://bsky.app/profile/accuconf.bsk...
  / accuorg  
  / accuconf  
---

YouTube Videos Filmed, Edited & Optimised by Digital Medium: https://events.digital-medium.co.uk


#accuconf #compiler #cpp #cplusplus #hlsl #programming #softwaredevelopment #softwareengineer #programmingconcepts #coding #programmingtutorial #learncoding #learncpp #softwareengineering

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
When the Compiler Gives You Errors, Make SFINAE - Keith Stockdale - ACCU 2025 Short Talks

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]