iris: clamp PointWidth in 3DSTATE_SF like i965 does

Values match how MinimumPointWidth, MaximumPointWidth is setup. This
fixes assert hit in debug build when packing the struct with too large
value for genxml.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9942>
This commit is contained in:
Tapani Pälli 2021-03-30 16:57:49 +03:00
parent ddab996589
commit b2af419391

View file

@ -1793,7 +1793,7 @@ iris_create_rasterizer_state(struct pipe_context *ctx,
sf.SmoothPointEnable = (state->point_smooth || state->multisample) &&
!state->point_quad_rasterization;
sf.PointWidthSource = state->point_size_per_vertex ? Vertex : State;
sf.PointWidth = state->point_size;
sf.PointWidth = CLAMP(state->point_size, 0.125f, 255.875f);
if (state->flatshade_first) {
sf.TriangleFanProvokingVertexSelect = 1;