radv: rename RADV_PIPELINE_LIBRARY to RADV_PIPELINE_RAY_TRACING_LIB

This seems more consistent with graphics pipeline libraries and it
avoids any confusion.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21894>
This commit is contained in:
Samuel Pitoiset 2023-03-20 09:34:11 +01:00 committed by Marge Bot
parent 10622ccc73
commit abfdc06b01
3 changed files with 14 additions and 12 deletions

View File

@ -133,8 +133,9 @@ radv_pipeline_destroy(struct radv_device *device, struct radv_pipeline *pipeline
radv_shader_part_unref(device, graphics_pipeline->ps_epilog);
vk_free(&device->vk.alloc, graphics_pipeline->state_data);
} else if (pipeline->type == RADV_PIPELINE_LIBRARY) {
struct radv_library_pipeline *library_pipeline = radv_pipeline_to_library(pipeline);
} else if (pipeline->type == RADV_PIPELINE_RAY_TRACING_LIB) {
struct radv_ray_tracing_lib_pipeline *library_pipeline =
radv_pipeline_to_ray_tracing_lib(pipeline);
ralloc_free(library_pipeline->ctx);
} else if (pipeline->type == RADV_PIPELINE_GRAPHICS_LIB) {

View File

@ -142,7 +142,8 @@ radv_create_merged_rt_create_info(const VkRayTracingPipelineCreateInfoKHR *pCrea
if (pCreateInfo->pLibraryInfo) {
for (unsigned i = 0; i < pCreateInfo->pLibraryInfo->libraryCount; ++i) {
RADV_FROM_HANDLE(radv_pipeline, pipeline, pCreateInfo->pLibraryInfo->pLibraries[i]);
struct radv_library_pipeline *library_pipeline = radv_pipeline_to_library(pipeline);
struct radv_ray_tracing_lib_pipeline *library_pipeline =
radv_pipeline_to_ray_tracing_lib(pipeline);
total_stages += library_pipeline->stage_count;
total_groups += library_pipeline->group_count;
@ -173,7 +174,8 @@ radv_create_merged_rt_create_info(const VkRayTracingPipelineCreateInfoKHR *pCrea
if (pCreateInfo->pLibraryInfo) {
for (unsigned i = 0; i < pCreateInfo->pLibraryInfo->libraryCount; ++i) {
RADV_FROM_HANDLE(radv_pipeline, pipeline, pCreateInfo->pLibraryInfo->pLibraries[i]);
struct radv_library_pipeline *library_pipeline = radv_pipeline_to_library(pipeline);
struct radv_ray_tracing_lib_pipeline *library_pipeline =
radv_pipeline_to_ray_tracing_lib(pipeline);
for (unsigned j = 0; j < library_pipeline->stage_count; ++j)
stages[total_stages + j] = library_pipeline->stages[j];
@ -334,7 +336,7 @@ radv_rt_pipeline_library_create(VkDevice _device, VkPipelineCache _cache,
const VkAllocationCallbacks *pAllocator, VkPipeline *pPipeline)
{
RADV_FROM_HANDLE(radv_device, device, _device);
struct radv_library_pipeline *pipeline;
struct radv_ray_tracing_lib_pipeline *pipeline;
VkRayTracingPipelineCreateInfoKHR local_create_info =
radv_create_merged_rt_create_info(pCreateInfo);
@ -348,7 +350,7 @@ radv_rt_pipeline_library_create(VkDevice _device, VkPipelineCache _cache,
if (pipeline == NULL)
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
radv_pipeline_init(device, &pipeline->base, RADV_PIPELINE_LIBRARY);
radv_pipeline_init(device, &pipeline->base, RADV_PIPELINE_RAY_TRACING_LIB);
pipeline->ctx = ralloc_context(NULL);
@ -733,8 +735,8 @@ radv_GetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline _pipeline, u
{
RADV_FROM_HANDLE(radv_pipeline, pipeline, _pipeline);
struct radv_ray_tracing_module *groups;
if (pipeline->type == RADV_PIPELINE_LIBRARY) {
groups = radv_pipeline_to_library(pipeline)->groups;
if (pipeline->type == RADV_PIPELINE_RAY_TRACING_LIB) {
groups = radv_pipeline_to_ray_tracing_lib(pipeline)->groups;
} else {
groups = radv_pipeline_to_ray_tracing(pipeline)->groups;
}

View File

@ -2118,8 +2118,7 @@ enum radv_pipeline_type {
RADV_PIPELINE_GRAPHICS_LIB,
/* Compute pipeline */
RADV_PIPELINE_COMPUTE,
/* Pipeline library. This can't actually run and merely is a partial pipeline. */
RADV_PIPELINE_LIBRARY,
RADV_PIPELINE_RAY_TRACING_LIB,
/* Raytracing pipeline */
RADV_PIPELINE_RAY_TRACING,
};
@ -2275,7 +2274,7 @@ struct radv_ray_tracing_module {
struct radv_pipeline_shader_stack_size stack_size;
};
struct radv_library_pipeline {
struct radv_ray_tracing_lib_pipeline {
struct radv_pipeline base;
/* ralloc context used for allocating pipeline library resources. */
@ -2322,7 +2321,7 @@ struct radv_ray_tracing_pipeline {
RADV_DECL_PIPELINE_DOWNCAST(graphics, RADV_PIPELINE_GRAPHICS)
RADV_DECL_PIPELINE_DOWNCAST(graphics_lib, RADV_PIPELINE_GRAPHICS_LIB)
RADV_DECL_PIPELINE_DOWNCAST(compute, RADV_PIPELINE_COMPUTE)
RADV_DECL_PIPELINE_DOWNCAST(library, RADV_PIPELINE_LIBRARY)
RADV_DECL_PIPELINE_DOWNCAST(ray_tracing_lib, RADV_PIPELINE_RAY_TRACING_LIB)
RADV_DECL_PIPELINE_DOWNCAST(ray_tracing, RADV_PIPELINE_RAY_TRACING)
struct radv_pipeline_stage {