summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/vc4/vc4_cl.c5
-rw-r--r--src/gallium/drivers/vc4/vc4_context.c5
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h2
3 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/drivers/vc4/vc4_cl.c b/src/gallium/drivers/vc4/vc4_cl.c
index 5c660d8d7a8..29b956e6e9a 100644
--- a/src/gallium/drivers/vc4/vc4_cl.c
+++ b/src/gallium/drivers/vc4/vc4_cl.c
@@ -61,10 +61,7 @@ vc4_gem_hindex(struct vc4_context *vc4, struct vc4_bo *bo)
}
cl_u32(&vc4->bo_handles, bo->handle);
-
-#ifdef USE_VC4_SIMULATOR
- cl_ptr(&vc4->bo_pointers, bo);
-#endif
+ cl_ptr(&vc4->bo_pointers, vc4_bo_reference(bo));
return hindex;
}
diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c
index c69d620d6b6..6799e7ebf61 100644
--- a/src/gallium/drivers/vc4/vc4_context.c
+++ b/src/gallium/drivers/vc4/vc4_context.c
@@ -226,9 +226,10 @@ vc4_flush(struct pipe_context *pctx)
vc4_reset_cl(&vc4->shader_rec);
vc4_reset_cl(&vc4->uniforms);
vc4_reset_cl(&vc4->bo_handles);
-#ifdef USE_VC4_SIMULATOR
+ struct vc4_bo **referenced_bos = vc4->bo_pointers.base;
+ for (int i = 0; i < submit.bo_handle_count; i++)
+ vc4_bo_unreference(&referenced_bos[i]);
vc4_reset_cl(&vc4->bo_pointers);
-#endif
vc4->shader_rec_count = 0;
vc4->needs_flush = false;
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index 55746ea3b71..85cdf41e427 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -123,9 +123,7 @@ struct vc4_context {
struct vc4_cl shader_rec;
struct vc4_cl uniforms;
struct vc4_cl bo_handles;
-#ifdef USE_VC4_SIMULATOR
struct vc4_cl bo_pointers;
-#endif
uint32_t shader_rec_count;
struct vc4_bo *tile_alloc;