diff options
author | Eric Anholt <[email protected]> | 2015-07-17 10:01:48 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-07-17 22:11:56 -0700 |
commit | ff7896a398f55baefd00e695c8f45f2ffa57bceb (patch) | |
tree | b880c1e0dc89e1de8fbcb7dcda22d64165254a28 /src/gallium/drivers/vc4/vc4_program.c | |
parent | e42cfe5d032e97e0444df39421a9f93f84452d68 (diff) |
vc4: Switch to using a separate ioctl for making shaders.
This gives the kernel a chance to validate and lock down the data,
without having to deal with mmap zapping.
With this, GLBenchmark stops on a texture relocations, because we'd
recycled a shader BO as another shader and failed to revalidate, since we
weren't clearing the cached validation state on mmap faults.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 75c1be4f421..561da1074ce 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -2277,9 +2277,8 @@ vc4_get_compiled_shader(struct vc4_context *vc4, enum qstage stage, } copy_uniform_state_to_shader(shader, c); - shader->bo = vc4_bo_alloc_mem(vc4->screen, c->qpu_insts, - c->qpu_inst_count * sizeof(uint64_t), - "code"); + shader->bo = vc4_bo_alloc_shader(vc4->screen, c->qpu_insts, + c->qpu_inst_count * sizeof(uint64_t)); /* Copy the compiler UBO range state to the compiled shader, dropping * out arrays that were never referenced by an indirect load. |