DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

RasterizerOrderedByteAddressBuffer doesn't accept templated Load/Store

Open pow2clk opened this issue 3 years ago • 1 comments

The admittedly terse documentation of ROV types indicates that they can be used just like their RW* counterparts: https://docs.microsoft.com/en-us/windows/win32/direct3d11/rasterizer-order-views#implementation-details "Use these objects in the same manner as other UAV objects (such as RWBuffer etc.)."

Even though "similar" might be doing a lot of extra work here, it seems reasonable to expect that just as RWByteAddressBuffer can make use of templated Load<> and Store<>, these should as well. Yet, they produce an error when it is attempted

For example, with this shader:

// RUN: %dxc -T ps_6_0 %s | FileCheck %s
RasterizerOrderedByteAddressBuffer buf;
float4 main(uint idx1 : IDX1) : SV_Target {
  return buf.Load<float4>(idx1);
}

This error results:

error: Explicit template arguments on intrinsic Load are not supported
  r.x += buf1.Load<float>(idx1, status);

Similar attempts yield similar results.

pow2clk avatar Aug 19 '22 22:08 pow2clk

@bogner - tagging you to make sure you're aware of this for the clang implementation.

Marking this as dormant for now - we'll consider PRs addressing this, but are unlikely to invest time proactively fixing it for DXC.

damyanp avatar Oct 01 '24 17:10 damyanp