aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2017-12-16 10:57:47 +0100
committerMathias Fröhlich <[email protected]>2018-02-06 21:20:14 +0100
commit236657842b56e08055a4a9be8def8e440de78b58 (patch)
treedfd515754af1df7fcb9c1cfcba855967bfbfd352 /src
parent2313c33e950a1b17e7787dd8a3b2f1e823d0cfd4 (diff)
vbo: Move vbo_rebase into its only caller module tnl.
Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/Makefile.sources3
-rw-r--r--src/mesa/meson.build2
-rw-r--r--src/mesa/tnl/t_draw.c7
-rw-r--r--src/mesa/tnl/t_rebase.c (renamed from src/mesa/vbo/vbo_rebase.c)18
-rw-r--r--src/mesa/tnl/t_rebase.h39
-rw-r--r--src/mesa/vbo/vbo.h11
6 files changed, 55 insertions, 25 deletions
diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources
index 880f379eb10..0a9aad52d0f 100644
--- a/src/mesa/Makefile.sources
+++ b/src/mesa/Makefile.sources
@@ -370,6 +370,8 @@ TNL_FILES = \
tnl/tnl.h \
tnl/t_pipeline.c \
tnl/t_pipeline.h \
+ tnl/t_rebase.c \
+ tnl/t_rebase.h \
tnl/t_vb_cliptmp.h \
tnl/t_vb_fog.c \
tnl/t_vb_light.c \
@@ -405,7 +407,6 @@ VBO_FILES = \
vbo/vbo_noop.h \
vbo/vbo_primitive_restart.c \
vbo/vbo_private.h \
- vbo/vbo_rebase.c \
vbo/vbo_save_api.c \
vbo/vbo_save.c \
vbo/vbo_save_draw.c \
diff --git a/src/mesa/meson.build b/src/mesa/meson.build
index a74c39d29e9..aa27d592641 100644
--- a/src/mesa/meson.build
+++ b/src/mesa/meson.build
@@ -338,7 +338,6 @@ files_libmesa_common = files(
'vbo/vbo_noop.c',
'vbo/vbo_noop.h',
'vbo/vbo_primitive_restart.c',
- 'vbo/vbo_rebase.c',
'vbo/vbo_save_api.c',
'vbo/vbo_save.c',
'vbo/vbo_save_draw.c',
@@ -366,6 +365,7 @@ files_libmesa_classic = files(
'tnl/tnl.h',
'tnl/t_pipeline.c',
'tnl/t_pipeline.h',
+ 'tnl/t_rebase.c',
'tnl/t_vb_cliptmp.h',
'tnl/t_vb_fog.c',
'tnl/t_vb_light.c',
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 9fca4da1f4d..c19d77d6418 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -38,6 +38,7 @@
#include "util/half_float.h"
#include "t_context.h"
+#include "t_rebase.h"
#include "tnl.h"
@@ -461,9 +462,9 @@ void _tnl_draw_prims(struct gl_context *ctx,
if (min_index) {
/* We always translate away calls with min_index != 0.
*/
- vbo_rebase_prims( ctx, arrays, prim, nr_prims, ib,
- min_index, max_index,
- _tnl_draw_prims );
+ t_rebase_prims( ctx, arrays, prim, nr_prims, ib,
+ min_index, max_index,
+ _tnl_draw_prims );
return;
}
else if ((GLint)max_index + max_basevertex > max) {
diff --git a/src/mesa/vbo/vbo_rebase.c b/src/mesa/tnl/t_rebase.c
index 02dbc68dcb5..b781781cb0a 100644
--- a/src/mesa/vbo/vbo_rebase.c
+++ b/src/mesa/tnl/t_rebase.c
@@ -51,7 +51,7 @@
#include "main/imports.h"
#include "main/mtypes.h"
-#include "vbo.h"
+#include "t_rebase.h"
#define REBASE(TYPE) \
@@ -100,14 +100,14 @@ REBASE(GLubyte)
* - can't save time by trying to upload half a vbo - typically it is
* all or nothing.
*/
-void vbo_rebase_prims( struct gl_context *ctx,
- const struct gl_vertex_array *arrays[],
- const struct _mesa_prim *prim,
- GLuint nr_prims,
- const struct _mesa_index_buffer *ib,
- GLuint min_index,
- GLuint max_index,
- vbo_draw_func draw )
+void t_rebase_prims( struct gl_context *ctx,
+ const struct gl_vertex_array *arrays[],
+ const struct _mesa_prim *prim,
+ GLuint nr_prims,
+ const struct _mesa_index_buffer *ib,
+ GLuint min_index,
+ GLuint max_index,
+ vbo_draw_func draw )
{
struct gl_vertex_array tmp_arrays[VERT_ATTRIB_MAX];
const struct gl_vertex_array *tmp_array_pointers[VERT_ATTRIB_MAX];
diff --git a/src/mesa/tnl/t_rebase.h b/src/mesa/tnl/t_rebase.h
new file mode 100644
index 00000000000..35175868d5d
--- /dev/null
+++ b/src/mesa/tnl/t_rebase.h
@@ -0,0 +1,39 @@
+/*
+ * mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _T_REBASE_H_
+#define _T_REBASE_H_
+
+#include "vbo/vbo.h"
+
+void t_rebase_prims( struct gl_context *ctx,
+ const struct gl_vertex_array *arrays[],
+ const struct _mesa_prim *prim,
+ GLuint nr_prims,
+ const struct _mesa_index_buffer *ib,
+ GLuint min_index,
+ GLuint max_index,
+ vbo_draw_func draw );
+
+#endif
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index 6ae6991cad2..a04f9b849c9 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -226,17 +226,6 @@ vbo_split_prims(struct gl_context *ctx,
void
-vbo_rebase_prims(struct gl_context *ctx,
- const struct gl_vertex_array *arrays[],
- const struct _mesa_prim *prim,
- GLuint nr_prims,
- const struct _mesa_index_buffer *ib,
- GLuint min_index,
- GLuint max_index,
- vbo_draw_func draw);
-
-
-void
vbo_delete_minmax_cache(struct gl_buffer_object *bufferObj);
void