#ifndef _INTEL_INIT_H_
#define _INTEL_INIT_H_
+#include <stdbool.h>
#include <sys/time.h>
#include "dri_util.h"
-#include "intel_rotate.h"
-#include "i830_common.h"
+#include "intel_bufmgr.h"
+#include "i915_drm.h"
#include "xmlconfig.h"
-#include "dri_bufmgr.h"
-/* XXX: change name or eliminate to avoid conflict with "struct
- * intel_region"!!!
- */
-typedef struct
+struct intel_screen
{
- drm_handle_t handle;
- drmSize size; /* region size in bytes */
- char *map; /* memory map */
- int offset; /* from start of video mem, in bytes */
- int pitch; /* row stride, in bytes */
- unsigned int bo_handle; /* buffer object id if available, or -1 */
-} intelRegion;
-
-typedef struct
-{
- intelRegion front;
- intelRegion back;
- intelRegion third;
- intelRegion rotated;
- intelRegion depth;
- intelRegion tex;
-
- struct intel_region *front_region;
- struct intel_region *back_region;
- struct intel_region *third_region;
- struct intel_region *depth_region;
- struct intel_region *rotated_region;
-
int deviceID;
- int width;
- int height;
- int mem; /* unused */
-
- int cpp; /* for front and back buffers */
-/* int bitsPerPixel; */
- int fbFormat; /* XXX FBO: this is obsolete - remove after i830 updates */
+ int gen;
- int logTextureGranularity;
+ int max_gl_core_version;
+ int max_gl_compat_version;
+ int max_gl_es1_version;
+ int max_gl_es2_version;
- __DRIscreenPrivate *driScrnPriv;
- unsigned int sarea_priv_offset;
+ __DRIscreen *driScrnPriv;
- int drmMinor;
+ bool no_hw;
- int irq_active;
- int allow_batchbuffer;
+ bool hw_has_swizzling;
- struct matrix23 rotMatrix;
-
- int current_rotation; /* 0, 90, 180 or 270 */
- int rotatedWidth, rotatedHeight;
+ bool no_vbo;
+ dri_bufmgr *bufmgr;
/**
* Configuration cache with default values for all contexts
*/
driOptionCache optionCache;
+};
- dri_bufmgr *bufmgr;
- unsigned int maxBatchSize;
-
- /**
- * This value indicates that the kernel memory manager is being used
- * instead of the fake client-side memory manager.
- */
- GLboolean ttm;
-} intelScreenPrivate;
+extern void intelDestroyContext(__DRIcontext * driContextPriv);
-
-
-extern GLboolean intelMapScreenRegions(__DRIscreenPrivate * sPriv);
-
-extern void intelUnmapScreenRegions(intelScreenPrivate * intelScreen);
-
-extern void
-intelUpdateScreenFromSAREA(intelScreenPrivate * intelScreen,
- drmI830Sarea * sarea);
-
-extern void intelDestroyContext(__DRIcontextPrivate * driContextPriv);
-
-extern GLboolean intelUnbindContext(__DRIcontextPrivate * driContextPriv);
+extern GLboolean intelUnbindContext(__DRIcontext * driContextPriv);
extern GLboolean
-intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
- __DRIdrawablePrivate * driDrawPriv,
- __DRIdrawablePrivate * driReadPriv);
-
-extern void intelSwapBuffers(__DRIdrawablePrivate * dPriv);
-
-extern void
-intelCopySubBuffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h);
-
-extern struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen);
+intelMakeCurrent(__DRIcontext * driContextPriv,
+ __DRIdrawable * driDrawPriv,
+ __DRIdrawable * driReadPriv);
-extern void
-intelUpdateScreenRotation(__DRIscreenPrivate * sPriv, drmI830Sarea * sarea);
+double get_time(void);
+void aub_dump_bmp(struct gl_context *ctx);
#endif