mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
vulkan: namespace functions in compute-utils to spa_vulkan_compute
Rename compute functions to allow for shared common functions for non oppinionated vulkan helpers. No functional changes.
This commit is contained in:
parent
7d97e47e28
commit
51b7d49cff
4 changed files with 58 additions and 58 deletions
|
|
@ -460,7 +460,7 @@ static void clear_streams(struct vulkan_compute_state *s)
|
|||
}
|
||||
}
|
||||
|
||||
int spa_vulkan_fixate_modifier(struct vulkan_compute_state *s, struct vulkan_stream *p, struct spa_video_info_dsp *dsp_info,
|
||||
int spa_vulkan_compute_fixate_modifier(struct vulkan_compute_state *s, struct vulkan_stream *p, struct spa_video_info_dsp *dsp_info,
|
||||
uint32_t modifierCount, uint64_t *modifiers, uint64_t *modifier)
|
||||
{
|
||||
VkFormat format = vulkan_id_to_vkformat(dsp_info->format);
|
||||
|
|
@ -479,7 +479,7 @@ int spa_vulkan_fixate_modifier(struct vulkan_compute_state *s, struct vulkan_str
|
|||
return vulkan_fixate_modifier(&s->base, &fixation_info, modifier);
|
||||
}
|
||||
|
||||
int spa_vulkan_use_buffers(struct vulkan_compute_state *s, struct vulkan_stream *p, uint32_t flags,
|
||||
int spa_vulkan_compute_use_buffers(struct vulkan_compute_state *s, struct vulkan_stream *p, uint32_t flags,
|
||||
struct spa_video_info_dsp *dsp_info, uint32_t n_buffers, struct spa_buffer **buffers)
|
||||
{
|
||||
VkFormat format = vulkan_id_to_vkformat(dsp_info->format);
|
||||
|
|
@ -553,13 +553,13 @@ int spa_vulkan_use_buffers(struct vulkan_compute_state *s, struct vulkan_stream
|
|||
return 0;
|
||||
}
|
||||
|
||||
int spa_vulkan_init_stream(struct vulkan_compute_state *s, struct vulkan_stream *stream,
|
||||
int spa_vulkan_compute_init_stream(struct vulkan_compute_state *s, struct vulkan_stream *stream,
|
||||
enum spa_direction direction, struct spa_dict *props)
|
||||
{
|
||||
return vulkan_stream_init(stream, direction, props);
|
||||
}
|
||||
|
||||
int spa_vulkan_prepare(struct vulkan_compute_state *s)
|
||||
int spa_vulkan_compute_prepare(struct vulkan_compute_state *s)
|
||||
{
|
||||
if (!s->prepared) {
|
||||
CHECK(createFence(s));
|
||||
|
|
@ -571,7 +571,7 @@ int spa_vulkan_prepare(struct vulkan_compute_state *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int spa_vulkan_unprepare(struct vulkan_compute_state *s)
|
||||
int spa_vulkan_compute_unprepare(struct vulkan_compute_state *s)
|
||||
{
|
||||
if (s->prepared) {
|
||||
vkDestroyShaderModule(s->base.device, s->computeShaderModule, NULL);
|
||||
|
|
@ -587,7 +587,7 @@ int spa_vulkan_unprepare(struct vulkan_compute_state *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int spa_vulkan_start(struct vulkan_compute_state *s)
|
||||
int spa_vulkan_compute_start(struct vulkan_compute_state *s)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
|
|
@ -600,7 +600,7 @@ int spa_vulkan_start(struct vulkan_compute_state *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int spa_vulkan_stop(struct vulkan_compute_state *s)
|
||||
int spa_vulkan_compute_stop(struct vulkan_compute_state *s)
|
||||
{
|
||||
VK_CHECK_RESULT(vkDeviceWaitIdle(s->base.device));
|
||||
clear_streams(s);
|
||||
|
|
@ -608,7 +608,7 @@ int spa_vulkan_stop(struct vulkan_compute_state *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int spa_vulkan_ready(struct vulkan_compute_state *s)
|
||||
int spa_vulkan_compute_ready(struct vulkan_compute_state *s)
|
||||
{
|
||||
uint32_t i;
|
||||
VkResult result;
|
||||
|
|
@ -631,7 +631,7 @@ int spa_vulkan_ready(struct vulkan_compute_state *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int spa_vulkan_process(struct vulkan_compute_state *s)
|
||||
int spa_vulkan_compute_process(struct vulkan_compute_state *s)
|
||||
{
|
||||
CHECK(updateDescriptors(s));
|
||||
CHECK(runCommandBuffer(s));
|
||||
|
|
@ -641,7 +641,7 @@ int spa_vulkan_process(struct vulkan_compute_state *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int spa_vulkan_get_buffer_caps(struct vulkan_compute_state *s, enum spa_direction direction)
|
||||
int spa_vulkan_compute_get_buffer_caps(struct vulkan_compute_state *s, enum spa_direction direction)
|
||||
{
|
||||
switch (direction) {
|
||||
case SPA_DIRECTION_INPUT:
|
||||
|
|
@ -652,12 +652,12 @@ int spa_vulkan_get_buffer_caps(struct vulkan_compute_state *s, enum spa_directio
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct vulkan_modifier_info *spa_vulkan_get_modifier_info(struct vulkan_compute_state *s, struct spa_video_info_dsp *info) {
|
||||
struct vulkan_modifier_info *spa_vulkan_compute_get_modifier_info(struct vulkan_compute_state *s, struct spa_video_info_dsp *info) {
|
||||
VkFormat vk_format = vulkan_id_to_vkformat(info->format);
|
||||
return vulkan_modifierInfo_find(&s->base, vk_format, info->modifier);
|
||||
}
|
||||
|
||||
int spa_vulkan_init(struct vulkan_compute_state *s)
|
||||
int spa_vulkan_compute_init(struct vulkan_compute_state *s)
|
||||
{
|
||||
s->base.log = s->log;
|
||||
uint32_t dsp_format = SPA_VIDEO_FORMAT_DSP_F32;
|
||||
|
|
@ -669,7 +669,7 @@ int spa_vulkan_init(struct vulkan_compute_state *s)
|
|||
return vulkan_base_init(&s->base, &baseInfo);
|
||||
}
|
||||
|
||||
void spa_vulkan_deinit(struct vulkan_compute_state *s)
|
||||
void spa_vulkan_compute_deinit(struct vulkan_compute_state *s)
|
||||
{
|
||||
vulkan_base_deinit(&s->base);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue