v3d/uniforms: update VIEWPORT_X/Y_SCALE uniforms for v71
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 21 Oct 2021 11:46:11 +0000 (13:46 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 13 Oct 2023 22:37:43 +0000 (22:37 +0000)
commitb09f9156661b4d4bec4e5494f3c106b0aac1f5f7
treeb03b07f798827fda179f96814c65fa1d4e03c6f0
parent2908b2782ae900e9aef8c62686c035ece7764411
v3d/uniforms: update VIEWPORT_X/Y_SCALE uniforms for v71

As the packet CLIPPER_XY scaling, this needs to be computed on 1/64ths
of pixel, instead of 1/256ths of pixels.

As this is the usual values that we get from macros, we add manually a
v42 and v71 macro, and define a new helper to get those.

Those granularity values are the same for Vulkan and OpenGL, so
perhaps we should move them to a common place.

As with v3dv, V3D_X macro name is somewhat confusing. It is
specifically created to ask for define values that depends on the
version. But I also felt that V3D_DEFINE_X was too long.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
src/gallium/drivers/v3d/v3d_context.h
src/gallium/drivers/v3d/v3d_uniforms.c