aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-01-18 16:10:49 -0700
committerBrian Paul <[email protected]>2018-01-24 10:12:49 -0700
commitb9280031a8f970ebec03edc9954d7d3ade54ba42 (patch)
tree543138c646aa76de1d40e17bfdbb86c4bfc49843
parenta83f7e119cac2020100035d426927629ab666257 (diff)
vbo/i965: move vbo_all_varyings_in_vbos() to brw_draw.c
It's only used in brw_draw_prims(). s/GLboolean/bool/, etc. Reviewed-by: Roland Scheidegger <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c18
-rw-r--r--src/mesa/vbo/vbo.h2
-rw-r--r--src/mesa/vbo/vbo_rebase.c11
3 files changed, 17 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index dec7b29be9c..c94fc55e57c 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -906,6 +906,22 @@ retry:
return;
}
+
+static bool
+all_varyings_in_vbos(const struct gl_vertex_array *arrays[])
+{
+ GLuint i;
+
+ for (i = 0; i < VERT_ATTRIB_MAX; i++)
+ if (arrays[i]->StrideB &&
+ arrays[i]->BufferObj->Name == 0)
+ return false;
+
+ return true;
+}
+
+
+
void
brw_draw_prims(struct gl_context *ctx,
const struct _mesa_prim *prims,
@@ -951,7 +967,7 @@ brw_draw_prims(struct gl_context *ctx,
* get the minimum and maximum of their index buffer so we know what range
* to upload.
*/
- if (!index_bounds_valid && !vbo_all_varyings_in_vbos(arrays)) {
+ if (!index_bounds_valid && !all_varyings_in_vbos(arrays)) {
perf_debug("Scanning index buffer to compute index buffer bounds. "
"Use glDrawRangeElements() to avoid this.\n");
vbo_get_minmax_indices(ctx, prims, ib, &min_index, &max_index, nr_prims);
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index 0007029996c..30c83fc1a26 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -153,8 +153,6 @@ void vbo_split_prims( struct gl_context *ctx,
const struct split_limits *limits );
-GLboolean vbo_all_varyings_in_vbos( const struct gl_vertex_array *arrays[] );
-
void vbo_rebase_prims( struct gl_context *ctx,
const struct gl_vertex_array *arrays[],
const struct _mesa_prim *prim,
diff --git a/src/mesa/vbo/vbo_rebase.c b/src/mesa/vbo/vbo_rebase.c
index a9d8ff93e93..02dbc68dcb5 100644
--- a/src/mesa/vbo/vbo_rebase.c
+++ b/src/mesa/vbo/vbo_rebase.c
@@ -79,17 +79,6 @@ REBASE(GLuint)
REBASE(GLushort)
REBASE(GLubyte)
-GLboolean vbo_all_varyings_in_vbos( const struct gl_vertex_array *arrays[] )
-{
- GLuint i;
-
- for (i = 0; i < VERT_ATTRIB_MAX; i++)
- if (arrays[i]->StrideB &&
- arrays[i]->BufferObj->Name == 0)
- return GL_FALSE;
-
- return GL_TRUE;
-}
/* Adjust primitives, indices and vertex definitions so that min_index