radv: make pipeline hashing functions non-static
They will be used to generate pipeline hashes from pCreateInfo. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
This commit is contained in:
committed by
Marge Bot
parent
3423facbd1
commit
af76f48fc2
@@ -154,7 +154,7 @@ radv_compile_cs(struct radv_device *device, struct vk_pipeline_cache *cache, str
|
||||
return cs_shader;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
radv_compute_pipeline_hash(const struct radv_device *device, const VkComputePipelineCreateInfo *pCreateInfo,
|
||||
unsigned char *hash)
|
||||
{
|
||||
|
||||
@@ -62,4 +62,7 @@ VkResult radv_compute_pipeline_create(VkDevice _device, VkPipelineCache _cache,
|
||||
|
||||
void radv_destroy_compute_pipeline(struct radv_device *device, struct radv_compute_pipeline *pipeline);
|
||||
|
||||
void radv_compute_pipeline_hash(const struct radv_device *device, const VkComputePipelineCreateInfo *pCreateInfo,
|
||||
unsigned char *hash);
|
||||
|
||||
#endif /* RADV_PIPELINE_COMPUTE_H */
|
||||
|
||||
@@ -2750,20 +2750,7 @@ radv_should_compute_pipeline_hash(const struct radv_device *device, const enum r
|
||||
((instance->vk.trace_mode & RADV_TRACE_MODE_RGP) && pipeline_type == RADV_PIPELINE_GRAPHICS);
|
||||
}
|
||||
|
||||
struct radv_graphics_pipeline_state {
|
||||
struct vk_graphics_pipeline_state vk;
|
||||
void *vk_data;
|
||||
|
||||
bool compilation_required;
|
||||
|
||||
struct radv_shader_stage *stages;
|
||||
|
||||
struct radv_graphics_pipeline_key key;
|
||||
|
||||
struct radv_pipeline_layout layout;
|
||||
};
|
||||
|
||||
static void
|
||||
void
|
||||
radv_graphics_pipeline_state_finish(struct radv_device *device, struct radv_graphics_pipeline_state *gfx_state)
|
||||
{
|
||||
radv_pipeline_layout_finish(device, &gfx_state->layout);
|
||||
@@ -2776,7 +2763,7 @@ radv_graphics_pipeline_state_finish(struct radv_device *device, struct radv_grap
|
||||
}
|
||||
}
|
||||
|
||||
static VkResult
|
||||
VkResult
|
||||
radv_generate_graphics_pipeline_state(struct radv_device *device, const VkGraphicsPipelineCreateInfo *pCreateInfo,
|
||||
struct radv_graphics_pipeline_state *gfx_state)
|
||||
{
|
||||
@@ -2860,7 +2847,7 @@ fail:
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
radv_graphics_pipeline_hash(const struct radv_device *device, const struct radv_graphics_pipeline_state *gfx_state,
|
||||
unsigned char *hash)
|
||||
{
|
||||
|
||||
@@ -638,4 +638,26 @@ void radv_destroy_graphics_pipeline(struct radv_device *device, struct radv_grap
|
||||
|
||||
void radv_destroy_graphics_lib_pipeline(struct radv_device *device, struct radv_graphics_lib_pipeline *pipeline);
|
||||
|
||||
struct radv_graphics_pipeline_state {
|
||||
struct vk_graphics_pipeline_state vk;
|
||||
void *vk_data;
|
||||
|
||||
bool compilation_required;
|
||||
|
||||
struct radv_shader_stage *stages;
|
||||
|
||||
struct radv_graphics_pipeline_key key;
|
||||
|
||||
struct radv_pipeline_layout layout;
|
||||
};
|
||||
|
||||
void radv_graphics_pipeline_hash(const struct radv_device *device, const struct radv_graphics_pipeline_state *gfx_state,
|
||||
unsigned char *hash);
|
||||
|
||||
VkResult radv_generate_graphics_pipeline_state(struct radv_device *device,
|
||||
const VkGraphicsPipelineCreateInfo *pCreateInfo,
|
||||
struct radv_graphics_pipeline_state *gfx_state);
|
||||
|
||||
void radv_graphics_pipeline_state_finish(struct radv_device *device, struct radv_graphics_pipeline_state *gfx_state);
|
||||
|
||||
#endif /* RADV_PIPELINE_GRAPHICS_H */
|
||||
|
||||
@@ -18,16 +18,6 @@
|
||||
#include "radv_rmv.h"
|
||||
#include "radv_shader.h"
|
||||
|
||||
struct radv_ray_tracing_state_key {
|
||||
uint32_t stage_count;
|
||||
struct radv_ray_tracing_stage *stages;
|
||||
|
||||
uint32_t group_count;
|
||||
struct radv_ray_tracing_group *groups;
|
||||
|
||||
struct radv_shader_stage_key stage_keys[MESA_VULKAN_SHADER_STAGES];
|
||||
};
|
||||
|
||||
struct rt_handle_hash_entry {
|
||||
uint32_t key;
|
||||
char hash[20];
|
||||
@@ -833,7 +823,7 @@ compile_rt_prolog(struct radv_device *device, struct radv_ray_tracing_pipeline *
|
||||
pipeline->prolog->max_waves = radv_get_max_waves(device, config, &pipeline->prolog->info);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
radv_ray_tracing_pipeline_hash(const struct radv_device *device, const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
|
||||
const struct radv_ray_tracing_state_key *rt_state, unsigned char *hash)
|
||||
{
|
||||
@@ -933,14 +923,14 @@ done:
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
radv_ray_tracing_state_key_finish(struct radv_ray_tracing_state_key *rt_state)
|
||||
{
|
||||
free(rt_state->stages);
|
||||
free(rt_state->groups);
|
||||
}
|
||||
|
||||
static VkResult
|
||||
VkResult
|
||||
radv_generate_ray_tracing_state_key(struct radv_device *device, const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
|
||||
struct radv_ray_tracing_state_key *rt_state)
|
||||
{
|
||||
|
||||
@@ -99,6 +99,26 @@ struct radv_ray_tracing_stage {
|
||||
uint8_t sha1[SHA1_DIGEST_LENGTH];
|
||||
};
|
||||
|
||||
struct radv_ray_tracing_state_key {
|
||||
uint32_t stage_count;
|
||||
struct radv_ray_tracing_stage *stages;
|
||||
|
||||
uint32_t group_count;
|
||||
struct radv_ray_tracing_group *groups;
|
||||
|
||||
struct radv_shader_stage_key stage_keys[MESA_VULKAN_SHADER_STAGES];
|
||||
};
|
||||
|
||||
void radv_destroy_ray_tracing_pipeline(struct radv_device *device, struct radv_ray_tracing_pipeline *pipeline);
|
||||
|
||||
void radv_ray_tracing_pipeline_hash(const struct radv_device *device,
|
||||
const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
|
||||
const struct radv_ray_tracing_state_key *rt_state, unsigned char *hash);
|
||||
|
||||
VkResult radv_generate_ray_tracing_state_key(struct radv_device *device,
|
||||
const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
|
||||
struct radv_ray_tracing_state_key *rt_state);
|
||||
|
||||
void radv_ray_tracing_state_key_finish(struct radv_ray_tracing_state_key *rt_state);
|
||||
|
||||
#endif /* RADV_PIPELINE_RT */
|
||||
|
||||
Reference in New Issue
Block a user