dri/nouveau: Split out the scratch helpers to a separate file.
[mesa.git] / src / mesa / drivers / dri / nouveau / nouveau_render.h
index bff0ccfd7624fc0afdb5a3da7c021ad430e9e1db..a9e8e90faf76c5bfb3fa77b8f3df5853b2266181 100644 (file)
 
 struct nouveau_array_state;
 
-typedef void (*dispatch_t)(GLcontext *, unsigned int, int, unsigned int);
-typedef unsigned (*extract_u_t)(struct nouveau_array_state *a, int i, int j);
-typedef float (*extract_f_t)(struct nouveau_array_state *a, int i, int j);
+typedef void (*dispatch_t)(struct gl_context *, unsigned int, int, unsigned int);
+typedef unsigned (*extract_u_t)(struct nouveau_array_state *, int, int);
+typedef float (*extract_f_t)(struct nouveau_array_state *, int, int);
 
 struct nouveau_attr_info {
        int vbo_index;
        int imm_method;
        int imm_fields;
 
-       void (*emit)(GLcontext *, struct nouveau_array_state *, const void *);
+       void (*emit)(struct gl_context *, struct nouveau_array_state *, const void *);
 };
 
 struct nouveau_array_state {
@@ -55,19 +55,9 @@ struct nouveau_array_state {
        extract_f_t extract_f;
 };
 
-#define RENDER_SCRATCH_COUNT 32
-#define RENDER_SCRATCH_SIZE 64*1024
-
-struct nouveau_scratch_state {
-       struct nouveau_bo *bo[RENDER_SCRATCH_COUNT];
-
-       int index;
-       int offset;
-       void *buf;
-};
-
 struct nouveau_swtnl_state {
        struct nouveau_bo *vbo;
+       unsigned offset;
        void *buf;
        unsigned vertex_count;
        GLenum primitive;
@@ -89,7 +79,6 @@ struct nouveau_render_state {
        int attr_count;
        int vertex_size;
 
-       struct nouveau_scratch_state scratch;
        struct nouveau_swtnl_state swtnl;
 };