summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nouveau_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_buffer.h')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_buffer.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.h b/src/gallium/drivers/nouveau/nouveau_buffer.h
index 46e3554bdf7..c0a781c6fd3 100644
--- a/src/gallium/drivers/nouveau/nouveau_buffer.h
+++ b/src/gallium/drivers/nouveau/nouveau_buffer.h
@@ -8,10 +8,6 @@ struct pipe_resource;
struct nouveau_context;
struct nouveau_bo;
-#define NOUVEAU_BUFFER_SCORE_MIN -25000
-#define NOUVEAU_BUFFER_SCORE_MAX 25000
-#define NOUVEAU_BUFFER_SCORE_VRAM_THRESHOLD 20000
-
/* DIRTY: buffer was (or will be after the next flush) written to by GPU and
* resource->data has not been updated to reflect modified VRAM contents
*
@@ -39,8 +35,6 @@ struct nv04_resource {
uint8_t status;
uint8_t domain;
- int16_t score; /* low if mapped very often, if high can move to VRAM */
-
struct nouveau_fence *fence;
struct nouveau_fence *fence_wr;
@@ -58,23 +52,6 @@ boolean
nouveau_buffer_migrate(struct nouveau_context *,
struct nv04_resource *, unsigned domain);
-static INLINE void
-nouveau_buffer_adjust_score(struct nouveau_context *pipe,
- struct nv04_resource *res, int16_t score)
-{
- if (score < 0) {
- if (res->score > NOUVEAU_BUFFER_SCORE_MIN)
- res->score += score;
- } else
- if (score > 0){
- if (res->score < NOUVEAU_BUFFER_SCORE_MAX)
- res->score += score;
- if (res->domain == NOUVEAU_BO_GART &&
- res->score > NOUVEAU_BUFFER_SCORE_VRAM_THRESHOLD)
- nouveau_buffer_migrate(pipe, res, NOUVEAU_BO_VRAM);
- }
-}
-
/* XXX: wait for fence (atm only using this for vertex push) */
static INLINE void *
nouveau_resource_map_offset(struct nouveau_context *pipe,
@@ -83,8 +60,6 @@ nouveau_resource_map_offset(struct nouveau_context *pipe,
{
void *map;
- nouveau_buffer_adjust_score(pipe, res, -250);
-
if ((res->domain == NOUVEAU_BO_VRAM) &&
(res->status & NOUVEAU_BUFFER_STATUS_GPU_WRITING))
nouveau_buffer_download(pipe, res, 0, res->base.width0);