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-21 15:14:56 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-21 15:16:42 +0300
commit3a6e981bcd579b3fda039ff33f95d4baacc96465 (patch)
tree78350c493d69fb9aef14096e9bd960a66d730390 /source/blender/gpu/intern
parent220fbdf59341f620c06959280e2145132003c5df (diff)
Cleanup: GPU: Update classes comments
This should avoid confusion about what is a class and what is an opaque pointer.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_batch_private.hh4
-rw-r--r--source/blender/gpu/intern/gpu_drawlist_private.hh4
-rw-r--r--source/blender/gpu/intern/gpu_shader_interface.hh4
-rw-r--r--source/blender/gpu/intern/gpu_shader_private.hh4
-rw-r--r--source/blender/gpu/intern/gpu_state_private.hh4
-rw-r--r--source/blender/gpu/intern/gpu_uniform_buffer_private.hh4
6 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_batch_private.hh b/source/blender/gpu/intern/gpu_batch_private.hh
index 11efd784238..c0444647fe1 100644
--- a/source/blender/gpu/intern/gpu_batch_private.hh
+++ b/source/blender/gpu/intern/gpu_batch_private.hh
@@ -32,6 +32,10 @@
namespace blender {
namespace gpu {
+/**
+ * Base class which is then specialized for each implementation (GL, VK, ...).
+ * NOTE: Extends GPUBatch as we still needs to expose some of the internals to the outside C code.
+ **/
class Batch : public GPUBatch {
public:
Batch(){};
diff --git a/source/blender/gpu/intern/gpu_drawlist_private.hh b/source/blender/gpu/intern/gpu_drawlist_private.hh
index 04cc18a5ffd..ddb09fb0c89 100644
--- a/source/blender/gpu/intern/gpu_drawlist_private.hh
+++ b/source/blender/gpu/intern/gpu_drawlist_private.hh
@@ -28,6 +28,10 @@
namespace blender {
namespace gpu {
+/**
+ * Implementation of Multi Draw Indirect.
+ * Base class which is then specialized for each implementation (GL, VK, ...).
+ **/
class DrawList {
public:
virtual ~DrawList(){};
diff --git a/source/blender/gpu/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh
index 76925f4fddb..b40a3abd3e0 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.hh
+++ b/source/blender/gpu/intern/gpu_shader_interface.hh
@@ -45,6 +45,10 @@ typedef struct ShaderInput {
int32_t binding;
} ShaderInput;
+/**
+ * Implementation of Shader interface.
+ * Base class which is then specialized for each implementation (GL, VK, ...).
+ **/
class ShaderInterface {
/* TODO(fclem) should be protected. */
public:
diff --git a/source/blender/gpu/intern/gpu_shader_private.hh b/source/blender/gpu/intern/gpu_shader_private.hh
index e5af22cae92..22de1a0f59e 100644
--- a/source/blender/gpu/intern/gpu_shader_private.hh
+++ b/source/blender/gpu/intern/gpu_shader_private.hh
@@ -29,6 +29,10 @@
namespace blender {
namespace gpu {
+/**
+ * Implementation of shader compilation and uniforms handling.
+ * Base class which is then specialized for each implementation (GL, VK, ...).
+ **/
class Shader {
public:
/** Uniform & attribute locations for shader. */
diff --git a/source/blender/gpu/intern/gpu_state_private.hh b/source/blender/gpu/intern/gpu_state_private.hh
index f325f035f28..a1bfefbaff5 100644
--- a/source/blender/gpu/intern/gpu_state_private.hh
+++ b/source/blender/gpu/intern/gpu_state_private.hh
@@ -151,6 +151,10 @@ inline GPUStateMutable operator~(const GPUStateMutable &a)
return r;
}
+/**
+ * State manager keeping track of the draw state and applying it before drawing.
+ * Base class which is then specialized for each implementation (GL, VK, ...).
+ **/
class GPUStateManager {
public:
GPUState state;
diff --git a/source/blender/gpu/intern/gpu_uniform_buffer_private.hh b/source/blender/gpu/intern/gpu_uniform_buffer_private.hh
index 069a3b1c80c..288cbae526e 100644
--- a/source/blender/gpu/intern/gpu_uniform_buffer_private.hh
+++ b/source/blender/gpu/intern/gpu_uniform_buffer_private.hh
@@ -33,6 +33,10 @@ namespace gpu {
# define DEBUG_NAME_LEN 64
#endif
+/**
+ * Implementation of Uniform Buffers.
+ * Base class which is then specialized for each implementation (GL, VK, ...).
+ **/
class UniformBuf {
protected:
/** Data size in bytes. */