vc4: Restructure the simulator mode

Graphics / Mesa 3D Graphics Library / Mesa - Eric Anholt [anholt.net] - 21 October 2016 16:12 UTC

Rather than having simulator mode changes scattered around vc4_bufmgr.c and vc4_screen.c, make vc4_bufmgr.c just call a vc4_simulator_ioctl, which then dispatches to a corresponding implementation.

This will give the simulator support a centralized place to do tricks like storing most BOs directly in simulator memory rather than copying in and out.

This leaves special casing of mmaping BOs and execution, because of the winsys mapping.

7808767 vc4: Restructure the simulator mode.
src/gallium/drivers/vc4/vc4_bufmgr.c | 98 +++++++---------------
src/gallium/drivers/vc4/vc4_context.h | 11 +++
src/gallium/drivers/vc4/vc4_program.c | 3 -
src/gallium/drivers/vc4/vc4_screen.c | 15 +---
src/gallium/drivers/vc4/vc4_simulator.c | 139 +++++++++++++++++++++++++++++++
5 files changed, 182 insertions(+), 84 deletions(-)

Upstream: cgit.freedesktop.org


  • Share