I have three simple compute shaders reading and writing to two float buffers.
- Init - fills them in
- Float4RW - reads and writes as float4s
- Float16RW - reads and writes as 16 bit floats (half)
The first two shaders work fine. The third shader writes fine, but for the read gets 0s for the second half of the buffer.
Pix (2507.11) is inconsistent about how it shows these buffers. It almost never shows the full 128 bytes worth of data, and is inconsistent how much it does show between different captures.
Either that’s a pix bug, or is showing us that the views are being made incorrectly in engine.
Because pix was inconsistent, the code does a readback of both buffers after every step. Images attached of what is expected vs what actually came out.
I’ve tried various things, including setting the view format to PF_R16F, but haven’t been able to get this to work.
Applying Files.zip to reproduce it:
I’m working against the latest in GitHub (5.6.1), on windows (pix shows the engine is using DX12)
Here’s where the files go, to reproduce:
- The 3 .usf shader files go in Engine\Shaders\Private\Strides\
- StridesTechnique.h goes in Engine\Source\Runtime\Renderer\Public
- StridesTechnique.cpp goes in Engine\Source\Runtime\Renderer\Private
Engine\Source\Runtime\Renderer\Private\PostProcess\PostProcessing.cpp needs a
include “StridesTechnique.h”
and in AddPostProcessingPasses() right after where FScreenPassTexture SceneColor is declared, these 2 lines go:
Strides::FTechniqueParams params;
Strides::AddTechnique(GraphBuilder, View, params);
Then just building / running development editor, doing a pix capture or setting a breakpoint in the function and looking at the readback data shows the final buffer2 data is wrong.
BTW it would be really great to have a “vis” command to be able to see the contents of buffers, like we can see the contents of textures, without having to do this readback in code ![]()
Thanks!