Blender  V3.3
patch_table.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright 2011-2022 Blender Foundation */
3 
4 #ifndef __SUBD_PATCH_TABLE_H__
5 #define __SUBD_PATCH_TABLE_H__
6 
7 #include "util/array.h"
8 #include "util/types.h"
9 
10 #ifdef WITH_OPENSUBDIV
11 # ifdef _MSC_VER
12 # include "iso646.h"
13 # endif
14 
15 # include <opensubdiv/far/patchTable.h>
16 #endif
17 
19 
20 #ifdef WITH_OPENSUBDIV
21 using namespace OpenSubdiv;
22 #else
23 /* forward declare for when OpenSubdiv is unavailable */
24 namespace Far {
25 struct PatchTable;
26 }
27 #endif
28 
29 #define PATCH_ARRAY_SIZE 4
30 #define PATCH_PARAM_SIZE 2
31 #define PATCH_HANDLE_SIZE 3
32 #define PATCH_NODE_SIZE 1
33 
36 
37  size_t num_arrays;
38  size_t num_indices;
39  size_t num_patches;
40  size_t num_nodes;
41 
42  /* calculated size from num_* members */
43  size_t total_size();
44 
45  void pack(Far::PatchTable *patch_table, int offset = 0);
46  void copy_adjusting_offsets(uint *dest, int doffset);
47 };
48 
50 
51 #endif /* __SUBD_PATCH_TABLE_H__ */
unsigned int uint
Definition: BLI_sys_types.h:67
#define CCL_NAMESPACE_END
Definition: cuda/compat.h:9
SyclQueue void * dest
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
size_t num_patches
Definition: patch_table.h:39
array< uint > table
Definition: patch_table.h:35
size_t num_indices
Definition: patch_table.h:38