mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[d3d11] Validate shader module capabilities
Only create a shader module if the device actually supports the required features. Apparently this is needed for some Unity Engine games.
This commit is contained in:
parent
ddf010479d
commit
ee77afb6af
@ -2049,6 +2049,16 @@ namespace dxvk {
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
auto shader = commonShader.GetShader();
|
||||
|
||||
if (shader->hasCapability(spv::CapabilityStencilExportEXT)
|
||||
&& !m_dxvkDevice->extensions().extShaderStencilExport)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (shader->hasCapability(spv::CapabilityShaderViewportIndexLayerEXT)
|
||||
&& !m_dxvkDevice->extensions().extShaderViewportIndexLayer)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*pShaderModule = std::move(commonShader);
|
||||
return S_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user