summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_cl.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-07-18 13:06:01 -0700
committerEric Anholt <[email protected]>2014-08-11 14:40:45 -0700
commita3cd3c0d198374647df3db83198e8ce0cddcb6b7 (patch)
treead6f36cbf7b4c8bf081b0ea4c62620ef62e97282 /src/gallium/drivers/vc4/vc4_cl.c
parenta02c658908384b81e9d27e2555ba2fce2cc0f6a8 (diff)
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.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_cl.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_cl.c14
1 files changed, 5 insertions, 9 deletions
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;
}