diff options
author | Eric Anholt <eric@anholt.net> | 2015-07-28 10:20:10 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2015-07-28 19:35:26 -0700 |
commit | 1f5e070dd7ddd344a913f2f5daddebb4c51abb8a (patch) | |
tree | df946fe4d40be76a32b2822a168ae1a027da6ee0 /src/gallium/drivers/vc4/vc4_simulator.c | |
parent | 044f7bbda077ea7029fb1004183b29127307bd84 (diff) |
vc4: Simplify vc4_use_bo and make sure it's not a shader.
Since the conversion to keeping validated shaders around for the BO's
lifetime, we haven't been checking that rendering doesn't happen to
shaders. Make vc4_use_bo check that always, and just don't use it for the
VC4_MODE_SHADER case (so now modes are unused)
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_simulator.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_simulator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/vc4_simulator.c b/src/gallium/drivers/vc4/vc4_simulator.c index 4097dce28a7..7cfd236349d 100644 --- a/src/gallium/drivers/vc4/vc4_simulator.c +++ b/src/gallium/drivers/vc4/vc4_simulator.c @@ -74,7 +74,7 @@ vc4_simulator_pin_bos(struct drm_device *dev, struct vc4_exec_info *exec) struct vc4_bo **bos = vc4->bo_pointers.base; exec->bo_count = args->bo_handle_count; - exec->bo = calloc(exec->bo_count, sizeof(struct vc4_bo_exec_state)); + exec->bo = calloc(exec->bo_count, sizeof(void *)); for (int i = 0; i < exec->bo_count; i++) { struct vc4_bo *bo = bos[i]; struct drm_gem_cma_object *obj = vc4_wrap_bo_with_cma(dev, bo); @@ -87,7 +87,7 @@ vc4_simulator_pin_bos(struct drm_device *dev, struct vc4_exec_info *exec) vc4_bo_map(bo); memcpy(obj->vaddr, bo->map, bo->size); - exec->bo[i].bo = obj; + exec->bo[i] = obj; /* The kernel does this validation at shader create ioctl * time. @@ -105,7 +105,7 @@ static int vc4_simulator_unpin_bos(struct vc4_exec_info *exec) { for (int i = 0; i < exec->bo_count; i++) { - struct drm_gem_cma_object *obj = exec->bo[i].bo; + struct drm_gem_cma_object *obj = exec->bo[i]; struct vc4_bo *bo = to_vc4_bo(&obj->base)->bo; memcpy(bo->map, obj->vaddr, bo->size); |