Numerous symbol scope issues.

I830EntityIndex is shared between 810 and newer driver.
Move most EXA rendering state into I830 structure.
Declare shared variables in shared header files rather than .c.
This commit is contained in:
Keith Packard 2007-01-06 18:19:34 -08:00
parent 736d82a6b4
commit 40af0ee6ba
12 changed files with 160 additions and 170 deletions

View File

@ -34,7 +34,7 @@ struct header
{
unsigned int length:16;
unsigned int opcode:16;
} bits;
};
union header_union

View File

@ -77,6 +77,7 @@ extern const OptionInfoRec *I830AvailableOptions(int chipid, int busid);
extern void I830InitpScrn(ScrnInfoPtr pScrn);
/* Symbol lists shared by the i810 and i830 parts. */
extern int I830EntityIndex;
extern const char *I810vgahwSymbols[];
extern const char *I810ramdacSymbols[];
extern const char *I810int10Symbols[];

View File

@ -381,7 +381,7 @@ static int i810_pitches[] = {
#endif
#endif
static int I830EntityIndex = -1;
int I830EntityIndex = -1;
#ifdef XFree86LOADER

View File

@ -149,11 +149,14 @@ static struct wm_info i810_wm_24_100[] = {
{202.5, 0x44419000}
};
#if 0
/* not used */
static struct wm_info i810_wm_32_100[] = {
{0, 0x2210b000},
{60, 0x22415000}, /* 0x314000 works too */
{80, 0x22419000} /* 0x518000 works too */
};
#endif
static struct wm_info i810_wm_8_133[] = {
{0, 0x22003000},

View File

@ -379,6 +379,14 @@ typedef struct _I830Rec {
Bool *overlayOn;
#endif
/* EXA render state */
float scale_units[2][2];
Bool is_transform[2];
PictTransform *transform[2];
/* i915 EXA render state */
CARD32 mapstate[6];
CARD32 samplerstate[6];
Bool directRenderingDisabled; /* DRI disabled in PreInit. */
Bool directRenderingEnabled; /* DRI enabled this generation. */
@ -495,6 +503,11 @@ typedef struct _I830Rec {
#define I830_SELECT_BACK 1
#define I830_SELECT_DEPTH 2
#ifdef I830_USE_EXA
extern const int I830PatternROP[16];
extern const int I830CopyROP[16];
#endif
/* I830 specific functions */
extern int I830WaitLpRing(ScrnInfoPtr pScrn, int n, int timeout_millis);
extern void I830SetPIOAccess(I830Ptr pI830);

View File

@ -322,9 +322,6 @@ static CARD32 I830CheckDevicesTimer(OsTimerPtr timer, CARD32 now, pointer arg);
static Bool SaveHWState(ScrnInfoPtr pScrn);
static Bool RestoreHWState(ScrnInfoPtr pScrn);
extern int I830EntityIndex;
/* temporary */
extern void xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y);

View File

@ -106,7 +106,7 @@ static const ddc_quirk_map_t ddc_quirks[] = {
#define MODEPREFIX(name) NULL, NULL, name, 0,M_T_DRIVER
#define MODESUFFIX 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
DisplayModeRec DDCEstablishedModes[17] = {
static DisplayModeRec DDCEstablishedModes[17] = {
{ MODEPREFIX("800x600"), 40000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@60Hz */
{ MODEPREFIX("800x600"), 36000, 800, 824, 896, 1024, 0, 600, 601, 603, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@56Hz */
{ MODEPREFIX("640x480"), 31500, 640, 656, 720, 840, 0, 480, 481, 484, 500, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@75Hz */

View File

@ -57,9 +57,7 @@ do { \
} while(0)
#endif
static float scale_units[2][2];
const static int I830CopyROP[16] =
const int I830CopyROP[16] =
{
ROP_0, /* GXclear */
ROP_DSa, /* GXand */
@ -79,7 +77,7 @@ const static int I830CopyROP[16] =
ROP_1 /* GXset */
};
const static int I830PatternROP[16] =
const int I830PatternROP[16] =
{
ROP_0,
ROP_DPa,
@ -111,9 +109,6 @@ union intfloat {
OUT_RING(tmp.ui); \
} while(0)
static Bool is_transform[2];
static PictTransform *transform[2];
extern Bool I830EXACheckComposite(int, PicturePtr, PicturePtr, PicturePtr);
extern Bool I830EXAPrepareComposite(int, PicturePtr, PicturePtr, PicturePtr,
PixmapPtr, PixmapPtr, PixmapPtr);
@ -314,10 +309,10 @@ IntelEXAComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
"src_scale_x %f, src_scale_y %f, "
"mask_scale_x %f, mask_scale_y %f\n",
srcX, srcY, maskX, maskY, dstX, dstY, w, h,
scale_units[0][0], scale_units[0][1],
scale_units[1][0], scale_units[1][1]);
pI830->scale_units[0][0], pI830->scale_units[0][1],
pI830->scale_units[1][0], pI830->scale_units[1][1]);
if (scale_units[1][0] == -1 || scale_units[1][1] == -1) {
if (pI830->scale_units[1][0] == -1 || pI830->scale_units[1][1] == -1) {
pMask = 0;
}
@ -325,31 +320,31 @@ IntelEXAComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
srcYend = srcY + h;
maskXend = maskX + w;
maskYend = maskY + h;
if (is_transform[0]) {
if (pI830->is_transform[0]) {
v.vector[0] = IntToxFixed(srcX);
v.vector[1] = IntToxFixed(srcY);
v.vector[2] = xFixed1;
PictureTransformPoint(transform[0], &v);
PictureTransformPoint(pI830->transform[0], &v);
srcX = xFixedToInt(v.vector[0]);
srcY = xFixedToInt(v.vector[1]);
v.vector[0] = IntToxFixed(srcXend);
v.vector[1] = IntToxFixed(srcYend);
v.vector[2] = xFixed1;
PictureTransformPoint(transform[0], &v);
PictureTransformPoint(pI830->transform[0], &v);
srcXend = xFixedToInt(v.vector[0]);
srcYend = xFixedToInt(v.vector[1]);
}
if (is_transform[1]) {
if (pI830->is_transform[1]) {
v.vector[0] = IntToxFixed(maskX);
v.vector[1] = IntToxFixed(maskY);
v.vector[2] = xFixed1;
PictureTransformPoint(transform[1], &v);
PictureTransformPoint(pI830->transform[1], &v);
maskX = xFixedToInt(v.vector[0]);
maskY = xFixedToInt(v.vector[1]);
v.vector[0] = IntToxFixed(maskXend);
v.vector[1] = IntToxFixed(maskYend);
v.vector[2] = xFixed1;
PictureTransformPoint(transform[1], &v);
PictureTransformPoint(pI830->transform[1], &v);
maskXend = xFixedToInt(v.vector[0]);
maskYend = xFixedToInt(v.vector[1]);
}
@ -378,38 +373,38 @@ IntelEXAComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
OUT_RING_F(dstX);
OUT_RING_F(dstY);
OUT_RING_F(srcX / scale_units[0][0]);
OUT_RING_F(srcY / scale_units[0][1]);
OUT_RING_F(srcX / pI830->scale_units[0][0]);
OUT_RING_F(srcY / pI830->scale_units[0][1]);
if (pMask) {
OUT_RING_F(maskX / scale_units[1][0]);
OUT_RING_F(maskY / scale_units[1][1]);
OUT_RING_F(maskX / pI830->scale_units[1][0]);
OUT_RING_F(maskY / pI830->scale_units[1][1]);
}
OUT_RING_F(dstX);
OUT_RING_F(dstY + h);
OUT_RING_F(srcX / scale_units[0][0]);
OUT_RING_F(srcYend / scale_units[0][1]);
OUT_RING_F(srcX / pI830->scale_units[0][0]);
OUT_RING_F(srcYend / pI830->scale_units[0][1]);
if (pMask) {
OUT_RING_F(maskX / scale_units[1][0]);
OUT_RING_F(maskYend / scale_units[1][1]);
OUT_RING_F(maskX / pI830->scale_units[1][0]);
OUT_RING_F(maskYend / pI830->scale_units[1][1]);
}
OUT_RING_F(dstX + w);
OUT_RING_F(dstY + h);
OUT_RING_F(srcXend / scale_units[0][0]);
OUT_RING_F(srcYend / scale_units[0][1]);
OUT_RING_F(srcXend / pI830->scale_units[0][0]);
OUT_RING_F(srcYend / pI830->scale_units[0][1]);
if (pMask) {
OUT_RING_F(maskXend / scale_units[1][0]);
OUT_RING_F(maskYend / scale_units[1][1]);
OUT_RING_F(maskXend / pI830->scale_units[1][0]);
OUT_RING_F(maskYend / pI830->scale_units[1][1]);
}
OUT_RING_F(dstX + w);
OUT_RING_F(dstY);
OUT_RING_F(srcXend / scale_units[0][0]);
OUT_RING_F(srcY / scale_units[0][1]);
OUT_RING_F(srcXend / pI830->scale_units[0][0]);
OUT_RING_F(srcY / pI830->scale_units[0][1]);
if (pMask) {
OUT_RING_F(maskXend / scale_units[1][0]);
OUT_RING_F(maskY / scale_units[1][1]);
OUT_RING_F(maskXend / pI830->scale_units[1][0]);
OUT_RING_F(maskY / pI830->scale_units[1][1]);
}
ADVANCE_LP_RING();
}

View File

@ -51,10 +51,6 @@ do { \
} while(0)
#endif
extern float scale_units[2][2];
extern Bool is_transform[2];
extern PictTransform *transform[2];
struct blendinfo {
Bool dst_alpha;
Bool src_alpha;
@ -274,8 +270,8 @@ I830TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit)
pitch = exaGetPixmapPitch(pPix);
w = pPict->pDrawable->width;
h = pPict->pDrawable->height;
scale_units[unit][0] = pPix->drawable.width;
scale_units[unit][1] = pPix->drawable.height;
pI830->scale_units[unit][0] = pPix->drawable.width;
pI830->scale_units[unit][1] = pPix->drawable.height;
for (i = 0; i < sizeof(I830TexFormats) / sizeof(I830TexFormats[0]); i++) {
if (I830TexFormats[i].fmt == pPict->format)
@ -344,10 +340,10 @@ I830TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit)
/* XXX */
if (pPict->transform != 0) {
is_transform[unit] = TRUE;
transform[unit] = pPict->transform;
pI830->is_transform[unit] = TRUE;
pI830->transform[unit] = pPict->transform;
} else {
is_transform[unit] = FALSE;
pI830->is_transform[unit] = FALSE;
}
#ifdef I830DEBUG
@ -412,9 +408,9 @@ I830EXAPrepareComposite(int op, PicturePtr pSrcPicture,
if (!I830TextureSetup(pMaskPicture, pMask, 1))
I830FALLBACK("fail to setup mask texture\n");
} else {
is_transform[1] = FALSE;
scale_units[1][0] = -1;
scale_units[1][1] = -1;
pI830->is_transform[1] = FALSE;
pI830->scale_units[1][0] = -1;
pI830->scale_units[1][1] = -1;
}
{

View File

@ -91,11 +91,6 @@ static void I830SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno);
#endif
static void I830RestoreAccelState(ScrnInfoPtr pScrn);
#ifdef I830_USE_EXA
extern const int I830PatternROP[16];
extern const int I830CopyROP[16];
#endif
Bool
I830XAAInit(ScreenPtr pScreen)
{

View File

@ -52,12 +52,6 @@ do { \
} while(0)
#endif
extern float scale_units[2][2];
extern Bool is_transform[2];
extern PictTransform *transform[2];
static CARD32 mapstate[6];
static CARD32 samplerstate[6];
struct formatinfo {
int fmt;
CARD32 card_fmt;
@ -267,8 +261,8 @@ I915TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit)
pitch = exaGetPixmapPitch(pPix);
w = pPict->pDrawable->width;
h = pPict->pDrawable->height;
scale_units[unit][0] = pPix->drawable.width;
scale_units[unit][1] = pPix->drawable.height;
pI830->scale_units[unit][0] = pPix->drawable.width;
pI830->scale_units[unit][1] = pPix->drawable.height;
for (i = 0; i < sizeof(I915TexFormats) / sizeof(I915TexFormats[0]); i++) {
if (I915TexFormats[i].fmt == pPict->format)
@ -295,27 +289,27 @@ I915TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit)
I830FALLBACK("Bad filter 0x%x\n", pPict->filter);
}
mapstate[unit * 3 + 0] = offset;
mapstate[unit * 3 + 1] = format |
pI830->mapstate[unit * 3 + 0] = offset;
pI830->mapstate[unit * 3 + 1] = format |
((pPix->drawable.height - 1) << MS3_HEIGHT_SHIFT) |
((pPix->drawable.width - 1) << MS3_WIDTH_SHIFT);
if (!pI830->disableTiling)
samplerstate[unit * 3 + 1] |= MS3_USE_FENCE_REGS;
mapstate[unit * 3 + 2] = ((pitch / 4) - 1) << MS4_PITCH_SHIFT;
pI830->samplerstate[unit * 3 + 1] |= MS3_USE_FENCE_REGS;
pI830->mapstate[unit * 3 + 2] = ((pitch / 4) - 1) << MS4_PITCH_SHIFT;
samplerstate[unit * 3 + 0] = (MIPFILTER_NONE << SS2_MIP_FILTER_SHIFT);
samplerstate[unit * 3 + 0] |= filter;
samplerstate[unit * 3 + 1] = SS3_NORMALIZED_COORDS;
samplerstate[unit * 3 + 1] |= wrap_mode << SS3_TCX_ADDR_MODE_SHIFT;
samplerstate[unit * 3 + 1] |= wrap_mode << SS3_TCY_ADDR_MODE_SHIFT;
samplerstate[unit * 3 + 1] |= unit << SS3_TEXTUREMAP_INDEX_SHIFT;
samplerstate[unit * 3 + 2] = 0x00000000; /* border color */
pI830->samplerstate[unit * 3 + 0] = (MIPFILTER_NONE << SS2_MIP_FILTER_SHIFT);
pI830->samplerstate[unit * 3 + 0] |= filter;
pI830->samplerstate[unit * 3 + 1] = SS3_NORMALIZED_COORDS;
pI830->samplerstate[unit * 3 + 1] |= wrap_mode << SS3_TCX_ADDR_MODE_SHIFT;
pI830->samplerstate[unit * 3 + 1] |= wrap_mode << SS3_TCY_ADDR_MODE_SHIFT;
pI830->samplerstate[unit * 3 + 1] |= unit << SS3_TEXTUREMAP_INDEX_SHIFT;
pI830->samplerstate[unit * 3 + 2] = 0x00000000; /* border color */
if (pPict->transform != 0) {
is_transform[unit] = TRUE;
transform[unit] = pPict->transform;
pI830->is_transform[unit] = TRUE;
pI830->transform[unit] = pPict->transform;
} else {
is_transform[unit] = FALSE;
pI830->is_transform[unit] = FALSE;
}
return TRUE;
@ -348,44 +342,44 @@ I915EXAPrepareComposite(int op, PicturePtr pSrcPicture,
if (!I915TextureSetup(pMaskPicture, pMask, 1))
I830FALLBACK("fail to setup mask texture\n");
} else {
is_transform[1] = FALSE;
scale_units[1][0] = -1;
scale_units[1][1] = -1;
pI830->is_transform[1] = FALSE;
pI830->scale_units[1][0] = -1;
pI830->scale_units[1][1] = -1;
}
if (pMask == NULL) {
BEGIN_LP_RING(10);
OUT_RING(_3DSTATE_MAP_STATE | 3);
OUT_RING(0x00000001); /* map 0 */
OUT_RING(mapstate[0]);
OUT_RING(mapstate[1]);
OUT_RING(mapstate[2]);
OUT_RING(pI830->mapstate[0]);
OUT_RING(pI830->mapstate[1]);
OUT_RING(pI830->mapstate[2]);
OUT_RING(_3DSTATE_SAMPLER_STATE | 3);
OUT_RING(0x00000001); /* sampler 0 */
OUT_RING(samplerstate[0]);
OUT_RING(samplerstate[1]);
OUT_RING(samplerstate[2]);
OUT_RING(pI830->samplerstate[0]);
OUT_RING(pI830->samplerstate[1]);
OUT_RING(pI830->samplerstate[2]);
ADVANCE_LP_RING();
} else {
BEGIN_LP_RING(16);
OUT_RING(_3DSTATE_MAP_STATE | 6);
OUT_RING(0x00000003); /* map 0,1 */
OUT_RING(mapstate[0]);
OUT_RING(mapstate[1]);
OUT_RING(mapstate[2]);
OUT_RING(mapstate[3]);
OUT_RING(mapstate[4]);
OUT_RING(mapstate[5]);
OUT_RING(pI830->mapstate[0]);
OUT_RING(pI830->mapstate[1]);
OUT_RING(pI830->mapstate[2]);
OUT_RING(pI830->mapstate[3]);
OUT_RING(pI830->mapstate[4]);
OUT_RING(pI830->mapstate[5]);
OUT_RING(_3DSTATE_SAMPLER_STATE | 6);
OUT_RING(0x00000003); /* sampler 0,1 */
OUT_RING(samplerstate[0]);
OUT_RING(samplerstate[1]);
OUT_RING(samplerstate[2]);
OUT_RING(samplerstate[3]);
OUT_RING(samplerstate[4]);
OUT_RING(samplerstate[5]);
OUT_RING(pI830->samplerstate[0]);
OUT_RING(pI830->samplerstate[1]);
OUT_RING(pI830->samplerstate[2]);
OUT_RING(pI830->samplerstate[3]);
OUT_RING(pI830->samplerstate[4]);
OUT_RING(pI830->samplerstate[5]);
ADVANCE_LP_RING();
}
{

View File

@ -71,10 +71,6 @@ I965EXAComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
static void I965GetBlendCntl(int op, PicturePtr pMask, CARD32 dst_format,
CARD32 *sblend, CARD32 *dblend);
extern float scale_units[2][2];
extern Bool is_transform[2];
extern PictTransform *transform[2];
struct blendinfo {
Bool dst_alpha;
Bool src_alpha;
@ -267,46 +263,46 @@ I965EXACheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define BRW_GRF_BLOCKS(nreg) ((nreg + 15) / 16 - 1)
int urb_vs_start, urb_vs_size;
int urb_gs_start, urb_gs_size;
int urb_clip_start, urb_clip_size;
int urb_sf_start, urb_sf_size;
int urb_cs_start, urb_cs_size;
static int urb_vs_start, urb_vs_size;
static int urb_gs_start, urb_gs_size;
static int urb_clip_start, urb_clip_size;
static int urb_sf_start, urb_sf_size;
static int urb_cs_start, urb_cs_size;
struct brw_surface_state *dest_surf_state;
struct brw_surface_state *src_surf_state;
struct brw_surface_state *mask_surf_state;
struct brw_sampler_state *src_sampler_state;
struct brw_sampler_state *mask_sampler_state;
struct brw_sampler_default_color *default_color_state;
static struct brw_surface_state *dest_surf_state;
static struct brw_surface_state *src_surf_state;
static struct brw_surface_state *mask_surf_state;
static struct brw_sampler_state *src_sampler_state;
static struct brw_sampler_state *mask_sampler_state;
static struct brw_sampler_default_color *default_color_state;
struct brw_vs_unit_state *vs_state;
struct brw_sf_unit_state *sf_state;
struct brw_wm_unit_state *wm_state;
struct brw_cc_unit_state *cc_state;
struct brw_cc_viewport *cc_viewport;
static struct brw_vs_unit_state *vs_state;
static struct brw_sf_unit_state *sf_state;
static struct brw_wm_unit_state *wm_state;
static struct brw_cc_unit_state *cc_state;
static struct brw_cc_viewport *cc_viewport;
struct brw_instruction *sf_kernel;
struct brw_instruction *ps_kernel;
struct brw_instruction *sip_kernel;
static struct brw_instruction *sf_kernel;
static struct brw_instruction *ps_kernel;
static struct brw_instruction *sip_kernel;
CARD32 *binding_table;
int binding_table_entries;
static CARD32 *binding_table;
static int binding_table_entries;
int dest_surf_offset, src_surf_offset, mask_surf_offset;
int src_sampler_offset, mask_sampler_offset,vs_offset;
int sf_offset, wm_offset, cc_offset, vb_offset, cc_viewport_offset;
int sf_kernel_offset, ps_kernel_offset, sip_kernel_offset;
int wm_scratch_offset;
int binding_table_offset;
int default_color_offset;
int next_offset, total_state_size;
char *state_base;
int state_base_offset;
float *vb;
int vb_size = (4 * 4) * 4 ; /* 4 DWORDS per vertex*/
static int dest_surf_offset, src_surf_offset, mask_surf_offset;
static int src_sampler_offset, mask_sampler_offset,vs_offset;
static int sf_offset, wm_offset, cc_offset, vb_offset, cc_viewport_offset;
static int sf_kernel_offset, ps_kernel_offset, sip_kernel_offset;
static int wm_scratch_offset;
static int binding_table_offset;
static int default_color_offset;
static int next_offset, total_state_size;
static char *state_base;
static int state_base_offset;
static float *vb;
static int vb_size = (4 * 4) * 4 ; /* 4 DWORDS per vertex*/
CARD32 src_blend, dst_blend;
static CARD32 src_blend, dst_blend;
static const CARD32 sip_kernel_static[][4] = {
/* wait (1) a0<1>UW a145<0,1,0>UW { align1 + } */
@ -394,27 +390,27 @@ I965EXAPrepareComposite(int op, PicturePtr pSrcPicture,
mask_offset = exaGetPixmapOffset(pMask);
mask_pitch = exaGetPixmapPitch(pMask);
}
scale_units[0][0] = pSrc->drawable.width;
scale_units[0][1] = pSrc->drawable.height;
pI830->scale_units[0][0] = pSrc->drawable.width;
pI830->scale_units[0][1] = pSrc->drawable.height;
if (pSrcPicture->transform) {
is_transform[0] = TRUE;
transform[0] = pSrcPicture->transform;
pI830->is_transform[0] = TRUE;
pI830->transform[0] = pSrcPicture->transform;
} else
is_transform[0] = FALSE;
pI830->is_transform[0] = FALSE;
if (!pMask) {
is_transform[1] = FALSE;
scale_units[1][0] = -1;
scale_units[1][1] = -1;
pI830->is_transform[1] = FALSE;
pI830->scale_units[1][0] = -1;
pI830->scale_units[1][1] = -1;
} else {
if (pMaskPicture->transform) {
is_transform[1] = TRUE;
transform[1] = pMaskPicture->transform;
pI830->is_transform[1] = TRUE;
pI830->transform[1] = pMaskPicture->transform;
} else
is_transform[1] = FALSE;
scale_units[1][0] = pMask->drawable.width;
scale_units[1][1] = pMask->drawable.height;
pI830->is_transform[1] = FALSE;
pI830->scale_units[1][0] = pMask->drawable.width;
pI830->scale_units[1][1] = pMask->drawable.height;
}
/* setup 3d pipeline state */
@ -996,10 +992,10 @@ I965EXAComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
"src_scale_x %f, src_scale_y %f, "
"mask_scale_x %f, mask_scale_y %f\n",
srcX, srcY, maskX, maskY, dstX, dstY, w, h,
scale_units[0][0], scale_units[0][1],
scale_units[1][0], scale_units[1][1]);
pI830->scale_units[0][0], pI830->scale_units[0][1],
pI830->scale_units[1][0], pI830->scale_units[1][1]);
if (scale_units[1][0] == -1 || scale_units[1][1] == -1) {
if (pI830->scale_units[1][0] == -1 || pI830->scale_units[1][1] == -1) {
pMask = 0;
}
@ -1007,31 +1003,31 @@ I965EXAComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
srcYend = srcY + h;
maskXend = maskX + w;
maskYend = maskY + h;
if (is_transform[0]) {
if (pI830->is_transform[0]) {
v.vector[0] = IntToxFixed(srcX);
v.vector[1] = IntToxFixed(srcY);
v.vector[2] = xFixed1;
PictureTransformPoint(transform[0], &v);
PictureTransformPoint(pI830->transform[0], &v);
srcX = xFixedToInt(v.vector[0]);
srcY = xFixedToInt(v.vector[1]);
v.vector[0] = IntToxFixed(srcXend);
v.vector[1] = IntToxFixed(srcYend);
v.vector[2] = xFixed1;
PictureTransformPoint(transform[0], &v);
PictureTransformPoint(pI830->transform[0], &v);
srcXend = xFixedToInt(v.vector[0]);
srcYend = xFixedToInt(v.vector[1]);
}
if (is_transform[1]) {
if (pI830->is_transform[1]) {
v.vector[0] = IntToxFixed(maskX);
v.vector[1] = IntToxFixed(maskY);
v.vector[2] = xFixed1;
PictureTransformPoint(transform[1], &v);
PictureTransformPoint(pI830->transform[1], &v);
maskX = xFixedToInt(v.vector[0]);
maskY = xFixedToInt(v.vector[1]);
v.vector[0] = IntToxFixed(maskXend);
v.vector[1] = IntToxFixed(maskYend);
v.vector[2] = xFixed1;
PictureTransformPoint(transform[1], &v);
PictureTransformPoint(pI830->transform[1], &v);
maskXend = xFixedToInt(v.vector[0]);
maskYend = xFixedToInt(v.vector[1]);
}
@ -1043,31 +1039,31 @@ I965EXAComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
i = 0;
/* rect (x2,y2) */
vb[i++] = (float)(srcXend) / scale_units[0][0];
vb[i++] = (float)(srcYend) / scale_units[0][1];
vb[i++] = (float)(srcXend) / pI830->scale_units[0][0];
vb[i++] = (float)(srcYend) / pI830->scale_units[0][1];
if (pMask) {
vb[i++] = (float)maskXend / scale_units[1][0];
vb[i++] = (float)maskYend / scale_units[1][1];
vb[i++] = (float)maskXend / pI830->scale_units[1][0];
vb[i++] = (float)maskYend / pI830->scale_units[1][1];
}
vb[i++] = (float)(dstX + w);
vb[i++] = (float)(dstY + h);
/* rect (x1,y2) */
vb[i++] = (float)(srcX)/ scale_units[0][0];
vb[i++] = (float)(srcYend)/ scale_units[0][1];
vb[i++] = (float)(srcX)/ pI830->scale_units[0][0];
vb[i++] = (float)(srcYend)/ pI830->scale_units[0][1];
if (pMask) {
vb[i++] = (float)maskX / scale_units[1][0];
vb[i++] = (float)maskYend / scale_units[1][1];
vb[i++] = (float)maskX / pI830->scale_units[1][0];
vb[i++] = (float)maskYend / pI830->scale_units[1][1];
}
vb[i++] = (float)dstX;
vb[i++] = (float)(dstY + h);
/* rect (x1,y1) */
vb[i++] = (float)(srcX) / scale_units[0][0];
vb[i++] = (float)(srcY) / scale_units[0][1];
vb[i++] = (float)(srcX) / pI830->scale_units[0][0];
vb[i++] = (float)(srcY) / pI830->scale_units[0][1];
if (pMask) {
vb[i++] = (float)maskX / scale_units[1][0];
vb[i++] = (float)maskY / scale_units[1][1];
vb[i++] = (float)maskX / pI830->scale_units[1][0];
vb[i++] = (float)maskY / pI830->scale_units[1][1];
}
vb[i++] = (float)dstX;
vb[i++] = (float)dstY;