This name better reflects the purpose and content of this struct.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22686>
void
radv_hash_rt_shaders(unsigned char *hash, const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
const struct radv_pipeline_key *key,
- const struct radv_ray_tracing_module *groups, uint32_t flags)
+ const struct radv_ray_tracing_group *groups, uint32_t flags)
{
RADV_FROM_HANDLE(radv_pipeline_layout, layout, pCreateInfo->layout);
struct mesa_sha1 ctx;
unsigned num_rt_groups = radv_pipeline_to_ray_tracing(pipeline)->group_count;
assert(num_rt_groups == pipeline_obj->num_stack_sizes);
struct radv_pipeline_shader_stack_size *stack_sizes = pipeline_obj->data;
- struct radv_ray_tracing_module *rt_groups = radv_pipeline_to_ray_tracing(pipeline)->groups;
+ struct radv_ray_tracing_group *rt_groups = radv_pipeline_to_ray_tracing(pipeline)->groups;
for (unsigned i = 0; i < num_rt_groups; i++)
rt_groups[i].stack_size = stack_sizes[i];
}
if (pipeline->type == RADV_PIPELINE_RAY_TRACING) {
struct radv_pipeline_shader_stack_size *stack_sizes = pipeline_obj->data;
- struct radv_ray_tracing_module *rt_groups = radv_pipeline_to_ray_tracing(pipeline)->groups;
+ struct radv_ray_tracing_group *rt_groups = radv_pipeline_to_ray_tracing(pipeline)->groups;
for (unsigned i = 0; i < num_rt_groups; i++)
stack_sizes[i] = rt_groups[i].stack_size;
}
static VkResult
radv_create_group_handles(struct radv_device *device,
const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
- struct radv_ray_tracing_module *groups)
+ struct radv_ray_tracing_group *groups)
{
bool capture_replay = pCreateInfo->flags &
VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR;
const VkPipelineShaderStageCreateInfo *pStage,
const VkPipelineCreateFlags flags, const uint8_t *custom_hash,
const VkPipelineCreationFeedbackCreateInfo *creation_feedback,
- struct radv_ray_tracing_module *rt_groups, uint32_t num_rt_groups)
+ struct radv_ray_tracing_group *rt_groups, uint32_t num_rt_groups)
{
struct radv_shader_binary *binaries[MESA_VULKAN_SHADER_STAGES] = {NULL};
unsigned char hash[20];
return VK_ERROR_OUT_OF_HOST_MEMORY;
size_t pipeline_size =
- sizeof(*pipeline) + local_create_info.groupCount * sizeof(struct radv_ray_tracing_module);
+ sizeof(*pipeline) + local_create_info.groupCount * sizeof(struct radv_ray_tracing_group);
pipeline = vk_zalloc2(&device->vk.alloc, pAllocator, pipeline_size, 8,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
if (!pipeline) {
static unsigned
compute_rt_stack_size(const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
- const struct radv_ray_tracing_module *groups)
+ const struct radv_ray_tracing_group *groups)
{
if (radv_rt_pipeline_has_dynamic_stack_size(pCreateInfo))
return -1u;
pCreateInfo->flags | VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT;
size_t pipeline_size =
- sizeof(*rt_pipeline) + local_create_info.groupCount * sizeof(struct radv_ray_tracing_module);
+ sizeof(*rt_pipeline) + local_create_info.groupCount * sizeof(struct radv_ray_tracing_group);
rt_pipeline = vk_zalloc2(&device->vk.alloc, pAllocator, pipeline_size, 8,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
if (rt_pipeline == NULL) {
uint32_t groupCount, size_t dataSize, void *pData)
{
RADV_FROM_HANDLE(radv_pipeline, pipeline, _pipeline);
- struct radv_ray_tracing_module *groups;
+ struct radv_ray_tracing_group *groups;
if (pipeline->type == RADV_PIPELINE_RAY_TRACING_LIB) {
groups = radv_pipeline_to_ray_tracing_lib(pipeline)->groups;
} else {
#define RADV_HASH_SHADER_NO_FMASK (1 << 19)
#define RADV_HASH_SHADER_NGG_STREAMOUT (1 << 20)
-struct radv_ray_tracing_module;
struct radv_pipeline_key;
void radv_pipeline_stage_init(const VkPipelineShaderStageCreateInfo *sinfo,
void radv_hash_rt_shaders(unsigned char *hash, const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
const struct radv_pipeline_key *key,
- const struct radv_ray_tracing_module *groups, uint32_t flags);
+ const struct radv_ray_tracing_group *groups, uint32_t flags);
uint32_t radv_get_hash_flags(const struct radv_device *device, bool stats);
struct radv_pipeline base;
};
-struct radv_ray_tracing_module {
+struct radv_ray_tracing_group {
struct radv_pipeline_group_handle handle;
struct radv_pipeline_shader_stack_size stack_size;
};
VkPipelineShaderStageCreateInfo *stages;
unsigned group_count;
VkRayTracingShaderGroupCreateInfoKHR *group_infos;
- struct radv_ray_tracing_module groups[];
+ struct radv_ray_tracing_group groups[];
};
struct radv_graphics_lib_pipeline {
uint32_t group_count;
uint32_t stack_size;
- struct radv_ray_tracing_module groups[];
+ struct radv_ray_tracing_group groups[];
};
#define RADV_DECL_PIPELINE_DOWNCAST(pipe_type, pipe_enum) \
static void
insert_rt_case(nir_builder *b, nir_shader *shader, struct rt_variables *vars, nir_ssa_def *idx,
uint32_t call_idx_base, uint32_t call_idx, unsigned stage_idx,
- struct radv_ray_tracing_module *groups)
+ struct radv_ray_tracing_group *groups)
{
uint32_t workgroup_size = b->shader->info.workgroup_size[0] * b->shader->info.workgroup_size[1] *
b->shader->info.workgroup_size[2];
struct rt_traversal_vars *trav_vars;
nir_variable *barycentrics;
- struct radv_ray_tracing_module *groups;
+ struct radv_ray_tracing_group *groups;
const struct radv_pipeline_key *key;
};
static nir_shader *
build_traversal_shader(struct radv_device *device,
const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
- struct radv_ray_tracing_module *groups, const struct radv_pipeline_key *key)
+ struct radv_ray_tracing_group *groups, const struct radv_pipeline_key *key)
{
/* Create the traversal shader as an intersection shader to prevent validation failures due to
* invalid variable modes.*/
nir_shader *
create_rt_shader(struct radv_device *device, const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
- struct radv_ray_tracing_module *groups, const struct radv_pipeline_key *key)
+ struct radv_ray_tracing_group *groups, const struct radv_pipeline_key *key)
{
nir_builder b = radv_meta_init_shader(device, MESA_SHADER_RAYGEN, "rt_combined");
b.shader->info.internal = false;
struct radv_physical_device;
struct radv_device;
struct radv_pipeline;
-struct radv_ray_tracing_module;
+struct radv_ray_tracing_group;
struct radv_pipeline_key;
struct radv_shader_args;
struct radv_vs_input_state;
nir_shader *create_rt_shader(struct radv_device *device,
const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
- struct radv_ray_tracing_module *groups,
+ struct radv_ray_tracing_group *groups,
const struct radv_pipeline_key *key);
#endif