aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-10-17 21:28:56 -0400
committerMarek Olšák <[email protected]>2019-10-23 21:12:52 -0400
commitfb04e5da97d904ab1dc7e0182bcba77071bbe340 (patch)
tree1dc96b29f5ef0bfd666c13fcbd3f2d8f740c9452 /src/gallium/include
parent8a0dd0af3f1a6c0310a08daf4220132ec6815b31 (diff)
gallium: add pipe_screen::finalize_nir
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_screen.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index 9a1fc37280e..0f2831b6eda 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -500,6 +500,17 @@ struct pipe_screen {
struct pipe_resource *resource,
unsigned int nrects,
const struct pipe_box *rects);
+
+ /**
+ * Run driver-specific NIR lowering and optimization passes.
+ *
+ * State trackers should call this before passing shaders to drivers,
+ * and ideally also before shader caching.
+ *
+ * \param optimize Whether the input shader hasn't been optimized and
+ * should be.
+ */
+ void (*finalize_nir)(struct pipe_screen *screen, void *nir, bool optimize);
};