From 0d89dfae95323c6bf309b75ed19321cd064658fa Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 25 Jul 2018 11:42:05 +0200 Subject: [PATCH] [d3d11] Report format support for stream output buffers --- src/d3d11/d3d11_device.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index 74566a95..71f05886 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -1550,8 +1550,22 @@ namespace dxvk { || Format == DXGI_FORMAT_R32_UINT) flags1 |= D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER; - // TODO implement stream output - // D3D11_FORMAT_SUPPORT_SO_BUFFER + // These formats are technically irrelevant since + // SO buffers are passed in as raw buffers and not + // as views, but the feature flag exists regardless + if (Format == DXGI_FORMAT_R32_FLOAT + || Format == DXGI_FORMAT_R32_UINT + || Format == DXGI_FORMAT_R32_SINT + || Format == DXGI_FORMAT_R32G32_FLOAT + || Format == DXGI_FORMAT_R32G32_UINT + || Format == DXGI_FORMAT_R32G32_SINT + || Format == DXGI_FORMAT_R32G32B32_FLOAT + || Format == DXGI_FORMAT_R32G32B32_UINT + || Format == DXGI_FORMAT_R32G32B32_SINT + || Format == DXGI_FORMAT_R32G32B32A32_FLOAT + || Format == DXGI_FORMAT_R32G32B32A32_UINT + || Format == DXGI_FORMAT_R32G32B32A32_SINT) + flags1 |= D3D11_FORMAT_SUPPORT_SO_BUFFER; if (fmtSupport.optimalTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT || fmtSupport.optimalTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) {