mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 23:30:10 +01:00
nvk/nvkmd: Add a concept of incomplete pushes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
This commit is contained in:
parent
cbf87e82e8
commit
0915b3131f
2 changed files with 18 additions and 1 deletions
|
|
@ -165,7 +165,19 @@ nvkmd_nouveau_exec_ctx_exec(struct nvkmd_ctx *_ctx,
|
|||
struct nvkmd_nouveau_exec_ctx *ctx = nvkmd_nouveau_exec_ctx(_ctx);
|
||||
|
||||
for (uint32_t i = 0; i < exec_count; i++) {
|
||||
if (unlikely(ctx->req.push_count >= ctx->max_push)) {
|
||||
uint32_t incomplete_count = 0;
|
||||
for (uint32_t j = i; j < exec_count; j++) {
|
||||
if (!execs[j].incomplete)
|
||||
break;
|
||||
|
||||
/* The last exec cannot be incomplete */
|
||||
assert(j < exec_count - 1);
|
||||
|
||||
incomplete_count++;
|
||||
}
|
||||
assert(incomplete_count < ctx->max_push);
|
||||
|
||||
if (unlikely(ctx->req.push_count + incomplete_count >= ctx->max_push)) {
|
||||
VkResult result = nvkmd_nouveau_exec_ctx_flush(&ctx->base, log_obj);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -284,6 +284,11 @@ struct nvkmd_va {
|
|||
struct nvkmd_ctx_exec {
|
||||
uint64_t addr;
|
||||
uint32_t size_B;
|
||||
/* True if this push ends in an incomplete method and requires the next
|
||||
* push to provide the method data. In this case, this push and the next
|
||||
* one must be in the same submit ioctl.
|
||||
*/
|
||||
bool incomplete;
|
||||
bool no_prefetch;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue