2 Copyright © 2011, The AROS Development Team. All rights reserved.
6 #ifndef INTEL_AROS_WINSYS_H
7 #define INTEL_AROS_WINSYS_H
9 #include <proto/alib.h>
10 #include <proto/exec.h>
11 #include <exec/types.h>
12 #include <exec/lists.h>
13 #include <exec/nodes.h>
15 #include "i915/i915_batchbuffer.h"
16 #include "hidd/gallium.h"
18 #define MAGIC 0x12345678
19 #define RELOC_MAGIC 0x87654321
20 #define MAGIC_WARNING(b) if(b->magic != MAGIC ){ bug("[GMA winsys] %s: Bad MAGIC in buffer %p\n",__func__,b);};
21 #define IF_BAD_MAGIC(b) MAGIC_WARNING(b);if(b->magic != MAGIC )
23 #define MAX_RELOCS 1024
27 struct i915_winsys base
;
28 struct pipe_screen
*pscreen
;
29 size_t max_batch_size
;
32 static INLINE
struct aros_winsys
*
33 aros_winsys(struct i915_winsys
*iws
)
35 return (struct aros_winsys
*)iws
;
40 struct i915_winsys_buffer
*buf
;
41 enum i915_winsys_buffer_usage usage
;
46 struct aros_batchbuffer
48 struct i915_winsys_batchbuffer base
;
52 struct reloc relocs
[MAX_RELOCS
];
56 static INLINE
struct aros_batchbuffer
*
57 aros_batchbuffer(struct i915_winsys_batchbuffer
*batch
)
59 return (struct aros_batchbuffer
*)batch
;
62 struct i915_winsys_buffer
{
75 struct aros_winsys
*winsys_create();
76 boolean
buffer_is_busy(struct i915_winsys
*iws
,struct i915_winsys_buffer
*buf
);
77 void destroy_unused_buffers();