diff options
author | Rob Clark <[email protected]> | 2016-03-01 17:31:21 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-03-01 19:20:33 -0500 |
commit | 5fd152bae8a765024231a7390ae48752b579a5a9 (patch) | |
tree | 223cb895d5a94727ac8d0bcef1cead5c3941eb20 /src/gallium/drivers/freedreno/ir3/ir3_shader.c | |
parent | 1be953797ea4ae31193ab40bd35133eef38ae0ce (diff) |
freedreno/ir3: add dev ptr to ir3_compiler
And use this for allocating bo's to hold the shader binary, rather than
accessing the dev via ctx ptr. One step towards making shaders sharable
across contexts.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3/ir3_shader.c')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_shader.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.c b/src/gallium/drivers/freedreno/ir3/ir3_shader.c index 7d17f426ad3..26106072b5a 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_shader.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.c @@ -127,14 +127,14 @@ void * ir3_shader_assemble(struct ir3_shader_variant *v, uint32_t gpu_id) static void assemble_variant(struct ir3_shader_variant *v) { - struct fd_context *ctx = fd_context(v->shader->pctx); - uint32_t gpu_id = v->shader->compiler->gpu_id; + struct ir3_compiler *compiler = v->shader->compiler; + uint32_t gpu_id = compiler->gpu_id; uint32_t sz, *bin; bin = ir3_shader_assemble(v, gpu_id); sz = v->info.sizedwords * 4; - v->bo = fd_bo_new(ctx->dev, sz, + v->bo = fd_bo_new(compiler->dev, sz, DRM_FREEDRENO_GEM_CACHE_WCOMBINE | DRM_FREEDRENO_GEM_TYPE_KMEM); |