I suppose we could inline this and use macro to fetch out __LINE__ and stuff in case we run into trouble
with other compilers ... GLUE!
*/
+#if 1
#define WARN_ONCE(a, ...) { \
static int warn##__LINE__=1; \
if(warn##__LINE__){ \
warn##__LINE__=0;\
} \
}
+#else
+#define WARN_ONCE(a, ...) {}
+#endif
typedef GLuint uint32_t;
typedef GLubyte uint8_t;
void (*flush) (r300ContextPtr);
char *buf0_address; /* start of buf[0], for index calcs */
- GLuint nr_released_bufs; /* flush after so many buffers released */
+
+ /* Number of "in-flight" DMA buffers, i.e. the number of buffers
+ * for which a DISCARD command is currently queued in the command buffer.
+ */
+ GLuint nr_released_bufs;
};
/* Texture related */
#ifdef EXP_C
struct r300_state_atom lsf; /* line stipple factor */
#endif
- struct r300_state_atom dummy[4];
struct r300_state_atom unk4260; /* (4260) */
struct r300_state_atom unk4274; /* (4274) */
struct r300_state_atom unk4288; /* (4288) */
struct r300_state_atom vpi; /* vp instructions */
struct r300_state_atom vpp; /* vp parameters */
struct r300_state_atom vps; /* vertex point size (?) */
-
/* 8 texture units */
/* the state is grouped by function and not by
texture unit. This makes single unit updates
int aos_count;
GLuint *Elts;
- struct r300_dma_region elt_ao;
+ struct r300_dma_region elt_dma;
GLuint render_inputs; /* actual render inputs that R300 was configured for.
- They are the same as tnl->render_inputs for fixed pipeline */
+ They are the same as tnl->render_inputs for fixed pipeline */
+ struct {
+ int transform_offset; /* Transform matrix offset, -1 if none */
+ } vap_param; /* vertex processor parameter allocation - tells where to write parameters */
int hw_stencil;
};
#define R300_CONTEXT(ctx) ((r300ContextPtr)(ctx->DriverCtx))
+static __inline GLuint r300PackColor( GLuint cpp,
+ GLubyte r, GLubyte g,
+ GLubyte b, GLubyte a )
+{
+ switch ( cpp ) {
+ case 2:
+ return PACK_COLOR_565( r, g, b );
+ case 4:
+ return PACK_COLOR_8888( r, g, b, a );
+ default:
+ return 0;
+ }
+}
extern void r300DestroyContext(__DRIcontextPrivate * driContextPriv);
extern GLboolean r300CreateContext(const __GLcontextModes * glVisual,
__DRIcontextPrivate * driContextPriv,