vc4: Use the normal simulator ioctl path for CL submit as well.
The simulator no longer needs to look back into the gallium structs.
This commit is contained in:
@@ -486,9 +486,6 @@ void vc4_program_fini(struct pipe_context *pctx);
|
||||
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);
|
||||
|
||||
|
||||
@@ -492,11 +492,7 @@ vc4_job_submit(struct vc4_context *vc4, struct vc4_job *job)
|
||||
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. "
|
||||
|
||||
@@ -364,12 +364,9 @@ vc4_dump_to_file(struct vc4_exec_info *exec)
|
||||
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;
|
||||
@@ -583,6 +580,8 @@ int
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user