From b3c78a51f33a26b57f4bec64bab73ea720c1e619 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 12 Jul 2017 15:56:00 -0700 Subject: [PATCH] broadcom/vc4: Switch the Viewport Center fields to a fixed-point representation. This gets us automatic CL decoding to a floating-point value, and drops a magic number from the emit code. 250x250 shader runner tests now say they have a center of 125.0 instead of 2000. --- src/broadcom/cle/v3d_packet_v21.xml | 4 ++-- src/gallium/drivers/vc4/vc4_emit.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/broadcom/cle/v3d_packet_v21.xml b/src/broadcom/cle/v3d_packet_v21.xml index 350cf294b51..b28f2b5eb6c 100644 --- a/src/broadcom/cle/v3d_packet_v21.xml +++ b/src/broadcom/cle/v3d_packet_v21.xml @@ -212,8 +212,8 @@ - - + + diff --git a/src/gallium/drivers/vc4/vc4_emit.c b/src/gallium/drivers/vc4/vc4_emit.c index d0a701f17b3..b45ffb75aa9 100644 --- a/src/gallium/drivers/vc4/vc4_emit.c +++ b/src/gallium/drivers/vc4/vc4_emit.c @@ -135,9 +135,9 @@ vc4_emit_state(struct pipe_context *pctx) cl_emit(&job->bcl, VIEWPORT_OFFSET, vp) { vp.viewport_centre_x_coordinate = - 16 * vc4->viewport.translate[0]; + vc4->viewport.translate[0]; vp.viewport_centre_y_coordinate = - 16 * vc4->viewport.translate[1]; + vc4->viewport.translate[1]; } } -- 2.30.2