The simulator no longer needs to look back into the gallium structs.
void vc4_query_init(struct pipe_context *pctx);
void vc4_simulator_init(struct vc4_screen *screen);
void vc4_simulator_destroy(struct vc4_screen *screen);
-int vc4_simulator_flush(struct vc4_context *vc4,
- struct drm_vc4_submit_cl *args,
- struct vc4_job *job);
int vc4_simulator_ioctl(int fd, unsigned long request, void *arg);
void vc4_simulator_open_from_handle(int fd, int handle, uint32_t size);
if (!(vc4_debug & VC4_DEBUG_NORAST)) {
int ret;
-#ifndef USE_VC4_SIMULATOR
- ret = drmIoctl(vc4->fd, DRM_IOCTL_VC4_SUBMIT_CL, &submit);
-#else
- ret = vc4_simulator_flush(vc4, &submit, job);
-#endif
+ ret = vc4_ioctl(vc4->fd, DRM_IOCTL_VC4_SUBMIT_CL, &submit);
static bool warned = false;
if (ret && !warned) {
fprintf(stderr, "Draw call returned %s. "
fclose(f);
}
-int
-vc4_simulator_flush(struct vc4_context *vc4,
- struct drm_vc4_submit_cl *args, struct vc4_job *job)
+static int
+vc4_simulator_submit_cl_ioctl(int fd, struct drm_vc4_submit_cl *args)
{
- struct vc4_screen *screen = vc4->screen;
- int fd = screen->fd;
struct vc4_simulator_file *file = vc4_get_simulator_file_for_fd(fd);
struct vc4_exec_info exec;
struct drm_device *dev = &file->dev;
vc4_simulator_ioctl(int fd, unsigned long request, void *args)
{
switch (request) {
+ case DRM_IOCTL_VC4_SUBMIT_CL:
+ return vc4_simulator_submit_cl_ioctl(fd, args);
case DRM_IOCTL_VC4_CREATE_BO:
return vc4_simulator_create_bo_ioctl(fd, args);
case DRM_IOCTL_VC4_CREATE_SHADER_BO: