panfrost: expose PIPE_CAP_POLYGON_OFFSET_CLAMP

This gives us ARB_polygon_offset_clamp and EXT_polygon_offset_clamp, and
most of the actual state plumbing was already in place.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23169>
This commit is contained in:
Erik Faye-Lund 2023-05-22 13:43:18 +02:00 committed by Marge Bot
parent 8484fdf501
commit 569d035a08
3 changed files with 3 additions and 4 deletions

View file

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

View file

@ -670,6 +670,7 @@ panfrost_prepare_fs_state(struct panfrost_context *ctx, mali_ptr *blend_shaders,
cfg.stencil_mask_misc.alpha_to_coverage = alpha_to_coverage;
cfg.depth_units = rast->offset_units * 2.0f;
cfg.depth_factor = rast->offset_scale;
cfg.depth_bias_clamp = rast->offset_clamp;
bool back_enab = zsa->base.stencil[1].enabled;
cfg.stencil_front.reference_value = ctx->stencil_ref.ref_value[0];
@ -3932,9 +3933,6 @@ panfrost_create_rasterizer_state(struct pipe_context *pctx,
so->base = *cso;
/* Gauranteed with the core GL call, so don't expose ARB_polygon_offset */
assert(cso->offset_clamp == 0.0);
#if PAN_ARCH <= 7
pan_pack(&so->multisample, MULTISAMPLE_MISC, cfg) {
cfg.multisample_enable = cso->multisample;

View file

@ -154,6 +154,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_SAMPLER_VIEW_TARGET:
case PIPE_CAP_CLIP_HALFZ:
case PIPE_CAP_POLYGON_OFFSET_CLAMP:
case PIPE_CAP_TEXTURE_SWIZZLE:
case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE:
case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR: