summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/virgl
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-10-29 10:17:04 +0000
committerEmil Velikov <[email protected]>2015-10-30 17:37:09 +0000
commit493e410d552e97572ca9a492d23648f6a236e4a4 (patch)
treec9eba7f41222c8b8825e759b84ea47c78269145b /src/gallium/winsys/virgl
parent7154d48c6e02c6cb29d877a3fac9de98f7cb1b4a (diff)
virgl: unwrap the includes
Include what you want, rather than relying on a header foo.h N levels down the include chain, to provide something that you need. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/winsys/virgl')
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.c21
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.h12
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_public.h1
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c6
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c7
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h6
6 files changed, 27 insertions, 26 deletions
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index 0616de31309..c9cdf68c5d0 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -20,21 +20,26 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "virgl_drm_winsys.h"
-#include "virgl_drm_public.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <sys/ioctl.h>
+
+#include "os/os_mman.h"
+#include "os/os_time.h"
#include "util/u_memory.h"
#include "util/u_format.h"
+#include "util/u_hash_table.h"
+#include "util/u_inlines.h"
#include "state_tracker/drm_driver.h"
-#include "os/os_mman.h"
-#include "os/os_time.h"
-#include <sys/ioctl.h>
-#include <errno.h>
#include <xf86drm.h>
-#include <fcntl.h>
-#include <stdio.h>
#include "virtgpu_drm.h"
+#include "virgl_drm_winsys.h"
+#include "virgl_drm_public.h"
+
static inline boolean can_cache_resource(struct virgl_hw_res *res)
{
return res->cacheable == TRUE;
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h
index c83527206f5..da85ff87d2a 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h
@@ -24,22 +24,14 @@
#define VIRGL_DRM_WINSYS_H
#include <stdint.h>
-#include "pipe/p_compiler.h"
-#include "drm.h"
-
#include "os/os_thread.h"
+#include "pipe/p_state.h"
#include "util/list.h"
-#include "util/u_inlines.h"
-#include "util/u_hash_table.h"
-
-#include "pipe/p_screen.h"
-#include "pipe/p_context.h"
-#include "pipe/p_context.h"
-#include "virgl/virgl_hw.h"
#include "virgl/virgl_winsys.h"
struct pipe_fence_handle;
+struct util_hash_table;
struct virgl_hw_res {
struct pipe_reference reference;
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_public.h b/src/gallium/winsys/virgl/vtest/virgl_vtest_public.h
index 72336499b44..47379d9c735 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_public.h
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_public.h
@@ -24,6 +24,7 @@
#define VIRGL_VTEST_PUBLIC_H
struct virgl_winsys;
+struct sw_winsys;
struct virgl_winsys *virgl_vtest_winsys_wrap(struct sw_winsys *sws);
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
index 8fd6a510f70..e33475334ce 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c
@@ -20,8 +20,7 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "virgl_vtest_winsys.h"
-#include "virgl_vtest_public.h"
+
#include <sys/socket.h>
#include <errno.h>
#include <stdio.h>
@@ -34,6 +33,9 @@
/* connect to remote socket */
#define VTEST_SOCKET_NAME "/tmp/.virgl_test"
+#include "virgl_vtest_winsys.h"
+#include "virgl_vtest_public.h"
+
/* block read/write routines */
static int virgl_block_write(int fd, void *buf, int size)
{
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
index 28c4c62931b..6181d7c1976 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
@@ -21,13 +21,14 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
-#include "virgl_vtest_winsys.h"
-#include "virgl_vtest_public.h"
#include "util/u_memory.h"
#include "util/u_format.h"
#include "util/u_inlines.h"
-#include "state_tracker/drm_driver.h"
#include "os/os_time.h"
+#include "state_tracker/sw_winsys.h"
+
+#include "virgl_vtest_winsys.h"
+#include "virgl_vtest_public.h"
static void *virgl_vtest_resource_map(struct virgl_winsys *vws, struct virgl_hw_res *res);
static void virgl_vtest_resource_unmap(struct virgl_winsys *vws, struct virgl_hw_res *res);
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h
index fd8cb7a6368..72ca2b207b1 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h
@@ -27,15 +27,15 @@
#include "pipe/p_compiler.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
-#include "state_tracker/sw_winsys.h"
-#include "virgl/virgl_hw.h"
-#include "virgl/virgl_winsys.h"
#include "util/list.h"
#include "os/os_thread.h"
+#include "virgl/virgl_winsys.h"
#include "vtest_protocol.h"
struct pipe_fence_handle;
+struct sw_winsys;
+struct sw_displaytarget;
struct virgl_vtest_winsys {
struct virgl_winsys base;