radv: change the reset stipple pattern mode for adjacent lines
Ported from RadeonSI. This isn't covered by VK CTS. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26429>
This commit is contained in:
committed by
Marge Bot
parent
16d5ffc3ee
commit
e88973fd02
@@ -2215,7 +2215,7 @@ radv_emit_line_stipple(struct radv_cmd_buffer *cmd_buffer)
|
||||
const struct radv_dynamic_state *d = &cmd_buffer->state.dynamic;
|
||||
uint32_t auto_reset_cntl = 2;
|
||||
|
||||
if (d->vk.ia.primitive_topology == V_008958_DI_PT_LINELIST)
|
||||
if (radv_primitive_topology_is_line_list(d->vk.ia.primitive_topology))
|
||||
auto_reset_cntl = 1;
|
||||
|
||||
radeon_set_context_reg(cmd_buffer->cs, R_028A0C_PA_SC_LINE_STIPPLE,
|
||||
@@ -6810,8 +6810,8 @@ radv_CmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology
|
||||
struct radv_cmd_state *state = &cmd_buffer->state;
|
||||
unsigned primitive_topology = si_translate_prim(primitiveTopology);
|
||||
|
||||
if ((state->dynamic.vk.ia.primitive_topology == V_008958_DI_PT_LINELIST) !=
|
||||
(primitive_topology == V_008958_DI_PT_LINELIST))
|
||||
if (radv_primitive_topology_is_line_list(state->dynamic.vk.ia.primitive_topology) !=
|
||||
radv_primitive_topology_is_line_list(primitive_topology))
|
||||
state->dirty |= RADV_CMD_DIRTY_DYNAMIC_LINE_STIPPLE;
|
||||
|
||||
if (radv_prim_is_points_or_lines(state->dynamic.vk.ia.primitive_topology) !=
|
||||
|
||||
@@ -3389,6 +3389,12 @@ radv_polygon_mode_is_points_or_lines(unsigned polygon_mode)
|
||||
return radv_polygon_mode_is_point(polygon_mode) || radv_polygon_mode_is_line(polygon_mode);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
radv_primitive_topology_is_line_list(unsigned primitive_topology)
|
||||
{
|
||||
return primitive_topology == V_008958_DI_PT_LINELIST || primitive_topology == V_008958_DI_PT_LINELIST_ADJ;
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
radv_get_num_vertices_per_prim(const struct radv_pipeline_key *pipeline_key)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user