i965: Move down genX_upload_sbe in profiles.

Avoid looping over all VARYING_SLOT_MAX urb_setup array
entries from genX_upload_sbe. Prepare an array indirection
to the active entries of urb_setup already in the compile
step. On upload only walk the active arrays.

v2: Use uint8_t to store the attribute numbers.
v3: Change loop to build up the array indirection.
v4: Rebase.
v5: Style fix.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
This commit is contained in:
Mathias Fröhlich
2018-12-11 18:45:43 +01:00
committed by Marge Bot
parent b1a6a15aaf
commit 630154e77b
5 changed files with 37 additions and 3 deletions

View File

@@ -788,6 +788,14 @@ struct brw_wm_prog_data {
* For varying slots that are not used by the FS, the value is -1.
*/
int urb_setup[VARYING_SLOT_MAX];
/**
* Cache structure into the urb_setup array above that contains the
* attribute numbers of active varyings out of urb_setup.
* The actual count is stored in urb_setup_attribs_count.
*/
uint8_t urb_setup_attribs[VARYING_SLOT_MAX];
uint8_t urb_setup_attribs_count;
};
/** Returns the SIMD width corresponding to a given KSP index