mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
nouveau: remove sync hack, gallium got sort-of fixed.
This commit is contained in:
parent
3e1e40ee79
commit
d67c2c1cd5
3 changed files with 5 additions and 21 deletions
|
|
@ -253,20 +253,15 @@ nouveau_bo_validate(struct nouveau_channel *chan, struct nouveau_bo *bo,
|
||||||
if (!nvbo->drm.size) {
|
if (!nvbo->drm.size) {
|
||||||
nouveau_bo_realloc_gpu(nvbo, flags, nvbo->base.size);
|
nouveau_bo_realloc_gpu(nvbo, flags, nvbo->base.size);
|
||||||
nouveau_bo_upload(nvbo);
|
nouveau_bo_upload(nvbo);
|
||||||
|
if (!nvbo->user) {
|
||||||
|
free(nvbo->sysmem);
|
||||||
|
nvbo->sysmem = NULL;
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
if (nvbo->user) {
|
if (nvbo->user) {
|
||||||
nouveau_bo_upload(nvbo);
|
nouveau_bo_upload(nvbo);
|
||||||
} else
|
|
||||||
if (nvbo->base.map) {
|
|
||||||
nouveau_bo_upload(nvbo);
|
|
||||||
nvbo->sync_hack = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nvbo->user && !nvbo->base.map) {
|
|
||||||
free(nvbo->sysmem);
|
|
||||||
nvbo->sysmem = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nvbo->fence)
|
if (nvbo->fence)
|
||||||
nouveau_fence_del(&nvbo->fence);
|
nouveau_fence_del(&nvbo->fence);
|
||||||
nouveau_fence_ref(fence, &nvbo->fence);
|
nouveau_fence_ref(fence, &nvbo->fence);
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,6 @@ struct nouveau_bo_priv {
|
||||||
int user;
|
int user;
|
||||||
|
|
||||||
int refcount;
|
int refcount;
|
||||||
int sync_hack;
|
|
||||||
};
|
};
|
||||||
#define nouveau_bo(n) ((struct nouveau_bo_priv *)(n))
|
#define nouveau_bo(n) ((struct nouveau_bo_priv *)(n))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,6 @@ nouveau_pushbuf_flush(struct nouveau_channel *chan)
|
||||||
struct nouveau_pushbuf_priv *nvpb = nouveau_pushbuf(nvchan->pb_tail);
|
struct nouveau_pushbuf_priv *nvpb = nouveau_pushbuf(nvchan->pb_tail);
|
||||||
struct nouveau_pushbuf_bo *pbbo;
|
struct nouveau_pushbuf_bo *pbbo;
|
||||||
struct nouveau_fence *fence = NULL;
|
struct nouveau_fence *fence = NULL;
|
||||||
int sync_hack = 0;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!nvpb)
|
if (!nvpb)
|
||||||
|
|
@ -90,9 +89,6 @@ nouveau_pushbuf_flush(struct nouveau_channel *chan)
|
||||||
ret = nouveau_bo_validate(chan, bo, fence, pbbo->flags);
|
ret = nouveau_bo_validate(chan, bo, fence, pbbo->flags);
|
||||||
assert (ret == 0);
|
assert (ret == 0);
|
||||||
|
|
||||||
sync_hack |= nouveau_bo(bo)->sync_hack;
|
|
||||||
nouveau_bo(bo)->sync_hack = 0;
|
|
||||||
|
|
||||||
while ((r = ptr_to_pbrel(pbbo->relocs))) {
|
while ((r = ptr_to_pbrel(pbbo->relocs))) {
|
||||||
uint32_t push;
|
uint32_t push;
|
||||||
|
|
||||||
|
|
@ -144,12 +140,6 @@ nouveau_pushbuf_flush(struct nouveau_channel *chan)
|
||||||
/* Kickoff */
|
/* Kickoff */
|
||||||
FIRE_RING_CH(chan);
|
FIRE_RING_CH(chan);
|
||||||
|
|
||||||
if (sync_hack) {
|
|
||||||
struct nouveau_fence *f = NULL;
|
|
||||||
nouveau_fence_ref(nvpb->fence, &f);
|
|
||||||
nouveau_fence_wait(&f);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Allocate space for next push buffer */
|
/* Allocate space for next push buffer */
|
||||||
out_realloc:
|
out_realloc:
|
||||||
nvpb = calloc(1, sizeof(struct nouveau_pushbuf_priv));
|
nvpb = calloc(1, sizeof(struct nouveau_pushbuf_priv));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue