mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +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)))
|
&moduleInfo)))
|
||||||
return D3DERR_INVALIDCALL;
|
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,
|
*ppShader = ref(new D3D9VertexShader(this,
|
||||||
&m_shaderAllocator,
|
&m_shaderAllocator,
|
||||||
module,
|
module,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user