#ifndef _INTEL_INIT_H_
#define _INTEL_INIT_H_
+#include <stdbool.h>
#include <sys/time.h>
#include "dri_util.h"
+#include "intel_bufmgr.h"
+#include "i915_drm.h"
#include "xmlconfig.h"
-#include "i830_common.h"
-
-/* XXX: change name or eliminate to avoid conflict with "struct
- * intel_region"!!!
- */
-typedef struct {
- 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 pixels */
- unsigned int tiled;
-} intelRegion;
-
-typedef struct
+
+struct intel_screen
{
- intelRegion front;
- intelRegion back;
- intelRegion rotated;
- intelRegion depth;
- intelRegion tex;
-
int deviceID;
- int width;
- int height;
- int mem; /* unused */
+ int gen;
- int cpp; /* for front and back buffers */
- int fbFormat;
+ int max_gl_core_version;
+ int max_gl_compat_version;
+ int max_gl_es1_version;
+ int max_gl_es2_version;
- int logTextureGranularity;
-
- __DRIscreenPrivate *driScrnPriv;
- unsigned int sarea_priv_offset;
+ __DRIscreen *driScrnPriv;
- int drmMinor;
+ bool no_hw;
- int irq_active;
- int allow_batchbuffer;
+ /*
+ * The hardware hiz and separate stencil fields are needed in intel_screen,
+ * rather than solely in brw_context, because glXCreatePbuffer and
+ * glXCreatePixmap are not passed a GLXContext.
+ */
+ bool hw_has_separate_stencil;
+ bool hw_must_use_separate_stencil;
-/* struct matrix23 rotMatrix; */
+ bool hw_has_llc;
+ bool hw_has_swizzling;
- int current_rotation; /* 0, 90, 180 or 270 */
- int rotatedWidth, rotatedHeight;
+ dri_bufmgr *bufmgr;
/**
- * Configuration cache with default values for all contexts
+ * A unique ID for shader programs.
*/
- driOptionCache optionCache;
-} intelScreenPrivate;
-
-
-extern GLboolean
-intelMapScreenRegions(__DRIscreenPrivate *sPriv);
+ unsigned program_id;
-extern void
-intelUnmapScreenRegions(intelScreenPrivate *intelScreen);
+ /**
+ * Configuration cache with default values for all contexts
+ */
+ driOptionCache optionCache;
+};
-extern void
-intelUpdateScreenFromSAREA(intelScreenPrivate *intelScreen,
- volatile drmI830Sarea *sarea);
+extern void intelDestroyContext(__DRIcontext * driContextPriv);
-extern void
-intelDestroyContext(__DRIcontextPrivate *driContextPriv);
+extern GLboolean intelUnbindContext(__DRIcontext * driContextPriv);
extern GLboolean
-intelUnbindContext(__DRIcontextPrivate *driContextPriv);
-
-extern GLboolean
-intelMakeCurrent(__DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv);
-
-extern void
-intelSwapBuffers(__DRIdrawablePrivate *dPriv);
+intelMakeCurrent(__DRIcontext * driContextPriv,
+ __DRIdrawable * driDrawPriv,
+ __DRIdrawable * driReadPriv);
-extern void
-intelCopySubBuffer( __DRIdrawablePrivate *dPriv,
- int x, int y, int w, int h );
+double get_time(void);
+void aub_dump_bmp(struct gl_context *ctx);
#endif