pan/bi: Track whether the malloc IDVS flow is used

This affects what instructions the fragment shader uses. Will be used for the
legacy geometry flow in blit shaders. Whether that is a good idea remains to be
seen, admittedly.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15793>
This commit is contained in:
Alyssa Rosenzweig
2022-03-24 16:39:52 -04:00
committed by Marge Bot
parent 9758555481
commit a1d5bf0a7a
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -4336,6 +4336,7 @@ bi_compile_variant_nir(nir_shader *nir,
ctx->arch = inputs->gpu_id >> 12;
ctx->info = info;
ctx->idvs = idvs;
ctx->malloc_idvs = (ctx->arch >= 9) && !inputs->no_idvs;
if (idvs != BI_IDVS_NONE) {
/* Specializing shaders for IDVS is destructive, so we need to
+6
View File
@@ -728,6 +728,12 @@ typedef struct {
unsigned arch;
enum bi_idvs_mode idvs;
/* In any graphics shader, whether the "IDVS with memory
* allocation" flow is used. This affects how varyings are loaded and
* stored. Ignore for compute.
*/
bool malloc_idvs;
/* During NIR->BIR */
bi_block *current_block;
bi_block *after_block;