diff --git a/proposals/0029-cooperative-vector.md b/proposals/0029-cooperative-vector.md index fab39cc8..b35a4eff 100644 --- a/proposals/0029-cooperative-vector.md +++ b/proposals/0029-cooperative-vector.md @@ -586,7 +586,7 @@ enum class DXILMatrixLayout : uint { ``` Optimal layouts are opaque implementation specific layouts, the D3D call -`ConvertLinearAlgebraMatrix` can be used to convert the *Matrix* to an optimal +`ConvertLinearAlgebraMatrices` can be used to convert the matrices to an optimal layout. Row-Major and Column-Major layouts are also supported. **matrix stride** must be zero for optimal layouts. @@ -872,11 +872,13 @@ typedef struct D3D12_LINEAR_ALGEBRA_MATRIX_CONVERSION_DEST_INFO { // the destination layout information and does not depend on the source layout // information. -void ID3D12DevicePreview::GetLinearAlgebraMatrixConversionDestinationInfo( +void ID3D12DeviceNN::GetLinearAlgebraMatrixConversionDestinationInfo( D3D12_LINEAR_ALGEBRA_MATRIX_CONVERSION_DEST_INFO* pDesc); ``` +> Note: NN will be replaced with the actual number suffix when implemented. + #### Conversion descriptors After the size of the destination buffer is known, user can pass the @@ -932,28 +934,41 @@ number of bytes returned in call to ```c++ // Converts source matrix to desired layout and datatype -void ID3D12GraphicsCommandListPreview::ConvertLinearAlgebraMatrix( +void ID3D12GraphicsCommandListNN::ConvertLinearAlgebraMatrices( D3D12_LINEAR_ALGEBRA_MATRIX_CONVERSION_INFO* pDesc, UINT DescCount); ``` +> Note: NN will be replaced with the actual number suffix when implemented. +> Also note the name change from `ConvertLinearAlgebraMatrix` to + `ConvertLinearAlgebraMatrices` to more accurately reflect that multiple + matrices maybe transformed in one call. + *Valid Usage:* -* If SrcLayout is row-major or column-major, then SrcStride should be greater than the length of a row/column, and a - multiple of the element size. -* If DestLayout is row-major or column-major, then DestStride should be greater than the length of a row/column, and a - multiple of 16. -* If SrcComponentType is not a supported MatrixInterpretation value as reported by CheckFeatureSupport() then - SrcComponentType should be `D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT32`. -* If DestComponentType is not a supported MatrixInterpretation value as reported by CheckFeatureSupport() then - DestComponentType should be `D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT32`. -* If SrcComponentType and DestComponentType are not equal, then one should be `D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT32` or `D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT16` and the other should be a lower-precision floating-point type. -* If DestComponentType is `D3D12_LINEAR_ALGEBRA_DATATYPE_E4M3` or `D3D12_LINEAR_ALGEBRA_DATATYPE_E5M2`, then DestLayout should be `D3D12_LINEAR_ALGEBRA_MATRIX_LAYOUT_MUL_OPTIMAL` or `D3D12_LINEAR_ALGEBRA_MATRIX_LAYOUT_OUTER_PRODUCT_OPTIMAL`. +* If SrcLayout is row-major or column-major, then SrcStride must be greater + than the length of a row/column, and a multiple of the element size. +* If DestLayout is row-major or column-major, then DestStride must be greater + than the length of a row/column, and a multiple of 16. +* If SrcComponentType is not a supported MatrixInterpretation value as reported + by CheckFeatureSupport() then SrcComponentType must be + `D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT32`. +* If DestComponentType is not a supported MatrixInterpretation value as reported + by CheckFeatureSupport() then DestComponentType must be + `D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT32`. +* If SrcComponentType and DestComponentType are not equal, then one must be + `D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT32` or + `D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT16` and the other must be a + lower-precision floating-point type. +* If DestComponentType is `D3D12_LINEAR_ALGEBRA_DATATYPE_E4M3` or + `D3D12_LINEAR_ALGEBRA_DATATYPE_E5M2`, then DestLayout must be + `D3D12_LINEAR_ALGEBRA_MATRIX_LAYOUT_MUL_OPTIMAL` or + `D3D12_LINEAR_ALGEBRA_MATRIX_LAYOUT_OUTER_PRODUCT_OPTIMAL`. *CommandList interactions:* -- Synchronization around `ConvertLinearAlgebraMatrix` calls: +- Synchronization around `ConvertLinearAlgebraMatrices` calls: - Legacy Barrier - Source buffer: Must be in `D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE` state - Dest buffer: Must be in `D3D12_RESOURCE_STATE_UNORDERED_ACCESS` state @@ -1012,7 +1027,7 @@ pD3D12Device->GetLinearAlgebraMatrixConversionDestinationInfo(&infoDesc.DestInfo infoDesc.DataDesc.DestVA = srcVA + infoDesc.DestInfo.DestSize; // Perform the conversion -pD3D12CommandList->ConvertLinearAlgebraMatrix(&infoDesc, 0); +pD3D12CommandList->ConvertLinearAlgebraMatrices(&infoDesc, 0); ``` ### D3D12 DDI Additions