| 1372 | } |
| 1373 | |
| 1374 | static size_t ComputeMinSize(VkComponentTypeKHR component_type, VkCooperativeVectorMatrixLayoutNV layout, uint32_t num_rows, |
| 1375 | uint32_t num_columns, size_t stride) { |
| 1376 | size_t min_size = 0; |
| 1377 | size_t element_size = ComponentTypeBytesPerElement(component_type); |
| 1378 | if (layout == VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV) { |
| 1379 | min_size = (num_rows - 1) * stride + num_columns * element_size; |
| 1380 | } else if (layout == VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV) { |
| 1381 | min_size = (num_columns - 1) * stride + num_rows * element_size; |
| 1382 | } |
| 1383 | return min_size; |
| 1384 | } |
| 1385 | |
| 1386 | bool Device::manual_PreCallValidateConvertCooperativeVectorMatrixNV(VkDevice device, |
| 1387 | const VkConvertCooperativeVectorMatrixInfoNV* pInfo, |