directx 12 – Typed SRV always fetches zero

The vertex shader always receives zero when looking up a typed resource view.

Buffer<unorm float> UnormBuffer : register(t0);

float4 main(VSInput input, uint id : SV_VertexID) : SV_POSITION
{
    float mag = 100.f * UnormBuffertag:google.com,2013:googlealerts/feed:6507528833224869218;
    // mag always zero
}

The shader resource view bound to t0 has type DXGI_FORMAT_R8_UNORM.

The draw call is using instancing.

The debug layer doesn’t emit any warnings or errors.

PIX shows the SRV to have the correct data, but when I step through the shader, zero is always returned.

Ideas?

Read more here: Source link