vkr: add vkr_common.h

A header that is included by all internal source files.  It replaces
vkr_object.h.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
macos/master
Chia-I Wu 3 years ago
parent 170ddba9be
commit 965a920893
  1. 2
      src/meson.build
  2. 2
      src/venus/.clang-format
  3. 27
      src/venus/vkr_common.h
  4. 1
      src/venus/vkr_cs.c
  5. 11
      src/venus/vkr_cs.h
  6. 15
      src/venus/vkr_renderer.c
  7. 7
      src/venus/vkr_ring.c
  8. 12
      src/venus/vkr_ring.h

@ -77,9 +77,9 @@ vrend_winsys_glx_sources = [
venus_sources = [
'venus_hw.h',
'venus/venus-protocol/vn_protocol_renderer.h',
'venus/vkr_common.h',
'venus/vkr_cs.c',
'venus/vkr_cs.h',
'venus/vkr_object.h',
'venus/vkr_renderer.c',
'venus/vkr_renderer.h',
'venus/vkr_ring.c',

@ -17,7 +17,7 @@ ForEachMacros:
- LIST_FOR_EACH_ENTRY_SAFE
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"config.h"$'
- Regex: '^("config.h"|"vkr_common.h")$'
Priority: 0
- Regex: '^"vkr_'
Priority: 3

@ -3,14 +3,35 @@
* SPDX-License-Identifier: MIT
*/
#ifndef VKR_OBJECT_H
#define VKR_OBJECT_H
#ifndef VKR_COMMON_H
#define VKR_COMMON_H
#include "config.h"
#include <assert.h>
#include <errno.h>
#include <stdatomic.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "c11/threads.h"
#include "os/os_misc.h"
#include "os/os_thread.h"
#include "pipe/p_compiler.h"
#include "util/u_double_list.h"
#include "util/u_hash_table.h"
#include "util/u_math.h"
#include "util/u_memory.h"
#include "util/u_pointer.h"
#include "venus-protocol/vulkan.h"
#include "virgl_util.h"
#include "virglrenderer.h"
#include "vrend_debug.h"
#include "vkr_renderer.h"
typedef uint64_t vkr_object_id;
@ -55,4 +76,4 @@ struct vkr_object {
struct list_head track_head;
};
#endif /* VKR_OBJECT_H */
#endif /* VKR_COMMON_H */

@ -5,7 +5,6 @@
#include "vkr_cs.h"
#include "util/u_memory.h"
#include "vrend_iov.h"
void

@ -6,16 +6,7 @@
#ifndef VKR_CS_H
#define VKR_CS_H
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "util/u_hash_table.h"
#include "util/u_math.h"
#include "vkr_object.h"
#include "vkr_common.h"
#define VKR_CS_DECODER_TEMP_POOL_MAX_SIZE (64u * 1024 * 1024)

@ -3,35 +3,22 @@
* SPDX-License-Identifier: MIT
*/
#include "vkr_renderer.h"
#include "vkr_common.h"
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "c11/threads.h"
#include "os/os_thread.h"
#include "pipe/p_compiler.h"
#include "pipe/p_state.h"
#include "util/u_debug.h"
#include "util/u_double_list.h"
#include "util/u_hash_table.h"
#include "util/u_math.h"
#include "util/u_memory.h"
#include "util/u_pointer.h"
#include "venus-protocol/vn_protocol_renderer.h"
#include "virgl_context.h"
#include "virgl_protocol.h" /* for transfer_mode */
#include "virgl_resource.h"
#include "virgl_util.h"
#include "virglrenderer.h"
#include "virglrenderer_hw.h"
#include "vrend_debug.h"
#include "vrend_iov.h"
#include "vkr_cs.h"
#include "vkr_object.h"
#include "vkr_ring.h"
/*

@ -5,17 +5,10 @@
#include "vkr_ring.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "os/os_thread.h"
#include "util/u_math.h"
#include "util/u_memory.h"
#include "virgl_context.h"
#include "virgl_util.h"
enum vkr_ring_status_flag {
VKR_RING_STATUS_IDLE = 1u << 0,

@ -6,17 +6,7 @@
#ifndef VKR_RING_H
#define VKR_RING_H
#include "config.h"
#include <stdatomic.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "c11/threads.h"
#include "util/u_double_list.h"
#include "vkr_object.h"
#include "vkr_common.h"
struct virgl_context;

Loading…
Cancel
Save