v3d: expose ARB_depth_clamp in V3D 7.x

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30155>
This commit is contained in:
Juan A. Suarez Romero 2024-07-12 17:44:15 +02:00
parent f8623ea7da
commit cbd3927445
4 changed files with 7 additions and 10 deletions

View File

@ -92,7 +92,7 @@ GL 3.2, GLSL 1.50 --- all DONE: freedreno, nv50, nvc0, r600, radeonsi, llvmpipe,
GL_ARB_provoking_vertex (Provoking vertex) DONE (v3d, vc4, panfrost, lima, crocus)
GL_ARB_seamless_cube_map (Seamless cubemaps) DONE (panfrost, crocus)
GL_ARB_texture_multisample (Multisample textures) DONE (freedreno/a5xx+, v3d, vc4, panfrost)
GL_ARB_depth_clamp (Frag depth clamp) DONE (panfrost, crocus)
GL_ARB_depth_clamp (Frag depth clamp) DONE (panfrost, crocus, v3d)
GL_ARB_sync (Fence objects) DONE (v3d, vc4, panfrost, lima, crocus)
GLX_ARB_create_context_profile DONE

View File

@ -5,3 +5,4 @@ VK_EXT_shader_replicated_composites on ANV, dozen, hasvk, lavapipe, nvk, RADV, a
VK_KHR_maintenance5 on v3dv
VK_KHR_maintenance7 on RADV
VK_EXT_depth_clamp_zero_one on v3dv
GL_ARB_depth_clamp on v3d

View File

@ -295,6 +295,9 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_NATIVE_FENCE_FD:
return true;
case PIPE_CAP_DEPTH_CLIP_DISABLE:
return screen->devinfo.ver >= 71;
default:
return u_pipe_screen_get_param_defaults(pscreen, param);
}

View File

@ -380,18 +380,11 @@ v3dX(emit_state)(struct pipe_context *pctx)
}
#if V3D_VERSION >= 71
/* The following follows the logic implemented in v3dv
* plus the definition of depth_clip_near/far and
* depth_clamp.
*
* Note: some extensions are not supported by v3d
* (like ARB_depth_clamp) that would affect this, but
* the values on rasterizer are taking that into
* account.
*/
config.z_clipping_mode = v3d->rasterizer->base.depth_clip_near ||
v3d->rasterizer->base.depth_clip_far ?
V3D_Z_CLIP_MODE_MIN_ONE_TO_ONE : V3D_Z_CLIP_MODE_NONE;
config.z_clamp_mode = v3d->rasterizer->base.depth_clamp;
#endif
}
}