zink: clamp min viewport width to 1

fixes validation spam

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
This commit is contained in:
Mike Blumenkrantz 2022-04-04 11:03:38 -04:00 committed by Marge Bot
parent d4e91d0baa
commit e72ca7e7ac

View file

@ -620,7 +620,7 @@ zink_draw(struct pipe_context *pctx,
VkViewport viewport = {
ctx->vp_state.viewport_states[i].translate[0] - ctx->vp_state.viewport_states[i].scale[0],
ctx->vp_state.viewport_states[i].translate[1] - ctx->vp_state.viewport_states[i].scale[1],
ctx->vp_state.viewport_states[i].scale[0] * 2,
MAX2(ctx->vp_state.viewport_states[i].scale[0] * 2, 1),
ctx->vp_state.viewport_states[i].scale[1] * 2,
ctx->rast_state->base.clip_halfz ?
ctx->vp_state.viewport_states[i].translate[2] :