zink: move streamout to draw_vbo
this isn't part of descriptor updating Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>
This commit is contained in:
committed by
Marge Bot
parent
b10a3be45e
commit
761a04a464
@@ -328,16 +328,6 @@ update_descriptors(struct zink_context *ctx, struct zink_screen *screen, bool is
|
||||
if (!shader)
|
||||
continue;
|
||||
enum pipe_shader_type stage = pipe_shader_type_from_mesa(shader->nir->info.stage);
|
||||
if (ctx->num_so_targets &&
|
||||
(stage == PIPE_SHADER_GEOMETRY ||
|
||||
(stage == PIPE_SHADER_TESS_EVAL && !ctx->gfx_stages[PIPE_SHADER_GEOMETRY]) ||
|
||||
(stage == PIPE_SHADER_VERTEX && !ctx->gfx_stages[PIPE_SHADER_GEOMETRY] && !ctx->gfx_stages[PIPE_SHADER_TESS_EVAL]))) {
|
||||
for (unsigned j = 0; j < ctx->num_so_targets; j++) {
|
||||
struct zink_so_target *t = zink_so_target(ctx->so_targets[j]);
|
||||
if (t)
|
||||
t->stride = shader->streamout.so_info.stride[j] * sizeof(uint32_t);
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < shader->num_bindings; j++) {
|
||||
int index = shader->bindings[j].index;
|
||||
@@ -733,6 +723,23 @@ zink_draw_vbo(struct pipe_context *pctx,
|
||||
barrier_vertex_buffers(ctx);
|
||||
barrier_draw_buffers(ctx, dinfo, dindirect, index_buffer);
|
||||
|
||||
for (int i = 0; i < ZINK_SHADER_COUNT; i++) {
|
||||
struct zink_shader *shader = ctx->gfx_stages[i];
|
||||
if (!shader)
|
||||
continue;
|
||||
enum pipe_shader_type stage = pipe_shader_type_from_mesa(shader->nir->info.stage);
|
||||
if (ctx->num_so_targets &&
|
||||
(stage == PIPE_SHADER_GEOMETRY ||
|
||||
(stage == PIPE_SHADER_TESS_EVAL && !ctx->gfx_stages[PIPE_SHADER_GEOMETRY]) ||
|
||||
(stage == PIPE_SHADER_VERTEX && !ctx->gfx_stages[PIPE_SHADER_GEOMETRY] && !ctx->gfx_stages[PIPE_SHADER_TESS_EVAL]))) {
|
||||
for (unsigned j = 0; j < ctx->num_so_targets; j++) {
|
||||
struct zink_so_target *t = zink_so_target(ctx->so_targets[j]);
|
||||
if (t)
|
||||
t->stride = shader->streamout.so_info.stride[j] * sizeof(uint32_t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gfx_program->base.num_descriptors)
|
||||
update_descriptors(ctx, screen, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user