#include "r600_emit.h"
#include "radeon_bocs_wrapper.h"
-#include "r700_chip.h"
#include "r700_state.h"
#include "r700_ioctl.h"
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
}
- r600->disable_lowimpact_fallback =
- driQueryOptionb(&r600->radeon.optionCache,
- "disable_lowimpact_fallback");
radeon_fbo_init(&r600->radeon);
radeonInitSpanFuncs( ctx );
context_t *context = ctx ? R700_CONTEXT(ctx) : NULL;
if (context)
- (context->chipobj.DestroyChipObj)(context->chipobj.pvChipObj);
+ FREE(context->hw.pStateList);
}
#include "main/mtypes.h"
#include "main/colormac.h"
+#include "r700_chip.h"
+
struct r600_context;
typedef struct r600_context context_t;
GLuint mask;
} offset_modifiers;
-typedef struct chip_object
-{
- void *pvChipObj;
-
- /* ------------ OUT ------------------- */
- GLboolean (*DestroyChipObj)(GLcontext * ctx);
-
-} chip_object;
-
/**
* \brief R600 context structure.
*/
struct r600_context {
struct radeon_context radeon; /* parent class, must be first */
- /* ------ */
- chip_object chipobj;
+ /* ------ */
+ R700_CHIP_CONTEXT hw;
/* Vertex buffers
*/
GLvector4f dummy_attrib[_TNL_ATTRIB_MAX];
GLvector4f *temp_attrib[_TNL_ATTRIB_MAX];
- GLboolean disable_lowimpact_fallback;
-
- GLboolean vap_flush_needed;
};
#define R700_CONTEXT(ctx) ((context_t *)(ctx->DriverCtx))
__DRIcontextPrivate * driContextPriv,
void *sharedContextPrivate);
+#define R700_CONTEXT_STATES(context) ((R700_CHIP_CONTEXT *)(&context->hw))
+
+extern GLboolean r700InitChipObject(context_t *context);
+extern GLboolean r700SendContextStates(context_t *context);
+extern int r700SetupStreams(GLcontext * ctx);
+extern void r700SetupVTXConstants(GLcontext * ctx,
+ unsigned int nStreamID,
+ void * pAos,
+ unsigned int size, /* number of elements in vector */
+ unsigned int stride,
+ unsigned int Count); /* number of vectors in stream */
+
#define RADEON_D_CAPTURE 0
#define RADEON_D_PLAYBACK 1
#define RADEON_D_PLAYBACK_RAW 2
#include "main/imports.h"
#include "r600_context.h"
-#include "r700_chip.h"
#include "r700_debug.h"
#include "r700_assembler.h"
#include "r600_context.h"
#include "r600_cmdbuf.h"
-#include "r700_chip.h"
#include "r700_state.h"
#include "r700_tex.h"
#include "r700_oglprog.h"
#include "r700_vertprog.h"
#include "r700_ioctl.h"
-static GLboolean r700DestroyChipObj(GLcontext * ctx)
-{
- context_t * context = R700_CONTEXT(ctx);
- R700_CHIP_CONTEXT *r700;
-
- if(NULL == context->chipobj.pvChipObj)
- {
- return GL_TRUE;
- }
-
- r700 = (R700_CHIP_CONTEXT *)(context->chipobj.pvChipObj);
-
- FREE(r700->pStateList);
-
- FREE(r700);
-
- return GL_TRUE;
-}
-
#define LINK_STATES(reg) \
do \
{ \
{
ContextState * pStateListWork;
- R700_CHIP_CONTEXT *r700 = CALLOC( sizeof(R700_CHIP_CONTEXT) );
-
- context->chipobj.pvChipObj = (void*)r700;
-
- context->chipobj.DestroyChipObj = r700DestroyChipObj;
+ R700_CHIP_CONTEXT *r700 = &context->hw;
/* init state list */
r700->pStateList = (ContextState*) MALLOC (sizeof(ContextState)*sizeof(R700_CHIP_CONTEXT)/sizeof(unsigned int));
} R700_CHIP_CONTEXT;
-#define R700_CONTEXT_STATES(context) ((R700_CHIP_CONTEXT *)(context->chipobj.pvChipObj))
-
-extern GLboolean r700InitChipObject(context_t *context);
-extern GLboolean r700SendContextStates(context_t *context);
-extern int r700SetupStreams(GLcontext * ctx);
-extern void r700SetupVTXConstants(GLcontext * ctx,
- unsigned int nStreamID,
- void * pAos,
- unsigned int size, /* number of elements in vector */
- unsigned int stride,
- unsigned int Count); /* number of vectors in stream */
-
#endif /* _R700_CHIP_H_ */
#include "main/enums.h"
#include "r600_context.h"
-#include "r700_chip.h"
#include "r700_shaderinst.h"
#include "r600_emit.h"
#include "r600_context.h"
#include "r600_cmdbuf.h"
-#include "r700_chip.h"
#include "r700_fragprog.h"
#include "r700_debug.h"
context_t *context = R700_CONTEXT(ctx);
BATCH_LOCALS(&context->radeon);
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(context->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
struct r700_fragment_program *fp = (struct r700_fragment_program *)
(ctx->FragmentProgram._Current);
#include "radeon_lock.h"
#include "r600_context.h"
-#include "r700_chip.h"
#include "r700_ioctl.h"
#include "r700_clear.h"
#include "r600_context.h"
-#include "r700_chip.h"
#include "r700_oglprog.h"
#include "r700_fragprog.h"
#include "r700_vertprog.h"
#include "r600_context.h"
#include "r600_cmdbuf.h"
-#include "r700_chip.h"
#include "r700_tex.h"
#include "r700_vertprog.h"
{
context_t *context = R700_CONTEXT(ctx);
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(context->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
GLuint exportCount;
{
unsigned int i;
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(context->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
#if 0 /* to be enabled */
for(i=0; i<R700_TEXTURE_NUMBERUNITS; i++)
{
struct tnl_pipeline_stage *stage)
{
context_t *context = R700_CONTEXT(ctx);
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(context->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
#if 1
BATCH_LOCALS(&context->radeon);
#include "main/glheader.h"
#include "r600_context.h"
-#include "r700_chip.h"
#include "r700_debug.h"
#include "r700_shader.h"
#include "r600_context.h"
-#include "r700_chip.h"
#include "r700_state.h"
#include "r700_fragprog.h"
{
context_t *context = R700_CONTEXT(ctx);
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(context->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
_swrast_InvalidateState(ctx, new_state);
_swsetup_InvalidateState(ctx, new_state);
{
context_t *context = R700_CONTEXT(ctx);
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(context->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
if (ctx->Depth.Test)
{
static void r700UpdateCulling(GLcontext * ctx)
{
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(R700_CONTEXT(ctx)->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&R700_CONTEXT(ctx)->hw);
CLEARbit(r700->PA_SU_SC_MODE_CNTL.u32All, FACE_bit);
CLEARbit(r700->PA_SU_SC_MODE_CNTL.u32All, CULL_FRONT_bit);
{
context_t *context = R700_CONTEXT(ctx);
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(context->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
__DRIdrawablePrivate *dPriv = context->radeon.dri.drawable;
tz = v[MAT_TZ] * scale;
/* TODO : Need DMA flush as well. */
-#if 0 /* to be enabled */
- if(context->cmdbuf.count_used > 0)
- {
- (context->chipobj.FlushCmdBuffer)(context);
- }
-#endif /* to be enabled */
+
r700->PA_CL_VPORT_XSCALE.u32All = *((unsigned int*)(&sx));
r700->PA_CL_VPORT_XOFFSET.u32All = *((unsigned int*)(&tx));
void r700SetRenderTarget(context_t *context)
{
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(context->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
struct radeon_renderbuffer *rrb;
unsigned int nPitchInPixel;
{
context_t *context = R700_CONTEXT(ctx);
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(context->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
/* Turn off vgt reuse */
r700->VGT_REUSE_OFF.u32All = 0;
#include "radeon_common.h"
#include "r600_context.h"
-#include "r700_chip.h"
#include "r700_state.h"
#include "r600_context.h"
#include "r600_cmdbuf.h"
-#include "r700_chip.h"
#include "r700_debug.h"
#include "r700_vertprog.h"
BATCH_LOCALS(&context->radeon);
- R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(context->chipobj.pvChipObj);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
struct r700_vertex_program *vp
= (struct r700_vertex_program *)ctx->VertexProgram._Current;