-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DirectX] Introduce llvm.dx.bufferGetDimensions and lower it to getDimensions dxil ops #112982
Comments
struct Astruct {float a;};
RWStructuredBuffer<Astruct > Buf : register(u0);
uint count, stride;
Buf.GetDimensions(count, stride); It should generate DXIL that looks like so. %8 = call %dx.types.Dimensions @dx.op.getDimensions(i32 72, %dx.types.Handle %7, i32 undef)
%9 = extractvalue %dx.types.Dimensions %8
|
There are 54 cases of GetDimensions we need to support. Below is how they are used per Handle type. Texture1D
Texture1DArray
Texture2D
Texture2DMS
Texture2DArray
Texture2DArrayMS
Texture3D
TextureCUBE
TextureCUBEArray
Buffer
RWTexture1D
RWTexture1DArray
RWTexture2D
RWTexture2DArray
RWTexture2DMS
RWTexture3D
RWBuffer
ByteAddressBuffer
RWByteAddressBuffer
StructuredBuffer
RWStructuredBuffer
AppendStructuredBuffer
ConsumeStructuredBuffer
|
We need LLVM intrinsic for bufferGetDimensions which will be lowered to the op.dx.getDimensions dxil operations. These will be used on structured buffers.
https://godbolt.org/z/bz7zxsf5n
The text was updated successfully, but these errors were encountered: