mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 04:29:15 +01:00
[d3d8] Enforce the pCaps->MaxVertexShaderConst limit on VS creation
This commit is contained in:
parent
04cef0025a
commit
bbb5aa36ce
@ -3352,6 +3352,16 @@ namespace dxvk {
|
||||
&moduleInfo)))
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
|
||||
if (m_isD3D8Compatible && !m_isSWVP) {
|
||||
const uint32_t maxVSConstantIndex = module.GetMaxDefinedConstant();
|
||||
// D3D8 enforces the value advertised in pCaps->MaxVertexShaderConst for HWVP
|
||||
if (unlikely(maxVSConstantIndex > caps::MaxFloatConstantsVS - 1)) {
|
||||
Logger::err(str::format("D3D9DeviceEx::CreateVertexShader: Invalid constant index ", maxVSConstantIndex));
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
|
||||
*ppShader = ref(new D3D9VertexShader(this,
|
||||
&m_shaderAllocator,
|
||||
module,
|
||||
|
Loading…
x
Reference in New Issue
Block a user