Commit c27c5346 authored by Guido Gunther's avatar Guido Gunther

Update texture descriptor code to new folded in libdrm

Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent 6f8fa2a0
......@@ -516,9 +516,8 @@ etna_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
uint32_t *buf = etna_bo_map(ctx->dummy_desc_bo);
etna_bo_cpu_prep(ctx->dummy_desc_bo, DRM_ETNA_PREP_WRITE);
memset(buf, 0, 0x100);
etna_drm_bo_cpu_fini(ctx->dummy_desc_bo);
etna_drm_bo_ref(ctx->dummy_desc_bo);
etna_bo_cpu_fini(ctx->dummy_desc_bo);
etna_bo_ref(ctx->dummy_desc_bo);
ctx->DUMMY_DESC_ADDR.bo = ctx->dummy_desc_bo;
ctx->DUMMY_DESC_ADDR.offset = 0;
ctx->DUMMY_DESC_ADDR.flags = ETNA_RELOC_READ;
......
......@@ -201,7 +201,7 @@ etna_sampler_view_update_descriptor(struct etna_context *ctx,
res = etna_resource(res->texture);
}
/* No need to ref LOD levels individually as they'll always come from the same bo */
etna_drm_bo_ref(res->bo);
etna_bo_ref(res->bo);
fprintf(stderr, "desc: Updating %p, bo: %p, maxlod: %d\n", sv, res->bo, sv->maxlod);
......@@ -221,7 +221,7 @@ etna_sampler_view_desc_destroy(struct pipe_context *pctx,
if (res->texture) {
res = etna_resource(res->texture);
}
etna_drm_bo_del(res->bo);
etna_bo_del(res->bo);
fprintf(stderr, "desc: Destroying %p, bo: %p\n", sv, res->bo);
......
......@@ -28,7 +28,7 @@
#ifndef H_ETNAVIV_TEXTURE_DESC
#define H_ETNAVIV_TEXTURE_DESC
#include <etnaviv_drmif.h>
#include "drm/etnaviv_drmif.h"
#include "pipe/p_context.h"
#include "pipe/p_state.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment