[Vulkan] Handle unsupported fillModeNonSolid + fix portability subset feature checks
This commit is contained in:
parent
d30d59883a
commit
d8b2944caa
|
@ -525,6 +525,7 @@ bool VulkanPipelineCache::GetCurrentStateDescription(
|
|||
bool cull_back = pa_su_sc_mode_cntl.cull_back;
|
||||
description_out.cull_front = cull_front;
|
||||
description_out.cull_back = cull_back;
|
||||
if (device_features.fillModeNonSolid) {
|
||||
xenos::PolygonType polygon_type = xenos::PolygonType::kTriangles;
|
||||
if (!cull_front) {
|
||||
polygon_type =
|
||||
|
@ -557,6 +558,9 @@ bool VulkanPipelineCache::GetCurrentStateDescription(
|
|||
assert_unhandled_case(polygon_type);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
description_out.polygon_mode = PipelinePolygonMode::kFill;
|
||||
}
|
||||
description_out.front_face_clockwise = pa_su_sc_mode_cntl.face != 0;
|
||||
} else {
|
||||
description_out.polygon_mode = PipelinePolygonMode::kFill;
|
||||
|
@ -701,7 +705,6 @@ bool VulkanPipelineCache::ArePipelineRequirementsMet(
|
|||
|
||||
const ui::vulkan::VulkanProvider& provider =
|
||||
command_processor_.GetVulkanProvider();
|
||||
const VkPhysicalDeviceFeatures& device_features = provider.device_features();
|
||||
|
||||
const VkPhysicalDevicePortabilitySubsetFeaturesKHR*
|
||||
device_portability_subset_features =
|
||||
|
@ -709,13 +712,15 @@ bool VulkanPipelineCache::ArePipelineRequirementsMet(
|
|||
if (device_portability_subset_features) {
|
||||
if (description.primitive_topology ==
|
||||
PipelinePrimitiveTopology::kTriangleFan &&
|
||||
device_portability_subset_features->triangleFans) {
|
||||
!device_portability_subset_features->triangleFans) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (description.polygon_mode == PipelinePolygonMode::kPoint &&
|
||||
device_portability_subset_features->pointPolygons) {
|
||||
!device_portability_subset_features->pointPolygons) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!device_portability_subset_features->constantAlphaColorBlendFactors) {
|
||||
uint32_t color_rts_remaining =
|
||||
description.render_pass_key.depth_and_color_used >> 1;
|
||||
|
@ -738,11 +743,18 @@ bool VulkanPipelineCache::ArePipelineRequirementsMet(
|
|||
}
|
||||
}
|
||||
|
||||
const VkPhysicalDeviceFeatures& device_features = provider.device_features();
|
||||
|
||||
if (!device_features.geometryShader &&
|
||||
description.geometry_shader != PipelineGeometryShader::kNone) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!device_features.fillModeNonSolid &&
|
||||
description.polygon_mode != PipelinePolygonMode::kFill) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!device_features.independentBlend) {
|
||||
uint32_t color_rts_remaining =
|
||||
description.render_pass_key.depth_and_color_used >> 1;
|
||||
|
|
Loading…
Reference in New Issue