diff --git a/src/panfrost/ci/panfrost-g610-fails.txt b/src/panfrost/ci/panfrost-g610-fails.txt index a70db18336a..327a3578c6b 100644 --- a/src/panfrost/ci/panfrost-g610-fails.txt +++ b/src/panfrost/ci/panfrost-g610-fails.txt @@ -342,24 +342,6 @@ dEQP-VK.renderpass.dedicated_allocation.attachment_allocation.input_output.63,Fa dEQP-VK.spirv_assembly.instruction.graphics.cross_stage.basic_type.no_perspective,Fail dEQP-VK.spirv_assembly.instruction.graphics.cross_stage.interface_blocks.no_perspective,Fail -dEQP-VK.rasterization.flatshading.line_strip,Fail -dEQP-VK.rasterization.flatshading.line_strip_wide,Fail -dEQP-VK.rasterization.flatshading.lines,Fail -dEQP-VK.rasterization.flatshading.lines_wide,Fail -dEQP-VK.rasterization.flatshading.non_strict_line_strip,Fail -dEQP-VK.rasterization.flatshading.non_strict_line_strip_wide,Fail -dEQP-VK.rasterization.flatshading.non_strict_lines,Fail -dEQP-VK.rasterization.flatshading.non_strict_lines_wide,Fail -dEQP-VK.rasterization.flatshading.triangle_fan,Fail -dEQP-VK.rasterization.flatshading.triangle_strip,Fail -dEQP-VK.rasterization.flatshading.triangles,Fail - -dEQP-VK.rasterization.provoking_vertex.draw.default.line_list,Fail -dEQP-VK.rasterization.provoking_vertex.draw.default.line_strip,Fail -dEQP-VK.rasterization.provoking_vertex.draw.default.triangle_fan,Fail -dEQP-VK.rasterization.provoking_vertex.draw.default.triangle_list,Fail -dEQP-VK.rasterization.provoking_vertex.draw.default.triangle_strip,Fail - dEQP-VK.draw.dynamic_rendering.complete_secondary_cmd_buff.linear_interpolation.no_offset_1_sample,Fail dEQP-VK.draw.dynamic_rendering.complete_secondary_cmd_buff.multiple_interpolation.separate.no_sample_decoration.1_sample,Fail dEQP-VK.draw.dynamic_rendering.complete_secondary_cmd_buff.multiple_interpolation.separate.no_sample_decoration.4_samples,Fail diff --git a/src/panfrost/vulkan/csf/panvk_vX_cmd_draw.c b/src/panfrost/vulkan/csf/panvk_vX_cmd_draw.c index c94e4d00782..e351f66a840 100644 --- a/src/panfrost/vulkan/csf/panvk_vX_cmd_draw.c +++ b/src/panfrost/vulkan/csf/panvk_vX_cmd_draw.c @@ -1201,6 +1201,23 @@ get_fb_descs(struct panvk_cmd_buffer *cmdbuf) return VK_SUCCESS; } +static void +set_provoking_vertex_mode(struct panvk_cmd_buffer *cmdbuf) +{ + struct pan_fb_info *fbinfo = &cmdbuf->state.gfx.render.fb.info; + bool first_provoking_vertex = + cmdbuf->vk.dynamic_graphics_state.rs.provoking_vertex == + VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT; + + /* If this is not the first draw, first_provoking_vertex should match + * the one from the previous draws. Unfortunately, we can't check it + * when the render pass is inherited. */ + assert(!cmdbuf->state.gfx.render.fbds.gpu || + fbinfo->first_provoking_vertex == first_provoking_vertex); + + fbinfo->first_provoking_vertex = first_provoking_vertex; +} + static VkResult get_render_ctx(struct panvk_cmd_buffer *cmdbuf) { @@ -1587,6 +1604,8 @@ prepare_draw(struct panvk_cmd_buffer *cmdbuf, struct panvk_draw_info *draw) /* FIXME: support non-IDVS. */ assert(idvs); + set_provoking_vertex_mode(cmdbuf); + result = update_tls(cmdbuf); if (result != VK_SUCCESS) return result; diff --git a/src/panfrost/vulkan/jm/panvk_vX_cmd_draw.c b/src/panfrost/vulkan/jm/panvk_vX_cmd_draw.c index 4b44f1d3018..3d4a1a80684 100644 --- a/src/panfrost/vulkan/jm/panvk_vX_cmd_draw.c +++ b/src/panfrost/vulkan/jm/panvk_vX_cmd_draw.c @@ -1015,6 +1015,23 @@ panvk_emit_tiler_dcd(struct panvk_cmd_buffer *cmdbuf, } } +static void +set_provoking_vertex_mode(struct panvk_cmd_buffer *cmdbuf) +{ + struct pan_fb_info *fbinfo = &cmdbuf->state.gfx.render.fb.info; + bool first_provoking_vertex = + cmdbuf->vk.dynamic_graphics_state.rs.provoking_vertex == + VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT; + + /* If this is not the first draw, first_provoking_vertex should match + * the one from the previous draws. Unfortunately, we can't check it + * when the render pass is inherited. */ + assert(!cmdbuf->cur_batch->fb.desc.gpu || + fbinfo->first_provoking_vertex == first_provoking_vertex); + + fbinfo->first_provoking_vertex = first_provoking_vertex; +} + static VkResult panvk_draw_prepare_tiler_job(struct panvk_cmd_buffer *cmdbuf, struct panvk_draw_info *draw) @@ -1233,6 +1250,8 @@ panvk_cmd_draw(struct panvk_cmd_buffer *cmdbuf, struct panvk_draw_info *draw) cmdbuf->state.gfx.occlusion_query.mode != MALI_OCCLUSION_MODE_DISABLED; bool needs_tiling = !rs->rasterizer_discard_enable || active_occlusion; + set_provoking_vertex_mode(cmdbuf); + if (!rs->rasterizer_discard_enable) { struct pan_fb_info *fbinfo = &cmdbuf->state.gfx.render.fb.info; uint32_t rasterization_samples =