From a448695eee1cffe59ebdd641f746b0f4bdb5f115 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 3 Feb 2022 12:52:30 +1000 Subject: [PATCH] llvmpipe: refactor lp_rast_shader_inputs. viewport_index won't be >= 16 layer should be < 2048 view_index should be < 2048 this leaves the last 64-bits as padding, which something expects, but not having to write to it means we have to write less memory every triangle. Reviewed-by: Jose Fonseca Part-of: --- src/gallium/drivers/llvmpipe/lp_rast.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h index cc07b2083e7..14a2710f7f5 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.h +++ b/src/gallium/drivers/llvmpipe/lp_rast.h @@ -111,12 +111,11 @@ struct lp_rast_shader_inputs { unsigned frontfacing:1; /** True for front-facing */ unsigned disable:1; /** Partially binned, disable this command */ unsigned is_blit:1; /* blit */ - unsigned pad0:13; /* wasted space */ - unsigned view_index:16; + unsigned viewport_index:4; /* viewport index */ + unsigned layer:11; + unsigned view_index:14; unsigned stride; /* how much to advance data between a0, dadx, dady */ - unsigned layer; /* the layer to render to (from gs, already clamped) */ - unsigned viewport_index; /* the active viewport index (from gs, already clamped) */ - + unsigned pad[2]; /* followed by a0, dadx, dady and planes[] */ };