summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2023-11-20 13:48:09 -0500
committerMarge Bot <emma+marge@anholt.net>2024-01-14 21:55:19 +0000
commiteb20ef92772c6a4963128370260d578f100efee9 (patch)
tree04d3baa5430fa12a4afd0c2debc4764bf9dec8f5 /src/gallium/drivers/r300/r300_state.c
parent2725b095ea2a16a1ce28aca8ae31e9d3df448c67 (diff)
gallium: remove unbind_trailing_count from set_vertex_buffers
It should implicitly unbind all bound buffers after "count". This also slightly simplies u_vbuf. This is a cleanup suggested by: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8142 Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> (asahi & panfrost) Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26309>
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index a0177280444..cf1d6cc7e16 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -1771,23 +1771,20 @@ static void r300_set_viewport_states(struct pipe_context* pipe,
}
static void r300_set_vertex_buffers_hwtcl(struct pipe_context* pipe,
- unsigned count,
- unsigned unbind_num_trailing_slots,
- bool take_ownership,
+ unsigned count, bool take_ownership,
const struct pipe_vertex_buffer* buffers)
{
struct r300_context* r300 = r300_context(pipe);
util_set_vertex_buffers_count(r300->vertex_buffer,
- &r300->nr_vertex_buffers,
- buffers, count,
- unbind_num_trailing_slots, take_ownership);
+ &r300->nr_vertex_buffers, buffers, count,
+ take_ownership);
/* There must be at least one vertex buffer set, otherwise it locks up. */
if (!r300->nr_vertex_buffers) {
util_set_vertex_buffers_count(r300->vertex_buffer,
&r300->nr_vertex_buffers,
- &r300->dummy_vb, 1, 0, false);
+ &r300->dummy_vb, 1, false);
}
r300->vertex_arrays_dirty = true;
@@ -1795,7 +1792,6 @@ static void r300_set_vertex_buffers_hwtcl(struct pipe_context* pipe,
static void r300_set_vertex_buffers_swtcl(struct pipe_context* pipe,
unsigned count,
- unsigned unbind_num_trailing_slots,
bool take_ownership,
const struct pipe_vertex_buffer* buffers)
{
@@ -1803,11 +1799,9 @@ static void r300_set_vertex_buffers_swtcl(struct pipe_context* pipe,
unsigned i;
util_set_vertex_buffers_count(r300->vertex_buffer,
- &r300->nr_vertex_buffers,
- buffers, count,
- unbind_num_trailing_slots, take_ownership);
- draw_set_vertex_buffers(r300->draw, count,
- unbind_num_trailing_slots, buffers);
+ &r300->nr_vertex_buffers, buffers, count,
+ take_ownership);
+ draw_set_vertex_buffers(r300->draw, count, buffers);
if (!buffers)
return;