From: Kenneth Graunke Date: Wed, 15 Aug 2018 20:35:05 +0000 (-0700) Subject: iris: last VUE map NOS, handle > 16 FS inputs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2bd7d6fa71e62e3b9f77c20a5213a9fbcedc3415;p=mesa.git iris: last VUE map NOS, handle > 16 FS inputs not sure if the UNCOMPILED_FS flagging is still needed, should reevaluate those hacks at some point --- diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 5eee587990a..71c3f89965b 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -121,6 +121,7 @@ enum iris_nos_dep { IRIS_NOS_DEPTH_STENCIL_ALPHA, IRIS_NOS_RASTERIZER, IRIS_NOS_BLEND, + IRIS_NOS_LAST_VUE_MAP, IRIS_NOS_COUNT, }; diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 39bb53602c1..9eec3a7a0fe 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -120,6 +120,12 @@ iris_create_shader_state(struct pipe_context *ctx, IRIS_NOS_DEPTH_STENCIL_ALPHA | IRIS_NOS_RASTERIZER | IRIS_NOS_BLEND; + + /* The program key needs the VUE map if there are > 16 inputs */ + if (util_bitcount64(ish->nir->info.inputs_read & + BRW_FS_VARYING_INPUT_MASK) > 16) { + ish->nos |= IRIS_NOS_LAST_VUE_MAP; + } break; case MESA_SHADER_COMPUTE: // XXX: NOS @@ -742,6 +748,9 @@ iris_update_compiled_fs(struct iris_context *ice) struct brw_wm_prog_key key = { .program_string_id = ish->program_id }; ice->vtbl.populate_fs_key(ice, &key); + if (ish->nos & IRIS_NOS_LAST_VUE_MAP) + key.input_slots_valid = ice->shaders.last_vue_map->slots_valid; + if (iris_bind_cached_shader(ice, IRIS_CACHE_FS, &key)) return; @@ -789,7 +798,8 @@ update_last_vue_map(struct iris_context *ice, ice->state.dirty |= IRIS_DIRTY_CLIP | IRIS_DIRTY_SF_CL_VIEWPORT | IRIS_DIRTY_SCISSOR_RECT | - IRIS_DIRTY_UNCOMPILED_FS; + IRIS_DIRTY_UNCOMPILED_FS | + ice->state.dirty_for_nos[IRIS_NOS_LAST_VUE_MAP]; // XXX: CC_VIEWPORT? }