Популярное

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

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

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

Топ запросов

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

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

Автор: ACCU Conference

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

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

Описание:

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

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

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

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

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

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

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

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

consteval All The Things? - Jason Turner - ACCU 2025

consteval All The Things? - Jason Turner - ACCU 2025

Challenges and Benefits of Upgrading Sea of Thieves From C++14 to C++20 - Keith Stockdale  ACCU 2025

Challenges and Benefits of Upgrading Sea of Thieves From C++14 to C++20 - Keith Stockdale ACCU 2025

What C++ Needs to be Safe - John Lakos - ACCU 2025

What C++ Needs to be Safe - John Lakos - ACCU 2025

5 уровней C++

5 уровней C++

🔀 Фронтендеры не знают Web API: OPFS, Web Crypto, Websocket, WebRTC, Locks, Workers, Cache API...

🔀 Фронтендеры не знают Web API: OPFS, Web Crypto, Websocket, WebRTC, Locks, Workers, Cache API...

Why particles might not exist | Sabine Hossenfelder, Hilary Lawson, Tim Maudlin

Why particles might not exist | Sabine Hossenfelder, Hilary Lawson, Tim Maudlin

Адская прожарка Ruby. Так ли хорош язык программирования Ruby? #ruby #rubyonrails #programming

Адская прожарка Ruby. Так ли хорош язык программирования Ruby? #ruby #rubyonrails #programming

C++20 Ranges - The Stuff of Science Fiction - Stewart Becker - ACCU 2025 Short Talks

C++20 Ranges - The Stuff of Science Fiction - Stewart Becker - ACCU 2025 Short Talks

What if everything was

What if everything was "Async", but nothing needed "Await"? | The Par Programming Language

The Definitive Guide to Functional Programming in Cpp - Jonathan Müller - ACCU 2025

The Definitive Guide to Functional Programming in Cpp - Jonathan Müller - ACCU 2025

SFINAE

SFINAE "Substitution Failure Is Not An Error" | Modern Cpp Series Ep 215

Крах Jaguar: Как “повестка” в рекламе добила легенду британского автопрома

Крах Jaguar: Как “повестка” в рекламе добила легенду британского автопрома

Где и как спасаться от мировой войны?

Где и как спасаться от мировой войны?

Learning To Stop Writing C++ Code (and Why You Won’t Miss It) - Daisy Hollman - ACCU 2025

Learning To Stop Writing C++ Code (and Why You Won’t Miss It) - Daisy Hollman - ACCU 2025

Первый удар: как начнется ЯДЕРНАЯ ВОЙНА?

Первый удар: как начнется ЯДЕРНАЯ ВОЙНА?

К чему готовится Лукашенко? | «Новости» с Чалым

К чему готовится Лукашенко? | «Новости» с Чалым

Peering Forward - C++’s Next Decade - Herb Sutter - CppCon 2024

Peering Forward - C++’s Next Decade - Herb Sutter - CppCon 2024

What Is

What Is "Hello" in C++? - Nicolai M. Josuttis - ACCU 2025 Short Talks

Как СОВЕТСКИЙ реактивный лайнер смог покорить ВЕСЬ МИР? | ИЛ-62

Как СОВЕТСКИЙ реактивный лайнер смог покорить ВЕСЬ МИР? | ИЛ-62

Зачем подключать конденсатор параллельно диоду? Вот почему!

Зачем подключать конденсатор параллельно диоду? Вот почему!

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



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



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