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.h59
1 files changed, 34 insertions, 25 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h
index 87e4479da3..77fe13a9cd 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h
@@ -36,25 +36,24 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "mtypes.h"
#include "tnl/t_vertex.h"
+#include "nouveau_fbo.h"
#include "nouveau_screen.h"
-#include "nouveau_state_cache.h"
-#include "nouveau_buffers.h"
#include "nouveau_shader.h"
+#include "nouveau_state_cache.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;
- u_int32_t current;
- u_int32_t put;
- u_int32_t free;
- u_int32_t max;
-}
-nouveau_fifo;
+typedef struct nouveau_fifo {
+ struct drm_nouveau_channel_alloc drm;
+ uint32_t *pushbuf;
+ uint32_t *mmio;
+ uint32_t *notifier_block;
+ uint32_t current;
+ uint32_t put;
+ uint32_t free;
+ uint32_t max;
+} nouveau_fifo_t;
#define TAG(x) nouveau##x
#include "tnl_dd/t_dd_vertex.h"
@@ -83,10 +82,16 @@ typedef struct nouveau_hw_func_t {
GLboolean (*InitCard)(struct nouveau_context *);
/* Update buffer offset/pitch/format */
GLboolean (*BindBuffers)(struct nouveau_context *, int num_color,
- nouveau_renderbuffer **color,
- nouveau_renderbuffer *depth);
+ nouveau_renderbuffer_t **color,
+ nouveau_renderbuffer_t *depth);
/* Update anything that depends on the window position/size */
void (*WindowMoved)(struct nouveau_context *);
+
+ /* Update projection matrix */
+ void (*UpdateProjectionMatrix)(GLcontext *);
+
+ /* Update modelview matrix (used for lighting and vertex weight) */
+ void (*UpdateModelviewMatrix)(GLcontext *);
} nouveau_hw_func;
typedef struct nouveau_context {
@@ -94,24 +99,21 @@ typedef struct nouveau_context {
GLcontext *glCtx;
/* The per-context fifo */
- nouveau_fifo fifo;
-
- /* The read-only regs */
- volatile unsigned char* mmio;
+ nouveau_fifo_t fifo;
/* Physical addresses of AGP/VRAM apertures */
uint64_t vram_phys;
uint64_t vram_size;
- uint64_t agp_phys;
- uint64_t agp_size;
+ uint64_t gart_phys;
+ uint64_t gart_size;
/* Channel synchronisation */
- nouveau_notifier *syncNotifier;
+ struct drm_nouveau_notifierobj_alloc *syncNotifier;
/* ARB_occlusion_query / EXT_timer_query */
GLuint query_object_max;
GLboolean * query_alloc;
- nouveau_notifier *queryNotifier;
+ struct drm_nouveau_notifierobj_alloc *queryNotifier;
/* Additional hw-specific functions */
nouveau_hw_func hw_func;
@@ -127,6 +129,10 @@ typedef struct nouveau_context {
struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX];
GLuint vertex_attr_count;
+ /* Color and depth renderbuffers */
+ nouveau_renderbuffer_t *color_buffer;
+ nouveau_renderbuffer_t *depth_buffer;
+
/* Color buffer clear value */
uint32_t clear_color_value;
@@ -150,7 +156,7 @@ typedef struct nouveau_context {
GLuint numClipRects;
drm_clip_rect_t *pClipRects;
drm_clip_rect_t osClipRect;
- GLuint drawX, drawY;
+ GLuint drawX, drawY, drawW, drawH;
/* The rendering context information */
GLenum current_primitive; /* the current primitive enum */
@@ -165,7 +171,7 @@ typedef struct nouveau_context {
nouveauShader *passthrough_fp;
nouveauScreenRec *screen;
- drm_nouveau_sarea_t *sarea;
+ struct drm_nouveau_sarea *sarea;
__DRIcontextPrivate *driContext; /* DRI context */
__DRIscreenPrivate *driScreen; /* DRI screen */
@@ -220,6 +226,9 @@ extern GLboolean nouveauMakeCurrent( __DRIcontextPrivate *driContextPriv,
extern GLboolean nouveauUnbindContext( __DRIcontextPrivate *driContextPriv );
+extern void nouveauDoSwapBuffers(nouveauContextPtr nmesa,
+ __DRIdrawablePrivate *dPriv);
+
extern void nouveauSwapBuffers(__DRIdrawablePrivate *dPriv);
extern void nouveauCopySubBuffer(__DRIdrawablePrivate *dPriv,