mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 10:40:11 +01:00
pvr: break out instance/device to separate header
Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37432>
This commit is contained in:
parent
af431e7495
commit
0cf8839a3d
31 changed files with 311 additions and 246 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include "pvr_blit.h"
|
||||
#include "pvr_clear.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_job_transfer.h"
|
||||
#include "pvr_private.h"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "hwdef/rogue_hw_utils.h"
|
||||
#include "pvr_bo.h"
|
||||
#include "pvr_debug.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_dump.h"
|
||||
#include "pvr_private.h"
|
||||
#include "pvr_types.h"
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "hwdef/rogue_hw_utils.h"
|
||||
#include "pvr_bo.h"
|
||||
#include "pvr_border.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_private.h"
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ struct pvr_sampler;
|
|||
/* Forward declaration from "pvr_bo.h" */
|
||||
struct pvr_bo;
|
||||
|
||||
/* Forward declaration from "pvr_private.h" */
|
||||
/* Forward declaration from "pvr_device.h" */
|
||||
struct pvr_device;
|
||||
|
||||
struct pvr_border_color_table {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "pco/pco_data.h"
|
||||
#include "pco_uscgen_programs.h"
|
||||
#include "pvr_clear.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_pds.h"
|
||||
#include "pvr_private.h"
|
||||
#include "pvr_usc.h"
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "pvr_common.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_csb_enum_helpers.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_hw_pass.h"
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "pvr_bo.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_debug.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_private.h"
|
||||
#include "pvr_types.h"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "hwdef/rogue_hw_utils.h"
|
||||
#include "pvr_bo.h"
|
||||
#include "pvr_debug.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_private.h"
|
||||
#include "pvr_types.h"
|
||||
#include "util/compiler.h"
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "pvr_device.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
|
|
|
|||
279
src/imagination/vulkan/pvr_device.h
Normal file
279
src/imagination/vulkan/pvr_device.h
Normal file
|
|
@ -0,0 +1,279 @@
|
|||
/*
|
||||
* Copyright © 2022 Imagination Technologies Ltd.
|
||||
*
|
||||
* based in part on anv driver which is:
|
||||
* Copyright © 2015 Intel Corporation
|
||||
*
|
||||
* based in part on radv driver which is:
|
||||
* Copyright © 2016 Red Hat.
|
||||
* Copyright © 2016 Bas Nieuwenhuizen
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#ifndef PVR_DEVICE_H
|
||||
#define PVR_DEVICE_H
|
||||
|
||||
#include "vk_device.h"
|
||||
#include "vk_instance.h"
|
||||
#include "vk_physical_device.h"
|
||||
|
||||
#include "wsi_common.h"
|
||||
|
||||
#include "util/mesa-sha1.h"
|
||||
|
||||
#include "pvr_border.h"
|
||||
#include "pvr_clear.h"
|
||||
#include "pvr_common.h"
|
||||
#include "pvr_pds.h"
|
||||
#include "pvr_spm.h"
|
||||
#include "pvr_usc.h"
|
||||
|
||||
typedef struct _pco_ctx pco_ctx;
|
||||
|
||||
struct pvr_instance;
|
||||
struct pvr_queue;
|
||||
|
||||
struct pvr_physical_device {
|
||||
struct vk_physical_device vk;
|
||||
|
||||
/* Back-pointer to instance */
|
||||
struct pvr_instance *instance;
|
||||
|
||||
char *render_path;
|
||||
char *display_path;
|
||||
|
||||
/* primary node (cardN) of the render device */
|
||||
dev_t primary_devid;
|
||||
/* render node (renderN) of the render device */
|
||||
dev_t render_devid;
|
||||
|
||||
struct pvr_winsys *ws;
|
||||
struct pvr_device_info dev_info;
|
||||
struct pvr_device_runtime_info dev_runtime_info;
|
||||
|
||||
VkPhysicalDeviceMemoryProperties memory;
|
||||
|
||||
struct wsi_device wsi_device;
|
||||
|
||||
pco_ctx *pco_ctx;
|
||||
|
||||
uint8_t device_uuid[SHA1_DIGEST_LENGTH];
|
||||
uint8_t cache_uuid[SHA1_DIGEST_LENGTH];
|
||||
};
|
||||
|
||||
struct pvr_instance {
|
||||
struct vk_instance vk;
|
||||
|
||||
uint32_t active_device_count;
|
||||
|
||||
uint8_t driver_build_sha[SHA1_DIGEST_LENGTH];
|
||||
};
|
||||
|
||||
struct pvr_compute_query_shader {
|
||||
struct pvr_suballoc_bo *usc_bo;
|
||||
|
||||
struct pvr_pds_upload pds_prim_code;
|
||||
uint32_t primary_data_size_dw;
|
||||
uint32_t primary_num_temps;
|
||||
|
||||
struct pvr_pds_info info;
|
||||
struct pvr_pds_upload pds_sec_code;
|
||||
};
|
||||
|
||||
struct pvr_device {
|
||||
struct vk_device vk;
|
||||
struct pvr_instance *instance;
|
||||
struct pvr_physical_device *pdevice;
|
||||
|
||||
struct pvr_winsys *ws;
|
||||
struct pvr_winsys_heaps heaps;
|
||||
|
||||
struct pvr_free_list *global_free_list;
|
||||
|
||||
struct pvr_queue *queues;
|
||||
uint32_t queue_count;
|
||||
|
||||
/* Running count of the number of job submissions across all queue. */
|
||||
uint32_t global_cmd_buffer_submit_count;
|
||||
|
||||
/* Running count of the number of presentations across all queues. */
|
||||
uint32_t global_queue_present_count;
|
||||
|
||||
uint32_t pixel_event_data_size_in_dwords;
|
||||
|
||||
uint64_t input_attachment_sampler;
|
||||
|
||||
struct pvr_pds_upload pds_compute_fence_program;
|
||||
struct pvr_pds_upload pds_compute_empty_program;
|
||||
|
||||
/* Compute shaders for queries. */
|
||||
struct pvr_compute_query_shader availability_shader;
|
||||
struct pvr_compute_query_shader reset_queries_shader;
|
||||
struct pvr_compute_query_shader copy_results_shader;
|
||||
|
||||
struct pvr_suballocator suballoc_general;
|
||||
struct pvr_suballocator suballoc_pds;
|
||||
struct pvr_suballocator suballoc_transfer;
|
||||
struct pvr_suballocator suballoc_usc;
|
||||
struct pvr_suballocator suballoc_vis_test;
|
||||
|
||||
struct {
|
||||
struct pvr_pds_upload pds;
|
||||
struct pvr_suballoc_bo *usc;
|
||||
} nop_program;
|
||||
|
||||
struct pvr_pds_view_index_init_program
|
||||
view_index_init_info[PVR_MAX_MULTIVIEW];
|
||||
struct pvr_pds_upload view_index_init_programs[PVR_MAX_MULTIVIEW];
|
||||
|
||||
/* Issue Data Fence, Wait for Data Fence state. */
|
||||
struct {
|
||||
uint32_t usc_shareds;
|
||||
struct pvr_suballoc_bo *usc;
|
||||
|
||||
/* Buffer in which the IDF/WDF program performs store ops. */
|
||||
struct pvr_bo *store_bo;
|
||||
/* Contains the initialization values for the shared registers. */
|
||||
struct pvr_bo *shareds_bo;
|
||||
|
||||
struct pvr_pds_upload pds;
|
||||
struct pvr_pds_upload sw_compute_barrier_pds;
|
||||
} idfwdf_state;
|
||||
|
||||
struct pvr_device_static_clear_state {
|
||||
struct pvr_suballoc_bo *usc_vertex_shader_bo;
|
||||
struct pvr_suballoc_bo *vertices_bo;
|
||||
struct pvr_pds_upload pds;
|
||||
|
||||
/* Only valid if PVR_HAS_FEATURE(dev_info, gs_rta_support). */
|
||||
struct pvr_suballoc_bo *usc_multi_layer_vertex_shader_bo;
|
||||
|
||||
struct pvr_static_clear_ppp_base ppp_base;
|
||||
/* Indexable using VkImageAspectFlags. */
|
||||
struct pvr_static_clear_ppp_template
|
||||
ppp_templates[PVR_STATIC_CLEAR_VARIANT_COUNT];
|
||||
|
||||
const uint32_t *vdm_words;
|
||||
const uint32_t *large_clear_vdm_words;
|
||||
|
||||
struct pvr_suballoc_bo *usc_clear_attachment_programs;
|
||||
struct pvr_suballoc_bo *pds_clear_attachment_programs;
|
||||
/* TODO: See if we can use PVR_CLEAR_ATTACHMENT_PROGRAM_COUNT to save some
|
||||
* memory.
|
||||
*/
|
||||
struct pvr_pds_clear_attachment_program_info {
|
||||
pvr_dev_addr_t texture_program_offset;
|
||||
pvr_dev_addr_t pixel_program_offset;
|
||||
|
||||
uint32_t texture_program_pds_temps_count;
|
||||
/* Size in dwords. */
|
||||
uint32_t texture_program_data_size;
|
||||
} pds_clear_attachment_program_info[PVR_NUM_CLEAR_ATTACH_SHADERS];
|
||||
} static_clear_state;
|
||||
|
||||
struct {
|
||||
struct pvr_suballoc_bo *usc_programs;
|
||||
struct pvr_suballoc_bo *pds_programs;
|
||||
|
||||
struct pvr_spm_per_load_program_state {
|
||||
pvr_dev_addr_t pds_pixel_program_offset;
|
||||
pvr_dev_addr_t pds_uniform_program_offset;
|
||||
|
||||
uint32_t pds_texture_program_data_size;
|
||||
uint32_t pds_texture_program_temps_count;
|
||||
} load_program[PVR_NUM_SPM_LOAD_SHADERS];
|
||||
} spm_load_state;
|
||||
|
||||
struct pvr_device_tile_buffer_state {
|
||||
simple_mtx_t mtx;
|
||||
|
||||
#define PVR_MAX_TILE_BUFFER_COUNT 7U
|
||||
struct pvr_bo *buffers[PVR_MAX_TILE_BUFFER_COUNT];
|
||||
uint32_t buffer_count;
|
||||
} tile_buffer_state;
|
||||
|
||||
struct pvr_spm_scratch_buffer_store spm_scratch_buffer_store;
|
||||
|
||||
struct pvr_bo_store *bo_store;
|
||||
|
||||
struct pvr_bo *robustness_buffer;
|
||||
|
||||
struct vk_sync *presignaled_sync;
|
||||
|
||||
struct pvr_border_color_table border_color_table;
|
||||
};
|
||||
|
||||
struct pvr_device_memory {
|
||||
struct vk_object_base base;
|
||||
struct pvr_winsys_bo *bo;
|
||||
};
|
||||
|
||||
VK_DEFINE_HANDLE_CASTS(pvr_instance,
|
||||
vk.base,
|
||||
VkInstance,
|
||||
VK_OBJECT_TYPE_INSTANCE)
|
||||
|
||||
VK_DEFINE_HANDLE_CASTS(pvr_physical_device,
|
||||
vk.base,
|
||||
VkPhysicalDevice,
|
||||
VK_OBJECT_TYPE_PHYSICAL_DEVICE)
|
||||
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(pvr_device_memory,
|
||||
base,
|
||||
VkDeviceMemory,
|
||||
VK_OBJECT_TYPE_DEVICE_MEMORY)
|
||||
|
||||
VK_DEFINE_HANDLE_CASTS(pvr_device, vk.base, VkDevice, VK_OBJECT_TYPE_DEVICE)
|
||||
|
||||
static inline struct pvr_device *vk_to_pvr_device(struct vk_device *device)
|
||||
{
|
||||
return container_of(device, struct pvr_device, vk);
|
||||
}
|
||||
|
||||
uint32_t pvr_calc_fscommon_size_and_tiles_in_flight(
|
||||
const struct pvr_device_info *dev_info,
|
||||
const struct pvr_device_runtime_info *dev_runtime_info,
|
||||
uint32_t fs_common_size,
|
||||
uint32_t min_tiles_in_flight);
|
||||
|
||||
VkResult pvr_device_tile_buffer_ensure_cap(struct pvr_device *device,
|
||||
uint32_t capacity,
|
||||
uint32_t size_in_bytes);
|
||||
|
||||
VkResult pvr_pds_compute_shader_create_and_upload(
|
||||
struct pvr_device *device,
|
||||
struct pvr_pds_compute_shader_program *program,
|
||||
struct pvr_pds_upload *const pds_upload_out);
|
||||
|
||||
VkResult pvr_bind_memory(struct pvr_device *device,
|
||||
struct pvr_device_memory *mem,
|
||||
VkDeviceSize offset,
|
||||
VkDeviceSize size,
|
||||
VkDeviceSize alignment,
|
||||
struct pvr_winsys_vma **const vma_out,
|
||||
pvr_dev_addr_t *const dev_addr_out);
|
||||
void pvr_unbind_memory(struct pvr_device *device, struct pvr_winsys_vma *vma);
|
||||
|
||||
VkResult pvr_gpu_upload(struct pvr_device *device,
|
||||
struct pvr_winsys_heap *heap,
|
||||
const void *data,
|
||||
size_t size,
|
||||
uint64_t alignment,
|
||||
struct pvr_suballoc_bo **const pvr_bo_out);
|
||||
VkResult pvr_gpu_upload_pds(struct pvr_device *device,
|
||||
const uint32_t *data,
|
||||
uint32_t data_size_dwords,
|
||||
uint32_t data_alignment,
|
||||
const uint32_t *code,
|
||||
uint32_t code_size_dwords,
|
||||
uint32_t code_alignment,
|
||||
uint64_t min_alignment,
|
||||
struct pvr_pds_upload *const pds_upload_out);
|
||||
VkResult pvr_gpu_upload_usc(struct pvr_device *device,
|
||||
const void *code,
|
||||
size_t code_size,
|
||||
uint64_t code_alignment,
|
||||
struct pvr_suballoc_bo **const pvr_bo_out);
|
||||
|
||||
#endif /* PVR_DEVICE_H */
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
#include "pvr_bo.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_csb_enum_helpers.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_dump.h"
|
||||
#include "pvr_dump_bo.h"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "hwdef/rogue_hw_utils.h"
|
||||
#include "pvr_common.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_private.h"
|
||||
#include "util/bitpack_helpers.h"
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "hwdef/rogue_hw_defs.h"
|
||||
#include "hwdef/rogue_hw_utils.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_hw_pass.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_private.h"
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_private.h"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_debug.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_job_common.h"
|
||||
#include "pvr_job_context.h"
|
||||
#include "pvr_job_compute.h"
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "pvr_bo.h"
|
||||
#include "pvr_common.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_job_context.h"
|
||||
#include "pvr_pds.h"
|
||||
#include "pvr_private.h"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "pvr_bo.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_debug.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_csb_enum_helpers.h"
|
||||
#include "pvr_debug.h"
|
||||
#include "pvr_job_common.h"
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_csb_enum_helpers.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_job_common.h"
|
||||
#include "pvr_job_context.h"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "hwdef/rogue_hw_utils.h"
|
||||
#include "pvr_bo.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_hw_pass.h"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "pvr_bo.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_csb_enum_helpers.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_pds.h"
|
||||
#include "pvr_private.h"
|
||||
#include "pvr_robustness.h"
|
||||
|
|
|
|||
|
|
@ -58,20 +58,16 @@
|
|||
#include "util/format/u_format.h"
|
||||
#include "util/log.h"
|
||||
#include "util/macros.h"
|
||||
#include "util/mesa-sha1.h"
|
||||
#include "util/simple_mtx.h"
|
||||
#include "util/u_dynarray.h"
|
||||
#include "util/u_math.h"
|
||||
#include "vk_buffer.h"
|
||||
#include "vk_buffer_view.h"
|
||||
#include "vk_command_buffer.h"
|
||||
#include "vk_device.h"
|
||||
#include "vk_enum_to_str.h"
|
||||
#include "vk_graphics_state.h"
|
||||
#include "vk_image.h"
|
||||
#include "vk_instance.h"
|
||||
#include "vk_log.h"
|
||||
#include "vk_physical_device.h"
|
||||
#include "vk_sync.h"
|
||||
#include "wsi_common.h"
|
||||
|
||||
|
|
@ -84,48 +80,10 @@
|
|||
#endif
|
||||
|
||||
struct pvr_bo;
|
||||
struct pvr_bo_store;
|
||||
struct pvr_compute_pipeline;
|
||||
struct pvr_free_list;
|
||||
struct pvr_device;
|
||||
struct pvr_graphics_pipeline;
|
||||
struct pvr_instance;
|
||||
struct pvr_queue;
|
||||
|
||||
struct pvr_physical_device {
|
||||
struct vk_physical_device vk;
|
||||
|
||||
/* Back-pointer to instance */
|
||||
struct pvr_instance *instance;
|
||||
|
||||
char *render_path;
|
||||
char *display_path;
|
||||
|
||||
/* primary node (cardN) of the render device */
|
||||
dev_t primary_devid;
|
||||
/* render node (renderN) of the render device */
|
||||
dev_t render_devid;
|
||||
|
||||
struct pvr_winsys *ws;
|
||||
struct pvr_device_info dev_info;
|
||||
struct pvr_device_runtime_info dev_runtime_info;
|
||||
|
||||
VkPhysicalDeviceMemoryProperties memory;
|
||||
|
||||
struct wsi_device wsi_device;
|
||||
|
||||
pco_ctx *pco_ctx;
|
||||
|
||||
uint8_t device_uuid[SHA1_DIGEST_LENGTH];
|
||||
uint8_t cache_uuid[SHA1_DIGEST_LENGTH];
|
||||
};
|
||||
|
||||
struct pvr_instance {
|
||||
struct vk_instance vk;
|
||||
|
||||
uint32_t active_device_count;
|
||||
|
||||
uint8_t driver_build_sha[SHA1_DIGEST_LENGTH];
|
||||
};
|
||||
struct pvr_physical_device;
|
||||
|
||||
struct pvr_vertex_binding {
|
||||
struct pvr_buffer *buffer;
|
||||
|
|
@ -133,145 +91,6 @@ struct pvr_vertex_binding {
|
|||
VkDeviceSize size;
|
||||
};
|
||||
|
||||
struct pvr_compute_query_shader {
|
||||
struct pvr_suballoc_bo *usc_bo;
|
||||
|
||||
struct pvr_pds_upload pds_prim_code;
|
||||
uint32_t primary_data_size_dw;
|
||||
uint32_t primary_num_temps;
|
||||
|
||||
struct pvr_pds_info info;
|
||||
struct pvr_pds_upload pds_sec_code;
|
||||
};
|
||||
|
||||
struct pvr_device {
|
||||
struct vk_device vk;
|
||||
struct pvr_instance *instance;
|
||||
struct pvr_physical_device *pdevice;
|
||||
|
||||
struct pvr_winsys *ws;
|
||||
struct pvr_winsys_heaps heaps;
|
||||
|
||||
struct pvr_free_list *global_free_list;
|
||||
|
||||
struct pvr_queue *queues;
|
||||
uint32_t queue_count;
|
||||
|
||||
/* Running count of the number of job submissions across all queue. */
|
||||
uint32_t global_cmd_buffer_submit_count;
|
||||
|
||||
/* Running count of the number of presentations across all queues. */
|
||||
uint32_t global_queue_present_count;
|
||||
|
||||
uint32_t pixel_event_data_size_in_dwords;
|
||||
|
||||
uint64_t input_attachment_sampler;
|
||||
|
||||
struct pvr_pds_upload pds_compute_fence_program;
|
||||
struct pvr_pds_upload pds_compute_empty_program;
|
||||
|
||||
/* Compute shaders for queries. */
|
||||
struct pvr_compute_query_shader availability_shader;
|
||||
struct pvr_compute_query_shader reset_queries_shader;
|
||||
struct pvr_compute_query_shader copy_results_shader;
|
||||
|
||||
struct pvr_suballocator suballoc_general;
|
||||
struct pvr_suballocator suballoc_pds;
|
||||
struct pvr_suballocator suballoc_transfer;
|
||||
struct pvr_suballocator suballoc_usc;
|
||||
struct pvr_suballocator suballoc_vis_test;
|
||||
|
||||
struct {
|
||||
struct pvr_pds_upload pds;
|
||||
struct pvr_suballoc_bo *usc;
|
||||
} nop_program;
|
||||
|
||||
struct pvr_pds_view_index_init_program
|
||||
view_index_init_info[PVR_MAX_MULTIVIEW];
|
||||
struct pvr_pds_upload view_index_init_programs[PVR_MAX_MULTIVIEW];
|
||||
|
||||
/* Issue Data Fence, Wait for Data Fence state. */
|
||||
struct {
|
||||
uint32_t usc_shareds;
|
||||
struct pvr_suballoc_bo *usc;
|
||||
|
||||
/* Buffer in which the IDF/WDF program performs store ops. */
|
||||
struct pvr_bo *store_bo;
|
||||
/* Contains the initialization values for the shared registers. */
|
||||
struct pvr_bo *shareds_bo;
|
||||
|
||||
struct pvr_pds_upload pds;
|
||||
struct pvr_pds_upload sw_compute_barrier_pds;
|
||||
} idfwdf_state;
|
||||
|
||||
struct pvr_device_static_clear_state {
|
||||
struct pvr_suballoc_bo *usc_vertex_shader_bo;
|
||||
struct pvr_suballoc_bo *vertices_bo;
|
||||
struct pvr_pds_upload pds;
|
||||
|
||||
/* Only valid if PVR_HAS_FEATURE(dev_info, gs_rta_support). */
|
||||
struct pvr_suballoc_bo *usc_multi_layer_vertex_shader_bo;
|
||||
|
||||
struct pvr_static_clear_ppp_base ppp_base;
|
||||
/* Indexable using VkImageAspectFlags. */
|
||||
struct pvr_static_clear_ppp_template
|
||||
ppp_templates[PVR_STATIC_CLEAR_VARIANT_COUNT];
|
||||
|
||||
const uint32_t *vdm_words;
|
||||
const uint32_t *large_clear_vdm_words;
|
||||
|
||||
struct pvr_suballoc_bo *usc_clear_attachment_programs;
|
||||
struct pvr_suballoc_bo *pds_clear_attachment_programs;
|
||||
/* TODO: See if we can use PVR_CLEAR_ATTACHMENT_PROGRAM_COUNT to save some
|
||||
* memory.
|
||||
*/
|
||||
struct pvr_pds_clear_attachment_program_info {
|
||||
pvr_dev_addr_t texture_program_offset;
|
||||
pvr_dev_addr_t pixel_program_offset;
|
||||
|
||||
uint32_t texture_program_pds_temps_count;
|
||||
/* Size in dwords. */
|
||||
uint32_t texture_program_data_size;
|
||||
} pds_clear_attachment_program_info[PVR_NUM_CLEAR_ATTACH_SHADERS];
|
||||
} static_clear_state;
|
||||
|
||||
struct {
|
||||
struct pvr_suballoc_bo *usc_programs;
|
||||
struct pvr_suballoc_bo *pds_programs;
|
||||
|
||||
struct pvr_spm_per_load_program_state {
|
||||
pvr_dev_addr_t pds_pixel_program_offset;
|
||||
pvr_dev_addr_t pds_uniform_program_offset;
|
||||
|
||||
uint32_t pds_texture_program_data_size;
|
||||
uint32_t pds_texture_program_temps_count;
|
||||
} load_program[PVR_NUM_SPM_LOAD_SHADERS];
|
||||
} spm_load_state;
|
||||
|
||||
struct pvr_device_tile_buffer_state {
|
||||
simple_mtx_t mtx;
|
||||
|
||||
#define PVR_MAX_TILE_BUFFER_COUNT 7U
|
||||
struct pvr_bo *buffers[PVR_MAX_TILE_BUFFER_COUNT];
|
||||
uint32_t buffer_count;
|
||||
} tile_buffer_state;
|
||||
|
||||
struct pvr_spm_scratch_buffer_store spm_scratch_buffer_store;
|
||||
|
||||
struct pvr_bo_store *bo_store;
|
||||
|
||||
struct pvr_bo *robustness_buffer;
|
||||
|
||||
struct vk_sync *presignaled_sync;
|
||||
|
||||
struct pvr_border_color_table border_color_table;
|
||||
};
|
||||
|
||||
struct pvr_device_memory {
|
||||
struct vk_object_base base;
|
||||
struct pvr_winsys_bo *bo;
|
||||
};
|
||||
|
||||
struct pvr_mip_level {
|
||||
/* Offset of the mip level in bytes */
|
||||
uint32_t offset;
|
||||
|
|
@ -1194,44 +1013,9 @@ struct pvr_load_op_state {
|
|||
struct pvr_load_op *load_ops;
|
||||
};
|
||||
|
||||
uint32_t pvr_calc_fscommon_size_and_tiles_in_flight(
|
||||
const struct pvr_device_info *dev_info,
|
||||
const struct pvr_device_runtime_info *dev_runtime_info,
|
||||
uint32_t fs_common_size,
|
||||
uint32_t min_tiles_in_flight);
|
||||
|
||||
VkResult pvr_wsi_init(struct pvr_physical_device *pdevice);
|
||||
void pvr_wsi_finish(struct pvr_physical_device *pdevice);
|
||||
|
||||
VkResult pvr_bind_memory(struct pvr_device *device,
|
||||
struct pvr_device_memory *mem,
|
||||
VkDeviceSize offset,
|
||||
VkDeviceSize size,
|
||||
VkDeviceSize alignment,
|
||||
struct pvr_winsys_vma **const vma_out,
|
||||
pvr_dev_addr_t *const dev_addr_out);
|
||||
void pvr_unbind_memory(struct pvr_device *device, struct pvr_winsys_vma *vma);
|
||||
VkResult pvr_gpu_upload(struct pvr_device *device,
|
||||
struct pvr_winsys_heap *heap,
|
||||
const void *data,
|
||||
size_t size,
|
||||
uint64_t alignment,
|
||||
struct pvr_suballoc_bo **const pvr_bo_out);
|
||||
VkResult pvr_gpu_upload_pds(struct pvr_device *device,
|
||||
const uint32_t *data,
|
||||
uint32_t data_size_dwords,
|
||||
uint32_t data_alignment,
|
||||
const uint32_t *code,
|
||||
uint32_t code_size_dwords,
|
||||
uint32_t code_alignment,
|
||||
uint64_t min_alignment,
|
||||
struct pvr_pds_upload *const pds_upload_out);
|
||||
VkResult pvr_gpu_upload_usc(struct pvr_device *device,
|
||||
const void *code,
|
||||
size_t code_size,
|
||||
uint64_t code_alignment,
|
||||
struct pvr_suballoc_bo **const pvr_bo_out);
|
||||
|
||||
VkResult pvr_cmd_buffer_add_transfer_cmd(struct pvr_cmd_buffer *cmd_buffer,
|
||||
struct pvr_transfer_cmd *transfer_cmd);
|
||||
|
||||
|
|
@ -1264,11 +1048,6 @@ to_pvr_graphics_pipeline(struct pvr_pipeline *pipeline)
|
|||
return container_of(pipeline, struct pvr_graphics_pipeline, base);
|
||||
}
|
||||
|
||||
static inline struct pvr_device *vk_to_pvr_device(struct vk_device *device)
|
||||
{
|
||||
return container_of(device, struct pvr_device, vk);
|
||||
}
|
||||
|
||||
static inline struct pvr_descriptor_set_layout *
|
||||
vk_to_pvr_descriptor_set_layout(struct vk_descriptor_set_layout *layout)
|
||||
{
|
||||
|
|
@ -1378,10 +1157,6 @@ VkResult pvr_pds_unitex_state_program_create_and_upload(
|
|||
uint32_t uniform_kicks,
|
||||
struct pvr_pds_upload *const pds_upload_out);
|
||||
|
||||
VkResult pvr_device_tile_buffer_ensure_cap(struct pvr_device *device,
|
||||
uint32_t capacity,
|
||||
uint32_t size_in_bytes);
|
||||
|
||||
VkResult
|
||||
pvr_cmd_buffer_upload_general(struct pvr_cmd_buffer *const cmd_buffer,
|
||||
const void *const data,
|
||||
|
|
@ -1416,11 +1191,6 @@ void pvr_compute_update_kernel_private(
|
|||
|
||||
size_t pvr_pds_get_max_descriptor_upload_const_map_size_in_bytes(void);
|
||||
|
||||
VkResult pvr_pds_compute_shader_create_and_upload(
|
||||
struct pvr_device *device,
|
||||
struct pvr_pds_compute_shader_program *program,
|
||||
struct pvr_pds_upload *const pds_upload_out);
|
||||
|
||||
VkResult pvr_device_create_compute_query_programs(struct pvr_device *device);
|
||||
void pvr_device_destroy_compute_query_programs(struct pvr_device *device);
|
||||
|
||||
|
|
@ -1451,20 +1221,7 @@ VK_DEFINE_HANDLE_CASTS(pvr_cmd_buffer,
|
|||
vk.base,
|
||||
VkCommandBuffer,
|
||||
VK_OBJECT_TYPE_COMMAND_BUFFER)
|
||||
VK_DEFINE_HANDLE_CASTS(pvr_device, vk.base, VkDevice, VK_OBJECT_TYPE_DEVICE)
|
||||
VK_DEFINE_HANDLE_CASTS(pvr_instance,
|
||||
vk.base,
|
||||
VkInstance,
|
||||
VK_OBJECT_TYPE_INSTANCE)
|
||||
VK_DEFINE_HANDLE_CASTS(pvr_physical_device,
|
||||
vk.base,
|
||||
VkPhysicalDevice,
|
||||
VK_OBJECT_TYPE_PHYSICAL_DEVICE)
|
||||
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(pvr_device_memory,
|
||||
base,
|
||||
VkDeviceMemory,
|
||||
VK_OBJECT_TYPE_DEVICE_MEMORY)
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(pvr_image, vk.base, VkImage, VK_OBJECT_TYPE_IMAGE)
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(pvr_buffer,
|
||||
vk.base,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "pvr_bo.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_private.h"
|
||||
#include "util/macros.h"
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "hwdef/rogue_hw_utils.h"
|
||||
#include "pco_uscgen_programs.h"
|
||||
#include "pvr_bo.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_pds.h"
|
||||
#include "pvr_private.h"
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include <unistd.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_job_compute.h"
|
||||
#include "pvr_job_context.h"
|
||||
#include "pvr_job_render.h"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include <vulkan/vulkan_core.h>
|
||||
|
||||
#include "pvr_bo.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_private.h"
|
||||
#include "pvr_robustness.h"
|
||||
#include "util/u_math.h"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "pvr_bo.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_csb_enum_helpers.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_hw_pass.h"
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "hwdef/rogue_hw_defs.h"
|
||||
#include "pco/pco_common.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_formats.h"
|
||||
#include "pvr_private.h"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "hwdef/rogue_hw_utils.h"
|
||||
#include "pvr_bo.h"
|
||||
#include "pvr_common.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_job_transfer.h"
|
||||
#include "pvr_pds.h"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_queue.h"
|
||||
#include "pvr_private.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "hwdef/rogue_hw_utils.h"
|
||||
#include "pvr_csb.h"
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_device_info.h"
|
||||
#include "pvr_private.h"
|
||||
#include "pvr_srv.h"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <poll.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#include "pvr_device.h"
|
||||
#include "pvr_private.h"
|
||||
#include "pvr_srv.h"
|
||||
#include "pvr_srv_sync.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue