st/mesa: disable light_twoside if back faces are culled
This potentially improves performance. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26308>
This commit is contained in:
@@ -295,6 +295,10 @@ st_update_rasterizer(struct st_context *st)
|
||||
raster->cull_face |= PIPE_FACE_BACK;
|
||||
}
|
||||
|
||||
/* Disable two-sided colors if back faces are culled. */
|
||||
if (raster->cull_face & PIPE_FACE_BACK)
|
||||
raster->light_twoside = 0;
|
||||
|
||||
/* _NEW_TRANSFORM */
|
||||
raster->depth_clip_near = !ctx->Transform.DepthClampNear;
|
||||
raster->depth_clip_far = !ctx->Transform.DepthClampFar;
|
||||
|
||||
Reference in New Issue
Block a user