mesa/st: disable unrestricted fragment depth values for GL/GLES
GLES always clamps for 32-bit float buffers, GL doesn't require it but setting this per API causes virgl to fail some tests. To fix is properly we'd need to introduce a CAP to expose this between host/guest. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>
This commit is contained in:
parent
0e38db0146
commit
171e35de91
|
@ -299,6 +299,9 @@ st_update_rasterizer(struct st_context *st)
|
||||||
raster->depth_clip_near = !ctx->Transform.DepthClampNear;
|
raster->depth_clip_near = !ctx->Transform.DepthClampNear;
|
||||||
raster->depth_clip_far = !ctx->Transform.DepthClampFar;
|
raster->depth_clip_far = !ctx->Transform.DepthClampFar;
|
||||||
raster->depth_clamp = !raster->depth_clip_far;
|
raster->depth_clamp = !raster->depth_clip_far;
|
||||||
|
/* this should be different for GL vs GLES but without NV_depth_buffer_float
|
||||||
|
it doesn't matter, and likely virgl would need fixes to deal with it. */
|
||||||
|
raster->unclamped_fragment_depth_values = false;
|
||||||
raster->clip_plane_enable = ctx->Transform.ClipPlanesEnabled;
|
raster->clip_plane_enable = ctx->Transform.ClipPlanesEnabled;
|
||||||
raster->clip_halfz = (ctx->Transform.ClipDepthMode == GL_ZERO_TO_ONE);
|
raster->clip_halfz = (ctx->Transform.ClipDepthMode == GL_ZERO_TO_ONE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue