anv: cache raytracing trampoline shader

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8637>
This commit is contained in:
Lionel Landwerlin
2021-04-02 17:03:13 +03:00
committed by Marge Bot
parent ab77aeb488
commit 045f4600b1
4 changed files with 94 additions and 41 deletions

View File

@@ -1241,6 +1241,8 @@ struct anv_device {
struct anv_scratch_pool scratch_pool;
struct anv_bo *rt_scratch_bos[16];
struct anv_shader_bin *rt_trampoline;
pthread_mutex_t mutex;
pthread_cond_t queue_submit;
int _lost;
@@ -3610,9 +3612,6 @@ struct anv_ray_tracing_pipeline {
/* All shaders in the pipeline */
struct util_dynarray shaders;
/* Trampoline shader */
struct anv_state trampoline;
/* Dummy stack return shader */
struct anv_shader_bin * trivial_return_shader;
@@ -3681,6 +3680,12 @@ anv_pipeline_get_last_vue_prog_data(const struct anv_graphics_pipeline *pipeline
return &get_vs_prog_data(pipeline)->base;
}
VkResult
anv_device_init_rt_trampoline(struct anv_device *device);
void
anv_device_finish_rt_shaders(struct anv_device *device);
VkResult
anv_pipeline_init(struct anv_pipeline *pipeline,
struct anv_device *device,