X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Famd%2Fvulkan%2Fradv_private.h;h=316fbc9af1d218225a2901ece067a672c378e3df;hb=cc21e96d5f412aae5d3982dde0d4c926e8d049e8;hp=e554fc7acca7fc58f1d7246fc1f86716c6953e2d;hpb=288fe7ec714f0920e870d0551bdaccf277e12a59;p=mesa.git diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index e554fc7acca..316fbc9af1d 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -217,20 +217,19 @@ radv_clear_mask(uint32_t *inout_mask, uint32_t clear_mask) * propagating errors. Might be useful to plug in a stack trace here. */ -VkResult __vk_errorf(VkResult error, const char *file, int line, const char *format, ...); +struct radv_instance; -#ifdef DEBUG -#define vk_error(error) __vk_errorf(error, __FILE__, __LINE__, NULL); -#define vk_errorf(error, format, ...) __vk_errorf(error, __FILE__, __LINE__, format, ## __VA_ARGS__); -#else -#define vk_error(error) error -#define vk_errorf(error, format, ...) error -#endif +VkResult __vk_errorf(struct radv_instance *instance, VkResult error, const char *file, int line, const char *format, ...); + +#define vk_error(instance, error) __vk_errorf(instance, error, __FILE__, __LINE__, NULL); +#define vk_errorf(instance, error, format, ...) __vk_errorf(instance, error, __FILE__, __LINE__, format, ## __VA_ARGS__); void __radv_finishme(const char *file, int line, const char *format, ...) radv_printflike(3, 4); void radv_loge(const char *format, ...) radv_printflike(1, 2); void radv_loge_v(const char *format, va_list va); +void radv_logi(const char *format, ...) radv_printflike(1, 2); +void radv_logi_v(const char *format, va_list va); /** * Print a FINISHME message, including its source location. @@ -1132,9 +1131,11 @@ bool radv_get_memory_fd(struct radv_device *device, static inline void radv_emit_shader_pointer_head(struct radeon_winsys_cs *cs, - unsigned sh_offset, bool use_32bit_pointers) + unsigned sh_offset, unsigned pointer_count, + bool use_32bit_pointers) { - radeon_set_sh_reg_seq(cs, sh_offset, use_32bit_pointers ? 1 : 2); + radeon_emit(cs, PKT3(PKT3_SET_SH_REG, pointer_count * (use_32bit_pointers ? 1 : 2), 0)); + radeon_emit(cs, (sh_offset - SI_SH_REG_OFFSET) >> 2); } static inline void @@ -1159,7 +1160,7 @@ radv_emit_shader_pointer(struct radv_device *device, { bool use_32bit_pointers = HAVE_32BIT_POINTERS && !global; - radv_emit_shader_pointer_head(cs, sh_offset, use_32bit_pointers); + radv_emit_shader_pointer_head(cs, sh_offset, 1, use_32bit_pointers); radv_emit_shader_pointer_body(device, cs, va, use_32bit_pointers); } @@ -1315,7 +1316,8 @@ struct radv_userdata_info *radv_lookup_user_sgpr(struct radv_pipeline *pipeline, gl_shader_stage stage, int idx); -struct radv_shader_variant *radv_get_vertex_shader(struct radv_pipeline *pipeline); +struct radv_shader_variant *radv_get_shader(struct radv_pipeline *pipeline, + gl_shader_stage stage); struct radv_graphics_pipeline_create_info { bool use_rectlist; @@ -1742,14 +1744,6 @@ struct radv_semaphore { uint32_t temp_syncobj; }; -VkResult radv_alloc_sem_info(struct radv_winsys_sem_info *sem_info, - int num_wait_sems, - const VkSemaphore *wait_sems, - int num_signal_sems, - const VkSemaphore *signal_sems, - VkFence fence); -void radv_free_sem_info(struct radv_winsys_sem_info *sem_info); - void radv_set_descriptor_set(struct radv_cmd_buffer *cmd_buffer, VkPipelineBindPoint bind_point, struct radv_descriptor_set *set,