diff options
author | Rob Clark <[email protected]> | 2020-06-20 12:53:36 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2020-06-26 08:53:02 -0700 |
commit | 6aadb00e60fcf37bbef0dfe03e76e72e7c08bf33 (patch) | |
tree | 06283f5da4b1b48eeb1c307a8fc2008cd59577b7 /src/gallium/drivers | |
parent | 83b97bf161f50371a09fdc02b3ca045671469b09 (diff) |
freedreno/ir3: build binning variant at same time as draw variant
For shader-cache, we are going to want to serialize them together.
Which is awkward if the two related variants are not compiled together.
This also decouples allocation and compile, which will simplify adding
shader-cache (which still needs to allocate, but can skip compile).
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_gallium.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c index a660a916d99..af307906896 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c @@ -44,8 +44,7 @@ #include "ir3/ir3_nir.h" static void -dump_shader_info(struct ir3_shader_variant *v, bool binning_pass, - struct pipe_debug_callback *debug) +dump_shader_info(struct ir3_shader_variant *v, struct pipe_debug_callback *debug) { if (!unlikely(fd_mesa_debug & FD_DBG_SHADERDB)) return; @@ -118,9 +117,14 @@ ir3_shader_variant(struct ir3_shader *shader, struct ir3_shader_key key, key.vastc_srgb, key.fastc_srgb); } - dump_shader_info(v, binning_pass, debug); + dump_shader_info(v, debug); upload_shader_variant(v); + + if (v->binning) { + upload_shader_variant(v->binning); + dump_shader_info(v->binning, debug); + } } return v; @@ -285,7 +289,7 @@ ir3_shader_state_delete(struct pipe_context *pctx, void *hwcso) fd_bo_del(v->bo); v->bo = NULL; - if (v->binning) { + if (v->binning && v->binning->bo) { fd_bo_del(v->binning->bo); v->binning->bo = NULL; } |