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

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

?? r128_dri.c

?? x.org上有關ati系列顯卡最新驅動
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c,v 1.31 2003/09/28 20:15:53 alanh Exp $ *//* * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario, *                      Precision Insight, Inc., Cedar Park, Texas, 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, PRECISION INSIGHT, 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#include <string.h>#include <stdio.h>/* * Authors: *   Kevin E. Martin <martin@valinux.com> *   Rickard E. Faith <faith@valinux.com> *   Daryll Strauss <daryll@valinux.com> *   Gareth Hughes <gareth@valinux.com> * */				/* Driver data structures */#include "r128.h"#include "r128_dri.h"#include "r128_common.h"#include "r128_reg.h"#include "r128_sarea.h"#include "r128_version.h"				/* X and server generic header files */#include "xf86.h"#include "windowstr.h"#include "atipciids.h"#include "shadowfb.h"				/* GLX/DRI/DRM definitions */#define _XF86DRI_SERVER_#include "GL/glxtokens.h"#include "sarea.h"static size_t r128_drm_page_size;static void R128DRITransitionTo2d(ScreenPtr pScreen);static void R128DRITransitionTo3d(ScreenPtr pScreen);static void R128DRITransitionMultiToSingle3d(ScreenPtr pScreen);static void R128DRITransitionSingleToMulti3d(ScreenPtr pScreen);static void R128DRIRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);/* Initialize the visual configs that are supported by the hardware.   These are combined with the visual configs that the indirect   rendering core supports, and the intersection is exported to the   client. */static Bool R128InitVisualConfigs(ScreenPtr pScreen){    ScrnInfoPtr       pScrn            = xf86Screens[pScreen->myNum];    R128InfoPtr       info             = R128PTR(pScrn);    int               numConfigs       = 0;    __GLXvisualConfig *pConfigs        = 0;    R128ConfigPrivPtr pR128Configs     = 0;    R128ConfigPrivPtr *pR128ConfigPtrs = 0;    int               i, accum, stencil, db;    switch (info->CurrentLayout.pixel_code) {    case 8:  /* 8bpp mode is not support */    case 15: /* FIXME */    case 24: /* FIXME */	xf86DrvMsg(pScreen->myNum, X_ERROR,		   "[dri] R128DRIScreenInit failed (depth %d not supported).  "		   "Disabling DRI.\n", info->CurrentLayout.pixel_code);	return FALSE;#define R128_USE_ACCUM   1#define R128_USE_STENCIL 1#define R128_USE_DB      1    case 16:	numConfigs = 1;	if (R128_USE_ACCUM)   numConfigs *= 2;	if (R128_USE_STENCIL) numConfigs *= 2;	if (R128_USE_DB)      numConfigs *= 2;	if (!(pConfigs	      = (__GLXvisualConfig*)xcalloc(sizeof(__GLXvisualConfig),					      numConfigs))) {	    return FALSE;	}	if (!(pR128Configs	      = (R128ConfigPrivPtr)xcalloc(sizeof(R128ConfigPrivRec),					     numConfigs))) {	    xfree(pConfigs);	    return FALSE;	}	if (!(pR128ConfigPtrs	      = (R128ConfigPrivPtr*)xcalloc(sizeof(R128ConfigPrivPtr),					      numConfigs))) {	    xfree(pConfigs);	    xfree(pR128Configs);	    return FALSE;	}	i = 0;	for (db = 0; db <= R128_USE_DB; db++) {	  for (accum = 0; accum <= R128_USE_ACCUM; accum++) {	    for (stencil = 0; stencil <= R128_USE_STENCIL; stencil++) {		pR128ConfigPtrs[i] = &pR128Configs[i];		pConfigs[i].vid                = (VisualID)(-1);		pConfigs[i].class              = -1;		pConfigs[i].rgba               = TRUE;		pConfigs[i].redSize            = 5;		pConfigs[i].greenSize          = 6;		pConfigs[i].blueSize           = 5;		pConfigs[i].alphaSize          = 0;		pConfigs[i].redMask            = 0x0000F800;		pConfigs[i].greenMask          = 0x000007E0;		pConfigs[i].blueMask           = 0x0000001F;		pConfigs[i].alphaMask          = 0x00000000;		if (accum) { /* Simulated in software */		    pConfigs[i].accumRedSize   = 16;		    pConfigs[i].accumGreenSize = 16;		    pConfigs[i].accumBlueSize  = 16;		    pConfigs[i].accumAlphaSize = 0;		} else {		    pConfigs[i].accumRedSize   = 0;		    pConfigs[i].accumGreenSize = 0;		    pConfigs[i].accumBlueSize  = 0;		    pConfigs[i].accumAlphaSize = 0;		}		if (db)		    pConfigs[i].doubleBuffer       = TRUE;		else		    pConfigs[i].doubleBuffer       = FALSE;		pConfigs[i].stereo             = FALSE;		pConfigs[i].bufferSize         = 16;		pConfigs[i].depthSize          = 16;		if (stencil)		    pConfigs[i].stencilSize    = 8; /* Simulated in software */		else		    pConfigs[i].stencilSize    = 0;		pConfigs[i].auxBuffers         = 0;		pConfigs[i].level              = 0;		if (accum || stencil) {		   pConfigs[i].visualRating    = GLX_SLOW_CONFIG;		} else {		   pConfigs[i].visualRating    = GLX_NONE;		}		pConfigs[i].transparentPixel   = GLX_NONE;		pConfigs[i].transparentRed     = 0;		pConfigs[i].transparentGreen   = 0;		pConfigs[i].transparentBlue    = 0;		pConfigs[i].transparentAlpha   = 0;		pConfigs[i].transparentIndex   = 0;		i++;	    }	  }	}	break;    case 32:	numConfigs = 1;	if (R128_USE_ACCUM)   numConfigs *= 2;	if (R128_USE_STENCIL) numConfigs *= 2;	if (R128_USE_DB)      numConfigs *= 2;	if (!(pConfigs	      = (__GLXvisualConfig*)xcalloc(sizeof(__GLXvisualConfig),					      numConfigs))) {	    return FALSE;	}	if (!(pR128Configs	      = (R128ConfigPrivPtr)xcalloc(sizeof(R128ConfigPrivRec),					     numConfigs))) {	    xfree(pConfigs);	    return FALSE;	}	if (!(pR128ConfigPtrs	      = (R128ConfigPrivPtr*)xcalloc(sizeof(R128ConfigPrivPtr),					      numConfigs))) {	    xfree(pConfigs);	    xfree(pR128Configs);	    return FALSE;	}	i = 0;	for (db = 0; db <= R128_USE_DB; db++) {	  for (accum = 0; accum <= R128_USE_ACCUM; accum++) {	    for (stencil = 0; stencil <= R128_USE_STENCIL; stencil++) {		pR128ConfigPtrs[i] = &pR128Configs[i];		pConfigs[i].vid                = (VisualID)(-1);		pConfigs[i].class              = -1;		pConfigs[i].rgba               = TRUE;		pConfigs[i].redSize            = 8;		pConfigs[i].greenSize          = 8;		pConfigs[i].blueSize           = 8;		pConfigs[i].alphaSize          = 0;		pConfigs[i].redMask            = 0x00FF0000;		pConfigs[i].greenMask          = 0x0000FF00;		pConfigs[i].blueMask           = 0x000000FF;		pConfigs[i].alphaMask          = 0x00000000;		if (accum) { /* Simulated in software */		    pConfigs[i].accumRedSize   = 16;		    pConfigs[i].accumGreenSize = 16;		    pConfigs[i].accumBlueSize  = 16;		    pConfigs[i].accumAlphaSize = 0;		} else {		    pConfigs[i].accumRedSize   = 0;		    pConfigs[i].accumGreenSize = 0;		    pConfigs[i].accumBlueSize  = 0;		    pConfigs[i].accumAlphaSize = 0;		}		if (db)		    pConfigs[i].doubleBuffer       = TRUE;		else		    pConfigs[i].doubleBuffer       = FALSE;		pConfigs[i].stereo             = FALSE;		pConfigs[i].bufferSize         = 24;		if (stencil) {		    pConfigs[i].depthSize      = 24;		    pConfigs[i].stencilSize    = 8;		} else {		    pConfigs[i].depthSize      = 24;		    pConfigs[i].stencilSize    = 0;		}		pConfigs[i].auxBuffers         = 0;		pConfigs[i].level              = 0;		if (accum) {		   pConfigs[i].visualRating    = GLX_SLOW_CONFIG;		} else {		   pConfigs[i].visualRating    = GLX_NONE;		}		pConfigs[i].transparentPixel   = GLX_NONE;		pConfigs[i].transparentRed     = 0;		pConfigs[i].transparentGreen   = 0;		pConfigs[i].transparentBlue    = 0;		pConfigs[i].transparentAlpha   = 0;		pConfigs[i].transparentIndex   = 0;		i++;	    }	  }	}	break;    }    info->numVisualConfigs   = numConfigs;    info->pVisualConfigs     = pConfigs;    info->pVisualConfigsPriv = pR128Configs;    GlxSetVisualConfigs(numConfigs, pConfigs, (void**)pR128ConfigPtrs);    return TRUE;}/* Create the Rage 128-specific context information */static Bool R128CreateContext(ScreenPtr pScreen, VisualPtr visual,			      drm_context_t hwContext, void *pVisualConfigPriv,			      DRIContextType contextStore){    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];    R128InfoPtr info = R128PTR(pScrn);    info->drmCtx = hwContext;    return TRUE;}/* Destroy the Rage 128-specific context information */static void R128DestroyContext(ScreenPtr pScreen, drm_context_t hwContext,			       DRIContextType contextStore){    /* Nothing yet */}/* Called when the X server is woken up to allow the last client's   context to be saved and the X server's context to be loaded.  This is   not necessary for the Rage 128 since the client detects when it's   context is not currently loaded and then load's it itself.  Since the   registers to start and stop the CCE are privileged, only the X server   can start/stop the engine. */static void R128EnterServer(ScreenPtr pScreen){    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];    R128InfoPtr info = R128PTR(pScrn);    if (info->accel) info->accel->NeedToSync = TRUE;}/* Called when the X server goes to sleep to allow the X server's   context to be saved and the last client's context to be loaded.  This   is not necessary for the Rage 128 since the client detects when it's   context is not currently loaded and then load's it itself.  Since the   registers to start and stop the CCE are privileged, only the X server   can start/stop the engine. */static void R128LeaveServer(ScreenPtr pScreen){    ScrnInfoPtr   pScrn     = xf86Screens[pScreen->myNum];    R128InfoPtr   info      = R128PTR(pScrn);    unsigned char *R128MMIO = info->MMIO;    if (!info->directRenderingEnabled) {	/* Save all hardware scissors */	info->sc_left     = INREG(R128_SC_LEFT);	info->sc_right    = INREG(R128_SC_RIGHT);	info->sc_top      = INREG(R128_SC_TOP);	info->sc_bottom   = INREG(R128_SC_BOTTOM);	info->aux_sc_cntl = INREG(R128_SC_BOTTOM);    } else if (info->CCEInUse) {	R128CCEReleaseIndirect(pScrn);	info->CCEInUse = FALSE;    }}/* Contexts can be swapped by the X server if necessary.  This callback   is currently only used to perform any functions necessary when   entering or leaving the X server, and in the future might not be   necessary. */static void R128DRISwapContext(ScreenPtr pScreen, DRISyncType syncType,			       DRIContextType oldContextType, void *oldContext,			       DRIContextType newContextType, void *newContext){    if ((syncType==DRI_3D_SYNC) && (oldContextType==DRI_2D_CONTEXT) &&	(newContextType==DRI_2D_CONTEXT)) { /* Entering from Wakeup */	R128EnterServer(pScreen);    }    if ((syncType==DRI_2D_SYNC) && (oldContextType==DRI_NO_CONTEXT) &&	(newContextType==DRI_2D_CONTEXT)) { /* Exiting from Block Handler */	R128LeaveServer(pScreen);    }}/* Initialize the state of the back and depth buffers. */static void R128DRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 indx){    /* FIXME: This routine needs to have acceleration turned on */    ScreenPtr   pScreen = pWin->drawable.pScreen;    ScrnInfoPtr pScrn   = xf86Screens[pScreen->myNum];    R128InfoPtr info    = R128PTR(pScrn);    BoxPtr      pbox, pboxSave;    int         nbox, nboxSave;    int         depth;    /* FIXME: Use accel when CCE 2D code is written     * EA: What is this code kept for? Radeon doesn't have it and     * has a comment: "There's no need for the 2d driver to be clearing     * buffers for the 3d client.  It knows how to do that on its own."     */    if (info->directRenderingEnabled)	return;    /* FIXME: This should be based on the __GLXvisualConfig info */    switch (pScrn->bitsPerPixel) {    case  8: depth = 0x000000ff; break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产剧情av麻豆香蕉精品| 亚洲欧美日韩在线播放| 欧美在线播放高清精品| 波多野结衣视频一区| 国产成a人无v码亚洲福利| 国产一区在线不卡| 国产一区免费电影| 成人av资源网站| 91色porny| 欧美丝袜第三区| 538prom精品视频线放| 欧美一区二区成人| 久久精品男人天堂av| 中文天堂在线一区| 亚洲欧美在线另类| 亚洲电影一级片| 久久精品国产亚洲aⅴ| 国产美女在线观看一区| 成人午夜视频在线观看| 色94色欧美sute亚洲线路一ni | 欧美a一区二区| 九九九久久久精品| 国产 欧美在线| 日本高清不卡一区| 91精品黄色片免费大全| 国产校园另类小说区| 亚洲欧洲精品天堂一级 | 精品三级在线看| 国产亚洲福利社区一区| 亚洲欧美日韩在线| 蜜臀av一区二区在线免费观看| 狠狠久久亚洲欧美| 色视频一区二区| 欧美刺激午夜性久久久久久久| 久久久久久久久97黄色工厂| 亚洲美女免费在线| 久久99精品一区二区三区三区| 成人精品一区二区三区中文字幕| 欧美午夜精品免费| 国产亚洲成av人在线观看导航| 亚洲国产精品一区二区久久恐怖片| 日日摸夜夜添夜夜添亚洲女人| 国产成人综合网站| 7777精品伊人久久久大香线蕉 | 亚洲线精品一区二区三区八戒| 久久99精品国产麻豆不卡| 91亚洲精华国产精华精华液| 欧美一级搡bbbb搡bbbb| 亚洲另类在线一区| 国产一区二区在线看| 欧美午夜一区二区三区免费大片| 久久婷婷国产综合精品青草| 亚洲.国产.中文慕字在线| 国产精品自在在线| 91精品国产91久久久久久最新毛片| 国产精品美女一区二区三区| 韩国午夜理伦三级不卡影院| 欧美在线观看18| 日韩伦理电影网| 成人妖精视频yjsp地址| 精品国产一区二区国模嫣然| 视频一区二区不卡| 欧美无砖专区一中文字| 亚洲视频在线一区| av午夜精品一区二区三区| 国产亚洲综合av| 国产自产视频一区二区三区| 欧美一区2区视频在线观看| 亚洲成人激情社区| 欧美性xxxxx极品少妇| 一二三四区精品视频| 91一区二区在线| 亚洲欧美激情视频在线观看一区二区三区| 精品一区在线看| 久久综合精品国产一区二区三区| 美腿丝袜亚洲三区| 日韩一区二区三区视频| 蜜臀av性久久久久蜜臀av麻豆| 欧美系列日韩一区| 日韩一区精品视频| 日韩一区二区三区精品视频| 日韩av午夜在线观看| 日韩欧美在线网站| 久久国产剧场电影| 久久久www成人免费无遮挡大片| 狠狠色综合播放一区二区| 国产亚洲精品超碰| 99国产精品99久久久久久| 亚洲精品国产品国语在线app| 色狠狠一区二区| 日韩中文字幕区一区有砖一区| 91精品国产综合久久久蜜臀粉嫩| 日韩不卡一区二区三区| 久久综合中文字幕| 成人av电影在线| 亚洲成a人片在线不卡一二三区| 欧美美女网站色| 国产一区二区三区久久悠悠色av| 国产欧美日韩综合| 欧美性极品少妇| 国内成人免费视频| 亚洲精品免费看| 欧美日韩国产首页| 国产精品99久久久| 亚洲激情第一区| 欧美成人video| 99久久综合精品| 日本伊人精品一区二区三区观看方式| 精品1区2区在线观看| 99视频国产精品| 蜜桃一区二区三区四区| 欧美韩日一区二区三区| 欧美精品在线观看播放| 国产精品一区在线观看乱码| 亚洲一区二区五区| 久久蜜桃av一区二区天堂| 欧美性生活大片视频| 国产精品一级在线| 日韩在线卡一卡二| 一区二区视频免费在线观看| 精品福利视频一区二区三区| 色欧美日韩亚洲| 豆国产96在线|亚洲| 天堂蜜桃一区二区三区| 亚洲天堂网中文字| 久久久午夜精品| 欧美一三区三区四区免费在线看 | 日韩亚洲欧美成人一区| 91丨九色丨国产丨porny| 国产美女一区二区| 看国产成人h片视频| 亚洲成人综合网站| 最新国产精品久久精品| 久久久久久99久久久精品网站| 欧美日韩国产免费一区二区| av中文一区二区三区| 国产成人精品在线看| 狠狠久久亚洲欧美| 久久丁香综合五月国产三级网站 | 日韩午夜小视频| 一本色道亚洲精品aⅴ| 成人妖精视频yjsp地址| 国产乱人伦偷精品视频免下载| 日韩主播视频在线| 丝袜美腿亚洲一区二区图片| 亚洲综合色区另类av| 亚洲天堂中文字幕| 亚洲人亚洲人成电影网站色| 国产欧美一区二区精品婷婷| 精品av久久707| 久久精品欧美一区二区三区麻豆 | 亚洲色图欧洲色图婷婷| 国产精品三级在线观看| 国产无人区一区二区三区| www精品美女久久久tv| 亚洲精品一区二区三区蜜桃下载| 日韩视频免费观看高清完整版在线观看 | 91黄视频在线| 欧美视频自拍偷拍| 欧美日韩电影一区| 欧美一区二区三区啪啪| 日韩一级片在线观看| 日韩精品专区在线影院重磅| 精品日韩99亚洲| 国产农村妇女毛片精品久久麻豆| 欧美经典一区二区| 亚洲婷婷国产精品电影人久久| 亚洲人成在线观看一区二区| 亚洲午夜在线视频| 日韩国产欧美三级| 国产永久精品大片wwwapp| 不卡电影一区二区三区| 91成人免费在线| 777xxx欧美| 久久―日本道色综合久久| 国产欧美日韩视频在线观看| 国产精品久久久久aaaa樱花| 亚洲一区在线观看网站| 免费成人在线观看| 成人看片黄a免费看在线| 色综合久久中文字幕| 欧美一区二区三区四区高清| 久久日韩精品一区二区五区| 中文字幕亚洲区| 秋霞影院一区二区| av电影天堂一区二区在线| 91成人国产精品| 国产拍揄自揄精品视频麻豆| 亚洲欧美一区二区三区久本道91| 日韩精品1区2区3区| 国产超碰在线一区| 国产suv精品一区二区883| 欧美视频一区在线观看| 久久女同互慰一区二区三区| 一二三四社区欧美黄| 懂色av一区二区三区蜜臀| 欧美日本一道本在线视频| 中文字幕二三区不卡| 日韩成人dvd| 欧洲日韩一区二区三区|