mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
zink: fix xfb buffer array sizing to use buffer limit, not output
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24568>
This commit is contained in:
parent
aa322a37fc
commit
f272a88505
2 changed files with 6 additions and 6 deletions
|
|
@ -52,9 +52,9 @@ zink_emit_stream_output_targets(struct pipe_context *pctx)
|
|||
{
|
||||
struct zink_context *ctx = zink_context(pctx);
|
||||
struct zink_batch *batch = &ctx->batch;
|
||||
VkBuffer buffers[PIPE_MAX_SO_OUTPUTS] = {0};
|
||||
VkDeviceSize buffer_offsets[PIPE_MAX_SO_OUTPUTS] = {0};
|
||||
VkDeviceSize buffer_sizes[PIPE_MAX_SO_OUTPUTS] = {0};
|
||||
VkBuffer buffers[PIPE_MAX_SO_BUFFERS] = {0};
|
||||
VkDeviceSize buffer_offsets[PIPE_MAX_SO_BUFFERS] = {0};
|
||||
VkDeviceSize buffer_sizes[PIPE_MAX_SO_BUFFERS] = {0};
|
||||
|
||||
for (unsigned i = 0; i < ctx->num_so_targets; i++) {
|
||||
struct zink_so_target *t = (struct zink_so_target *)ctx->so_targets[i];
|
||||
|
|
@ -502,8 +502,8 @@ zink_draw(struct pipe_context *pctx,
|
|||
struct zink_so_target *so_target =
|
||||
dindirect && dindirect->count_from_stream_output ?
|
||||
zink_so_target(dindirect->count_from_stream_output) : NULL;
|
||||
VkBuffer counter_buffers[PIPE_MAX_SO_OUTPUTS];
|
||||
VkDeviceSize counter_buffer_offsets[PIPE_MAX_SO_OUTPUTS];
|
||||
VkBuffer counter_buffers[PIPE_MAX_SO_BUFFERS];
|
||||
VkDeviceSize counter_buffer_offsets[PIPE_MAX_SO_BUFFERS];
|
||||
bool need_index_buffer_unref = false;
|
||||
bool mode_changed = ctx->gfx_pipeline_state.gfx_prim_mode != dinfo->mode;
|
||||
bool reads_drawid = ctx->shader_reads_drawid;
|
||||
|
|
|
|||
|
|
@ -1982,7 +1982,7 @@ struct zink_context {
|
|||
uint32_t ds3_states;
|
||||
|
||||
uint32_t num_so_targets;
|
||||
struct pipe_stream_output_target *so_targets[PIPE_MAX_SO_OUTPUTS];
|
||||
struct pipe_stream_output_target *so_targets[PIPE_MAX_SO_BUFFERS];
|
||||
bool dirty_so_targets;
|
||||
|
||||
bool gfx_dirty;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue