#include "r200_context.h"
#include "r200_ioctl.h"
#include "r200_state.h"
-#include "r200_span.h"
#include "r200_pixel.h"
#include "r200_tex.h"
#include "r200_swtcl.h"
#include "r200_maos.h"
#include "r200_vertprog.h"
-#define need_GL_ARB_multisample
-#define need_GL_ARB_texture_compression
-#define need_GL_ARB_vertex_buffer_object
+#include "radeon_span.h"
+
#define need_GL_ARB_vertex_program
#define need_GL_ATI_fragment_shader
#define need_GL_EXT_blend_minmax
#define need_GL_EXT_fog_coord
-#define need_GL_EXT_multi_draw_arrays
#define need_GL_EXT_secondary_color
#define need_GL_EXT_blend_equation_separate
#define need_GL_EXT_blend_func_separate
*/
const struct dri_extension card_extensions[] =
{
- { "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL },
{ "GL_ARB_texture_border_clamp", NULL },
- { "GL_ARB_texture_compression", GL_ARB_texture_compression_functions },
{ "GL_ARB_texture_env_add", NULL },
{ "GL_ARB_texture_env_combine", NULL },
{ "GL_ARB_texture_env_dot3", NULL },
{ "GL_ARB_texture_env_crossbar", NULL },
{ "GL_ARB_texture_mirrored_repeat", NULL },
- { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions },
{ "GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions },
{ "GL_EXT_blend_subtract", NULL },
{ "GL_EXT_fog_coord", GL_EXT_fog_coord_functions },
- { "GL_EXT_multi_draw_arrays", GL_EXT_multi_draw_arrays_functions },
{ "GL_EXT_secondary_color", GL_EXT_secondary_color_functions },
{ "GL_EXT_stencil_wrap", NULL },
{ "GL_EXT_texture_edge_clamp", NULL },
}
}
-
-static void r200_vtbl_flush(GLcontext *ctx)
-{
- R200_FIREVERTICES(R200_CONTEXT(ctx));
-}
-
-static void r200_vtbl_flush_vertices(radeonContextPtr rmesa)
-{
- R200_FIREVERTICES(((r200ContextPtr)rmesa));
-}
-
-static void r200_vtbl_set_all_dirty(GLcontext *ctx)
-{
- r200ContextPtr rmesa = R200_CONTEXT(ctx);
- rmesa->hw.all_dirty = GL_TRUE;
-}
-
static void r200_vtbl_emit_cs_header(struct radeon_cs *cs, radeonContextPtr rmesa)
{
}
-static void r200_vtbl_emit_state(radeonContextPtr rmesa)
-{
- r200EmitState((r200ContextPtr)rmesa);
-}
-
static void r200_init_vtbl(radeonContextPtr radeon)
{
radeon->vtbl.get_lock = r200_get_lock;
radeon->vtbl.update_viewport_offset = r200UpdateViewportOffset;
- radeon->vtbl.flush = r200_vtbl_flush;
- radeon->vtbl.flush_vertices = r200_vtbl_flush_vertices;
- radeon->vtbl.set_all_dirty = r200_vtbl_set_all_dirty;
radeon->vtbl.update_draw_buffer = r200UpdateDrawBuffer;
radeon->vtbl.emit_cs_header = r200_vtbl_emit_cs_header;
- radeon->vtbl.emit_state = r200_vtbl_emit_state;
+ radeon->vtbl.swtcl_flush = r200_swtcl_flush;
}
rmesa->radeon.texture_depth = ( screen->cpp == 4 ) ?
DRI_CONF_TEXTURE_DEPTH_32 : DRI_CONF_TEXTURE_DEPTH_16;
- rmesa->swtcl.RenderIndex = ~0;
- rmesa->hw.all_dirty = 1;
+ rmesa->radeon.swtcl.RenderIndex = ~0;
+ rmesa->radeon.hw.all_dirty = 1;
/* Set the maximum texture size small enough that we can guarentee that
* all texture units can bind a maximal texture and have all of them in
ctx->Const.VertexProgram.MaxNativeParameters = R200_VSF_MAX_PARAM;
ctx->Const.VertexProgram.MaxNativeAddressRegs = 1;
+ ctx->Const.MaxDrawBuffers = 1;
+
/* Initialize the software rasterizer and helper modules.
*/
_swrast_CreateContext( ctx );
#endif
/* plug in a few more device driver functions */
/* XXX these should really go right after _mesa_init_driver_functions() */
+ radeonInitSpanFuncs( ctx );
r200InitPixelFuncs( ctx );
- r200InitSpanFuncs( ctx );
r200InitTnlFuncs( ctx );
r200InitState( rmesa );
r200InitSwtcl( ctx );
/* check if we're deleting the currently bound context */
if (rmesa == current) {
- R200_FIREVERTICES( rmesa );
+ radeon_firevertices(&rmesa->radeon);
_mesa_make_current(NULL, NULL, NULL);
}
r200DestroySwtcl( rmesa->radeon.glCtx );
r200ReleaseArrays( rmesa->radeon.glCtx, ~0 );
- if (rmesa->dma.current) {
- radeonReleaseDmaRegion(rmesa);
+ if (rmesa->radeon.dma.current) {
+ radeonReleaseDmaRegion( &rmesa->radeon );
rcommonFlushCmdBuf( &rmesa->radeon, __FUNCTION__ );
}