Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/intern/draw_manager.h')
-rw-r--r--source/blender/draw/intern/draw_manager.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h
index d27eb8be9e0..929fe9e2e1d 100644
--- a/source/blender/draw/intern/draw_manager.h
+++ b/source/blender/draw/intern/draw_manager.h
@@ -205,8 +205,10 @@ typedef enum {
/* Compute Commands. */
DRW_CMD_COMPUTE = 8,
+ DRW_CMD_COMPUTE_REF = 9,
/* Other Commands */
+ DRW_CMD_BARRIER = 11,
DRW_CMD_CLEAR = 12,
DRW_CMD_DRWSTATE = 13,
DRW_CMD_STENCIL = 14,
@@ -249,6 +251,14 @@ typedef struct DRWCommandCompute {
int groups_z_len;
} DRWCommandCompute;
+typedef struct DRWCommandComputeRef {
+ int *groups_ref;
+} DRWCommandComputeRef;
+
+typedef struct DRWCommandBarrier {
+ eGPUBarrier type;
+} DRWCommandBarrier;
+
typedef struct DRWCommandDrawProcedural {
GPUBatch *batch;
DRWResourceHandle handle;
@@ -286,6 +296,8 @@ typedef union DRWCommand {
DRWCommandDrawInstanceRange instance_range;
DRWCommandDrawProcedural procedural;
DRWCommandCompute compute;
+ DRWCommandComputeRef compute_ref;
+ DRWCommandBarrier barrier;
DRWCommandSetMutableState state;
DRWCommandSetStencil stencil;
DRWCommandSetSelectID select_id;
@@ -314,6 +326,7 @@ typedef enum {
DRW_UNIFORM_BLOCK_REF,
DRW_UNIFORM_TFEEDBACK_TARGET,
DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE,
+ DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE_REF,
/** Per drawcall uniforms/UBO */
DRW_UNIFORM_BLOCK_OBMATS,
DRW_UNIFORM_BLOCK_OBINFOS,
@@ -345,6 +358,11 @@ struct DRWUniform {
GPUUniformBuf *block;
GPUUniformBuf **block_ref;
};
+ /* DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE */
+ union {
+ GPUVertBuf *vertbuf;
+ GPUVertBuf **vertbuf_ref;
+ };
/* DRW_UNIFORM_FLOAT_COPY */
float fvalue[4];
/* DRW_UNIFORM_INT_COPY */
@@ -422,6 +440,13 @@ typedef struct DRWViewUboStorage {
float viewvecs[2][4];
/* Should not be here. Not view dependent (only main view). */
float viewcamtexcofac[4];
+ float viewport_size[2];
+ float viewport_size_inv[2];
+
+ /** Frustum culling data. */
+ /** NOTE: vec3 arrays are paded to vec4. */
+ float frustum_corners[8][4];
+ float frustum_planes[6][4];
} DRWViewUboStorage;
BLI_STATIC_ASSERT_ALIGN(DRWViewUboStorage, 16)
@@ -506,6 +531,11 @@ typedef struct DRWDebugSphere {
float color[4];
} DRWDebugSphere;
+typedef struct DRWDebugBuffer {
+ struct DRWDebugBuffer *next; /* linked list */
+ struct GPUVertBuf *verts;
+} DRWDebugBuffer;
+
/* ------------- Memory Pools ------------ */
/* Contains memory pools information */
@@ -643,6 +673,7 @@ typedef struct DRWManager {
/* TODO(fclem): optimize: use chunks. */
DRWDebugLine *lines;
DRWDebugSphere *spheres;
+ DRWDebugBuffer *line_buffers;
} debug;
} DRWManager;
@@ -656,6 +687,7 @@ void *drw_viewport_engine_data_ensure(void *engine_type);
void drw_state_set(DRWState state);
+GPUVertBuf *drw_debug_line_buffer_get(void);
void drw_debug_draw(void);
void drw_debug_init(void);