radv: add radv_pipeline_key::dynamic_provoking_vtx_mode
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19168>
This commit is contained in:

committed by
Marge Bot

parent
08b346e81a
commit
8bb572b7f8
@@ -2900,6 +2900,22 @@ radv_generate_graphics_pipeline_key(const struct radv_graphics_pipeline *pipelin
|
|||||||
|
|
||||||
key.dynamic_color_write_mask = !!(pipeline->dynamic_states & RADV_DYNAMIC_COLOR_WRITE_MASK);
|
key.dynamic_color_write_mask = !!(pipeline->dynamic_states & RADV_DYNAMIC_COLOR_WRITE_MASK);
|
||||||
|
|
||||||
|
if (device->physical_device->use_ngg) {
|
||||||
|
VkShaderStageFlags ngg_stage;
|
||||||
|
|
||||||
|
if (pipeline->active_stages & VK_SHADER_STAGE_GEOMETRY_BIT) {
|
||||||
|
ngg_stage = VK_SHADER_STAGE_GEOMETRY_BIT;
|
||||||
|
} else if (pipeline->active_stages & VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT) {
|
||||||
|
ngg_stage = VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT;
|
||||||
|
} else {
|
||||||
|
ngg_stage = VK_SHADER_STAGE_VERTEX_BIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
key.dynamic_provoking_vtx_mode =
|
||||||
|
!!(pipeline->dynamic_states & RADV_DYNAMIC_PROVOKING_VERTEX_MODE) &&
|
||||||
|
(ngg_stage == VK_SHADER_STAGE_VERTEX_BIT || ngg_stage == VK_SHADER_STAGE_GEOMETRY_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,6 +65,7 @@ struct radv_pipeline_key {
|
|||||||
uint32_t dynamic_patch_control_points : 1;
|
uint32_t dynamic_patch_control_points : 1;
|
||||||
uint32_t dynamic_rasterization_samples : 1;
|
uint32_t dynamic_rasterization_samples : 1;
|
||||||
uint32_t dynamic_color_write_mask : 1;
|
uint32_t dynamic_color_write_mask : 1;
|
||||||
|
uint32_t dynamic_provoking_vtx_mode : 1;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
uint32_t instance_rate_inputs;
|
uint32_t instance_rate_inputs;
|
||||||
|
Reference in New Issue
Block a user