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 <emil.l.velikov@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Emil Velikov
2015-10-29 10:17:04 +00:00
parent 7154d48c6e
commit 493e410d55
19 changed files with 73 additions and 57 deletions
+2
View File
@@ -21,9 +21,11 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "util/u_inlines.h"
#include "util/u_memory.h"
#include "virgl_context.h"
#include "virgl_resource.h"
#include "virgl_screen.h"
static void virgl_buffer_destroy(struct pipe_screen *screen,
struct pipe_resource *buf)
+2 -5
View File
@@ -36,19 +36,16 @@
#include "util/u_upload_mgr.h"
#include "util/u_blitter.h"
#include "tgsi/tgsi_text.h"
#include "indices/u_primconvert.h"
#include "pipebuffer/pb_buffer.h"
#include "state_tracker/graw.h"
#include "state_tracker/drm_driver.h"
#include "virgl_encode.h"
#include "virgl_context.h"
#include "virgl_protocol.h"
#include "virgl_resource.h"
#include "virgl_screen.h"
#include "state_tracker/sw_winsys.h"
struct pipe_screen encscreen;
static uint32_t next_handle;
uint32_t virgl_object_assign_handle(void)
+4 -6
View File
@@ -25,15 +25,13 @@
#include "pipe/p_state.h"
#include "pipe/p_context.h"
#include "virgl_protocol.h"
#include "virgl_screen.h"
#include "util/u_slab.h"
#include "util/list.h"
#include "indices/u_primconvert.h"
struct virgl_resource;
struct virgl_buffer;
struct pipe_screen;
struct tgsi_token;
struct u_upload_mgr;
struct virgl_cmd_buf;
struct virgl_sampler_view {
struct pipe_sampler_view base;
+6 -2
View File
@@ -25,11 +25,15 @@
#include "util/u_memory.h"
#include "util/u_math.h"
#include "pipe/p_state.h"
#include "virgl_encode.h"
#include "virgl_resource.h"
#include "tgsi/tgsi_dump.h"
#include "tgsi/tgsi_parse.h"
#include "virgl_context.h"
#include "virgl_encode.h"
#include "virgl_protocol.h"
#include "virgl_resource.h"
#include "virgl_screen.h"
static int virgl_encoder_write_cmd_dword(struct virgl_context *ctx,
uint32_t dword)
{
+11 -1
View File
@@ -23,7 +23,17 @@
#ifndef VIRGL_ENCODE_H
#define VIRGL_ENCODE_H
#include "virgl_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "virgl_winsys.h"
struct tgsi_token;
struct virgl_context;
struct virgl_resource;
struct virgl_sampler_view;
struct virgl_surface {
struct pipe_surface base;
uint32_t handle;
+2 -1
View File
@@ -23,9 +23,10 @@
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "virgl_resource.h"
#include "virgl_context.h"
#include "virgl_encode.h"
#include "virgl_protocol.h"
#include "virgl_resource.h"
struct virgl_query {
uint32_t handle;
+2 -1
View File
@@ -21,8 +21,9 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "util/u_inlines.h"
#include "virgl_resource.h"
#include "virgl_context.h"
#include "virgl_resource.h"
#include "virgl_screen.h"
bool virgl_res_needs_flush_wait(struct virgl_context *vctx,
struct virgl_resource *res,
+3 -1
View File
@@ -24,7 +24,7 @@
#ifndef VIRGL_RESOURCE_H
#define VIRGL_RESOURCE_H
#include "util/u_inlines.h"
#include "util/u_resource.h"
#include "util/u_range.h"
#include "util/list.h"
#include "util/u_transfer.h"
@@ -32,8 +32,10 @@
#include "virgl_hw.h"
#define VR_MAX_TEXTURE_2D_LEVELS 15
struct winsys_handle;
struct virgl_screen;
struct virgl_context;
struct virgl_resource {
struct u_resource u;
struct virgl_hw_res *hw_res;
-3
View File
@@ -28,10 +28,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
#include "draw/draw_context.h"
#include "vl/vl_decoder.h"
#include "vl/vl_video_buffer.h"
#include "state_tracker/sw_winsys.h"
#include "tgsi/tgsi_exec.h"
#include "virgl_screen.h"
+2 -5
View File
@@ -23,12 +23,9 @@
#ifndef VIRGL_H
#define VIRGL_H
#include "util/u_transfer.h"
#include "virgl_hw.h"
#include "virgl_winsys.h"
#include "pipe/p_screen.h"
#include "virgl_winsys.h"
struct virgl_screen {
struct pipe_screen base;
struct virgl_winsys *vws;
+2 -1
View File
@@ -20,10 +20,11 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "util/u_memory.h"
#include "virgl_context.h"
#include "virgl_encode.h"
#include "virgl_protocol.h"
#include "virgl_resource.h"
static struct pipe_stream_output_target *virgl_create_so_target(
+5 -3
View File
@@ -20,11 +20,13 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "util/u_memory.h"
#include "util/u_format.h"
#include "virgl_screen.h"
#include "virgl_resource.h"
#include "util/u_inlines.h"
#include "util/u_memory.h"
#include "virgl_context.h"
#include "virgl_resource.h"
#include "virgl_screen.h"
static void virgl_copy_region_with_blit(struct pipe_context *pipe,
struct pipe_resource *dst,
+4 -1
View File
@@ -23,8 +23,11 @@
#ifndef VIRGL_WINSYS_H
#define VIRGL_WINSYS_H
#include "pipe/p_compiler.h"
#include "pipe/p_defines.h"
#include "virgl_hw.h"
struct pipe_box;
struct pipe_fence_handle;
struct winsys_handle;
struct virgl_hw_res;
@@ -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 "util/u_memory.h"
#include "util/u_format.h"
#include "state_tracker/drm_driver.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 <sys/ioctl.h>
#include <errno.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 <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;
@@ -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;
@@ -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);
@@ -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)
{
@@ -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);
@@ -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;