From a3cd3c0d198374647df3db83198e8ce0cddcb6b7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 18 Jul 2014 13:06:01 -0700 Subject: vc4: Switch simulator to using kernel validator This ensures that when I'm using the simulator, I get a closer match to what behavior on real hardware will be. It lets me rapidly iterate on the kernel validation code (which otherwise has a several-minute turnaround time), and helps catch buffer overflow bugs in the userspace driver faster. --- src/gallium/drivers/vc4/vc4_cl.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/gallium/drivers/vc4/vc4_cl.c') diff --git a/src/gallium/drivers/vc4/vc4_cl.c b/src/gallium/drivers/vc4/vc4_cl.c index 3bbeadc49ee..5c660d8d7a8 100644 --- a/src/gallium/drivers/vc4/vc4_cl.c +++ b/src/gallium/drivers/vc4/vc4_cl.c @@ -27,12 +27,6 @@ void vc4_init_cl(struct vc4_context *vc4, struct vc4_cl *cl) { -#ifdef USE_VC4_SIMULATOR - uint32_t size = 256 * 1024; - cl->base = vc4_simulator_alloc(vc4->screen, size); - cl->end = cl->base + size; - cl->next = cl->base; -#endif } void @@ -41,9 +35,6 @@ vc4_grow_cl(struct vc4_cl *cl) uint32_t size = MAX2((cl->end - cl->base) * 2, 4096); uint32_t offset = cl->next -cl->base; -#ifdef USE_VC4_SIMULATOR - assert(!"not reached"); -#endif cl->base = realloc(cl->base, size); cl->end = cl->base + size; cl->next = cl->base + offset; @@ -70,5 +61,10 @@ 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 + return hindex; } -- cgit v1.2.3