Otherwise, once we're not flushing at the end of every draw, we'll free
things like gallium resources, and free the backing GEM object, before
we've flushed the rendering using it to the kernel.
}
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;
}
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;
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;