summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2004-03-17 20:50:12 +0000
committerIan Romanick <idr@us.ibm.com>2004-03-17 20:50:12 +0000
commit16c704e8f7cd9b7d7c5d6667cb38e016e3b608d1 (patch)
treed3b07d3be78f379d76d36b17b06d3b74a8aa1079
parentaae2fde0e6758769c11611d0951b2cb0e4ee24eb (diff)
Convert all uses of CARD32 and CARD8 to int32_t and int8_t.
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_context.h38
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_render.c6
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_span.c8
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_state.c34
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_tex.c8
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_tritmp.h16
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.h2
-rw-r--r--src/mesa/drivers/dri/r128/r128_context.h6
-rw-r--r--src/mesa/drivers/dri/r128/r128_ioctl.c2
-rw-r--r--src/mesa/drivers/dri/r128/r128_ioctl.h6
-rw-r--r--src/mesa/drivers/dri/r128/r128_tex.c6
-rw-r--r--src/mesa/drivers/dri/r128/r128_tex.h2
-rw-r--r--src/mesa/drivers/dri/r128/r128_texmem.c6
-rw-r--r--src/mesa/drivers/dri/r128/r128_texobj.h4
-rw-r--r--src/mesa/drivers/dri/r128/r128_vb.c2
-rw-r--r--src/mesa/drivers/dri/r128/server/r128.h138
-rw-r--r--src/mesa/drivers/dri/r128/server/r128_dri.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_screen.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_screen.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_ioctl.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c2
25 files changed, 154 insertions, 154 deletions
diff --git a/src/mesa/drivers/dri/gamma/gamma_context.h b/src/mesa/drivers/dri/gamma/gamma_context.h
index 028c0d8a0f..233f5ff064 100644
--- a/src/mesa/drivers/dri/gamma/gamma_context.h
+++ b/src/mesa/drivers/dri/gamma/gamma_context.h
@@ -160,13 +160,13 @@ struct gamma_texture_object_t {
int internalFormat;
} image[GAMMA_TEX_MAXLEVELS];
- CARD32 TextureBaseAddr[GAMMA_TEX_MAXLEVELS];
- CARD32 TextureAddressMode;
- CARD32 TextureColorMode;
- CARD32 TextureFilterMode;
- CARD32 TextureFormat;
- CARD32 TextureReadMode;
- CARD32 TextureBorderColor;
+ int32_t TextureBaseAddr[GAMMA_TEX_MAXLEVELS];
+ int32_t TextureAddressMode;
+ int32_t TextureColorMode;
+ int32_t TextureFilterMode;
+ int32_t TextureFormat;
+ int32_t TextureReadMode;
+ int32_t TextureBorderColor;
};
#define GAMMA_NO_PALETTE 0x0
@@ -300,18 +300,18 @@ struct gamma_context {
unsigned int lastStamp;
- CARD32 ClearColor;
- CARD32 Color;
- CARD32 DitherMode;
- CARD32 ClearDepth;
- CARD32 FogMode;
- CARD32 AreaStippleMode;
- CARD32 LBReadFormat;
- CARD32 LBWriteFormat;
- CARD32 LineMode;
- CARD32 PointMode;
- CARD32 TriangleMode;
- CARD32 AntialiasMode;
+ int32_t ClearColor;
+ int32_t Color;
+ int32_t DitherMode;
+ int32_t ClearDepth;
+ int32_t FogMode;
+ int32_t AreaStippleMode;
+ int32_t LBReadFormat;
+ int32_t LBWriteFormat;
+ int32_t LineMode;
+ int32_t PointMode;
+ int32_t TriangleMode;
+ int32_t AntialiasMode;
GLfloat ViewportScaleX;
GLfloat ViewportScaleY;
GLfloat ViewportScaleZ;
diff --git a/src/mesa/drivers/dri/gamma/gamma_render.c b/src/mesa/drivers/dri/gamma/gamma_render.c
index a0b8a5dc18..aa2e284a4f 100644
--- a/src/mesa/drivers/dri/gamma/gamma_render.c
+++ b/src/mesa/drivers/dri/gamma/gamma_render.c
@@ -74,7 +74,7 @@ static void gamma_emit( GLcontext *ctx, GLuint start, GLuint end)
WRITEF(gmesa->buf, Tr4, tc0[i][2]);
WRITEF(gmesa->buf, Tt4, tc0[i][0]);
WRITEF(gmesa->buf, Ts4, tc0[i][1]);
- WRITE(gmesa->buf, PackedColor4, *(CARD32*)col[i]);
+ WRITE(gmesa->buf, PackedColor4, *(int32_t*)col[i]);
WRITEF(gmesa->buf, Vw, coord[i][3]);
WRITEF(gmesa->buf, Vz, coord[i][2]);
WRITEF(gmesa->buf, Vy, coord[i][1]);
@@ -85,7 +85,7 @@ static void gamma_emit( GLcontext *ctx, GLuint start, GLuint end)
CHECK_DMA_BUFFER(gmesa, 7);
WRITEF(gmesa->buf, Tt2, tc0[i][0]);
WRITEF(gmesa->buf, Ts2, tc0[i][1]);
- WRITE(gmesa->buf, PackedColor4, *(CARD32*)col[i]);
+ WRITE(gmesa->buf, PackedColor4, *(int32_t*)col[i]);
WRITEF(gmesa->buf, Vw, coord[i][3]);
WRITEF(gmesa->buf, Vz, coord[i][2]);
WRITEF(gmesa->buf, Vy, coord[i][1]);
@@ -94,7 +94,7 @@ static void gamma_emit( GLcontext *ctx, GLuint start, GLuint end)
} else {
for (i=start; i < end; i++) {
CHECK_DMA_BUFFER(gmesa, 4);
- WRITE(gmesa->buf, PackedColor4, *(CARD32*)col[i]);
+ WRITE(gmesa->buf, PackedColor4, *(int32_t*)col[i]);
WRITEF(gmesa->buf, Vz, coord[i][2]);
WRITEF(gmesa->buf, Vy, coord[i][1]);
WRITEF(gmesa->buf, Vx3, coord[i][0]);
diff --git a/src/mesa/drivers/dri/gamma/gamma_span.c b/src/mesa/drivers/dri/gamma/gamma_span.c
index 8d523c4b6f..854172ebd3 100644
--- a/src/mesa/drivers/dri/gamma/gamma_span.c
+++ b/src/mesa/drivers/dri/gamma/gamma_span.c
@@ -207,10 +207,10 @@ static void gammaReadRGBASpan8888( const GLcontext *ctx,
{
gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);
gammaScreenPtr gammascrn = gmesa->gammaScreen;
- CARD32 dwords1, dwords2, i = 0;
+ int32_t dwords1, dwords2, i = 0;
char *src = (char *)rgba[0];
GLuint read = n * gammascrn->cpp; /* Number of bytes we are expecting */
- CARD32 data;
+ int32_t data;
FLUSH_DMA_BUFFER(gmesa);
CHECK_DMA_BUFFER(gmesa, 16);
@@ -232,8 +232,8 @@ static void gammaReadRGBASpan8888( const GLcontext *ctx,
moredata:
- dwords1 = *(volatile CARD32*)(void *)(((CARD8*)gammascrn->regions[0].map) + (GlintOutFIFOWords));
- dwords2 = *(volatile CARD32*)(void *)(((CARD8*)gammascrn->regions[2].map) + (GlintOutFIFOWords));
+ dwords1 = *(volatile int32_t*)(void *)(((int8_t*)gammascrn->regions[0].map) + (GlintOutFIFOWords));
+ dwords2 = *(volatile int32_t*)(void *)(((int8_t*)gammascrn->regions[2].map) + (GlintOutFIFOWords));
if (dwords1) {
memcpy(src, (char*)gammascrn->regions[1].map + 0x1000, dwords1 << 2);
diff --git a/src/mesa/drivers/dri/gamma/gamma_state.c b/src/mesa/drivers/dri/gamma/gamma_state.c
index 813ced474b..6b87e44a01 100644
--- a/src/mesa/drivers/dri/gamma/gamma_state.c
+++ b/src/mesa/drivers/dri/gamma/gamma_state.c
@@ -44,9 +44,9 @@
static void gammaUpdateAlphaMode( GLcontext *ctx )
{
gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);
- CARD32 a = gmesa->AlphaTestMode;
- CARD32 b = gmesa->AlphaBlendMode;
- CARD32 f = gmesa->AB_FBReadMode_Save = 0;
+ int32_t a = gmesa->AlphaTestMode;
+ int32_t b = gmesa->AlphaBlendMode;
+ int32_t f = gmesa->AB_FBReadMode_Save = 0;
GLubyte refByte = (GLint) (ctx->Color.AlphaRef * 255.0);
a &= ~(AT_CompareMask | AT_RefValueMask);
@@ -419,10 +419,10 @@ static void gammaDDClear( GLcontext *ctx, GLbitfield mask, GLboolean all,
static void gammaUpdateZMode( GLcontext *ctx )
{
gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);
- CARD32 z = gmesa->DepthMode;
- CARD32 delta = gmesa->DeltaMode;
- CARD32 window = gmesa->Window;
- CARD32 lbread = gmesa->LBReadMode;
+ int32_t z = gmesa->DepthMode;
+ int32_t delta = gmesa->DeltaMode;
+ int32_t window = gmesa->Window;
+ int32_t lbread = gmesa->LBReadMode;
z &= ~DM_CompareMask;
@@ -538,9 +538,9 @@ static void gammaDDFlush( GLcontext *ctx )
static void gammaUpdateFogAttrib( GLcontext *ctx )
{
gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);
- CARD32 f = gmesa->FogMode;
- CARD32 g = gmesa->GeometryMode;
- CARD32 d = gmesa->DeltaMode;
+ int32_t f = gmesa->FogMode;
+ int32_t g = gmesa->GeometryMode;
+ int32_t d = gmesa->DeltaMode;
if (ctx->Fog.Enabled) {
f |= FogModeEnable;
@@ -634,7 +634,7 @@ static void gammaDDPointSize( GLcontext *ctx, GLfloat size )
static void gammaUpdatePolygon( GLcontext *ctx )
{
gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);
- CARD32 g = gmesa->GeometryMode;
+ int32_t g = gmesa->GeometryMode;
g &= ~(GM_PolyOffsetFillEnable | GM_PolyOffsetPointEnable |
GM_PolyOffsetLineEnable);
@@ -752,7 +752,7 @@ static void gammaDDScissor( GLcontext *ctx,
static void gammaUpdateCull( GLcontext *ctx )
{
gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);
- CARD32 g = gmesa->GeometryMode;
+ int32_t g = gmesa->GeometryMode;
g &= ~(GM_PolyCullMask | GM_FFMask);
@@ -972,8 +972,8 @@ static void gammaDDLightModelfv( GLcontext *ctx, GLenum pname,
static void gammaDDShadeModel( GLcontext *ctx, GLenum mode )
{
gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);
- CARD32 g = gmesa->GeometryMode;
- CARD32 c = gmesa->ColorDDAMode;
+ int32_t g = gmesa->GeometryMode;
+ int32_t c = gmesa->ColorDDAMode;
g &= ~GM_ShadingMask;
c &= ~ColorDDAShadingMask;
@@ -1240,7 +1240,7 @@ static void gammaDDEnable( GLcontext *ctx, GLenum cap, GLboolean state )
case GL_DITHER:
do {
- CARD32 d = gmesa->DitherMode;
+ int32_t d = gmesa->DitherMode;
FLUSH_BATCH( gmesa );
if ( state ) {
@@ -1272,7 +1272,7 @@ static void gammaDDEnable( GLcontext *ctx, GLenum cap, GLboolean state )
#if ENABLELIGHTING
case GL_LIGHTING:
do {
- CARD32 l = gmesa->LightingMode;
+ int32_t l = gmesa->LightingMode;
FLUSH_BATCH( gmesa );
if ( state ) {
@@ -1290,7 +1290,7 @@ static void gammaDDEnable( GLcontext *ctx, GLenum cap, GLboolean state )
case GL_COLOR_MATERIAL:
do {
- CARD32 m = gmesa->MaterialMode;
+ int32_t m = gmesa->MaterialMode;
FLUSH_BATCH( gmesa );
if ( state ) {
diff --git a/src/mesa/drivers/dri/gamma/gamma_tex.c b/src/mesa/drivers/dri/gamma/gamma_tex.c
index 4af99e4da4..e4814e6daf 100644
--- a/src/mesa/drivers/dri/gamma/gamma_tex.c
+++ b/src/mesa/drivers/dri/gamma/gamma_tex.c
@@ -32,8 +32,8 @@ static GLuint gammaComputeLodBias(GLfloat bias)
static void gammaSetTexWrapping(gammaTextureObjectPtr t,
GLenum wraps, GLenum wrapt)
{
- CARD32 t1 = t->TextureAddressMode;
- CARD32 t2 = t->TextureReadMode;
+ int32_t t1 = t->TextureAddressMode;
+ int32_t t2 = t->TextureReadMode;
t1 &= ~(TAM_SWrap_Mask | TAM_TWrap_Mask);
t2 &= ~(TRM_UWrap_Mask | TRM_VWrap_Mask);
@@ -58,8 +58,8 @@ static void gammaSetTexFilter(gammaContextPtr gmesa,
GLenum minf, GLenum magf,
GLfloat bias)
{
- CARD32 t1 = t->TextureAddressMode;
- CARD32 t2 = t->TextureReadMode;
+ int32_t t1 = t->TextureAddressMode;
+ int32_t t2 = t->TextureReadMode;
t2 &= ~(TRM_Mag_Mask | TRM_Min_Mask);
diff --git a/src/mesa/drivers/dri/gamma/gamma_tritmp.h b/src/mesa/drivers/dri/gamma/gamma_tritmp.h
index d0dbd1d6e7..3a6d8d2071 100644
--- a/src/mesa/drivers/dri/gamma/gamma_tritmp.h
+++ b/src/mesa/drivers/dri/gamma/gamma_tritmp.h
@@ -1,8 +1,8 @@
static void TAG(gamma_point)( gammaContextPtr gmesa,
const gammaVertex *v0 )
{
- CARD32 vColor;
- CARD32 vBegin;
+ int32_t vColor;
+ int32_t vBegin;
vBegin = gmesa->Begin | B_PrimType_Points;
@@ -55,8 +55,8 @@ static void TAG(gamma_line)( gammaContextPtr gmesa,
const gammaVertex *v0,
const gammaVertex *v1 )
{
- CARD32 vColor;
- CARD32 vBegin;
+ int32_t vColor;
+ int32_t vBegin;
vBegin = gmesa->Begin | B_PrimType_Lines;
@@ -164,8 +164,8 @@ static void TAG(gamma_triangle)( gammaContextPtr gmesa,
const gammaVertex *v1,
const gammaVertex *v2 )
{
- CARD32 vColor;
- CARD32 vBegin;
+ int32_t vColor;
+ int32_t vBegin;
vBegin = gmesa->Begin | B_PrimType_Triangles;
@@ -309,8 +309,8 @@ static void TAG(gamma_quad)( gammaContextPtr gmesa,
const gammaVertex *v2,
const gammaVertex *v3 )
{
- CARD32 vColor;
- CARD32 vBegin;
+ int32_t vColor;
+ int32_t vBegin;
vBegin = gmesa->Begin | B_PrimType_Quads;
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.h b/src/mesa/drivers/dri/mga/mga_xmesa.h
index b8140425c5..b9b4f8b0ae 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.h
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.h
@@ -144,7 +144,7 @@ do { \
#define MGA_BASE( reg ) ((unsigned long)(mmesa->mgaScreen->mmio.map))
#define MGA_ADDR( reg ) (MGA_BASE(reg) + reg)
-#define MGA_DEREF( reg ) *(volatile CARD32 *)MGA_ADDR( reg )
+#define MGA_DEREF( reg ) *(volatile int32_t *)MGA_ADDR( reg )
#define MGA_READ( reg ) MGA_DEREF( reg )
#define MGA_WRITE( reg, val ) do { MGA_DEREF( reg ) = val; } while (0)
diff --git a/src/mesa/drivers/dri/r128/r128_context.h b/src/mesa/drivers/dri/r128/r128_context.h
index de258da3f5..e7600d775c 100644
--- a/src/mesa/drivers/dri/r128/r128_context.h
+++ b/src/mesa/drivers/dri/r128/r128_context.h
@@ -135,9 +135,9 @@ struct r128_context {
GLuint num_verts;
GLubyte *verts;
- CARD32 ClearColor; /* Color used to clear color buffer */
- CARD32 ClearDepth; /* Value used to clear depth buffer */
- CARD32 ClearStencil; /* Value used to clear stencil */
+ int32_t ClearColor; /* Color used to clear color buffer */
+ int32_t ClearDepth; /* Value used to clear depth buffer */
+ int32_t ClearStencil; /* Value used to clear stencil */
/* Map GL texture units onto hardware
*/
diff --git a/src/mesa/drivers/dri/r128/r128_ioctl.c b/src/mesa/drivers/dri/r128/r128_ioctl.c
index e34173725c..dcd024154a 100644
--- a/src/mesa/drivers/dri/r128/r128_ioctl.c
+++ b/src/mesa/drivers/dri/r128/r128_ioctl.c
@@ -229,7 +229,7 @@ static void delay( void ) {
static int r128WaitForFrameCompletion( r128ContextPtr rmesa )
{
unsigned char *R128MMIO = rmesa->r128Screen->mmio.map;
- CARD32 frame;
+ int32_t frame;
int i;
int wait = 0;
diff --git a/src/mesa/drivers/dri/r128/r128_ioctl.h b/src/mesa/drivers/dri/r128/r128_ioctl.h
index db1c4986ee..4e08676452 100644
--- a/src/mesa/drivers/dri/r128/r128_ioctl.h
+++ b/src/mesa/drivers/dri/r128/r128_ioctl.h
@@ -41,7 +41,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r128_reg.h"
#include "r128_lock.h"
-#define R128_BUFFER_MAX_DWORDS (R128_BUFFER_SIZE / sizeof(CARD32))
+#define R128_BUFFER_MAX_DWORDS (R128_BUFFER_SIZE / sizeof(int32_t))
extern drmBufPtr r128GetBufferLocked( r128ContextPtr rmesa );
@@ -49,7 +49,7 @@ extern void r128FlushVerticesLocked( r128ContextPtr rmesa );
static __inline void *r128AllocDmaLow( r128ContextPtr rmesa, int bytes )
{
- CARD32 *head;
+ int32_t *head;
if ( !rmesa->vert_buf ) {
LOCK_HARDWARE( rmesa );
@@ -62,7 +62,7 @@ static __inline void *r128AllocDmaLow( r128ContextPtr rmesa, int bytes )
UNLOCK_HARDWARE( rmesa );
}
- head = (CARD32 *)((char *)rmesa->vert_buf->address + rmesa->vert_buf->used);
+ head = (int32_t *)((char *)rmesa->vert_buf->address + rmesa->vert_buf->used);
rmesa->vert_buf->used += bytes;
return head;
}
diff --git a/src/mesa/drivers/dri/r128/r128_tex.c b/src/mesa/drivers/dri/r128/r128_tex.c
index 1fd12456e1..44a6a415b5 100644
--- a/src/mesa/drivers/dri/r128/r128_tex.c
+++ b/src/mesa/drivers/dri/r128/r128_tex.c
@@ -462,9 +462,9 @@ static void r128TexEnv( GLcontext *ctx, GLenum target,
case GL_TEXTURE_LOD_BIAS:
{
- CARD32 t = rmesa->setup.tex_cntl_c;
+ int32_t t = rmesa->setup.tex_cntl_c;
GLint bias;
- CARD32 b;
+ int32_t b;
/* GTH: This isn't exactly correct, but gives good results up to a
* certain point. It is better than completely ignoring the LOD
@@ -484,7 +484,7 @@ static void r128TexEnv( GLcontext *ctx, GLenum target,
bias = 127;
}
- b = (CARD32)bias & 0xff;
+ b = (int32_t)bias & 0xff;
t &= ~R128_LOD_BIAS_MASK;
t |= (b << R128_LOD_BIAS_SHIFT);
diff --git a/src/mesa/drivers/dri/r128/r128_tex.h b/src/mesa/drivers/dri/r128/r128_tex.h
index 00012c5104..58daa3336d 100644
--- a/src/mesa/drivers/dri/r128/r128_tex.h
+++ b/src/mesa/drivers/dri/r128/r128_tex.h
@@ -70,7 +70,7 @@ extern void r128InitTextureFuncs( struct dd_function_table *functions );
#define R128PACKCOLOR4444( r, g, b, a ) \
((((a) & 0xf0) << 8) | (((r) & 0xf0) << 4) | ((g) & 0xf0) | ((b) >> 4))
-static __inline__ CARD32 r128PackColor( GLuint cpp,
+static __inline__ int32_t r128PackColor( GLuint cpp,
GLubyte r, GLubyte g,
GLubyte b, GLubyte a )
{
diff --git a/src/mesa/drivers/dri/r128/r128_texmem.c b/src/mesa/drivers/dri/r128/r128_texmem.c
index 595d8d7513..5c030e892f 100644
--- a/src/mesa/drivers/dri/r128/r128_texmem.c
+++ b/src/mesa/drivers/dri/r128/r128_texmem.c
@@ -86,7 +86,7 @@ static void uploadSubImage( r128ContextPtr rmesa, r128TexObjPtr t,
int imageWidth, imageHeight;
int remaining, rows;
int format, dwords;
- CARD32 pitch, offset;
+ int32_t pitch, offset;
int i;
/* Ensure we have a valid texture to upload */
@@ -202,7 +202,7 @@ static void uploadSubImage( r128ContextPtr rmesa, r128TexObjPtr t,
remaining > 0 ;
remaining -= rows, y += rows, i++ )
{
- CARD32 *dst;
+ int32_t *dst;
drmBufPtr buffer;
assert(image->Data);
@@ -213,7 +213,7 @@ static void uploadSubImage( r128ContextPtr rmesa, r128TexObjPtr t,
LOCK_HARDWARE( rmesa );
buffer = r128GetBufferLocked( rmesa );
- dst = (CARD32 *)((char *)buffer->address + R128_HOSTDATA_BLIT_OFFSET);
+ dst = (int32_t *)((char *)buffer->address + R128_HOSTDATA_BLIT_OFFSET);
/* Copy the next chunck of the texture image into the blit buffer */
{
diff --git a/src/mesa/drivers/dri/r128/r128_texobj.h b/src/mesa/drivers/dri/r128/r128_texobj.h
index 057602d0a0..68e34b2682 100644
--- a/src/mesa/drivers/dri/r128/r128_texobj.h
+++ b/src/mesa/drivers/dri/r128/r128_texobj.h
@@ -53,14 +53,14 @@ typedef struct r128_tex_obj r128TexObj, *r128TexObjPtr;
struct r128_tex_obj {
driTextureObject base;
- CARD32 bufAddr; /* Offset to start of locally
+ int32_t bufAddr; /* Offset to start of locally
shared texture block */
GLuint age;
r128TexImage image[R128_MAX_TEXTURE_LEVELS]; /* Image data for all
mipmap levels */
- CARD32 textureFormat; /* Actual hardware format */
+ int32_t textureFormat; /* Actual hardware format */
drm_r128_texture_regs_t setup; /* Setup regs for texture */
};
diff --git a/src/mesa/drivers/dri/r128/r128_vb.c b/src/mesa/drivers/dri/r128/r128_vb.c
index e09bedacea..541d7ecd02 100644
--- a/src/mesa/drivers/dri/r128/r128_vb.c
+++ b/src/mesa/drivers/dri/r128/r128_vb.c
@@ -462,7 +462,7 @@ void r128_emit_indexed_verts( GLcontext *ctx, GLuint start, GLuint count )
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint vertex_size = rmesa->vertex_size * 4;
GLuint bufsz = (count-start) * vertex_size;
- CARD32 *dest;
+ int32_t *dest;
rmesa->vertex_low = (rmesa->vertex_low + 63) & ~63; /* alignment */
rmesa->vertex_last_prim = rmesa->vertex_low;
diff --git a/src/mesa/drivers/dri/r128/server/r128.h b/src/mesa/drivers/dri/r128/server/r128.h
index fba01d6d60..0e3588c3f3 100644
--- a/src/mesa/drivers/dri/r128/server/r128.h
+++ b/src/mesa/drivers/dri/r128/server/r128.h
@@ -114,82 +114,82 @@ typedef struct { /* All values in XCLKS */
typedef struct {
/* Common registers */
- CARD32 ovr_clr;
- CARD32 ovr_wid_left_right;
- CARD32 ovr_wid_top_bottom;
- CARD32 ov0_scale_cntl;
- CARD32 mpp_tb_config;
- CARD32 mpp_gp_config;
- CARD32 subpic_cntl;
- CARD32 viph_control;
- CARD32 i2c_cntl_1;
- CARD32 gen_int_cntl;
- CARD32 cap0_trig_cntl;
- CARD32 cap1_trig_cntl;
- CARD32 bus_cntl;
- CARD32 config_cntl;
+ int32_t ovr_clr;
+ int32_t ovr_wid_left_right;
+ int32_t ovr_wid_top_bottom;
+ int32_t ov0_scale_cntl;
+ int32_t mpp_tb_config;
+ int32_t mpp_gp_config;
+ int32_t subpic_cntl;
+ int32_t viph_control;
+ int32_t i2c_cntl_1;
+ int32_t gen_int_cntl;
+ int32_t cap0_trig_cntl;
+ int32_t cap1_trig_cntl;
+ int32_t bus_cntl;
+ int32_t config_cntl;
/* Other registers to save for VT switches */
- CARD32 dp_datatype;
- CARD32 gen_reset_cntl;
- CARD32 clock_cntl_index;
- CARD32 amcgpio_en_reg;
- CARD32 amcgpio_mask;
+ int32_t dp_datatype;
+ int32_t gen_reset_cntl;
+ int32_t clock_cntl_index;
+ int32_t amcgpio_en_reg;
+ int32_t amcgpio_mask;
/* CRTC registers */
- CARD32 crtc_gen_cntl;
- CARD32 crtc_ext_cntl;
- CARD32 dac_cntl;
- CARD32 crtc_h_total_disp;
- CARD32 crtc_h_sync_strt_wid;
- CARD32 crtc_v_total_disp;
- CARD32 crtc_v_sync_strt_wid;
- CARD32 crtc_offset;
- CARD32 crtc_offset_cntl;
- CARD32 crtc_pitch;
+ int32_t crtc_gen_cntl;
+ int32_t crtc_ext_cntl;
+ int32_t dac_cntl;
+ int32_t crtc_h_total_disp;
+ int32_t crtc_h_sync_strt_wid;
+ int32_t crtc_v_total_disp;
+ int32_t crtc_v_sync_strt_wid;
+ int32_t crtc_offset;
+ int32_t crtc_offset_cntl;
+ int32_t crtc_pitch;
/* CRTC2 registers */
- CARD32 crtc2_gen_cntl;
+ int32_t crtc2_gen_cntl;
/* Flat panel registers */
- CARD32 fp_crtc_h_total_disp;
- CARD32 fp_crtc_v_total_disp;
- CARD32 fp_gen_cntl;
- CARD32 fp_h_sync_strt_wid;
- CARD32 fp_horz_stretch;
- CARD32 fp_panel_cntl;
- CARD32 fp_v_sync_strt_wid;
- CARD32 fp_vert_stretch;
- CARD32 lvds_gen_cntl;
- CARD32 tmds_crc;
- CARD32 tmds_transmitter_cntl;
+ int32_t fp_crtc_h_total_disp;
+ int32_t fp_crtc_v_total_disp;
+ int32_t fp_gen_cntl;
+ int32_t fp_h_sync_strt_wid;
+ int32_t fp_horz_stretch;
+ int32_t fp_panel_cntl;
+ int32_t fp_v_sync_strt_wid;
+ int32_t fp_vert_stretch;
+ int32_t lvds_gen_cntl;
+ int32_t tmds_crc;
+ int32_t tmds_transmitter_cntl;
/* Computed values for PLL */
- CARD32 dot_clock_freq;
- CARD32 pll_output_freq;
+ int32_t dot_clock_freq;
+ int32_t pll_output_freq;
int feedback_div;
int post_div;
/* PLL registers */
- CARD32 ppll_ref_div;
- CARD32 ppll_div_3;
- CARD32 htotal_cntl;
+ int32_t ppll_ref_div;
+ int32_t ppll_div_3;
+ int32_t htotal_cntl;
/* DDA register */
- CARD32 dda_config;
- CARD32 dda_on_off;
+ int32_t dda_config;
+ int32_t dda_on_off;
/* Pallet */
GLboolean palette_valid;
- CARD32 palette[256];
+ int32_t palette[256];
} R128SaveRec, *R128SavePtr;
#ifndef _SOLO
typedef struct {
CARD16 reference_freq;
CARD16 reference_div;
- CARD32 min_pll_freq;
- CARD32 max_pll_freq;
+ int32_t min_pll_freq;
+ int32_t max_pll_freq;
CARD16 xclk;
} R128PLLRec, *R128PLLPtr;
@@ -220,16 +220,16 @@ typedef struct {
unsigned char *MMIO; /* Map of MMIO region */
unsigned char *FB; /* Map of frame buffer */
- CARD32 MemCntl;
- CARD32 BusCntl;
+ int32_t MemCntl;
+ int32_t BusCntl;
unsigned long FbMapSize; /* Size of frame buffer, in bytes */
int Flags; /* Saved copy of mode flags */
#ifndef _SOLO
- CARD8 BIOSDisplay; /* Device the BIOS is set to display to */
+ int8_t BIOSDisplay; /* Device the BIOS is set to display to */
GLboolean HasPanelRegs; /* Current chip can connect to a FP */
- CARD8 *VBIOS; /* Video BIOS for mode validation on FPs */
+ int8_t *VBIOS; /* Video BIOS for mode validation on FPs */
int FPBIOSstart; /* Start of the flat panel info */
#endif
/* Computed values for FPs */
@@ -273,7 +273,7 @@ typedef struct {
/* Computed values for Rage 128 */
int pitch;
int datatype;
- CARD32 dp_gui_master_cntl;
+ int32_t dp_gui_master_cntl;
/* Saved values for ScreenToScreenCopy */
int xdir;
@@ -394,18 +394,18 @@ typedef struct {
int log2TexGran;
/* Saved scissor values */
- CARD32 sc_left;
- CARD32 sc_right;
- CARD32 sc_top;
- CARD32 sc_bottom;
+ int32_t sc_left;
+ int32_t sc_right;
+ int32_t sc_top;
+ int32_t sc_bottom;
- CARD32 re_top_left;
- CARD32 re_width_height;
+ int32_t re_top_left;
+ int32_t re_width_height;
- CARD32 aux_sc_cntl;
+ int32_t aux_sc_cntl;
int irq;
- CARD32 gen_int_cntl;
+ int32_t gen_int_cntl;
GLboolean DMAForXv;
#endif
@@ -420,7 +420,7 @@ typedef struct {
GLboolean isDFP;
GLboolean isPro2;
I2CBusPtr pI2CBus;
- CARD32 DDCReg;
+ int32_t DDCReg;
#endif
} R128InfoRec, *R128InfoPtr;
@@ -489,7 +489,7 @@ do { \
#define R128_VERBOSE 0
-#define RING_LOCALS CARD32 *__head; int __count;
+#define RING_LOCALS int32_t *__head; int __count;
#define R128CCE_REFRESH(pScrn, info) \
do { \
@@ -530,12 +530,12 @@ do { \
fprintf(stderr, \
"ADVANCE_RING() used: %d+%d=%d/%d\n", \
info->indirectBuffer->used - info->indirectStart, \
- __count * sizeof(CARD32), \
+ __count * sizeof(int32_t), \
info->indirectBuffer->used - info->indirectStart + \
- __count * sizeof(CARD32), \
+ __count * sizeof(int32_t), \
info->indirectBuffer->total - info->indirectStart ); \
} \
- info->indirectBuffer->used += __count * (int)sizeof(CARD32); \
+ info->indirectBuffer->used += __count * (int)sizeof(int32_t); \
} while (0)
#define OUT_RING( x ) do { \
diff --git a/src/mesa/drivers/dri/r128/server/r128_dri.c b/src/mesa/drivers/dri/r128/server/r128_dri.c
index b62f375966..f065bbd8ec 100644
--- a/src/mesa/drivers/dri/r128/server/r128_dri.c
+++ b/src/mesa/drivers/dri/r128/server/r128_dri.c
@@ -323,7 +323,7 @@ static GLboolean R128DRIPciInit(const DRIDriverContext *ctx)
{
R128InfoPtr info = ctx->driverPrivate;
unsigned char *R128MMIO = ctx->MMIOAddress;
- CARD32 chunk;
+ int32_t chunk;
int ret;
int flags;
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c
index 8f1d9fe59c..bae1fdff15 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.c
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.c
@@ -312,11 +312,11 @@ void r200AllocDmaRegionVerts( r200ContextPtr rmesa,
* SwapBuffers with client-side throttling
*/
-static CARD32 r200GetLastFrame(r200ContextPtr rmesa)
+static int32_t r200GetLastFrame(r200ContextPtr rmesa)
{
drm_radeon_getparam_t gp;
int ret;
- CARD32 frame;
+ int32_t frame;
gp.param = RADEON_PARAM_LAST_FRAME;
gp.value = (int *)&frame;
diff --git a/src/mesa/drivers/dri/r200/r200_screen.c b/src/mesa/drivers/dri/r200/r200_screen.c
index 3b4b343d94..29f259dcc8 100644
--- a/src/mesa/drivers/dri/r200/r200_screen.c
+++ b/src/mesa/drivers/dri/r200/r200_screen.c
@@ -375,7 +375,7 @@ r200CreateScreen( __DRIscreenPrivate *sPriv )
__driUtilMessage("%s: drmMap (2) failed\n", __FUNCTION__ );
return NULL;
}
- screen->scratch = (__volatile__ CARD32 *)
+ screen->scratch = (__volatile__ int32_t *)
((GLubyte *)screen->status.map + RADEON_SCRATCH_REG_OFFSET);
screen->buffers = drmMapBufs( sPriv->fd );
diff --git a/src/mesa/drivers/dri/r200/r200_screen.h b/src/mesa/drivers/dri/r200/r200_screen.h
index 5e0ee68565..b10d6c286e 100644
--- a/src/mesa/drivers/dri/r200/r200_screen.h
+++ b/src/mesa/drivers/dri/r200/r200_screen.h
@@ -86,7 +86,7 @@ typedef struct {
drmBufMapPtr buffers;
- __volatile__ CARD32 *scratch;
+ __volatile__ int32_t *scratch;
__DRIscreenPrivate *driScreen;
unsigned int sarea_priv_offset;
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index 4b6edd07b5..a755f5be68 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -709,7 +709,7 @@ static void r200PolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
static void r200UpdateSpecular( GLcontext *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
- CARD32 p = rmesa->hw.ctx.cmd[CTX_PP_CNTL];
+ int32_t p = rmesa->hw.ctx.cmd[CTX_PP_CNTL];
R200_STATECHANGE( rmesa, tcl );
R200_STATECHANGE( rmesa, vtx );
diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
index 631f140d05..7a995bf04a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
@@ -733,11 +733,11 @@ void radeonAllocDmaRegionVerts( radeonContextPtr rmesa,
* SwapBuffers with client-side throttling
*/
-static CARD32 radeonGetLastFrame (radeonContextPtr rmesa)
+static int32_t radeonGetLastFrame (radeonContextPtr rmesa)
{
unsigned char *RADEONMMIO = rmesa->radeonScreen->mmio.map;
int ret;
- CARD32 frame;
+ int32_t frame;
if (rmesa->dri.screen->drmMinor >= 4) {
drm_radeon_getparam_t gp;
@@ -973,7 +973,7 @@ static void radeonClear( GLcontext *ctx, GLbitfield mask, GLboolean all,
__DRIdrawablePrivate *dPriv = rmesa->dri.drawable;
drm_radeon_sarea_t *sarea = rmesa->sarea;
unsigned char *RADEONMMIO = rmesa->radeonScreen->mmio.map;
- CARD32 clear;
+ int32_t clear;
GLuint flags = 0;
GLuint color_mask = 0;
GLint ret, i;
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 8552f2a73d..fce325ea1c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -323,7 +323,7 @@ radeonScreenPtr radeonCreateScreen( __DRIscreenPrivate *sPriv )
__driUtilMessage("%s: drmMap (2) failed\n", __FUNCTION__ );
return NULL;
}
- screen->scratch = (__volatile__ CARD32 *)
+ screen->scratch = (__volatile__ int32_t *)
((GLubyte *)screen->status.map + RADEON_SCRATCH_REG_OFFSET);
screen->buffers = drmMapBufs( sPriv->fd );
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.h b/src/mesa/drivers/dri/radeon/radeon_screen.h
index c440b56265..94d2a8e0ee 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.h
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.h
@@ -88,7 +88,7 @@ typedef struct {
drmBufMapPtr buffers;
- __volatile__ CARD32 *scratch;
+ __volatile__ int32_t *scratch;
__DRIscreenPrivate *driScreen;
unsigned int sarea_priv_offset;
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 700e3f2c52..85d6f92ff1 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -692,7 +692,7 @@ static void radeonPolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
static void radeonUpdateSpecular( GLcontext *ctx )
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
- CARD32 p = rmesa->hw.ctx.cmd[CTX_PP_CNTL];
+ int32_t p = rmesa->hw.ctx.cmd[CTX_PP_CNTL];
RADEON_STATECHANGE( rmesa, tcl );