zink: rename last_was_compute -> last_work_was_compute

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29108>
This commit is contained in:
Mike Blumenkrantz
2024-05-08 10:43:20 -04:00
committed by Marge Bot
parent d157b89bee
commit fb6828a9a1
3 changed files with 4 additions and 4 deletions

View File

@@ -4098,7 +4098,7 @@ zink_flush_memory_barrier(struct zink_context *ctx, bool is_compute)
VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT |
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
const VkPipelineStageFlags cs_flags = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
VkPipelineStageFlags src = ctx->batch.last_was_compute ? cs_flags : gfx_flags;
VkPipelineStageFlags src = ctx->batch.last_work_was_compute ? cs_flags : gfx_flags;
VkPipelineStageFlags dst = is_compute ? cs_flags : gfx_flags;
if (ctx->memory_barrier & (PIPE_BARRIER_TEXTURE | PIPE_BARRIER_SHADER_BUFFER | PIPE_BARRIER_IMAGE))

View File

@@ -1120,7 +1120,7 @@ zink_draw(struct pipe_context *pctx,
}
batch->state->has_work = true;
batch->last_was_compute = false;
batch->last_work_was_compute = false;
ctx->batch.work_count = work_count;
/* flush if there's >100k draws */
if (!ctx->unordered_blitting && (unlikely(work_count >= 30000) || ctx->oom_flush))
@@ -1303,7 +1303,7 @@ zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
} else
VKCTX(CmdDispatch)(batch->state->cmdbuf, info->grid[0], info->grid[1], info->grid[2]);
batch->state->has_work = true;
batch->last_was_compute = true;
batch->last_work_was_compute = true;
/* flush if there's >100k computes */
if (!ctx->unordered_blitting && (unlikely(ctx->batch.work_count >= 30000) || ctx->oom_flush))
pctx->flush(pctx, NULL, 0);

View File

@@ -682,7 +682,7 @@ struct zink_batch {
unsigned work_count;
bool last_was_compute;
bool last_work_was_compute;
};