panfrost: Pass batch to panfrost_get_index_buffer_bounded
Calling batch_for_fbo outside of Gallium entrypoints is an antipattern. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10869>
This commit is contained in:
parent
7561cd5825
commit
35dfaaf1c3
|
@ -81,13 +81,13 @@ panfrost_bo_access_for_stage(enum pipe_shader_type stage)
|
|||
* require them to be together. */
|
||||
|
||||
mali_ptr
|
||||
panfrost_get_index_buffer_bounded(struct panfrost_context *ctx,
|
||||
panfrost_get_index_buffer_bounded(struct panfrost_batch *batch,
|
||||
const struct pipe_draw_info *info,
|
||||
const struct pipe_draw_start_count_bias *draw,
|
||||
unsigned *min_index, unsigned *max_index)
|
||||
{
|
||||
struct panfrost_resource *rsrc = pan_resource(info->index.resource);
|
||||
struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
|
||||
struct panfrost_context *ctx = batch->ctx;
|
||||
off_t offset = draw->start * info->index_size;
|
||||
bool needs_indices = true;
|
||||
mali_ptr out = 0;
|
||||
|
|
|
@ -71,7 +71,7 @@ panfrost_emit_vertex_data(struct panfrost_batch *batch,
|
|||
mali_ptr *buffers);
|
||||
|
||||
mali_ptr
|
||||
panfrost_get_index_buffer_bounded(struct panfrost_context *ctx,
|
||||
panfrost_get_index_buffer_bounded(struct panfrost_batch *batch,
|
||||
const struct pipe_draw_info *info,
|
||||
const struct pipe_draw_start_count_bias *draw,
|
||||
unsigned *min_index, unsigned *max_index);
|
||||
|
|
|
@ -458,7 +458,7 @@ panfrost_direct_draw(struct panfrost_batch *batch,
|
|||
mali_ptr indices = 0;
|
||||
|
||||
if (info->index_size) {
|
||||
indices = panfrost_get_index_buffer_bounded(ctx, info, draw,
|
||||
indices = panfrost_get_index_buffer_bounded(batch, info, draw,
|
||||
&min_index,
|
||||
&max_index);
|
||||
|
||||
|
|
Loading…
Reference in New Issue