v3d: add ARB_polygon_offset_clamp extension support

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16925>
This commit is contained in:
Juan A. Suarez Romero 2022-06-08 11:49:29 +02:00 committed by Marge Bot
parent a2463ec271
commit ef6cc03b17
3 changed files with 10 additions and 1 deletions

View File

@ -230,7 +230,7 @@ GL 4.6, GLSL 4.60 -- all DONE: radeonsi, zink
GL_ARB_gl_spirv DONE (i965/gen7+, llvmpipe)
GL_ARB_indirect_parameters DONE (i965/gen7+, nvc0, llvmpipe, virgl, d3d12)
GL_ARB_pipeline_statistics_query DONE (i965, nvc0, r600, llvmpipe, softpipe, )
GL_ARB_polygon_offset_clamp DONE (freedreno, i965, nv50, nvc0, r600, llvmpipe, virgl)
GL_ARB_polygon_offset_clamp DONE (freedreno, i965, nv50, nvc0, r600, llvmpipe, v3d, virgl)
GL_ARB_shader_atomic_counter_ops DONE (freedreno/a5xx+, i965/gen7+, nvc0, r600, llvmpipe, softpipe, virgl, v3d)
GL_ARB_shader_draw_parameters DONE (i965, llvmpipe, nvc0, d3d12)
GL_ARB_shader_group_vote DONE (i965, nvc0, llvmpipe)

View File

@ -150,6 +150,9 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_INDEP_BLEND_FUNC:
return 1;
case PIPE_CAP_POLYGON_OFFSET_CLAMP:
return screen->devinfo.ver >= 41;
case PIPE_CAP_TEXTURE_QUERY_LOD:
return screen->devinfo.ver >= 42;
break;

View File

@ -105,6 +105,9 @@ v3d_create_rasterizer_state(struct pipe_context *pctx,
v3dx_pack(&so->depth_offset, DEPTH_OFFSET, depth) {
depth.depth_offset_factor = cso->offset_scale;
depth.depth_offset_units = cso->offset_units;
#if V3D_VERSION >= 41
depth.limit = cso->offset_clamp;
#endif
}
/* The HW treats polygon offset units based on a Z24 buffer, so we
@ -113,6 +116,9 @@ v3d_create_rasterizer_state(struct pipe_context *pctx,
v3dx_pack(&so->depth_offset_z16, DEPTH_OFFSET, depth) {
depth.depth_offset_factor = cso->offset_scale;
depth.depth_offset_units = cso->offset_units * 256.0;
#if V3D_VERSION >= 41
depth.limit = cso->offset_clamp;
#endif
}
return so;