d3d12: Handle bitcasting of shader images
This is handled in 2 ways: * For casts in the same "class," we can just do the cast. There's also limited support for 4x8 => 1x32 and 2x16 => 1x32. * For casts that are just by size, use a lowering pass. This reads the data in the appropriate UINT format (except R11G11B10), retrieves the original bits, re-packs it into the dest, and returns it to the app for loads. For stores, the process is done in reverse - bits for the final format are computed and re-expanded to the format that should be used for the store. Reviewed-by: Sil Vilerino <sivileri@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342>
This commit is contained in:
@@ -230,6 +230,7 @@ init_texture(struct d3d12_screen *screen,
|
||||
(support.Support2 & (D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD | D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE)) ==
|
||||
(D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD | D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE)) {
|
||||
desc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
|
||||
desc.Format = d3d12_get_typeless_format(templ->format);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user