diff --git a/src/gallium/drivers/zink/ci/zink-lvp-fails.txt b/src/gallium/drivers/zink/ci/zink-lvp-fails.txt index 63bbd2e574d..3ff6ba1c9d8 100644 --- a/src/gallium/drivers/zink/ci/zink-lvp-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-lvp-fails.txt @@ -39,10 +39,6 @@ glx@glx_ext_import_context@make current- multi process,Fail glx@glx_ext_import_context@make current- single process,Fail glx@glx_ext_import_context@query context info,Fail spec@!opengl 1.0@gl-1.0-no-op-paths,Fail -spec@!opengl 1.1@linestipple,Fail -spec@!opengl 1.1@linestipple@Factor 2x,Fail -spec@!opengl 1.1@linestipple@Factor 3x,Fail -spec@!opengl 1.1@linestipple@Line loop,Fail spec@!opengl 1.1@polygon-mode,Fail spec@!opengl 1.1@polygon-mode-facing,Fail spec@!opengl 1.1@polygon-mode-offset,Fail diff --git a/src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt index ddb97c35aab..c9212ee7ef6 100644 --- a/src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt @@ -181,10 +181,6 @@ spec@khr_texture_compression_astc@sliced-3d-miptree-gl srgb-fp@sRGB decode full spec@oes_shader_io_blocks@compiler@layout-location-aliasing.vert,Fail spec@!opengl 1.0@gl-1.0-no-op-paths,Fail -spec@!opengl 1.1@linestipple@Factor 2x,Fail -spec@!opengl 1.1@linestipple@Factor 3x,Fail -spec@!opengl 1.1@linestipple,Fail -spec@!opengl 1.1@linestipple@Line loop,Fail spec@!opengl 1.1@polygon-mode-facing,Fail spec@!opengl 1.1@polygon-mode,Fail spec@!opengl 1.1@polygon-mode-offset@config 0: Expected white pixel on bottom edge,Fail diff --git a/src/gallium/drivers/zink/ci/zink-radv-polaris10-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-polaris10-fails.txt index 4c32936c11f..7c7cce63d38 100644 --- a/src/gallium/drivers/zink/ci/zink-radv-polaris10-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-radv-polaris10-fails.txt @@ -192,10 +192,6 @@ spec@khr_texture_compression_astc@sliced-3d-miptree-gl srgb-fp@sRGB decode full spec@oes_shader_io_blocks@compiler@layout-location-aliasing.vert,Fail spec@!opengl 1.0@gl-1.0-no-op-paths,Fail -spec@!opengl 1.1@linestipple@Factor 2x,Fail -spec@!opengl 1.1@linestipple@Factor 3x,Fail -spec@!opengl 1.1@linestipple,Fail -spec@!opengl 1.1@linestipple@Line loop,Fail spec@!opengl 1.1@polygon-mode-facing,Fail spec@!opengl 1.1@polygon-mode,Fail spec@!opengl 1.1@polygon-mode-offset@config 0: Expected white pixel on bottom edge,Fail diff --git a/src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt index 9f2b0642805..92c6f5a03ff 100644 --- a/src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt @@ -180,10 +180,6 @@ spec@khr_texture_compression_astc@sliced-3d-miptree-gl srgb-fp@sRGB decode full spec@oes_shader_io_blocks@compiler@layout-location-aliasing.vert,Fail spec@!opengl 1.0@gl-1.0-no-op-paths,Fail -spec@!opengl 1.1@linestipple@Factor 2x,Fail -spec@!opengl 1.1@linestipple@Factor 3x,Fail -spec@!opengl 1.1@linestipple,Fail -spec@!opengl 1.1@linestipple@Line loop,Fail spec@!opengl 1.1@polygon-mode-facing,Fail spec@!opengl 1.1@polygon-mode,Fail spec@!opengl 1.1@polygon-mode-offset@config 0: Expected white pixel on bottom edge,Fail diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index a3a88e93a16..be79ce9ef61 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -951,8 +951,10 @@ _mesa_End(void) } /* Special handling for GL_LINE_LOOP */ + bool driver_supports_lineloop = + ctx->Const.DriverSupportedPrimMask & BITFIELD_BIT(MESA_PRIM_LINE_LOOP); if (exec->vtx.mode[last] == GL_LINE_LOOP && - exec->vtx.markers[last].begin == 0) { + (exec->vtx.markers[last].begin == 0 || !driver_supports_lineloop)) { /* We're finishing drawing a line loop. Append 0th vertex onto * end of vertex buffer so we can draw it as a line strip. */ @@ -964,7 +966,9 @@ _mesa_End(void) /* copy 0th vertex to end of buffer */ memcpy(dst, src, exec->vtx.vertex_size * sizeof(fi_type)); - last_draw->start++; /* skip vertex0 */ + if (exec->vtx.markers[last].begin == 0) + last_draw->start++; /* skip vertex0 */ + /* note that the count stays unchanged */ exec->vtx.mode[last] = GL_LINE_STRIP; @@ -973,6 +977,9 @@ _mesa_End(void) */ exec->vtx.vert_count++; exec->vtx.buffer_ptr += exec->vtx.vertex_size; + + if (!driver_supports_lineloop) + last_draw->count++; } try_vbo_merge(exec);