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>2018-07-18 01:12:21 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-07-18 12:49:15 +0300
commit8cd7828792419fb4eac9a2a477968535b4c71535 (patch)
tree8fc733149fe07b7d9edd4b8b1e709519b4481887 /source/blender/gpu/intern/gpu_attr_binding.c
parent247ad2034de2c33a6d9cb7d3b6f1ef7ffa5b859d (diff)
GWN: Port to GPU module: Replace GWN prefix by GPU
Diffstat (limited to 'source/blender/gpu/intern/gpu_attr_binding.c')
-rw-r--r--source/blender/gpu/intern/gpu_attr_binding.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/gpu/intern/gpu_attr_binding.c b/source/blender/gpu/intern/gpu_attr_binding.c
index e7eba369335..9ac38578792 100644
--- a/source/blender/gpu/intern/gpu_attr_binding.c
+++ b/source/blender/gpu/intern/gpu_attr_binding.c
@@ -23,10 +23,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/gpu/intern/gwn_attr_binding.c
+/** \file blender/gpu/intern/gpu_attr_binding.c
* \ingroup gpu
*
- * Gawain vertex attribute binding
+ * GPU vertex attribute binding
*/
#include "GPU_attr_binding.h"
@@ -34,30 +34,30 @@
#include <stddef.h>
#include <stdlib.h>
-#if GWN_VERT_ATTR_MAX_LEN != 16
- #error "attrib binding code assumes GWN_VERT_ATTR_MAX_LEN = 16"
+#if GPU_VERT_ATTR_MAX_LEN != 16
+ #error "attrib binding code assumes GPU_VERT_ATTR_MAX_LEN = 16"
#endif
-void AttribBinding_clear(Gwn_AttrBinding* binding)
+void AttribBinding_clear(GPUAttrBinding* binding)
{
binding->loc_bits = 0;
binding->enabled_bits = 0;
}
-uint read_attrib_location(const Gwn_AttrBinding* binding, uint a_idx)
+uint read_attrib_location(const GPUAttrBinding* binding, uint a_idx)
{
#if TRUST_NO_ONE
- assert(a_idx < GWN_VERT_ATTR_MAX_LEN);
+ assert(a_idx < GPU_VERT_ATTR_MAX_LEN);
assert(binding->enabled_bits & (1 << a_idx));
#endif
return (binding->loc_bits >> (4 * a_idx)) & 0xF;
}
-static void write_attrib_location(Gwn_AttrBinding* binding, uint a_idx, uint location)
+static void write_attrib_location(GPUAttrBinding* binding, uint a_idx, uint location)
{
#if TRUST_NO_ONE
- assert(a_idx < GWN_VERT_ATTR_MAX_LEN);
- assert(location < GWN_VERT_ATTR_MAX_LEN);
+ assert(a_idx < GPU_VERT_ATTR_MAX_LEN);
+ assert(location < GPU_VERT_ATTR_MAX_LEN);
#endif
const uint shift = 4 * a_idx;
const uint64_t mask = ((uint64_t)0xF) << shift;
@@ -67,14 +67,14 @@ static void write_attrib_location(Gwn_AttrBinding* binding, uint a_idx, uint loc
binding->enabled_bits |= 1 << a_idx;
}
-void get_attrib_locations(const Gwn_VertFormat* format, Gwn_AttrBinding* binding, const Gwn_ShaderInterface* shaderface)
+void get_attrib_locations(const GPUVertFormat* format, GPUAttrBinding* binding, const GPUShaderInterface* shaderface)
{
AttribBinding_clear(binding);
for (uint a_idx = 0; a_idx < format->attr_len; ++a_idx) {
- const Gwn_VertAttr* a = format->attribs + a_idx;
+ const GPUVertAttr* a = format->attribs + a_idx;
for (uint n_idx = 0; n_idx < a->name_len; ++n_idx) {
- const Gwn_ShaderInput* input = GWN_shaderinterface_attr(shaderface, a->name[n_idx]);
+ const GPUShaderInput* input = GPU_shaderinterface_attr(shaderface, a->name[n_idx]);
#if TRUST_NO_ONE
assert(input != NULL);
/* TODO: make this a recoverable runtime error? indicates mismatch between vertex format and program */