Blender
V2.93
source
blender
gpu
intern
gpu_codegen.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*
16
* The Original Code is Copyright (C) 2005 Blender Foundation.
17
* All rights reserved.
18
*/
19
26
#pragma once
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
32
struct
GPUMaterial
;
33
struct
GPUNodeGraph
;
34
struct
GPUShader
;
35
36
typedef
struct
GPUPass
{
37
struct
GPUPass
*
next
;
38
39
struct
GPUShader
*
shader
;
40
char
*
fragmentcode
;
41
char
*
geometrycode
;
42
char
*
vertexcode
;
43
char
*
defines
;
44
uint
refcount
;
/* Orphaned GPUPasses gets freed by the garbage collector. */
45
uint32_t
hash
;
/* Identity hash generated from all GLSL code. */
46
bool
compiled
;
/* Did we already tried to compile the attached GPUShader. */
47
}
GPUPass
;
48
49
/* Pass */
50
51
GPUPass
*
GPU_generate_pass
(
struct
GPUMaterial
*
material
,
52
struct
GPUNodeGraph
*
graph
,
53
const
char
*vert_code,
54
const
char
*geom_code,
55
const
char
*frag_lib,
56
const
char
*defines);
57
struct
GPUShader
*
GPU_pass_shader_get
(
GPUPass
*pass);
58
bool
GPU_pass_compile
(
GPUPass
*pass,
const
char
*shname);
59
void
GPU_pass_release
(
GPUPass
*pass);
60
61
/* Module */
62
63
void
gpu_codegen_init
(
void
);
64
void
gpu_codegen_exit
(
void
);
65
66
#ifdef __cplusplus
67
}
68
#endif
uint
unsigned int uint
Definition:
BLI_sys_types.h:83
GPUShader
struct GPUShader GPUShader
Definition:
GPU_shader.h:33
graph
Depsgraph * graph
Definition:
deg_builder_cycle.cc:74
material
Material material
Definition:
deg_eval_copy_on_write.cc:118
GPU_generate_pass
GPUPass * GPU_generate_pass(struct GPUMaterial *material, struct GPUNodeGraph *graph, const char *vert_code, const char *geom_code, const char *frag_lib, const char *defines)
Definition:
gpu_codegen.c:839
GPUPass
struct GPUPass GPUPass
GPU_pass_release
void GPU_pass_release(GPUPass *pass)
Definition:
gpu_codegen.c:1049
gpu_codegen_init
void gpu_codegen_init(void)
Definition:
gpu_codegen.c:1116
GPU_pass_compile
bool GPU_pass_compile(GPUPass *pass, const char *shname)
Definition:
gpu_codegen.c:1025
GPU_pass_shader_get
struct GPUShader * GPU_pass_shader_get(GPUPass *pass)
Definition:
gpu_codegen.c:826
gpu_codegen_exit
void gpu_codegen_exit(void)
Definition:
gpu_codegen.c:1120
uint32_t
unsigned int uint32_t
Definition:
stdint.h:83
GPUMaterial
Definition:
gpu_material.c:65
GPUNodeGraph
Definition:
gpu_node_graph.h:148
GPUPass
Definition:
gpu_codegen.h:36
GPUPass::compiled
bool compiled
Definition:
gpu_codegen.h:46
GPUPass::hash
uint32_t hash
Definition:
gpu_codegen.h:45
GPUPass::vertexcode
char * vertexcode
Definition:
gpu_codegen.h:42
GPUPass::shader
struct GPUShader * shader
Definition:
gpu_codegen.h:39
GPUPass::refcount
uint refcount
Definition:
gpu_codegen.h:44
GPUPass::geometrycode
char * geometrycode
Definition:
gpu_codegen.h:41
GPUPass::defines
char * defines
Definition:
gpu_codegen.h:43
GPUPass::next
struct GPUPass * next
Definition:
gpu_codegen.h:37
GPUPass::fragmentcode
char * fragmentcode
Definition:
gpu_codegen.h:40
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1