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:
authorClément Foucault <foucault.clem@gmail.com>2020-08-11 02:31:40 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-13 15:20:24 +0300
commitefc97b3919ea4fd46b9d2e931ca3fea27e7ea31c (patch)
tree125e4239c90902a967487f44d5aca1696d49be68 /source/blender/gpu/GPU_shader_interface.h
parent47bfb0f7ad2f70017585fe55a68e49ae09f1150c (diff)
GPUBatch: GL backend isolation
This changes the drawing paradigm a bit. The VAO configuration is done JIT-style and depends on context active shader. This is to allow more flexibility for implementations to do optimization at lower level. The vao cache is now its own class to isolate the concept. It is this class that is reference by the GLContext for ownership of the containing VAO ids.
Diffstat (limited to 'source/blender/gpu/GPU_shader_interface.h')
-rw-r--r--source/blender/gpu/GPU_shader_interface.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/GPU_shader_interface.h b/source/blender/gpu/GPU_shader_interface.h
index 8aba1236b65..47e4e432d66 100644
--- a/source/blender/gpu/GPU_shader_interface.h
+++ b/source/blender/gpu/GPU_shader_interface.h
@@ -80,7 +80,7 @@ typedef struct GPUShaderInterface {
/** Buffer containing all inputs names separated by '\0'. */
char *name_buffer;
/** Reference to GPUBatches using this interface */
- struct GPUBatch **batches;
+ void **batches;
uint batches_len;
/** Input counts. */
uint attribute_len;
@@ -109,8 +109,8 @@ const GPUShaderInput *GPU_shaderinterface_ubo(const GPUShaderInterface *, const
const GPUShaderInput *GPU_shaderinterface_attr(const GPUShaderInterface *, const char *name);
/* keep track of batches using this interface */
-void GPU_shaderinterface_add_batch_ref(GPUShaderInterface *, struct GPUBatch *);
-void GPU_shaderinterface_remove_batch_ref(GPUShaderInterface *, struct GPUBatch *);
+void GPU_shaderinterface_add_batch_ref(GPUShaderInterface *interface, void *cache);
+void GPU_shaderinterface_remove_batch_ref(GPUShaderInterface *interface, void *cache);
#ifdef __cplusplus
}