Commit Graph

9 Commits

Author SHA1 Message Date
Marek Olšák f95fb3ab9c gallium/util: allow including a few files in C++
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7807>
2020-12-09 16:01:21 -05: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 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
Vinson Lee 8d79765feb util: Add forward declarations in u_index_modify.h. 2010-12-30 01:54:35 -08: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
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