Commit Graph

12 Commits

Author SHA1 Message Date
Marek Olšák 22253e6b65 gallium: rename PIPE_TRANSFER_* -> PIPE_MAP_*
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5749>
2020-09-22 03:20:54 +00:00
Marek Olšák 330d0607ed gallium: remove pipe_index_buffer and set_index_buffer
pipe_draw_info::indexed is replaced with index_size. index_size == 0 means
non-indexed.

Instead of pipe_index_buffer::offset, pipe_draw_info::start is used.
For indexed indirect draws, pipe_draw_info::start is added to the indirect
start. This is the only case when "start" affects indirect draws.

pipe_draw_info::index is a union. Use either index::resource or
index::user depending on the value of pipe_draw_info::has_user_indices.

v2: fixes for nine, svga
2017-05-10 19:00:16 +02:00
Marek Olšák abb25fb18e gallium/util: use const in u_index_modify helpers
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-03-30 16:09:29 +02:00
Marek Olšák c8ef512398 gallium/u_index_modify: don't add PIPE_TRANSFER_UNSYNCHRONIZED unconditionally
It's OK for r300g (because r300g can't write to buffers via the GPU), but
not later hardware. This issue was spotted randomly.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-19 17:16:26 +01:00
Marek Olšák 42297c862f gallium/util: remove unused u_index_modify helpers
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-18 01:22:08 +01:00
Marek Olšák c32114460d gallium: remove PIPE_USAGE_STATIC
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-02-06 17:37:34 +01:00
Marek Olšák bf469f4edc gallium: add void *user_buffer in pipe_index_buffer
Adapted drivers: i915, llvmpipe, r300, r600, radeonsi, softpipe.

User index buffers have been disabled in nv30, nv50, nvc0 and svga to keep
things working.
2012-04-30 01:14:28 +02:00
Marek Olšák eafb7f234d gallium: add usage parameter to pipe_buffer_create
And set a reasonable buffer usage flag everywhere instead of
just PIPE_USAGE_DEFAULT.
2011-02-15 22:44:21 +01:00
Marek Olšák 9a90eeee67 u_index_modify: map buffers with PIPE_TRANSFER_UNSYNCHRONIZED 2011-02-14 07:45:14 +01:00
Marek Olšák 76db330e2c util: add a way to store translated indices to a user memory in u_index_modify
I am about to use the upload buffer in r300g instead.
2010-12-29 18:32:41 +01:00
Marek Olšák ec51092a72 gallium: remove unused 'buf' parameter in pipe_buffer_unmap 2010-12-20 17:42:55 +01:00
Dave Airlie 91b70d8408 util/r300g: split the r300 index buffer modifier functions out to util
These can be used by other drivers, like r600g.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-20 09:38:18 +10:00