diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-10-14 18:43:23 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-10-14 21:13:28 +0200 |
commit | 2fbfe6c8f0ea3e636e60d09a742c6bf18e710b44 (patch) | |
tree | 7811c8a7f9d2ec91e4a1e43feb648e86abc3ab78 | |
parent | 7745f67a36d7cdd9e20fa36f8cae4db8eb8d378a (diff) |
etnaviv: fix compile with v2
-rw-r--r-- | src/etnaviv/etna.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/etnaviv/etna.c b/src/etnaviv/etna.c index 5763bd6..db7dcbb 100644 --- a/src/etnaviv/etna.c +++ b/src/etnaviv/etna.c @@ -58,7 +58,6 @@ static int gpu_context_clear(struct etna_ctx *ctx); static int gpu_context_initialize(struct etna_ctx *ctx) { - int rv; gcoCONTEXT vctx = ETNA_CALLOC_STRUCT(_gcoCONTEXT); if(vctx == NULL) { @@ -87,7 +86,7 @@ static int gpu_context_initialize(struct etna_ctx *ctx) ctx->ctx = VIV_TO_HANDLE(vctx); /* Allocate initial context buffer */ /* XXX DRM_ETNA_GEM_CACHE_xxx */ - if((ctx->ctx_info = etna_bo_new(ctx->conn, COMMAND_BUFFER_SIZE, DRM_ETNA_GEM_TYPE_CMD)) == NULL) + if((ctx->ctx_bo = etna_bo_new(ctx->conn, COMMAND_BUFFER_SIZE, DRM_ETNA_GEM_TYPE_CMD)) == NULL) { ETNA_FREE(vctx); return ETNA_OUT_OF_MEMORY; @@ -114,18 +113,18 @@ static int gpu_context_clear(struct etna_ctx *ctx) #ifdef DEBUG printf("gpu_context_clear: context was in use, deferred freeing and reallocating it\n"); #endif - if((rv = etna_bo_del(ctx->conn, ctx->ctx_info, ctx->queue)) != ETNA_OK) + if((rv = etna_bo_del(ctx->conn, ctx->ctx_bo, ctx->queue)) != ETNA_OK) { return rv; } - if((ctx->ctx_info = etna_bo_new(ctx->conn, COMMAND_BUFFER_SIZE, DRM_ETNA_GEM_TYPE_CMD)) == NULL) + if((ctx->ctx_bo = etna_bo_new(ctx->conn, COMMAND_BUFFER_SIZE, DRM_ETNA_GEM_TYPE_CMD)) == NULL) { return ETNA_OUT_OF_MEMORY; } } /* Leave space at beginning of buffer for PIPE switch */ GCCTX(ctx)->bufferSize = BEGIN_COMMIT_CLEARANCE; - GCCTX(ctx)->logical = ctx->ctx_info.logical; + GCCTX(ctx)->logical = etna_bo_map(ctx->ctx_bo); #ifdef GCABI_CONTEXT_HAS_PHYSICAL GCCTX(ctx)->bytes = ctx->ctx_info.bytes; /* actual size of buffer */ GCCTX(ctx)->physical = HANDLE_TO_VIV(ctx->ctx_info.physical); |