turnip: implement VK_EXT_provoking_vertex
Passes: dEQP-VK.rasterization.provoking_vertex.* Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11112>
This commit is contained in:

committed by
Marge Bot

parent
49add985ff
commit
20d8324a1b
@@ -537,6 +537,7 @@ Khronos extensions that are not part of any Vulkan version:
|
|||||||
VK_EXT_pipeline_creation_feedback DONE (anv, radv)
|
VK_EXT_pipeline_creation_feedback DONE (anv, radv)
|
||||||
VK_EXT_post_depth_coverage DONE (anv/gfx10+, lvp, radv)
|
VK_EXT_post_depth_coverage DONE (anv/gfx10+, lvp, radv)
|
||||||
VK_EXT_private_data DONE (anv, lvp, radv, tu, v3dv)
|
VK_EXT_private_data DONE (anv, lvp, radv, tu, v3dv)
|
||||||
|
VK_EXT_provoking_vertex DONE (anv, lvp, radv, tu)
|
||||||
VK_EXT_queue_family_foreign DONE (anv, radv)
|
VK_EXT_queue_family_foreign DONE (anv, radv)
|
||||||
VK_EXT_robustness2 DONE (anv, radv, tu)
|
VK_EXT_robustness2 DONE (anv, radv, tu)
|
||||||
VK_EXT_sample_locations DONE (anv, radv/gfx9-, tu/a650)
|
VK_EXT_sample_locations DONE (anv, radv/gfx9-, tu/a650)
|
||||||
|
@@ -3632,6 +3632,7 @@ tu6_draw_common(struct tu_cmd_buffer *cmd,
|
|||||||
tu_cs_emit_regs(cs, A6XX_PC_PRIMITIVE_CNTL_0(
|
tu_cs_emit_regs(cs, A6XX_PC_PRIMITIVE_CNTL_0(
|
||||||
.primitive_restart =
|
.primitive_restart =
|
||||||
pipeline->ia.primitive_restart && indexed,
|
pipeline->ia.primitive_restart && indexed,
|
||||||
|
.provoking_vtx_last = pipeline->provoking_vertex_last,
|
||||||
.tess_upper_left_domain_origin =
|
.tess_upper_left_domain_origin =
|
||||||
pipeline->tess.upper_left_domain_origin));
|
pipeline->tess.upper_left_domain_origin));
|
||||||
|
|
||||||
|
@@ -177,6 +177,7 @@ get_device_extensions(const struct tu_physical_device *device,
|
|||||||
.EXT_shader_stencil_export = true,
|
.EXT_shader_stencil_export = true,
|
||||||
.EXT_shader_viewport_index_layer = true,
|
.EXT_shader_viewport_index_layer = true,
|
||||||
.EXT_vertex_attribute_divisor = true,
|
.EXT_vertex_attribute_divisor = true,
|
||||||
|
.EXT_provoking_vertex = true,
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
.ANDROID_native_buffer = true,
|
.ANDROID_native_buffer = true,
|
||||||
#endif
|
#endif
|
||||||
@@ -734,6 +735,13 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||||||
features->timelineSemaphore = true;
|
features->timelineSemaphore = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: {
|
||||||
|
VkPhysicalDeviceProvokingVertexFeaturesEXT *features =
|
||||||
|
(VkPhysicalDeviceProvokingVertexFeaturesEXT *)ext;
|
||||||
|
features->provokingVertexLast = true;
|
||||||
|
features->transformFeedbackPreservesProvokingVertex = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -1059,6 +1067,13 @@ tu_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
|
|||||||
props->maxTimelineSemaphoreValueDifference = UINT64_MAX;
|
props->maxTimelineSemaphoreValueDifference = UINT64_MAX;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT: {
|
||||||
|
VkPhysicalDeviceProvokingVertexPropertiesEXT *properties =
|
||||||
|
(VkPhysicalDeviceProvokingVertexPropertiesEXT *)ext;
|
||||||
|
properties->provokingVertexModePerPipeline = true;
|
||||||
|
properties->transformFeedbackPreservesTriangleFanProvokingVertex = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -2642,6 +2642,10 @@ tu_pipeline_builder_parse_rasterization(struct tu_pipeline_builder *builder,
|
|||||||
rast_info->depthBiasSlopeFactor);
|
rast_info->depthBiasSlopeFactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct VkPipelineRasterizationProvokingVertexStateCreateInfoEXT *provoking_vtx_state =
|
||||||
|
vk_find_struct_const(rast_info->pNext, PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT);
|
||||||
|
pipeline->provoking_vertex_last = provoking_vtx_state &&
|
||||||
|
provoking_vtx_state->provokingVertexMode == VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -1173,6 +1173,8 @@ struct tu_pipeline
|
|||||||
uint32_t local_size[3];
|
uint32_t local_size[3];
|
||||||
} compute;
|
} compute;
|
||||||
|
|
||||||
|
bool provoking_vertex_last;
|
||||||
|
|
||||||
struct tu_lrz_pipeline lrz;
|
struct tu_lrz_pipeline lrz;
|
||||||
|
|
||||||
void *executables_mem_ctx;
|
void *executables_mem_ctx;
|
||||||
|
Reference in New Issue
Block a user