mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
dzn: Make a bunch of functions private
Looks like some functions that should have been marked static when transitioning from C++ methods to plain C where forgotten. Let's fix that now. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15607>
This commit is contained in:
parent
4194c89ed8
commit
329f16fffc
5 changed files with 36 additions and 52 deletions
|
|
@ -203,7 +203,7 @@ out:
|
|||
return result;
|
||||
}
|
||||
|
||||
VkResult
|
||||
static VkResult
|
||||
dzn_cmd_buffer_reset(dzn_cmd_buffer *cmdbuf)
|
||||
{
|
||||
dzn_device *device = container_of(cmdbuf->vk.base.device, dzn_device, vk);
|
||||
|
|
@ -754,7 +754,7 @@ dzn_CmdPipelineBarrier2(VkCommandBuffer commandBuffer,
|
|||
}
|
||||
}
|
||||
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE
|
||||
static D3D12_CPU_DESCRIPTOR_HANDLE
|
||||
dzn_cmd_buffer_get_dsv(dzn_cmd_buffer *cmdbuf,
|
||||
const dzn_image *image,
|
||||
const D3D12_DEPTH_STENCIL_VIEW_DESC *desc)
|
||||
|
|
@ -784,7 +784,7 @@ dzn_cmd_buffer_get_dsv(dzn_cmd_buffer *cmdbuf,
|
|||
return dsve->handle;
|
||||
}
|
||||
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE
|
||||
static D3D12_CPU_DESCRIPTOR_HANDLE
|
||||
dzn_cmd_buffer_get_rtv(dzn_cmd_buffer *cmdbuf,
|
||||
const dzn_image *image,
|
||||
const D3D12_RENDER_TARGET_VIEW_DESC *desc)
|
||||
|
|
@ -2090,7 +2090,7 @@ dzn_cmd_buffer_attachment_ref_transition(dzn_cmd_buffer *cmdbuf,
|
|||
cmdbuf->cmdlist->ResourceBarrier(1, &barrier);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_cmd_buffer_attachment_transition(dzn_cmd_buffer *cmdbuf,
|
||||
const dzn_attachment *att)
|
||||
{
|
||||
|
|
@ -2459,7 +2459,7 @@ dzn_cmd_buffer_update_push_constants(dzn_cmd_buffer *cmdbuf, uint32_t bindpoint)
|
|||
state->end = 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_cmd_buffer_update_zsa(dzn_cmd_buffer *cmdbuf)
|
||||
{
|
||||
if (cmdbuf->state.dirty & DZN_CMD_DIRTY_STENCIL_REF) {
|
||||
|
|
|
|||
|
|
@ -77,6 +77,15 @@ is_dynamic_desc_type(VkDescriptorType desc_type)
|
|||
desc_type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC);
|
||||
}
|
||||
|
||||
static bool
|
||||
dzn_descriptor_type_depends_on_shader_usage(VkDescriptorType type)
|
||||
{
|
||||
return type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER ||
|
||||
type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE ||
|
||||
type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER ||
|
||||
type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
num_descs_for_type(VkDescriptorType type, bool static_sampler)
|
||||
{
|
||||
|
|
@ -386,7 +395,7 @@ dzn_descriptor_set_layout_create(dzn_device *device,
|
|||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
static uint32_t
|
||||
dzn_descriptor_set_layout_get_heap_offset(const dzn_descriptor_set_layout *layout,
|
||||
uint32_t b,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE type,
|
||||
|
|
@ -413,7 +422,7 @@ dzn_descriptor_set_layout_get_heap_offset(const dzn_descriptor_set_layout *layou
|
|||
return layout->ranges[visibility][type][range_idx].OffsetInDescriptorsFromTableStart;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
static uint32_t
|
||||
dzn_descriptor_set_layout_get_desc_count(const dzn_descriptor_set_layout *layout,
|
||||
uint32_t b)
|
||||
{
|
||||
|
|
@ -745,16 +754,7 @@ desc_type_to_heap_type(VkDescriptorType in)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
dzn_descriptor_type_depends_on_shader_usage(VkDescriptorType type)
|
||||
{
|
||||
return type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER ||
|
||||
type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE ||
|
||||
type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER ||
|
||||
type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_descriptor_heap_finish(dzn_descriptor_heap *heap)
|
||||
{
|
||||
if (heap->heap)
|
||||
|
|
@ -764,7 +764,7 @@ dzn_descriptor_heap_finish(dzn_descriptor_heap *heap)
|
|||
heap->dev->Release();
|
||||
}
|
||||
|
||||
VkResult
|
||||
static VkResult
|
||||
dzn_descriptor_heap_init(dzn_descriptor_heap *heap,
|
||||
dzn_device *device,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE type,
|
||||
|
|
@ -815,7 +815,7 @@ dzn_descriptor_heap_get_gpu_handle(const dzn_descriptor_heap *heap, uint32_t des
|
|||
};
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_descriptor_heap_write_sampler_desc(dzn_descriptor_heap *heap,
|
||||
uint32_t desc_offset,
|
||||
const dzn_sampler *sampler)
|
||||
|
|
@ -866,7 +866,7 @@ dzn_descriptor_heap_write_image_view_desc(dzn_descriptor_heap *heap,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_descriptor_heap_write_buffer_view_desc(dzn_descriptor_heap *heap,
|
||||
uint32_t desc_offset,
|
||||
bool writeable,
|
||||
|
|
@ -1005,13 +1005,13 @@ dzn_descriptor_set_ptr_move(const dzn_descriptor_set *set,
|
|||
dzn_descriptor_set_ptr_validate(set, ptr);
|
||||
}
|
||||
|
||||
bool
|
||||
static bool
|
||||
dzn_descriptor_set_ptr_is_valid(const dzn_descriptor_set_ptr *ptr)
|
||||
{
|
||||
return ptr->binding != ~0 && ptr->elem != ~0;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
static uint32_t
|
||||
dzn_descriptor_set_remaining_descs_in_binding(const dzn_descriptor_set *set,
|
||||
const dzn_descriptor_set_ptr *ptr)
|
||||
{
|
||||
|
|
@ -1025,7 +1025,7 @@ dzn_descriptor_set_remaining_descs_in_binding(const dzn_descriptor_set *set,
|
|||
}
|
||||
|
||||
|
||||
uint32_t
|
||||
static uint32_t
|
||||
dzn_descriptor_set_get_heap_offset(const dzn_descriptor_set *set,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE type,
|
||||
const dzn_descriptor_set_ptr *ptr,
|
||||
|
|
@ -1042,7 +1042,7 @@ dzn_descriptor_set_get_heap_offset(const dzn_descriptor_set *set,
|
|||
return base + ptr->elem;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_descriptor_set_write_sampler_desc(dzn_descriptor_set *set,
|
||||
const dzn_descriptor_set_ptr *ptr,
|
||||
const dzn_sampler *sampler)
|
||||
|
|
@ -1060,7 +1060,7 @@ dzn_descriptor_set_write_sampler_desc(dzn_descriptor_set *set,
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t
|
||||
static uint32_t
|
||||
dzn_descriptor_set_get_dynamic_buffer_idx(const dzn_descriptor_set *set,
|
||||
const dzn_descriptor_set_ptr *ptr)
|
||||
{
|
||||
|
|
@ -1075,7 +1075,7 @@ dzn_descriptor_set_get_dynamic_buffer_idx(const dzn_descriptor_set *set,
|
|||
return base + ptr->elem;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_descriptor_set_write_dynamic_buffer_desc(dzn_descriptor_set *set,
|
||||
const dzn_descriptor_set_ptr *ptr,
|
||||
const dzn_buffer_desc *info)
|
||||
|
|
@ -1089,7 +1089,7 @@ dzn_descriptor_set_write_dynamic_buffer_desc(dzn_descriptor_set *set,
|
|||
set->dynamic_buffers[dynamic_buffer_idx] = *info;
|
||||
}
|
||||
|
||||
VkDescriptorType
|
||||
static VkDescriptorType
|
||||
dzn_descriptor_set_get_desc_vk_type(const dzn_descriptor_set *set,
|
||||
const dzn_descriptor_set_ptr *ptr)
|
||||
{
|
||||
|
|
@ -1099,7 +1099,7 @@ dzn_descriptor_set_get_desc_vk_type(const dzn_descriptor_set *set,
|
|||
return set->layout->bindings[ptr->binding].type;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_descriptor_set_write_image_view_desc(dzn_descriptor_set *set,
|
||||
const dzn_descriptor_set_ptr *ptr,
|
||||
bool cube_as_2darray,
|
||||
|
|
@ -1130,7 +1130,7 @@ dzn_descriptor_set_write_image_view_desc(dzn_descriptor_set *set,
|
|||
mtx_unlock(&set->pool->defragment_lock);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_descriptor_set_write_buffer_view_desc(dzn_descriptor_set *set,
|
||||
const dzn_descriptor_set_ptr *ptr,
|
||||
const dzn_buffer_view *bview)
|
||||
|
|
@ -1158,7 +1158,7 @@ dzn_descriptor_set_write_buffer_view_desc(dzn_descriptor_set *set,
|
|||
mtx_unlock(&set->pool->defragment_lock);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_descriptor_set_write_buffer_desc(dzn_descriptor_set *set,
|
||||
const dzn_descriptor_set_ptr *ptr,
|
||||
const dzn_buffer_desc *bdesc)
|
||||
|
|
@ -1323,7 +1323,7 @@ dzn_descriptor_pool_create(dzn_device *device,
|
|||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VkResult
|
||||
static VkResult
|
||||
dzn_descriptor_pool_defragment_heap(dzn_descriptor_pool *pool,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -545,7 +545,7 @@ dzn_physical_device_get_format_support(dzn_physical_device *pdev,
|
|||
return dfmt_info;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dzn_physical_device_get_format_properties(dzn_physical_device *pdev,
|
||||
VkFormat format,
|
||||
VkFormatProperties2 *properties)
|
||||
|
|
@ -645,7 +645,7 @@ dzn_physical_device_get_format_properties(dzn_physical_device *pdev,
|
|||
}
|
||||
}
|
||||
|
||||
VkResult
|
||||
static VkResult
|
||||
dzn_physical_device_get_image_format_properties(dzn_physical_device *pdev,
|
||||
const VkPhysicalDeviceImageFormatInfo2 *info,
|
||||
VkImageFormatProperties2 *properties)
|
||||
|
|
@ -939,7 +939,7 @@ dzn_EnumerateInstanceVersion(uint32_t *pApiVersion)
|
|||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
bool
|
||||
static bool
|
||||
dzn_physical_device_supports_compressed_format(dzn_physical_device *pdev,
|
||||
const VkFormat *formats,
|
||||
uint32_t format_count)
|
||||
|
|
@ -958,7 +958,7 @@ dzn_physical_device_supports_compressed_format(dzn_physical_device *pdev,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
static bool
|
||||
dzn_physical_device_supports_bc(dzn_physical_device *pdev)
|
||||
{
|
||||
static const VkFormat formats[] = {
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ dzn_image_range_get_subresource_index(const dzn_image *image,
|
|||
(planeSlice * image->desc.MipLevels * image->desc.DepthOrArraySize);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
static uint32_t
|
||||
dzn_image_get_subresource_index(const dzn_image *image,
|
||||
const VkImageSubresource *subres,
|
||||
VkImageAspectFlagBits aspect)
|
||||
|
|
|
|||
|
|
@ -381,9 +381,6 @@ struct dzn_descriptor_heap {
|
|||
uint32_t desc_sz;
|
||||
};
|
||||
|
||||
bool
|
||||
dzn_descriptor_type_depends_on_shader_usage(VkDescriptorType type);
|
||||
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE
|
||||
dzn_descriptor_heap_get_cpu_handle(const dzn_descriptor_heap *heap, uint32_t slot);
|
||||
|
||||
|
|
@ -408,14 +405,6 @@ dzn_descriptor_heap_copy(dzn_descriptor_heap *dst_heap, uint32_t dst_heap_offset
|
|||
const dzn_descriptor_heap *src_heap, uint32_t src_heap_offset,
|
||||
uint32_t desc_count);
|
||||
|
||||
VkResult
|
||||
dzn_descriptor_heap_init(dzn_descriptor_heap *heap, dzn_device *device,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE type, uint32_t count,
|
||||
bool shader_visible);
|
||||
|
||||
void
|
||||
dzn_descriptor_heap_finish(dzn_descriptor_heap *heap);
|
||||
|
||||
struct dzn_descriptor_heap_pool_entry {
|
||||
struct list_head link;
|
||||
dzn_descriptor_heap heap;
|
||||
|
|
@ -839,11 +828,6 @@ dzn_image_range_get_subresource_index(const dzn_image *image,
|
|||
VkImageAspectFlagBits aspect,
|
||||
uint32_t level, uint32_t layer);
|
||||
|
||||
uint32_t
|
||||
dzn_image_get_subresource_index(const dzn_image *image,
|
||||
const VkImageSubresource *subres,
|
||||
VkImageAspectFlagBits aspect);
|
||||
|
||||
D3D12_TEXTURE_COPY_LOCATION
|
||||
dzn_image_get_copy_loc(const dzn_image *image,
|
||||
const VkImageSubresourceLayers *layers,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue