summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nouveau_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_context.h')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h
index 947e95d18b..211d4e0a6d 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h
@@ -38,6 +38,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "nouveau_screen.h"
#include "nouveau_state_cache.h"
+#include "nouveau_buffers.h"
#include "nouveau_shader.h"
#include "xmlconfig.h"
@@ -75,6 +76,17 @@ typedef void (*nouveau_line_func)( struct nouveau_context*,
typedef void (*nouveau_point_func)( struct nouveau_context*,
nouveauVertex * );
+typedef struct nouveau_hw_func_t {
+ /* Initialise any card-specific non-GL related state */
+ GLboolean (*InitCard)(struct nouveau_context *);
+ /* Update buffer offset/pitch/format */
+ GLboolean (*BindBuffers)(struct nouveau_context *, int num_color,
+ nouveau_renderbuffer **color,
+ nouveau_renderbuffer *depth);
+ /* Update anything that depends on the window position/size */
+ void (*WindowMoved)(struct nouveau_context *);
+} nouveau_hw_func;
+
typedef struct nouveau_context {
/* Mesa context */
GLcontext *glCtx;
@@ -85,6 +97,13 @@ typedef struct nouveau_context {
/* The read-only regs */
volatile unsigned char* mmio;
+ /* Physical addresses of AGP/VRAM apertures */
+ uint64_t vram_phys;
+ uint64_t agp_phys;
+
+ /* Additional hw-specific functions */
+ nouveau_hw_func hw_func;
+
/* FIXME : do we want to put all state into a separate struct ? */
/* State for tris */
GLuint color_offset;
@@ -132,6 +151,7 @@ typedef struct nouveau_context {
__DRIcontextPrivate *driContext; /* DRI context */
__DRIscreenPrivate *driScreen; /* DRI screen */
__DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */
+ GLint lastStamp;
drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;