added dynamic state check at VKDeviceCreater.cpp
This commit is contained in:
parent
27f33e07cb
commit
459fb3afc4
@ -59,6 +59,45 @@ struct VulkanHardwareRequirement
|
|||||||
bool bc,etc2,astc_ldr,astc_hdr,pvrtc; ///<要求支持的压缩纹理格式
|
bool bc,etc2,astc_ldr,astc_hdr,pvrtc; ///<要求支持的压缩纹理格式
|
||||||
}texture_compression;
|
}texture_compression;
|
||||||
|
|
||||||
|
//dynamic_state VK_EXT_extended_dynamic_state
|
||||||
|
// cull mode
|
||||||
|
// front face
|
||||||
|
// primitive topology
|
||||||
|
// viewport
|
||||||
|
// scissor
|
||||||
|
// bind vbo
|
||||||
|
// depth test
|
||||||
|
// depth write
|
||||||
|
// depth compare op
|
||||||
|
// depth bounds test
|
||||||
|
// stencil test
|
||||||
|
// stencil op
|
||||||
|
//dynamic_state[1] VK_EXT_extended_dynamic_state2
|
||||||
|
// patch control points
|
||||||
|
// rasterizer discard
|
||||||
|
// depth bias
|
||||||
|
// logic op
|
||||||
|
// primitive restart
|
||||||
|
//dynamic_state[2] VK_EXT_extended_dynamic_state3
|
||||||
|
// tess domain origin
|
||||||
|
// depth clamp
|
||||||
|
// discard polygon mode
|
||||||
|
// rasterization samples
|
||||||
|
// sample mask
|
||||||
|
// alpha to coverage
|
||||||
|
// alpha to one
|
||||||
|
// logic op enable
|
||||||
|
// color blend
|
||||||
|
// color blend equation
|
||||||
|
// color write mask
|
||||||
|
// depth clamp
|
||||||
|
// Color blend advanced
|
||||||
|
// line rasterization mode
|
||||||
|
// line stipple
|
||||||
|
// depth clip -1 to 1
|
||||||
|
// shading rate image enable
|
||||||
|
bool dynamic_state[3]; ///<要求支持动态状态
|
||||||
|
|
||||||
// 1.3 特性
|
// 1.3 特性
|
||||||
bool dynamic_rendering; ///<要求支持动态渲染
|
bool dynamic_rendering; ///<要求支持动态渲染
|
||||||
};
|
};
|
||||||
|
@ -32,9 +32,9 @@ namespace
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
VK_EXT_DEBUG_MARKER_EXTENSION_NAME,
|
VK_EXT_DEBUG_MARKER_EXTENSION_NAME,
|
||||||
#endif//_DEBUG
|
#endif//_DEBUG
|
||||||
// VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME,
|
VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME,
|
||||||
// VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME,
|
VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME,
|
||||||
// VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME,
|
VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME,
|
||||||
// VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME,
|
// VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME,
|
||||||
VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME,
|
VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME,
|
||||||
// VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME,
|
// VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME,
|
||||||
@ -617,11 +617,11 @@ bool RequirementCheck(const VulkanHardwareRequirement &require,const GPUPhysical
|
|||||||
|
|
||||||
if(require.texture_compression.astc_hdr &&(!features13.textureCompressionASTC_HDR))return(false);
|
if(require.texture_compression.astc_hdr &&(!features13.textureCompressionASTC_HDR))return(false);
|
||||||
|
|
||||||
if(require.texture_compression.pvrtc)
|
if(require.texture_compression.pvrtc&&(!pd->CheckExtensionSupport(VK_IMG_FORMAT_PVRTC_EXTENSION_NAME)))return(false);
|
||||||
{
|
|
||||||
if(!pd->CheckExtensionSupport(VK_IMG_FORMAT_PVRTC_EXTENSION_NAME))
|
if(require.dynamic_state[0]&&(!pd->CheckExtensionSupport(VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME )))return(false);
|
||||||
return(false);
|
if(require.dynamic_state[1]&&(!pd->CheckExtensionSupport(VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME )))return(false);
|
||||||
}
|
if(require.dynamic_state[2]&&(!pd->CheckExtensionSupport(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME )))return(false);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user