Blender
V3.3
intern
cycles
subd
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
18
CCL_NAMESPACE_BEGIN
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
34
struct
PackedPatchTable
{
35
array<uint>
table
;
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
49
CCL_NAMESPACE_END
50
51
#endif
/* __SUBD_PATCH_TABLE_H__ */
uint
unsigned int uint
Definition:
BLI_sys_types.h:67
array< uint >
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition:
cuda/compat.h:9
array.h
dest
SyclQueue void * dest
Definition:
dll_interface_template.h:22
offset
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
Definition:
kernel/device/gpu/kernel.h:518
CCL_NAMESPACE_BEGIN
Definition:
python.cpp:37
Far
Definition:
patch_table.h:24
OpenSubdiv
Definition:
gl_compute_evaluator.h:33
PackedPatchTable
Definition:
patch_table.h:34
PackedPatchTable::num_patches
size_t num_patches
Definition:
patch_table.h:39
PackedPatchTable::num_nodes
size_t num_nodes
Definition:
patch_table.h:40
PackedPatchTable::num_arrays
size_t num_arrays
Definition:
patch_table.h:37
PackedPatchTable::table
array< uint > table
Definition:
patch_table.h:35
PackedPatchTable::num_indices
size_t num_indices
Definition:
patch_table.h:38
types.h
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1