diff options
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_cmdbuf.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_cmdbuf.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_context.c | 30 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_context.h | 29 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_emit.c | 2 |
5 files changed, 17 insertions, 48 deletions
diff --git a/src/mesa/drivers/dri/r600/r600_cmdbuf.c b/src/mesa/drivers/dri/r600/r600_cmdbuf.c index b1f78388e4..72a2ac1a8f 100644 --- a/src/mesa/drivers/dri/r600/r600_cmdbuf.c +++ b/src/mesa/drivers/dri/r600/r600_cmdbuf.c @@ -593,7 +593,7 @@ struct radeon_cs_manager * r600_radeon_cs_manager_legacy_ctor(struct radeon_cont return (struct radeon_cs_manager*)csm; } -void r600InitCmdBuf(r600ContextPtr r600) /* from rcommonInitCmdBuf */ +void r600InitCmdBuf(context_t *r600) /* from rcommonInitCmdBuf */ { radeonContextPtr rmesa = &r600->radeon; diff --git a/src/mesa/drivers/dri/r600/r600_cmdbuf.h b/src/mesa/drivers/dri/r600/r600_cmdbuf.h index 9ad73d9d3a..6c3ceb38fa 100644 --- a/src/mesa/drivers/dri/r600/r600_cmdbuf.h +++ b/src/mesa/drivers/dri/r600/r600_cmdbuf.h @@ -205,6 +205,6 @@ do { \ #define R600_OUT_BATCH_REGSEQ(reg, count) \ R600_OUT_BATCH_REGS((reg), (count)) -extern void r600InitCmdBuf(r600ContextPtr r600); +extern void r600InitCmdBuf(context_t *r600); #endif /* __R600_CMDBUF_H__ */ diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index 8baaa6aca8..a82dc7f36b 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -190,11 +190,11 @@ static void r600_vtbl_pre_emit_atoms(radeonContextPtr radeon) static void r600_fallback(GLcontext *ctx, GLuint bit, GLboolean mode) { - r600ContextPtr r600 = R600_CONTEXT(ctx); + context_t *context = R700_CONTEXT(ctx); if (mode) - r600->radeon.Fallback |= bit; + context->radeon.Fallback |= bit; else - r600->radeon.Fallback &= ~bit; + context->radeon.Fallback &= ~bit; } static void r600_init_vtbl(radeonContextPtr radeon) @@ -216,7 +216,7 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private); struct dd_function_table functions; - r600ContextPtr r600; + context_t *r600; GLcontext *ctx; int tcl_mode; @@ -225,7 +225,7 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, assert(screen); /* Allocate the R600 context */ - r600 = (r600ContextPtr) CALLOC(sizeof(*r600)); + r600 = (context_t*) CALLOC(sizeof(*r600)); if (!r600) return GL_FALSE; @@ -328,17 +328,15 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, _tnl_allow_vertex_fog(ctx, GL_TRUE); /* currently bogus data */ - if (screen->chip_flags & RADEON_CHIPSET_TCL) { - ctx->Const.VertexProgram.MaxInstructions = VSF_MAX_FRAGMENT_LENGTH / 4; - ctx->Const.VertexProgram.MaxNativeInstructions = - VSF_MAX_FRAGMENT_LENGTH / 4; - ctx->Const.VertexProgram.MaxNativeAttribs = 16; /* r420 */ - ctx->Const.VertexProgram.MaxTemps = 32; - ctx->Const.VertexProgram.MaxNativeTemps = - /*VSF_MAX_FRAGMENT_TEMPS */ 32; - ctx->Const.VertexProgram.MaxNativeParameters = 256; /* r420 */ - ctx->Const.VertexProgram.MaxNativeAddressRegs = 1; - } + ctx->Const.VertexProgram.MaxInstructions = VSF_MAX_FRAGMENT_LENGTH / 4; + ctx->Const.VertexProgram.MaxNativeInstructions = + VSF_MAX_FRAGMENT_LENGTH / 4; + ctx->Const.VertexProgram.MaxNativeAttribs = 16; /* r420 */ + ctx->Const.VertexProgram.MaxTemps = 32; + ctx->Const.VertexProgram.MaxNativeTemps = + /*VSF_MAX_FRAGMENT_TEMPS */ 32; + ctx->Const.VertexProgram.MaxNativeParameters = 256; /* r420 */ + ctx->Const.VertexProgram.MaxNativeAddressRegs = 1; ctx->Const.FragmentProgram.MaxNativeTemps = PFS_NUM_TEMP_REGS; ctx->Const.FragmentProgram.MaxNativeAttribs = 11; /* copy i915... */ diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h index 454cc7bad5..63c018dc9b 100644 --- a/src/mesa/drivers/dri/r600/r600_context.h +++ b/src/mesa/drivers/dri/r600/r600_context.h @@ -49,9 +49,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/colormac.h" struct r600_context; -typedef struct r600_context r600ContextRec; -typedef struct r600_context *r600ContextPtr; - typedef struct r600_context context_t; #include "main/mm.h" @@ -116,30 +113,6 @@ extern int hw_tcl_on; #define R600_FALLBACK_TCL 1 #define R600_FALLBACK_RAST 2 -/* r600_swtcl.c - */ -struct r600_swtcl_info { - /* - * Offset of the 4UB color data within a hardware (swtcl) vertex. - */ - GLuint coloroffset; - - /** - * Offset of the 3UB specular color data within a hardware (swtcl) vertex. - */ - GLuint specoffset; - - struct vertex_attribute{ - GLuint attr; - GLubyte format; - GLubyte dst_loc; - GLuint swizzle; - GLubyte write_mask; - } vert_attrs[VERT_ATTRIB_MAX]; - - GLubyte vertex_attr_count; -}; - enum { NO_SHIFT = 0, @@ -194,11 +167,9 @@ struct r600_context { GLboolean disable_lowimpact_fallback; - struct r600_swtcl_info swtcl; GLboolean vap_flush_needed; }; -#define R600_CONTEXT(ctx) ((r600ContextPtr)(ctx->DriverCtx)) #define R700_CONTEXT(ctx) ((context_t *)(ctx->DriverCtx)) #define GL_CONTEXT(context) ((GLcontext *)(context->radeon.glCtx)) diff --git a/src/mesa/drivers/dri/r600/r600_emit.c b/src/mesa/drivers/dri/r600/r600_emit.c index 711dfefd73..7f25cb1868 100644 --- a/src/mesa/drivers/dri/r600/r600_emit.c +++ b/src/mesa/drivers/dri/r600/r600_emit.c @@ -47,7 +47,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "r600_context.h" #include "r600_emit.h" -void r600EmitCacheFlush(r600ContextPtr rmesa) +void r600EmitCacheFlush(context_t *rmesa) { BATCH_LOCALS(&rmesa->radeon); /* |