void v3d_simulator_init(struct v3d_screen *screen);
void v3d_simulator_destroy(struct v3d_screen *screen);
-int v3d_simulator_flush(struct v3d_context *v3d,
- struct drm_v3d_submit_cl *args,
- struct v3d_job *job);
int v3d_simulator_ioctl(int fd, unsigned long request, void *arg);
void v3d_simulator_open_from_handle(int fd, int handle, uint32_t size);
if (!(V3D_DEBUG & V3D_DEBUG_NORAST)) {
int ret;
-#ifndef USE_V3D_SIMULATOR
- ret = drmIoctl(v3d->fd, DRM_IOCTL_V3D_SUBMIT_CL, &job->submit);
-#else
- ret = v3d_simulator_flush(v3d, &job->submit, job);
-#endif
+ ret = v3d_ioctl(v3d->fd, DRM_IOCTL_V3D_SUBMIT_CL, &job->submit);
static bool warned = false;
if (ret && !warned) {
fprintf(stderr, "Draw call returned %s. "
return 0;
}
-int
-v3d_simulator_flush(struct v3d_context *v3d,
- struct drm_v3d_submit_cl *submit, struct v3d_job *job)
+static int
+v3d_simulator_submit_cl_ioctl(int fd, struct drm_v3d_submit_cl *submit)
{
- struct v3d_screen *screen = v3d->screen;
- int fd = screen->fd;
struct v3d_simulator_file *file = v3d_get_simulator_file_for_fd(fd);
int ret;
return ret;
if (sim_state.ver >= 41)
- v3d41_simulator_flush(sim_state.v3d, submit, file->gmp->ofs);
+ v3d41_simulator_submit_cl_ioctl(sim_state.v3d, submit, file->gmp->ofs);
else
- v3d33_simulator_flush(sim_state.v3d, submit, file->gmp->ofs);
+ v3d33_simulator_submit_cl_ioctl(sim_state.v3d, submit, file->gmp->ofs);
ret = v3d_simulator_unpin_bos(file, submit);
if (ret)
v3d_simulator_ioctl(int fd, unsigned long request, void *args)
{
switch (request) {
+ case DRM_IOCTL_V3D_SUBMIT_CL:
+ return v3d_simulator_submit_cl_ioctl(fd, args);
case DRM_IOCTL_V3D_CREATE_BO:
return v3d_simulator_create_bo_ioctl(fd, args);
case DRM_IOCTL_V3D_MMAP_BO:
void v3dX(simulator_init_regs)(struct v3d_hw *v3d);
int v3dX(simulator_get_param_ioctl)(struct v3d_hw *v3d,
struct drm_v3d_get_param *args);
-void v3dX(simulator_flush)(struct v3d_hw *v3d, struct drm_v3d_submit_cl *submit,
- uint32_t gmp_ofs);
+void v3dX(simulator_submit_cl_ioctl)(struct v3d_hw *v3d,
+ struct drm_v3d_submit_cl *args,
+ uint32_t gmp_offset);
const struct v3d_format *v3dX(get_format_desc)(enum pipe_format f);
void v3dX(get_internal_type_bpp_for_output_format)(uint32_t format,
uint32_t *type,
}
void
-v3dX(simulator_flush)(struct v3d_hw *v3d, struct drm_v3d_submit_cl *submit,
- uint32_t gmp_ofs)
+v3dX(simulator_submit_cl_ioctl)(struct v3d_hw *v3d,
+ struct drm_v3d_submit_cl *submit,
+ uint32_t gmp_ofs)
{
/* Completely reset the GMP. */
V3D_WRITE(V3D_GMP_0_CFG,