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 <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14846>
This commit is contained in:
Dave Airlie 2022-02-03 12:52:30 +10:00 committed by Marge Bot
parent fb17da6c50
commit a448695eee

View file

@ -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[] */
};