#include "nouveau_state_cache.h"
#include "nouveau_buffers.h"
#include "nouveau_shader.h"
+#include "nouveau_sync.h"
#include "xmlconfig.h"
typedef struct nouveau_fifo_t{
+ int channel;
u_int32_t* buffer;
u_int32_t* mmio;
u_int32_t put_base;
/* The read-only regs */
volatile unsigned char* mmio;
+ /* The per-channel notifier block */
+ volatile void *notifier_block;
+
/* Physical addresses of AGP/VRAM apertures */
uint64_t vram_phys;
- uint64_t agp_phys;
+ uint64_t vram_size;
+ uint64_t gart_phys;
+ uint64_t gart_size;
+
+ /* Channel synchronisation */
+ struct drm_nouveau_notifier_alloc *syncNotifier;
+
+ /* ARB_occlusion_query / EXT_timer_query */
+ GLuint query_object_max;
+ GLboolean * query_alloc;
+ struct drm_nouveau_notifier_alloc *queryNotifier;
/* Additional hw-specific functions */
nouveau_hw_func hw_func;
struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX];
GLuint vertex_attr_count;
- /* Depth/stencil clear state */
+ /* Color buffer clear value */
+ uint32_t clear_color_value;
+
+ /* Depth/stencil clear value */
uint32_t clear_value;
/* Light state */
/* Cliprects information */
GLuint numClipRects;
drm_clip_rect_t *pClipRects;
+ drm_clip_rect_t osClipRect;
+ GLuint drawX, drawY, drawW, drawH;
/* The rendering context information */
GLenum current_primitive; /* the current primitive enum */
nvsFunc FPfunc;
nouveauShader *current_fragprog;
nouveauShader *current_vertprog;
+ nouveauShader *passthrough_vp;
+ nouveauShader *passthrough_fp;
nouveauScreenRec *screen;
- drm_nouveau_sarea_t *sarea;
+ struct drm_nouveau_sarea *sarea;
__DRIcontextPrivate *driContext; /* DRI context */
__DRIscreenPrivate *driScreen; /* DRI screen */
/* Configuration cache */
driOptionCache optionCache;
- /* vblank stuff */
- uint32_t vblank_flags;
- uint32_t vblank_seq;
+ /* vblank stuff */
+ uint32_t vblank_flags;
+ uint32_t vblank_seq;
- GLuint new_state;
- GLuint new_render_state;
- GLuint render_index;
- GLmatrix viewport;
- GLfloat depth_scale;
+ GLuint new_state;
+ GLuint new_render_state;
+ GLuint render_index;
+ GLmatrix viewport;
+ GLfloat depth_scale;
}nouveauContextRec, *nouveauContextPtr;
extern void nouveauCopySubBuffer(__DRIdrawablePrivate *dPriv,
int x, int y, int w, int h);
+/* Debugging utils: */
+extern int NOUVEAU_DEBUG;
+
+#define DEBUG_SHADERS 0x00000001
+#define DEBUG_MEM 0x00000002
+#define DEBUG_BUFFEROBJ 0x00000004
+
#endif /* __NOUVEAU_CONTEXT_H__ */