[Bf-blender-cvs] [bf441fcfacc] blender2.8: Gawain: move AttribBinding funcs to private interface
Mike Erwin
noreply at git.blender.org
Sun Apr 16 17:22:45 CEST 2017
Commit: bf441fcfacc1648cb5aff87dafd1e5f0098e3d2b
Author: Mike Erwin
Date: Sun Apr 16 11:21:45 2017 -0400
Branches: blender2.8
https://developer.blender.org/rBbf441fcfacc1648cb5aff87dafd1e5f0098e3d2b
Gawain: move AttribBinding funcs to private interface
Other parts of Gawain uses these internally, but they're not part of the public API.
Part of T51219
===================================================================
M intern/gawain/gawain/attrib_binding.h
A intern/gawain/gawain/attrib_binding_private.h
M intern/gawain/src/attrib_binding.c
M intern/gawain/src/immediate.c
===================================================================
diff --git a/intern/gawain/gawain/attrib_binding.h b/intern/gawain/gawain/attrib_binding.h
index 0642492882a..8c372c81cc7 100644
--- a/intern/gawain/gawain/attrib_binding.h
+++ b/intern/gawain/gawain/attrib_binding.h
@@ -11,15 +11,9 @@
#pragma once
-#include "vertex_format.h"
-#include "shader_interface.h"
+#include "common.h"
typedef struct {
uint64_t loc_bits; // store 4 bits for each of the 16 attribs
uint16_t enabled_bits; // 1 bit for each attrib
} AttribBinding;
-
-void AttribBinding_clear(AttribBinding*);
-
-void get_attrib_locations(const VertexFormat*, AttribBinding*, const ShaderInterface*);
-unsigned read_attrib_location(const AttribBinding*, unsigned a_idx);
diff --git a/intern/gawain/gawain/attrib_binding.h b/intern/gawain/gawain/attrib_binding_private.h
similarity index 77%
copy from intern/gawain/gawain/attrib_binding.h
copy to intern/gawain/gawain/attrib_binding_private.h
index 0642492882a..c9b7a3f2c01 100644
--- a/intern/gawain/gawain/attrib_binding.h
+++ b/intern/gawain/gawain/attrib_binding_private.h
@@ -4,7 +4,7 @@
// This code is part of the Gawain library, with modifications
// specific to integration with Blender.
//
-// Copyright 2016 Mike Erwin
+// Copyright 2017 Mike Erwin
//
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
@@ -14,11 +14,6 @@
#include "vertex_format.h"
#include "shader_interface.h"
-typedef struct {
- uint64_t loc_bits; // store 4 bits for each of the 16 attribs
- uint16_t enabled_bits; // 1 bit for each attrib
-} AttribBinding;
-
void AttribBinding_clear(AttribBinding*);
void get_attrib_locations(const VertexFormat*, AttribBinding*, const ShaderInterface*);
diff --git a/intern/gawain/src/attrib_binding.c b/intern/gawain/src/attrib_binding.c
index 8a7fe3df66c..10df9b9d333 100644
--- a/intern/gawain/src/attrib_binding.c
+++ b/intern/gawain/src/attrib_binding.c
@@ -10,6 +10,7 @@
// the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
#include "attrib_binding.h"
+#include "attrib_binding_private.h"
#include <stddef.h>
#if MAX_VERTEX_ATTRIBS != 16
diff --git a/intern/gawain/src/immediate.c b/intern/gawain/src/immediate.c
index 8c42ed54f75..6c237a27067 100644
--- a/intern/gawain/src/immediate.c
+++ b/intern/gawain/src/immediate.c
@@ -10,8 +10,9 @@
// the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
#include "immediate.h"
-#include "attrib_binding.h"
#include "buffer_id.h"
+#include "attrib_binding.h"
+#include "attrib_binding_private.h"
#include "vertex_format_private.h"
#include <string.h>
More information about the Bf-blender-cvs
mailing list