zink: advertise support for the quad primitive
authorantonino <antonino.maniscalco@collabora.com>
Mon, 13 Feb 2023 11:50:16 +0000 (12:50 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 29 Mar 2023 19:18:40 +0000 (19:18 +0000)
Zink now exposes the `PIPE_PRIM_QUADS` among supported primitives and
handles them with geometry shaders.

Previously, while not exposing this capability, gallium would internally
generate an index buffer to draw them with triangles.

However the information necessary to avoid drawing the diagonal line
when using the line primitive was not preserved.

fails are added for wireframe xfb quads tests

xfb is expected to output tessellatated quads while showing a quad
without a diagonal, however there is no sane way of achieving this.

As part of the test quads will be rendered with and without xfb and the
results compared.

Now to avoid breaking xfb zink has to always split quads into triangles
when xfb is enabled. This means that the test will fail.

Previously the diagonal was always present so the test passed

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

src/gallium/drivers/zink/ci/zink-amdpro-fails.txt
src/gallium/drivers/zink/ci/zink-anv-icl-fails.txt
src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt
src/gallium/drivers/zink/ci/zink-freedreno-a618-fails.txt
src/gallium/drivers/zink/ci/zink-lvp-fails.txt
src/gallium/drivers/zink/ci/zink-nv-fails.txt
src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt
src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt
src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt
src/gallium/drivers/zink/zink_screen.c

index 9c77545..a8976ba 100644 (file)
@@ -310,3 +310,7 @@ KHR-GL46.direct_state_access.renderbuffers_storage_multisample
 
 # VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT with VK_PRIMITIVE_TOPOLOGY_POINT_LIST is broken
 KHR-GL46.pipeline_statistics_query_tests_ARB.functional_primitives_vertices_submitted_and_clipping_input_output_primitives,Fail
+
+# Piglit xfb tests
+spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
+spec@ext_transform_feedback@tessellation quads wireframe,Fail
index 6d20682..40af4cb 100644 (file)
@@ -58,3 +58,7 @@ dEQP-GLES31.functional.copy_image.non_compressed.viewclass_32_bits.srgb8_alpha8_
 dEQP-GLES31.functional.copy_image.non_compressed.viewclass_64_bits.rg32i_rgba16i.renderbuffer_to_renderbuffer,Fail
 dEQP-GLES31.functional.copy_image.non_compressed.viewclass_64_bits.rg32ui_rgba16i.renderbuffer_to_renderbuffer,Fail
 dEQP-GLES31.functional.copy_image.non_compressed.viewclass_64_bits.rgba16ui_rgba16i.renderbuffer_to_renderbuffer,Fail
+
+# Piglit xfb tests
+spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
+spec@ext_transform_feedback@tessellation quads wireframe,Fail
index ac4c7d8..d0621cf 100644 (file)
@@ -688,6 +688,8 @@ spec@ext_framebuffer_multisample@interpolation 8 non-centroid-disabled,Fail
 spec@ext_packed_float@query-rgba-signed-components,Fail
 
 spec@ext_transform_feedback@tessellation triangle_fan flat_first,Fail
+spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
+spec@ext_transform_feedback@tessellation quads wireframe,Fail
 
 spec@glsl-1.50@execution@primitive-id-no-gs-quad-strip,Fail
 spec@glsl-1.50@execution@primitive-id-no-gs-quads,Fail
index ff1d362..2f0c8f2 100644 (file)
@@ -1,2 +1,6 @@
 # Some incorrect colors and missing lines.  Passes on its own.  Need to extract and minify the failing caselist.
 dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.lines.4,Fail
+
+# piglit xfb tests
+spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
+spec@ext_transform_feedback@tessellation quads wireframe,Fail
index d7f5154..6ec432b 100644 (file)
@@ -256,3 +256,6 @@ spec@glsl-4.50@execution@ssbo-atomiccompswap-int,Fail
 KHR-GL46.polygon_offset_clamp.PolygonOffsetClampMinMax,Fail
 KHR-GL46.polygon_offset_clamp.PolygonOffsetClampZeroInfinity,Fail
 spec@arb_texture_cube_map_array@texsubimage cube_map_array,Fail
+
+spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
+spec@ext_transform_feedback@tessellation quads wireframe,Fail
index f18273e..bffeb28 100644 (file)
@@ -536,3 +536,7 @@ dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_and_alpha_to_co
 dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_and_sample_coverage,Fail
 dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_and_sample_coverage_and_alpha_to_coverage,Fail
 dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_only,Fail
+
+# Piglit xfb tests
+spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
+spec@ext_transform_feedback@tessellation quads wireframe,Fail
index 3876670..6c59a99 100644 (file)
@@ -428,3 +428,6 @@ spec@arb_query_buffer_object@qbo@query-GL_PRIMITIVES_GENERATED-ASYNC_CPU_READ_AF
 
 # Should be fixed in the next glcts release (according to zmike)
 KHR-GL46.multi_bind.dispatch_bind_image_textures,Fail
+
+spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
+spec@ext_transform_feedback@tessellation quads wireframe,Fail
index 31358e0..b34310c 100644 (file)
@@ -432,3 +432,6 @@ spec@arb_query_buffer_object@qbo@query-GL_PRIMITIVES_GENERATED-ASYNC_CPU_READ_AF
 
 # Should be fixed in the next glcts release (according to zmike)
 KHR-GL46.multi_bind.dispatch_bind_image_textures,Fail
+
+spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
+spec@ext_transform_feedback@tessellation quads wireframe,Fail
index 3da662b..037b494 100644 (file)
@@ -22,3 +22,7 @@ KHR-GL46.texture_view.view_classes,Fail
 
 # https://gerrit.khronos.org/c/vk-gl-cts/+/9891/
 KHR-GLES31.core.polygon_offset_clamp.PolygonOffsetClampMinMax,Fail
+
+# Piglit xfb tests
+spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
+spec@ext_transform_feedback@tessellation quads wireframe,Fail
index 063ee27..b9f3b4b 100644 (file)
@@ -520,7 +520,6 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    }
    case PIPE_CAP_SUPPORTED_PRIM_MODES: {
       uint32_t modes = BITFIELD_MASK(PIPE_PRIM_MAX);
-      modes &= ~BITFIELD_BIT(PIPE_PRIM_QUADS);
       modes &= ~BITFIELD_BIT(PIPE_PRIM_QUAD_STRIP);
       modes &= ~BITFIELD_BIT(PIPE_PRIM_POLYGON);
       modes &= ~BITFIELD_BIT(PIPE_PRIM_LINE_LOOP);