/* else, totally clipped */
}
+static void
+clip_line_guard_xy(struct draw_stage *stage, struct prim_header *header)
+{
+ unsigned clipmask = (header->v[0]->clipmask |
+ header->v[1]->clipmask);
+
+ if ((clipmask & 0xffffffff) == 0) {
+ stage->next->line(stage->next, header);
+ }
+ else if ((clipmask & 0xfffffff0) == 0) {
+ while (clipmask) {
+ const unsigned plane_idx = ffs(clipmask)-1;
+ clipmask &= ~(1 << plane_idx); /* turn off this plane's bit */
+ /* TODO: this should really do proper guardband clipping,
+ * currently just throw out infs/nans.
+ * Also note that vertices with negative w values MUST be tossed
+ * out (not sure if proper guardband clipping would do this
+ * automatically). These would usually be captured by depth clip
+ * too but this can be disabled.
+ */
+ if ((header->v[0]->clip_pos[3] <= 0.0f &&
+ header->v[1]->clip_pos[3] <= 0.0f) ||
+ util_is_nan(header->v[0]->clip_pos[0]) ||
+ util_is_nan(header->v[0]->clip_pos[1]) ||
+ util_is_nan(header->v[1]->clip_pos[0]) ||
+ util_is_nan(header->v[1]->clip_pos[1]))
+ return;
+ }
+ stage->next->line(stage->next, header);
+ } else if ((header->v[0]->clipmask &
+ header->v[1]->clipmask) == 0) {
+ do_clip_line(stage, header, clipmask & 0xfffffff0);
+ }
+}
static void
clip_tri(struct draw_stage *stage, struct prim_header *header)
}
stage->tri = clip_tri;
- stage->line = clip_line;
}
struct prim_header *header)
{
clip_init_state(stage);
+ stage->line = stage->draw->guard_band_points_lines_xy ? clip_line_guard_xy : clip_line;
stage->line(stage, header);
}
dEQP-EGL.functional.robustness.reset_context.shaders.infinite_loop.sync_status.compute,Fail
dEQP-EGL.functional.robustness.reset_context.shaders.infinite_loop.sync_status.vertex,Fail
dEQP-EGL.functional.robustness.reset_context.shaders.infinite_loop.sync_status.vertex_and_fragment,Fail
-dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_center,Fail
-dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_corner,Fail
-dEQP-GLES3.functional.clipping.line.wide_line_clip_viewport_center,Fail
-dEQP-GLES3.functional.clipping.line.wide_line_clip_viewport_corner,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_dst_x,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_dst_x,Fail
-dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_center,Fail
-dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_corner,Fail
dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center,Fail
dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner,Fail
-dEQP-GLES3.functional.clipping.line.wide_line_clip_viewport_center,Fail
-dEQP-GLES3.functional.clipping.line.wide_line_clip_viewport_corner,Fail
dEQP-GLES3.functional.clipping.point.wide_point_clip,Fail
dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_corner,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag,Fail
spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_ust_test,Fail
-dEQP-GLES3.functional.clipping.line.wide_line_clip_viewport_center,Fail
-dEQP-GLES3.functional.clipping.line.wide_line_clip_viewport_corner,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_dst_x,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_dst_x,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_x,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_y,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_x,Fail
-dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_center,Fail
-dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_corner,Fail
# this test tries to be error-compatible with nvidia. spoiler: mesa isn't, and no driver can pass it
glx@glx_arb_create_context@invalid flag,Fail