亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? radeon_dga.c

?? x.org上有關ati系列顯卡最新驅動
?? C
字號:
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dga.c,v 1.11 2002/09/18 18:14:58 martin Exp $ *//* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and *                VA Linux Systems Inc., Fremont, California. * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) shall be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NON-INFRINGEMENT.  IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */#ifdef HAVE_CONFIG_H#include "config.h"#endif/* * Authors: *   Kevin E. Martin <martin@xfree86.org> * * Credits: * *   Thanks to Ove K?ven <ovek@transgaming.com> for writing the Rage 128 *   DGA support.  Portions of this file are based on the initialization *   code for that driver. * */#include <string.h>				/* Driver data structures */#include "radeon.h"#include "radeon_probe.h"				/* X and server generic header files */#include "xf86.h"				/* DGA support */#include "dgaproc.h"static Bool RADEON_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **,				   int *, int *, int *);static Bool RADEON_SetMode(ScrnInfoPtr, DGAModePtr);static int  RADEON_GetViewport(ScrnInfoPtr);static void RADEON_SetViewport(ScrnInfoPtr, int, int, int);#ifdef USE_XAAstatic void RADEON_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);static void RADEON_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);static void RADEON_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int,				 unsigned long);#endifstatic DGAModePtr RADEONSetupDGAMode(ScrnInfoPtr pScrn,				     DGAModePtr modes,				     int *num,				     int bitsPerPixel,				     int depth,				     Bool pixmap,				     int secondPitch,				     unsigned long red,				     unsigned long green,				     unsigned long blue,				     short visualClass){    RADEONInfoPtr   info     = RADEONPTR(pScrn);    DGAModePtr      newmodes = NULL;    DGAModePtr      currentMode;    DisplayModePtr  pMode;    DisplayModePtr  firstMode;    unsigned int    size;    int             pitch;    int             Bpp      = bitsPerPixel >> 3;SECOND_PASS:    pMode = firstMode = pScrn->modes;    while (1) {	pitch = pScrn->displayWidth;	size = pitch * Bpp * pMode->VDisplay;	if ((!secondPitch || (pitch != secondPitch)) &&	    (size <= info->FbMapSize)) {	    if (secondPitch)		pitch = secondPitch;	    if (!(newmodes = xrealloc(modes, (*num + 1) * sizeof(DGAModeRec))))		break;	    modes       = newmodes;	    currentMode = modes + *num;	    currentMode->mode           = pMode;	    currentMode->flags          = DGA_CONCURRENT_ACCESS;	    if (pixmap)		currentMode->flags     |= DGA_PIXMAP_AVAILABLE;#ifdef USE_EXA	    if (info->useEXA) {		/* We need to fill in RADEON_FillRect and RADEON_BlitRect and		 * connect them in RADEONDGAInit before turning these on.		 */		/*if (info->exa.accel.PrepareSolid && info->exa.accel.Solid)		    currentMode->flags    |= DGA_FILL_RECT;		if (info->exa.accel.PrepareCopy && info->exa.accel.Copy)		    currentMode->flags    |= DGA_BLIT_RECT | DGA_BLIT_RECT_TRANS;*/	    }#endif /* USE_EXA */#ifdef USE_XAA	    if (!info->useEXA && info->accel) {	      if (info->accel->SetupForSolidFill &&		  info->accel->SubsequentSolidFillRect)		 currentMode->flags    |= DGA_FILL_RECT;	      if (info->accel->SetupForScreenToScreenCopy &&		  info->accel->SubsequentScreenToScreenCopy)		 currentMode->flags    |= DGA_BLIT_RECT | DGA_BLIT_RECT_TRANS;	      if (currentMode->flags &		  (DGA_PIXMAP_AVAILABLE | DGA_FILL_RECT |		   DGA_BLIT_RECT | DGA_BLIT_RECT_TRANS))		  currentMode->flags   &= ~DGA_CONCURRENT_ACCESS;	    }#endif /* USE_XAA */	    if (pMode->Flags & V_DBLSCAN)		currentMode->flags     |= DGA_DOUBLESCAN;	    if (pMode->Flags & V_INTERLACE)		currentMode->flags     |= DGA_INTERLACED;	    currentMode->byteOrder      = pScrn->imageByteOrder;	    currentMode->depth          = depth;	    currentMode->bitsPerPixel   = bitsPerPixel;	    currentMode->red_mask       = red;	    currentMode->green_mask     = green;	    currentMode->blue_mask      = blue;	    currentMode->visualClass    = visualClass;	    currentMode->viewportWidth  = pMode->HDisplay;	    currentMode->viewportHeight = pMode->VDisplay;	    currentMode->xViewportStep  = 8;	    currentMode->yViewportStep  = 1;	    currentMode->viewportFlags  = DGA_FLIP_RETRACE;	    currentMode->offset         = 0;	    currentMode->address        = (unsigned char*)info->LinearAddr;	    currentMode->bytesPerScanline = pitch * Bpp;	    currentMode->imageWidth     = pitch;	    currentMode->imageHeight    = (info->FbMapSize					   / currentMode->bytesPerScanline);	    currentMode->pixmapWidth    = currentMode->imageWidth;	    currentMode->pixmapHeight   = currentMode->imageHeight;	    currentMode->maxViewportX   = (currentMode->imageWidth					   - currentMode->viewportWidth);	    /* this might need to get clamped to some maximum */	    currentMode->maxViewportY   = (currentMode->imageHeight					   - currentMode->viewportHeight);	    (*num)++;	}	pMode = pMode->next;	if (pMode == firstMode)	    break;    }    if (secondPitch) {	secondPitch = 0;	goto SECOND_PASS;    }    return modes;}Bool RADEONDGAInit(ScreenPtr pScreen){    ScrnInfoPtr    pScrn = xf86Screens[pScreen->myNum];    RADEONInfoPtr  info  = RADEONPTR(pScrn);    DGAModePtr     modes = NULL;    int            num   = 0;    /* 8 */    modes = RADEONSetupDGAMode(pScrn, modes, &num, 8, 8,			       (pScrn->bitsPerPixel == 8),				((pScrn->bitsPerPixel != 8)				 ? 0 : pScrn->displayWidth),			       0, 0, 0, PseudoColor);    /* 15 */    modes = RADEONSetupDGAMode(pScrn, modes, &num, 16, 15,			       (pScrn->bitsPerPixel == 16),			       ((pScrn->depth != 15)				? 0 : pScrn->displayWidth),			       0x7c00, 0x03e0, 0x001f, TrueColor);    modes = RADEONSetupDGAMode(pScrn, modes, &num, 16, 15,			       (pScrn->bitsPerPixel == 16),			       ((pScrn->depth != 15)				? 0 : pScrn->displayWidth),			       0x7c00, 0x03e0, 0x001f, DirectColor);    /* 16 */    modes = RADEONSetupDGAMode(pScrn, modes, &num, 16, 16,			       (pScrn->bitsPerPixel == 16),			       ((pScrn->depth != 16)				? 0 : pScrn->displayWidth),			       0xf800, 0x07e0, 0x001f, TrueColor);    modes = RADEONSetupDGAMode(pScrn, modes, &num, 16, 16,			       (pScrn->bitsPerPixel == 16),			       ((pScrn->depth != 16)				? 0 : pScrn->displayWidth),			       0xf800, 0x07e0, 0x001f, DirectColor);    /* 32 */    modes = RADEONSetupDGAMode(pScrn, modes, &num, 32, 24,			       (pScrn->bitsPerPixel == 32),			       ((pScrn->bitsPerPixel != 32)				? 0 : pScrn->displayWidth),			       0xff0000, 0x00ff00, 0x0000ff, TrueColor);    modes = RADEONSetupDGAMode(pScrn, modes, &num, 32, 24,			       (pScrn->bitsPerPixel == 32),			       ((pScrn->bitsPerPixel != 32)				? 0 : pScrn->displayWidth),			       0xff0000, 0x00ff00, 0x0000ff, DirectColor);    info->numDGAModes = num;    info->DGAModes    = modes;    info->DGAFuncs.OpenFramebuffer       = RADEON_OpenFramebuffer;    info->DGAFuncs.CloseFramebuffer      = NULL;    info->DGAFuncs.SetMode               = RADEON_SetMode;    info->DGAFuncs.SetViewport           = RADEON_SetViewport;    info->DGAFuncs.GetViewport           = RADEON_GetViewport;    info->DGAFuncs.Sync                  = NULL;    info->DGAFuncs.FillRect              = NULL;    info->DGAFuncs.BlitRect              = NULL;    info->DGAFuncs.BlitTransRect         = NULL;#ifdef USE_EXA    /*info->DGAFuncs.Sync              = info->exa.accel->Sync;*/    if (info->useEXA) {	/*if (info->exa.accel.PrepareSolid && info->exa.accel.Solid) {	    info->DGAFuncs.FillRect      = RADEON_FillRect;	}	if (info->exa.accel.PrepareCopy && info->exa.accel.Copy) {	    info->DGAFuncs.BlitRect      = RADEON_BlitRect;	}*/    }#endif /* USE_EXA */#ifdef USE_XAA    if (!info->useEXA && info->accel) {	info->DGAFuncs.Sync              = info->accel->Sync;	if (info->accel->SetupForSolidFill &&	    info->accel->SubsequentSolidFillRect)	    info->DGAFuncs.FillRect      = RADEON_FillRect;	if (info->accel->SetupForScreenToScreenCopy &&	    info->accel->SubsequentScreenToScreenCopy) {	    info->DGAFuncs.BlitRect      = RADEON_BlitRect;	    info->DGAFuncs.BlitTransRect = RADEON_BlitTransRect;	}    }#endif /* USE_XAA */    return DGAInit(pScreen, &info->DGAFuncs, modes, num);}static Bool RADEON_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode){    static RADEONFBLayout  SavedLayouts[MAXSCREENS];    int                    indx = pScrn->pScreen->myNum;    RADEONInfoPtr          info = RADEONPTR(pScrn);    if (!pMode) { /* restore the original mode */	/* put the ScreenParameters back */	if (info->DGAactive)	    memcpy(&info->CurrentLayout, &SavedLayouts[indx],		   sizeof(RADEONFBLayout));	pScrn->currentMode = info->CurrentLayout.mode;	RADEONSwitchMode(indx, pScrn->currentMode, 0);#ifdef XF86DRI	if (info->directRenderingEnabled) {	    RADEONCP_STOP(pScrn, info);	}#endif	if (info->accelOn)	    RADEONEngineInit(pScrn);#ifdef XF86DRI	if (info->directRenderingEnabled) {	    RADEONCP_START(pScrn, info);	}#endif	RADEONAdjustFrame(indx, 0, 0, 0);	info->DGAactive = FALSE;    } else {	if (!info->DGAactive) {  /* save the old parameters */	    memcpy(&SavedLayouts[indx], &info->CurrentLayout,		   sizeof(RADEONFBLayout));	    info->DGAactive = TRUE;	}	info->CurrentLayout.bitsPerPixel = pMode->bitsPerPixel;	info->CurrentLayout.depth        = pMode->depth;	info->CurrentLayout.displayWidth = (pMode->bytesPerScanline /					    (pMode->bitsPerPixel >> 3));	info->CurrentLayout.pixel_bytes  = pMode->bitsPerPixel / 8;	info->CurrentLayout.pixel_code   = (pMode->bitsPerPixel != 16					    ? pMode->bitsPerPixel					    : pMode->depth);	/* RADEONModeInit() will set the mode field */	RADEONSwitchMode(indx, pMode->mode, 0);#ifdef XF86DRI	if (info->directRenderingEnabled) {	    RADEONCP_STOP(pScrn, info);	}#endif	if (info->accelOn)	    RADEONEngineInit(pScrn);#ifdef XF86DRI	if (info->directRenderingEnabled) {	    RADEONCP_START(pScrn, info);	}#endif    }    return TRUE;}static int RADEON_GetViewport(ScrnInfoPtr pScrn){    RADEONInfoPtr  info = RADEONPTR(pScrn);    return info->DGAViewportStatus;}static void RADEON_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags){    RADEONInfoPtr  info = RADEONPTR(pScrn);    RADEONAdjustFrame(pScrn->pScreen->myNum, x, y, flags);    info->DGAViewportStatus = 0;  /* FIXME */}#ifdef USE_XAAstatic void RADEON_FillRect(ScrnInfoPtr pScrn,			    int x, int y, int w, int h,			    unsigned long color){    RADEONInfoPtr  info = RADEONPTR(pScrn);#ifdef USE_EXA    /* XXX */    if (info->useEXA) {	/*	info->exa.accel.PrepareSolid(pScrn, color, GXcopy, (CARD32)(~0));	info->exa.accel.Solid(pScrn, x, y, x+w, y+h);	info->exa.accel.DoneSolid();	*/	RADEON_MARK_SYNC(info, pScrn);    }#endif /* USE_EXA */#ifdef USE_XAA    if (!info->useEXA) {	(*info->accel->SetupForSolidFill)(pScrn, color, GXcopy, (CARD32)(~0));	(*info->accel->SubsequentSolidFillRect)(pScrn, x, y, w, h);        if (pScrn->bitsPerPixel == info->CurrentLayout.bitsPerPixel)	    RADEON_MARK_SYNC(info, pScrn);    }#endif /* USE_XAA */}static void RADEON_BlitRect(ScrnInfoPtr pScrn,			    int srcx, int srcy, int w, int h,			    int dstx, int dsty){    RADEONInfoPtr  info = RADEONPTR(pScrn);    int            xdir = ((srcx < dstx) && (srcy == dsty)) ? -1 : 1;    int            ydir = (srcy < dsty) ? -1 : 1;	#ifdef USE_EXA    /* XXX */    if (info->useEXA) {	/*	info->exa.accel.PrepareCopy(pScrn, color, GXcopy, (CARD32)(~0));	info->exa.accel.Copy(pScrn, srcx, srcy, dstx, dsty, w, h);	info->exa.accel.DoneCopy();	*/	RADEON_MARK_SYNC(info, pScrn);    }#endif /* USE_EXA */#ifdef USE_XAA    if (!info->useEXA) {	(*info->accel->SetupForScreenToScreenCopy)(pScrn, xdir, ydir,						   GXcopy, (CARD32)(~0), -1);	(*info->accel->SubsequentScreenToScreenCopy)(pScrn, srcx, srcy,						     dstx, dsty, w, h);        if (pScrn->bitsPerPixel == info->CurrentLayout.bitsPerPixel)	    RADEON_MARK_SYNC(info, pScrn);    }#endif /* USE_XAA */}static void RADEON_BlitTransRect(ScrnInfoPtr pScrn,				 int srcx, int srcy, int w, int h,				 int dstx, int dsty, unsigned long color){    RADEONInfoPtr  info = RADEONPTR(pScrn);    int            xdir = ((srcx < dstx) && (srcy == dsty)) ? -1 : 1;    int            ydir = (srcy < dsty) ? -1 : 1;    info->XAAForceTransBlit = TRUE;    (*info->accel->SetupForScreenToScreenCopy)(pScrn, xdir, ydir,					       GXcopy, (CARD32)(~0), color);    info->XAAForceTransBlit = FALSE;    (*info->accel->SubsequentScreenToScreenCopy)(pScrn, srcx, srcy,						 dstx, dsty, w, h);    if (pScrn->bitsPerPixel == info->CurrentLayout.bitsPerPixel)        RADEON_MARK_SYNC(info, pScrn);}#endif /* USE_XAA */static Bool RADEON_OpenFramebuffer(ScrnInfoPtr pScrn,				   char **name,				   unsigned char **mem,				   int *size, int *offset, int *flags){    RADEONInfoPtr  info = RADEONPTR(pScrn);    *name   = NULL;             /* no special device */    *mem    = (unsigned char*)info->LinearAddr;    *size   = info->FbMapSize;    *offset = 0;    *flags  = 0; /* DGA_NEED_ROOT; -- don't need root, just /dev/mem access */    return TRUE;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久9999吃药| 国产亚洲人成网站| 欧美国产视频在线| 亚洲宅男天堂在线观看无病毒| 免费成人av在线播放| 色婷婷av一区二区三区软件| 久久九九全国免费| 国产成人精品免费视频网站| 在线91免费看| 亚洲精品自拍动漫在线| av网站一区二区三区| 国产日韩av一区| 激情综合五月婷婷| 精品久久国产字幕高潮| 极品少妇xxxx精品少妇偷拍| 欧美日韩一区国产| 亚洲成av人片在线观看无码| 欧美在线观看视频一区二区三区| 一区二区三区在线观看动漫| 国产成人av电影免费在线观看| 久久久久久久综合日本| 国产一区二区三区在线看麻豆| 日韩视频在线你懂得| 日韩精品成人一区二区三区| 日韩欧美在线观看一区二区三区| 国产精品亚洲а∨天堂免在线| 亚洲一区二区免费视频| 国产人妖乱国产精品人妖| 欧美亚洲动漫制服丝袜| 粉嫩绯色av一区二区在线观看| 青青草国产成人99久久| 亚洲素人一区二区| 欧美大黄免费观看| 欧美一区二区三区思思人| 色久综合一二码| 成人免费毛片app| 国产精品77777| 国精品**一区二区三区在线蜜桃| 亚洲一区二区三区国产| 亚洲激情在线播放| 337p日本欧洲亚洲大胆精品| 制服丝袜亚洲播放| 欧美另类z0zxhd电影| 欧美日韩成人综合天天影院 | 欧美日韩国产美| 欧美中文字幕亚洲一区二区va在线| 高清不卡一二三区| 成人av影院在线| 91亚洲精品一区二区乱码| 成人免费的视频| www.欧美日韩国产在线| 色琪琪一区二区三区亚洲区| 在线日韩av片| 欧美揉bbbbb揉bbbbb| 欧美一二三四在线| 久久精品欧美一区二区三区不卡 | 欧美一级高清大全免费观看| 欧美精品第1页| 精品久久久影院| 欧美国产精品v| 亚洲大尺度视频在线观看| 国产精品一色哟哟哟| 日韩欧美一区二区视频| 亚洲精品免费电影| www.欧美亚洲| **欧美大码日韩| 99在线热播精品免费| 国产一区二区三区免费在线观看| 六月丁香婷婷久久| 欧美猛男gaygay网站| 一区二区三区日本| 欧美性大战xxxxx久久久| 在线成人午夜影院| 91精品久久久久久久久99蜜臂| 欧美视频中文字幕| 一本色道**综合亚洲精品蜜桃冫| 91天堂素人约啪| 中文字幕第一区综合| 国产一区二区按摩在线观看| 91精品午夜视频| 久久精品二区亚洲w码| 日韩免费视频一区二区| 精品一二三四区| 久久综合狠狠综合久久综合88| 蓝色福利精品导航| 久久久久久一二三区| 成人精品亚洲人成在线| 国产精品美女一区二区在线观看| 成人黄色软件下载| 亚洲柠檬福利资源导航| 在线日韩一区二区| 麻豆精品一区二区av白丝在线| 欧美mv和日韩mv国产网站| 精品一区二区三区免费观看 | 亚洲伦理在线免费看| 婷婷成人激情在线网| 天堂va蜜桃一区二区三区漫画版| 日韩成人一级片| 国产主播一区二区三区| 韩国一区二区视频| 色乱码一区二区三区88| 欧洲人成人精品| 久久久91精品国产一区二区三区| 蜜臀99久久精品久久久久久软件| 国产一区二区三区蝌蚪| 欧美大胆人体bbbb| 亚洲免费观看在线视频| 亚洲欧美偷拍三级| 麻豆精品新av中文字幕| 91污片在线观看| 精品国产三级电影在线观看| 国产精品久久久久久亚洲毛片 | 91在线视频网址| 91国在线观看| 久久一区二区视频| 国产精品99久久不卡二区| 日本高清视频一区二区| 中文成人av在线| 国产乱子伦一区二区三区国色天香| 亚洲欧美偷拍另类a∨色屁股| 精品国产第一区二区三区观看体验| 欧美日韩在线一区二区| 91在线视频网址| 一本色道综合亚洲| 成人av资源网站| 91在线国内视频| 99久久er热在这里只有精品66| 国产69精品一区二区亚洲孕妇| 精品系列免费在线观看| 国产中文字幕一区| 国产一区福利在线| 国产成+人+日韩+欧美+亚洲| 国产九色精品成人porny| 久久丁香综合五月国产三级网站| 蜜桃视频免费观看一区| 美女爽到高潮91| 国产成人aaaa| 97超碰欧美中文字幕| 日韩视频免费直播| 免费在线观看成人| 亚洲最大的成人av| 一区二区国产盗摄色噜噜| 欧美国产精品一区二区| 久久综合成人精品亚洲另类欧美 | 午夜电影网亚洲视频| 亚洲欧洲另类国产综合| 91精品国产综合久久精品性色| 综合色天天鬼久久鬼色| 欧美综合一区二区| 视频一区欧美日韩| 久久在线观看免费| 精品久久一二三区| 欧美日韩在线观看一区二区| 黑人精品欧美一区二区蜜桃| 亚洲国产综合色| 亚洲一区二区三区免费视频| 一区二区国产视频| 奇米影视7777精品一区二区| 五月婷婷欧美视频| 看片网站欧美日韩| 国产成人精品影视| 日本久久电影网| 日韩三区在线观看| 国产精品午夜免费| 亚洲精品欧美综合四区| 亚洲成年人影院| 国产成人在线视频免费播放| 粉嫩aⅴ一区二区三区四区| 色偷偷88欧美精品久久久| 欧美三区在线视频| 久久久精品黄色| 亚洲最大的成人av| 成人免费视频视频在线观看免费| 欧美色区777第一页| 久久这里只有精品首页| 亚洲午夜日本在线观看| 国产精品一区二区久久不卡| 日本韩国精品在线| 中文字幕欧美区| 国产精品久久久久毛片软件| 日本一区二区三区四区在线视频| 久久视频一区二区| 亚洲精品成人精品456| 国产午夜精品在线观看| 欧美日韩高清一区二区三区| 国产日韩精品一区| 亚洲欧洲日产国码二区| 日韩精品一区第一页| av一区二区三区黑人| 日本一区二区电影| 老司机午夜精品99久久| 欧美一区二区三区在线视频| 亚洲视频一二三| 五月婷婷综合网| 高清av一区二区| 欧美一区二区视频在线观看2022| 欧美丝袜丝nylons| 日韩一级片在线观看| 天堂一区二区在线免费观看| 色天使久久综合网天天|