<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on Dangling Pointers</title>
    <link>https://danglingpointers.com/post/</link>
    <description>Recent content in Posts on Dangling Pointers</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 21 Apr 2025 17:14:00 +0200</lastBuildDate>
    
	<atom:link href="https://danglingpointers.com/post/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>D3D12 Resource States Cheat Sheet</title>
      <link>https://danglingpointers.com/post/d3d12-resource-states/</link>
      <pubDate>Mon, 21 Apr 2025 17:14:00 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/d3d12-resource-states/</guid>
      <description>&lt;p&gt;The D3D12 Transition barriers may look simple at first glance, but once you consider &lt;strong&gt;state promotion&lt;/strong&gt; and interactions with &lt;strong&gt;copy queues&lt;/strong&gt;, there are quite a lot of subtle rules.&lt;/p&gt;

&lt;p&gt;The documentation is pretty complete, but also a bit scattered and confusing.&lt;/p&gt;

&lt;p&gt;I wished several times I had a &lt;strong&gt;cheat sheet&lt;/strong&gt;, and had instead to rely on my &lt;strong&gt;old comments&lt;/strong&gt; and testing things with the &lt;strong&gt;debug layer&lt;/strong&gt; enabled. This article is an attempt at helping future me :)&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;images/DirectX_12_Ultimate.png&#34; alt=&#34;DirectX 12 logo&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>The allocators of Bedrock, my own C&#43;&#43; STL alternative</title>
      <link>https://danglingpointers.com/post/bedrock-allocators/</link>
      <pubDate>Mon, 30 Dec 2024 10:03:00 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/bedrock-allocators/</guid>
      <description>&lt;p&gt;For some reason, I started making my own &lt;strong&gt;STL replacement library&lt;/strong&gt; about 2 months ago. It&amp;rsquo;s called &lt;strong&gt;Bedrock&lt;/strong&gt;. It&amp;rsquo;s &lt;a href=&#34;https://github.com/jlaumon/Bedrock&#34;&gt;available on github&lt;/a&gt; under a copyleft license.&lt;/p&gt;

&lt;p&gt;I don&amp;rsquo;t expect it to become very useful to anyone, but making it has been a lot of fun, so I thought I&amp;rsquo;d share some of the experience.&lt;/p&gt;

&lt;p&gt;Today we&amp;rsquo;re talking &lt;strong&gt;allocators&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;images/Microsoft-Fluentui-Emoji-Flat-Rock-Flat.256.png&#34; alt=&#34;Bedrock&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Asset Cooker -  Part 2: USN Journals and Fast Startup</title>
      <link>https://danglingpointers.com/post/asset-cooker-2/</link>
      <pubDate>Sat, 14 Dec 2024 18:03:00 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/asset-cooker-2/</guid>
      <description>&lt;p&gt;I said I would write a second article about Asset Cooker, and here it is! Barely six months later!&lt;/p&gt;

&lt;p&gt;Truth is, I couldn’t find a nice way of structuring the article, so I procrastinated a lot. This article doesn&amp;rsquo;t go too much into details because of that, but hopefully it still has the interesting bits.&lt;/p&gt;

&lt;p&gt;And now at least I can blog about something else next!&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;images/chef-hat-heart.png&#34; alt=&#34;Asset Cooker icon&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Asset Cooker - Part 1: Memory and Storage</title>
      <link>https://danglingpointers.com/post/asset-cooker-1/</link>
      <pubDate>Mon, 22 Jul 2024 21:24:00 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/asset-cooker-1/</guid>
      <description>&lt;p&gt;A few weeks ago, I released my hobby projet: &lt;a href=&#34;https://github.com/jlaumon/AssetCooker&#34;&gt;Asset Cooker&lt;/a&gt;. I even made a &lt;a href=&#34;https://www.youtube.com/watch?v=hvbVC4m6BOo&#34;&gt;short release trailer&lt;/a&gt; for it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;images/chef-hat-heart.png&#34; alt=&#34;Asset Cooker icon&#34; /&gt;&lt;/p&gt;

&lt;p&gt;So, what is &lt;strong&gt;Asset Cooker&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s a &lt;strong&gt;build system&lt;/strong&gt;. Put very briefly, it has &lt;strong&gt;commands&lt;/strong&gt; that have &lt;strong&gt;inputs&lt;/strong&gt; and &lt;strong&gt;outputs&lt;/strong&gt; (which are files). If the outputs don&amp;rsquo;t exist, or if the inputs are modified, it execute the command to (re)generate the outputs.&lt;/p&gt;

&lt;p&gt;I don&amp;rsquo;t plan on describing everything in articles, because that would be too much (and not all of it interesting), but I&amp;rsquo;ll try to do a few (short?) articles about single topics that I find interesting.&lt;/p&gt;

&lt;p&gt;In this first article, I&amp;rsquo;m going to talk about &lt;strong&gt;memory and storage&lt;/strong&gt;. Asset Cooker has to deal with &lt;strong&gt;a lot of items&lt;/strong&gt;. Hundreds of thousands of files, of commands, and of strings. Managing that carefully is very important.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Copy Queue woes.</title>
      <link>https://danglingpointers.com/post/copy-queues/</link>
      <pubDate>Mon, 01 Apr 2024 17:02:00 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/copy-queues/</guid>
      <description>&lt;p&gt;Consider this case: you&amp;rsquo;re launching several &lt;strong&gt;Async Compute&lt;/strong&gt; jobs. They need some input buffers to be uploaded, and some output buffers to be read back.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;images/CopyQueues_base.svg&#34; alt=&#34;Base scenario&#34; /&gt;&lt;/p&gt;

&lt;p&gt;How do you minimize the time it takes to get all the outputs back to the CPU? I&amp;rsquo;m focusing on D3D12 and Windows for this article.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Job System #2</title>
      <link>https://danglingpointers.com/post/job-system-2/</link>
      <pubDate>Sat, 20 Oct 2018 11:10:00 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/job-system-2/</guid>
      <description>&lt;p&gt;Oops! I actually wrote this article one year ago but never finished it. Let&amp;rsquo;s say it&amp;rsquo;s finished, and boom! released.&lt;/p&gt;

&lt;p&gt;This is a follow up on the previous article about &lt;a href=&#34;post/job-system/&#34;&gt;our fiber-based job system&lt;/a&gt;. It contains a few details about our implementation, what we found to be important or not.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Meltdown and Spectre explained, again</title>
      <link>https://danglingpointers.com/post/meltdown-spectre/</link>
      <pubDate>Sun, 25 Mar 2018 13:59:49 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/meltdown-spectre/</guid>
      <description>&lt;p&gt;You may have heard of &lt;strong&gt;Meltdown&lt;/strong&gt; and &lt;strong&gt;Spectre&lt;/strong&gt;. In January, these two new &lt;strong&gt;security vulnerabilities&lt;/strong&gt; were made public, and it was kind of a big deal: all modern processors were more or less vulnerable, all systems affected, they could steal your passwords and everything.&lt;/p&gt;

&lt;p&gt;Things have settled down a little bit since then; security patches have been released and no actual attacks have been reported. But still, discoveries of that scale are not common, so I was curious: How do these vulnerabilities work?&lt;/p&gt;

&lt;p&gt;The explanations I could find on the Internet came in two flavors:
the one for security experts (&lt;a href=&#34;https://googleprojectzero.blogspot.fr/2018/01/reading-privileged-memory-with-side.html&#34;&gt;extremely technical, very hard to follow&lt;/a&gt;) and the ones for scared customers (&lt;a href=&#34;https://www.youtube.com/watch?v=syAdX44pokE&#34;&gt;that will make you doubt everything you known about computers&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;So I decided to write my own: for people that have some knowledge about CPUs, but no interest in actually exploiting the vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;images/spectre.png&#34; alt=&#34;Spectre&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Spin Lock Implementation</title>
      <link>https://danglingpointers.com/post/spinlock-implementation/</link>
      <pubDate>Sun, 31 Dec 2017 13:03:00 +0100</pubDate>
      
      <guid>https://danglingpointers.com/post/spinlock-implementation/</guid>
      <description>&lt;p&gt;I attended a &lt;a href=&#34;https://www.game-connection.com/masterclasses/&#34;&gt;Game Connection master class&lt;/a&gt; this year again. This time it was with &lt;a href=&#34;http://www.gameenginebook.com/bio.html&#34;&gt;Jason Gregory&lt;/a&gt; (Lead Programmer at &lt;a href=&#34;https://www.naughtydog.com/&#34;&gt;Naughty Dog&lt;/a&gt;) on concurrent programming, and it was very interesting.&lt;/p&gt;

&lt;p&gt;I won&amp;rsquo;t give a full account because we saw &lt;em&gt;way&lt;/em&gt; too many things (500 slides!).&lt;/p&gt;

&lt;p&gt;Instead, I&amp;rsquo;ll just write about a few &lt;a href=&#34;https://en.wikipedia.org/wiki/Spinlock&#34;&gt;spin lock&lt;/a&gt; implementation tricks that he showed us.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Job System</title>
      <link>https://danglingpointers.com/post/job-system/</link>
      <pubDate>Sun, 27 Aug 2017 11:14:19 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/job-system/</guid>
      <description>&lt;p&gt;We have a fiber based job system at Pastagames. I started coding it just after seeing this &lt;a href=&#34;http://www.gdcvault.com/play/1022186/Parallelizing-the-Naughty-Dog-Engine&#34;&gt;Naughty Dog GDC Talk&lt;/a&gt; back in 2015. And so far, we&amp;rsquo;re really happy with it.&lt;/p&gt;

&lt;p&gt;In this article, I&amp;rsquo;ll focus more on how we use it than on how we implemented it ‒ our implementation is very close to what Christian Gyrling presented in his talk.&lt;/p&gt;

&lt;p&gt;If you haven&amp;rsquo;t seen the GDC Talk yet, you should watch it first. It&amp;rsquo;s very interesting and it&amp;rsquo;s probably necessary to follow what I&amp;rsquo;m talking about.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>String Hashes</title>
      <link>https://danglingpointers.com/post/string-hashes/</link>
      <pubDate>Sat, 06 May 2017 12:03:27 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/string-hashes/</guid>
      <description>&lt;p&gt;Strings are often used as &lt;strong&gt;identifiers&lt;/strong&gt; in games: object names, sound effect names, particle type names, etc. They&amp;rsquo;re a bit like enums with the advantage of allowing your game to be data-driven: you don&amp;rsquo;t necessarily need to recompile your program to accept new values.&lt;/p&gt;

&lt;p&gt;But strings are no fun: storing them efficiently is a headache, they&amp;rsquo;re bigger and they&amp;rsquo;re slower than enums.&lt;/p&gt;

&lt;p&gt;Fortunately there&amp;rsquo;s an alternative: &lt;strong&gt;string hashes&lt;/strong&gt;. We like them a lot at &lt;a href=&#34;http://www.pastagames.com/&#34;&gt;Pastagames&lt;/a&gt;, and here are our humble solutions to the practical problems that come with them.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Mike Acton&#39;s Data-Oriented Design Workshop (2015)</title>
      <link>https://danglingpointers.com/post/mike-actons-dod-workshop-2015/</link>
      <pubDate>Sat, 19 Mar 2016 12:04:48 +0100</pubDate>
      
      <guid>https://danglingpointers.com/post/mike-actons-dod-workshop-2015/</guid>
      <description>&lt;p&gt;I attended Mike Acton&amp;rsquo;s master class during last year&amp;rsquo;s &lt;a href=&#34;http://www.game-connection.com/master-classes-0&#34;&gt;Game Connection&lt;/a&gt; in Paris.
Unsurprisingly it was about data-oriented design, but it was a workshop, a practical exercise, and it showed us (or at least me)
a new facet of the concept, as well as a few interesting techniques.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Other blogs and links</title>
      <link>https://danglingpointers.com/post/links/</link>
      <pubDate>Thu, 24 Dec 2015 18:00:19 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/links/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;images/would-you-like-to-knwo-more.jpg&#34; alt=&#34;Would you like to know more?&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Don’t use std::list</title>
      <link>https://danglingpointers.com/post/dont-use-std-list/</link>
      <pubDate>Thu, 24 Dec 2015 17:00:19 +0200</pubDate>
      
      <guid>https://danglingpointers.com/post/dont-use-std-list/</guid>
      <description>&lt;p&gt;I feel like I’ve been saying this a lot lately ‒ at least once per intern we take at Pastagames ‒ so I guess it&amp;rsquo;s time I write it down.
There&amp;rsquo;s nothing new here, this has been said a hundred times over on the Internet,
but since a lot of people are still not aware of it, here is my contribution.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>