diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-01-07 15:26:53 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-01-12 20:37:20 +0100 |
commit | bfc713530a6354ce786d3f9bd0f4567844e7240f (patch) | |
tree | 5e760c6b936974046802f056c0dae1c71b987863 /src/gui/rhi/qrhid3d11.cpp | |
parent | 9d15854138b72be25f4584144eee8f4c0bf8117a (diff) |
rhi: Add queries for vertex input/output limits
Mainly because we do have legacy code in the Qt 5 graphical effects that
tries to dynamically determine the max number of varyings. Make it
easier to port such code.
Change-Id: I846cab2c2fe7b4cd473b5ced0146ca36f1c8169b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhid3d11.cpp')
-rw-r--r-- | src/gui/rhi/qrhid3d11.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp index 04544bc3b2..814ef05dd1 100644 --- a/src/gui/rhi/qrhid3d11.cpp +++ b/src/gui/rhi/qrhid3d11.cpp @@ -124,6 +124,10 @@ QT_BEGIN_NAMESPACE #define D3D11_1_UAV_SLOT_COUNT 64 #endif +#ifndef D3D11_VS_INPUT_REGISTER_COUNT +#define D3D11_VS_INPUT_REGISTER_COUNT 32 +#endif + QRhiD3D11::QRhiD3D11(QRhiD3D11InitParams *params, QRhiD3D11NativeHandles *importParams) : ofr(this), deviceCurse(this) @@ -583,6 +587,10 @@ int QRhiD3D11::resourceLimit(QRhi::ResourceLimit limit) const return D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION; case QRhi::MaxUniformBufferRange: return 65536; + case QRhi::MaxVertexInputs: + return D3D11_VS_INPUT_REGISTER_COUNT; + case QRhi::MaxVertexOutputs: + return D3D11_VS_OUTPUT_REGISTER_COUNT; default: Q_UNREACHABLE(); return 0; |