mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 04:00:07 +00:00
vk_instance: Detect MSAA features
The MSAA _requires_ `sampleRateShading`, and also requires `VK_KHR_create_renderpass2` and `VK_KHR_depth_stencil_resolve` for the depth-stencil MSAA resolves.
This commit is contained in:
parent
55c74f54d5
commit
c4fcd93ff9
@ -448,6 +448,8 @@ bool Instance::CreateDevice() {
|
||||
|
||||
add_extension(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
|
||||
image_format_list = add_extension(VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME);
|
||||
create_renderpass2 = add_extension(VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME);
|
||||
depth_stencil_resolve = add_extension(VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME);
|
||||
shader_stencil_export = add_extension(VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME);
|
||||
external_memory_host = add_extension(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME);
|
||||
tooling_info = add_extension(VK_EXT_TOOLING_INFO_EXTENSION_NAME);
|
||||
|
@ -248,6 +248,11 @@ public:
|
||||
return triangle_fan_supported;
|
||||
}
|
||||
|
||||
// Returns true when sampleRateShading, VK_KHR_create_renderpass2, VK_KHR_depth_stencil_resolve
|
||||
bool IsMSAASupported() const {
|
||||
return features.sampleRateShading && create_renderpass2 && depth_stencil_resolve;
|
||||
}
|
||||
|
||||
/// Returns the minimum vertex stride alignment
|
||||
u32 GetMinVertexStrideAlignment() const {
|
||||
return min_vertex_stride_alignment;
|
||||
@ -318,6 +323,8 @@ private:
|
||||
bool index_type_uint8{};
|
||||
bool fragment_shader_interlock{};
|
||||
bool image_format_list{};
|
||||
bool create_renderpass2{};
|
||||
bool depth_stencil_resolve{};
|
||||
bool pipeline_creation_cache_control{};
|
||||
bool fragment_shader_barycentric{};
|
||||
bool shader_stencil_export{};
|
||||
|
Loading…
Reference in New Issue
Block a user