diff options
author | Marek Olšák <[email protected]> | 2017-01-17 22:03:23 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-01-18 19:51:31 +0100 |
commit | c67a2793b369637c2b65263415a856c41f5e099e (patch) | |
tree | dfa0a0e36e3e20d6339b5b926fbd760953128b79 /src/gallium/drivers/radeonsi/si_state.c | |
parent | 1db2bf8d2b1554225132c7b350b0aabb01022e20 (diff) |
radeonsi: determine in advance which VBOs should be added to the buffer list
v2: now it should be correct
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 3022260f2ff..f60a4992bc3 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3323,6 +3323,7 @@ static void *si_create_vertex_elements(struct pipe_context *ctx, const struct pipe_vertex_element *elements) { struct si_vertex_element *v = CALLOC_STRUCT(si_vertex_element); + bool used[SI_NUM_VERTEX_BUFFERS] = {}; int i; assert(count <= SI_MAX_ATTRIBS); @@ -3342,6 +3343,11 @@ static void *si_create_vertex_elements(struct pipe_context *ctx, return NULL; } + if (!used[vbo_index]) { + v->first_vb_use_mask |= 1 << i; + used[vbo_index] = true; + } + desc = util_format_description(elements[i].src_format); first_non_void = util_format_get_first_non_void_channel(elements[i].src_format); data_format = si_translate_buffer_dataformat(ctx->screen, desc, first_non_void); |