From: Kenneth Graunke Date: Sun, 21 Jan 2018 00:56:59 +0000 (-0800) Subject: iris: do the FS...asserts because we don't lower uniforms yet X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=695bd55d1a469938c966d788a52d77a0e5080182;p=mesa.git iris: do the FS...asserts because we don't lower uniforms yet --- diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index e5c7791dcd7..109e5b95e7e 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -90,7 +90,7 @@ struct iris_context { struct { struct iris_uncompiled_shader *progs[MESA_SHADER_STAGES]; struct brw_stage_prog_data *prog_data[MESA_SHADER_STAGES]; - uint32_t *prog_offset[MESA_SHADER_STAGES]; + uint32_t prog_offset[MESA_SHADER_STAGES]; struct brw_vue_map *last_vue_map; struct iris_program_cache cache; diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index eed24334486..064b2b2a8ba 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -346,7 +346,10 @@ iris_update_compiled_fs(struct iris_context *ice) struct brw_wm_prog_key key; iris_populate_fs_key(ice, &key); - return; // XXX: need to fix FS compiles + if (iris_search_cache(ice, IRIS_CACHE_FS, &key, sizeof(key), IRIS_DIRTY_FS, + &ice->shaders.prog_offset[MESA_SHADER_FRAGMENT], + &ice->shaders.prog_data[MESA_SHADER_FRAGMENT])) + return; UNUSED bool success = iris_compile_fs(ice, ice->shaders.progs[MESA_SHADER_FRAGMENT], &key, @@ -356,18 +359,17 @@ iris_update_compiled_fs(struct iris_context *ice) static void update_last_vue_map(struct iris_context *ice) { -#if 0 - struct brw_vue_prog_data *vue_prog_data; + struct brw_stage_prog_data *prog_data; if (ice->shaders.progs[MESA_SHADER_GEOMETRY]) - vue_prog_data = brw_vue_prog_data(brw->gs.base.prog_data); + prog_data = ice->shaders.prog_data[MESA_SHADER_GEOMETRY]; else if (ice->shaders.progs[MESA_SHADER_TESS_EVAL]) - vue_prog_data = brw_vue_prog_data(brw->tes.base.prog_data); + prog_data = ice->shaders.prog_data[MESA_SHADER_TESS_EVAL]; else - vue_prog_data = brw_vue_prog_data(brw->vs.base.prog_data); + prog_data = ice->shaders.prog_data[MESA_SHADER_VERTEX]; - brw->vue_map_geom_out = vue_prog_data->vue_map; -#endif + struct brw_vue_prog_data *vue_prog_data = (void *) prog_data; + ice->shaders.last_vue_map = &vue_prog_data->vue_map; } void