mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
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:
parent
2d3f0a834a
commit
a141b52641
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue