struct ac_cull_options options = {};
options.cull_front = shader->key.opt.ngg_culling & SI_NGG_CULL_FRONT_FACE;
options.cull_back = shader->key.opt.ngg_culling & SI_NGG_CULL_BACK_FACE;
- options.cull_view_xy = shader->key.opt.ngg_culling & SI_NGG_CULL_VIEW_SMALLPRIMS;
- options.cull_small_prims = options.cull_view_xy;
+ options.cull_view_xy = true;
+ options.cull_small_prims = true; /* this would only be false with conservative rasterization */
options.cull_zero_area = options.cull_front || options.cull_back;
options.cull_w = true;
SI_VS_BLIT_SGPRS_POS_TEXCOORD = 9,
};
-#define SI_NGG_CULL_VIEW_SMALLPRIMS (1 << 0) /* view.xy + small prims */
+#define SI_NGG_CULL_ENABLED (1 << 0) /* this implies W, view.xy, and small prim culling */
#define SI_NGG_CULL_BACK_FACE (1 << 1) /* back faces */
#define SI_NGG_CULL_FRONT_FACE (1 << 2) /* front faces */
#define SI_NGG_CULL_GS_FAST_LAUNCH_TRI_LIST (1 << 3) /* GS fast launch: triangles */
S_028810_DX_LINEAR_ATTR_CLIP_ENA(1);
if (rs->rasterizer_discard) {
- rs->ngg_cull_flags = SI_NGG_CULL_FRONT_FACE | SI_NGG_CULL_BACK_FACE;
+ rs->ngg_cull_flags = SI_NGG_CULL_ENABLED |
+ SI_NGG_CULL_FRONT_FACE |
+ SI_NGG_CULL_BACK_FACE;
rs->ngg_cull_flags_y_inverted = rs->ngg_cull_flags;
} else {
- /* Polygon mode can't use view and small primitive culling,
- * because it draws points or lines where the culling depends
- * on the point or line width.
- */
- if (!rs->polygon_mode_enabled) {
- rs->ngg_cull_flags |= SI_NGG_CULL_VIEW_SMALLPRIMS;
- rs->ngg_cull_flags_y_inverted |= SI_NGG_CULL_VIEW_SMALLPRIMS;
- }
+ rs->ngg_cull_flags = SI_NGG_CULL_ENABLED;
+ rs->ngg_cull_flags_y_inverted = rs->ngg_cull_flags;
if (rs->cull_front) {
rs->ngg_cull_flags |= SI_NGG_CULL_FRONT_FACE;