mirror of https://github.com/PCSX2/pcsx2.git
GS:Vk: Change primitive_id enable to match the new meaning
A bit messy, due to the fact that its support piggybacks on support of other features, instead of having a dedicated feature flag
This commit is contained in:
parent
3e0f3d05e2
commit
0500824e57
|
@ -1 +1 @@
|
||||||
Subproject commit 52a76fd0a693708eb8c25bd0ab7a1008091f64d4
|
Subproject commit 9f4c61a31435a7a90a314fc68aeb386c92a09c0f
|
|
@ -450,6 +450,8 @@ namespace Vulkan
|
||||||
SupportsExtension(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME, false);
|
SupportsExtension(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME, false);
|
||||||
m_optional_extensions.vk_arm_rasterization_order_attachment_access =
|
m_optional_extensions.vk_arm_rasterization_order_attachment_access =
|
||||||
SupportsExtension(VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME, false);
|
SupportsExtension(VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME, false);
|
||||||
|
m_optional_extensions.vk_khr_fragment_shader_barycentric =
|
||||||
|
SupportsExtension(VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ namespace Vulkan
|
||||||
bool vk_ext_memory_budget : 1;
|
bool vk_ext_memory_budget : 1;
|
||||||
bool vk_khr_driver_properties : 1;
|
bool vk_khr_driver_properties : 1;
|
||||||
bool vk_arm_rasterization_order_attachment_access : 1;
|
bool vk_arm_rasterization_order_attachment_access : 1;
|
||||||
|
bool vk_khr_fragment_shader_barycentric : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
~Context();
|
~Context();
|
||||||
|
|
|
@ -230,7 +230,12 @@ bool GSDeviceVK::CheckFeatures()
|
||||||
m_features.texture_barrier = GSConfig.OverrideTextureBarriers != 0;
|
m_features.texture_barrier = GSConfig.OverrideTextureBarriers != 0;
|
||||||
m_features.broken_point_sampler = isAMD;
|
m_features.broken_point_sampler = isAMD;
|
||||||
m_features.geometry_shader = features.geometryShader && GSConfig.OverrideGeometryShaders != 0;
|
m_features.geometry_shader = features.geometryShader && GSConfig.OverrideGeometryShaders != 0;
|
||||||
m_features.primitive_id = features.fragmentStoresAndAtomics;
|
// Usually, geometry shader indicates primid support
|
||||||
|
// However on Metal (MoltenVK), geometry shader is never available, but primid sometimes is
|
||||||
|
// Officially, it's available on GPUs that support barycentric coordinates (Newer AMD and Apple)
|
||||||
|
// Unofficially, it seems to work on older Intel GPUs (but breaks other things on newer Intel GPUs, see GSMTLDeviceInfo.mm for details)
|
||||||
|
// We'll only enable for the officially supported GPUs here. We'll leave in the option of force-enabling it with OverrideGeometryShaders though.
|
||||||
|
m_features.primitive_id = features.geometryShader || GSConfig.OverrideGeometryShaders == 1 || g_vulkan_context->GetOptionalExtensions().vk_khr_fragment_shader_barycentric;
|
||||||
m_features.prefer_new_textures = true;
|
m_features.prefer_new_textures = true;
|
||||||
m_features.provoking_vertex_last = g_vulkan_context->GetOptionalExtensions().vk_ext_provoking_vertex;
|
m_features.provoking_vertex_last = g_vulkan_context->GetOptionalExtensions().vk_ext_provoking_vertex;
|
||||||
m_features.dual_source_blend = features.dualSrcBlend && !GSConfig.DisableDualSourceBlend;
|
m_features.dual_source_blend = features.dualSrcBlend && !GSConfig.DisableDualSourceBlend;
|
||||||
|
|
Loading…
Reference in New Issue