diff options
author | Mathias Fröhlich <[email protected]> | 2018-04-01 20:18:36 +0200 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2018-05-10 07:06:16 +0200 |
commit | 172c9a908f7d6405b41f5555f2a0087169ec83a3 (patch) | |
tree | 27a104490b3fab37e510840b76f233fc08b1080b | |
parent | 79eb6ab7b6dc187baa2837d90b3608c6b7a5f366 (diff) |
i965: Implement all_varyings_in_vbos in terms of Array._DrawVAO.
Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Mathias Fröhlich <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 25ba372c449..c5f04264fad 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -25,6 +25,7 @@ #include <sys/errno.h> +#include "main/arrayobj.h" #include "main/blend.h" #include "main/context.h" #include "main/condrender.h" @@ -917,20 +918,6 @@ retry: } -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].BufferBinding->Stride && - arrays[i].BufferBinding->BufferObj->Name == 0) - return false; - - return true; -} - - void brw_draw_prims(struct gl_context *ctx, @@ -982,7 +969,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 && !all_varyings_in_vbos(arrays)) { + if (!index_bounds_valid && _mesa_draw_user_array_bits(ctx) != 0) { 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); |