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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? radeon_dri.c

?? x.org上有關(guān)ati系列顯卡最新驅(qū)動
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c,v 1.39 2003/11/06 18:38:00 tsi Exp $ *//* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, *                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> *   Rickard E. Faith <faith@valinux.com> *   Gareth Hughes <gareth@valinux.com> * */#include <string.h>#include <stdio.h>				/* Driver data structures */#include "radeon.h"#include "radeon_video.h"#include "radeon_reg.h"#include "radeon_macros.h"#include "radeon_dri.h"#include "radeon_version.h"				/* X and server generic header files */#include "xf86.h"#include "xf86PciInfo.h"#include "windowstr.h"#include "shadowfb.h"				/* GLX/DRI/DRM definitions */#define _XF86DRI_SERVER_#include "GL/glxtokens.h"#include "sarea.h"#include "radeon_sarea.h"static size_t radeon_drm_page_size;static void RADEONDRITransitionTo2d(ScreenPtr pScreen);static void RADEONDRITransitionTo3d(ScreenPtr pScreen);static void RADEONDRITransitionMultiToSingle3d(ScreenPtr pScreen);static void RADEONDRITransitionSingleToMulti3d(ScreenPtr pScreen);#ifdef USE_XAAstatic void RADEONDRIRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);#endif/* 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 RADEONInitVisualConfigs(ScreenPtr pScreen){    ScrnInfoPtr          pScrn             = xf86Screens[pScreen->myNum];    RADEONInfoPtr        info              = RADEONPTR(pScrn);    int                  numConfigs        = 0;    __GLXvisualConfig   *pConfigs          = 0;    RADEONConfigPrivPtr  pRADEONConfigs    = 0;    RADEONConfigPrivPtr *pRADEONConfigPtrs = 0;    int                  i, accum, stencil, db, use_db;    use_db = !info->noBackBuffer ? 1 : 0;    switch (info->CurrentLayout.pixel_code) {    case 8:  /* 8bpp mode is not support */    case 15: /* FIXME */    case 24: /* FIXME */	xf86DrvMsg(pScreen->myNum, X_ERROR,		   "[dri] RADEONInitVisualConfigs failed "		   "(depth %d not supported).  "		   "Disabling DRI.\n", info->CurrentLayout.pixel_code);	return FALSE;#define RADEON_USE_ACCUM   1#define RADEON_USE_STENCIL 1    case 16:	numConfigs = 1;	if (RADEON_USE_ACCUM)   numConfigs *= 2;	if (RADEON_USE_STENCIL) numConfigs *= 2;	if (use_db)             numConfigs *= 2;	if (!(pConfigs	      = (__GLXvisualConfig *)xcalloc(sizeof(__GLXvisualConfig),					     numConfigs))) {	    return FALSE;	}	if (!(pRADEONConfigs	      = (RADEONConfigPrivPtr)xcalloc(sizeof(RADEONConfigPrivRec),					     numConfigs))) {	    xfree(pConfigs);	    return FALSE;	}	if (!(pRADEONConfigPtrs	      = (RADEONConfigPrivPtr *)xcalloc(sizeof(RADEONConfigPrivPtr),					       numConfigs))) {	    xfree(pConfigs);	    xfree(pRADEONConfigs);	    return FALSE;	}	i = 0;	for (db = use_db; db >= 0; db--) {	  for (accum = 0; accum <= RADEON_USE_ACCUM; accum++) {	    for (stencil = 0; stencil <= RADEON_USE_STENCIL; stencil++) {		pRADEONConfigPtrs[i] = &pRADEONConfigs[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          = info->depthBits;		if (pConfigs[i].depthSize == 24 ? (RADEON_USE_STENCIL - stencil)						: stencil) {		    pConfigs[i].stencilSize    = 8;		} else {		    pConfigs[i].stencilSize    = 0;		}		pConfigs[i].auxBuffers         = 0;		pConfigs[i].level              = 0;		if (accum ||		    (pConfigs[i].stencilSize && pConfigs[i].depthSize == 16)) {		   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 (RADEON_USE_ACCUM)   numConfigs *= 2;	if (RADEON_USE_STENCIL) numConfigs *= 2;	if (use_db)             numConfigs *= 2;	if (!(pConfigs	      = (__GLXvisualConfig *)xcalloc(sizeof(__GLXvisualConfig),					     numConfigs))) {	    return FALSE;	}	if (!(pRADEONConfigs	      = (RADEONConfigPrivPtr)xcalloc(sizeof(RADEONConfigPrivRec),					     numConfigs))) {	    xfree(pConfigs);	    return FALSE;	}	if (!(pRADEONConfigPtrs	      = (RADEONConfigPrivPtr *)xcalloc(sizeof(RADEONConfigPrivPtr),					       numConfigs))) {	    xfree(pConfigs);	    xfree(pRADEONConfigs);	    return FALSE;	}	i = 0;	for (db = use_db; db >= 0; db--) {	  for (accum = 0; accum <= RADEON_USE_ACCUM; accum++) {	    for (stencil = 0; stencil <= RADEON_USE_STENCIL; stencil++) {		pRADEONConfigPtrs[i] = &pRADEONConfigs[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          = 8;		pConfigs[i].redMask            = 0x00FF0000;		pConfigs[i].greenMask          = 0x0000FF00;		pConfigs[i].blueMask           = 0x000000FF;		pConfigs[i].alphaMask          = 0xFF000000;		if (accum) { /* Simulated in software */		    pConfigs[i].accumRedSize   = 16;		    pConfigs[i].accumGreenSize = 16;		    pConfigs[i].accumBlueSize  = 16;		    pConfigs[i].accumAlphaSize = 16;		} 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         = 32;		pConfigs[i].depthSize          = info->depthBits;		if (pConfigs[i].depthSize == 24 ? (RADEON_USE_STENCIL - stencil)						: stencil) {		    pConfigs[i].stencilSize    = 8;		} else {		    pConfigs[i].stencilSize    = 0;		}		pConfigs[i].auxBuffers         = 0;		pConfigs[i].level              = 0;		if (accum ||		    (pConfigs[i].stencilSize && pConfigs[i].depthSize == 16)) {		   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 = pRADEONConfigs;    GlxSetVisualConfigs(numConfigs, pConfigs, (void**)pRADEONConfigPtrs);    return TRUE;}/* Create the Radeon-specific context information */static Bool RADEONCreateContext(ScreenPtr pScreen, VisualPtr visual,				drm_context_t hwContext, void *pVisualConfigPriv,				DRIContextType contextStore){#ifdef PER_CONTEXT_SAREA    ScrnInfoPtr          pScrn = xf86Screens[pScreen->myNum];    RADEONInfoPtr        info  = RADEONPTR(pScrn);    RADEONDRIContextPtr  ctx_info;    ctx_info = (RADEONDRIContextPtr)contextStore;    if (!ctx_info) return FALSE;    if (drmAddMap(info->drmFD, 0,		  info->perctx_sarea_size,		  DRM_SHM,		  DRM_REMOVABLE,		  &ctx_info->sarea_handle) < 0) {	xf86DrvMsg(pScrn->scrnIndex, X_INFO,		   "[dri] could not create private sarea for ctx id (%d)\n",		   (int)hwContext);	return FALSE;    }    if (drmAddContextPrivateMapping(info->drmFD, hwContext,				    ctx_info->sarea_handle) < 0) {	xf86DrvMsg(pScrn->scrnIndex, X_INFO,		   "[dri] could not associate private sarea to ctx id (%d)\n",		   (int)hwContext);	drmRmMap(info->drmFD, ctx_info->sarea_handle);	return FALSE;    }    ctx_info->ctx_id = hwContext;#endif    return TRUE;}/* Destroy the Radeon-specific context information */static void RADEONDestroyContext(ScreenPtr pScreen, drm_context_t hwContext,				 DRIContextType contextStore){#ifdef PER_CONTEXT_SAREA    ScrnInfoPtr          pScrn = xf86Screens[pScreen->myNum];    RADEONInfoPtr        info = RADEONPTR(pScrn);    RADEONDRIContextPtr  ctx_info;    ctx_info = (RADEONDRIContextPtr)contextStore;    if (!ctx_info) return;    if (drmRmMap(info->drmFD, ctx_info->sarea_handle) < 0) {	xf86DrvMsg(pScrn->scrnIndex, X_INFO,		   "[dri] could not remove private sarea for ctx id (%d)\n",		   (int)hwContext);    }#endif}/* 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 Radeon 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 CP are privileged, only the X server * can start/stop the engine. */static void RADEONEnterServer(ScreenPtr pScreen){    ScrnInfoPtr    pScrn = xf86Screens[pScreen->myNum];    RADEONInfoPtr  info  = RADEONPTR(pScrn);    RADEONSAREAPrivPtr pSAREAPriv;    RADEON_MARK_SYNC(info, pScrn);    pSAREAPriv = DRIGetSAREAPrivate(pScrn->pScreen);    if (pSAREAPriv->ctxOwner != DRIGetContext(pScrn->pScreen))	info->XInited3D = FALSE;    /* TODO: Fix this more elegantly.     * Sometimes (especially with multiple DRI clients), this code     * runs immediately after a DRI client issues a rendering command.     *     * The accel code regularly inserts WAIT_UNTIL_IDLE into the     * command buffer that is sent with the indirect buffer below.     * The accel code fails to set the 3D cache flush registers for     * the R300 before sending WAIT_UNTIL_IDLE. Sending a cache flush     * on these new registers is not necessary for pure 2D functionality,     * but it *is* necessary after 3D operations.     * Without the cache flushes before WAIT_UNTIL_IDLE, the R300 locks up.     *     * The CP_IDLE call into the DRM indirectly flushes all caches and     * thus avoids the lockup problem, but the solution is far from ideal.     * Better solutions could be:     *  - always flush caches when entering the X server     *  - track the type of rendering commands somewhere and issue     *    cache flushes when they change     * However, I don't feel confident enough with the control flow     * inside the X server to implement either fix. -- nh     */        /* On my computer (Radeon Mobility M10)       The fix below results in x11perf -shmput500 rate of 245.0/sec       which is lower than 264.0/sec I get without it.              Doing the same each time before indirect buffer is submitted       results in x11perf -shmput500 rate of 225.0/sec.              On the other hand, not using CP acceleration at all benchmarks       at 144.0/sec.             For now let us accept this as a lesser evil, especially as the       DRM driver for R300 is still in flux.              Once the code is more stable this should probably be moved into DRM driver.    */          if (info->ChipFamily>=CHIP_FAMILY_R300)        drmCommandNone(info->drmFD, DRM_RADEON_CP_IDLE);}/* 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 Radeon since the client detects when it's * context is not currently loaded and then load's it itself.  Since the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91精品精华液一区二区三区 | 免费观看久久久4p| 欧美日韩国产小视频| 首页欧美精品中文字幕| 欧美一区二区三区免费视频| 人人爽香蕉精品| 久久亚洲私人国产精品va媚药| 韩国在线一区二区| 国产精品国产三级国产aⅴ无密码| 99久久精品久久久久久清纯| 亚洲欧美视频在线观看| 欧美日韩中文国产| 裸体一区二区三区| 国产亚洲欧美在线| 成人av第一页| 亚洲va韩国va欧美va| 日韩欧美自拍偷拍| 粉嫩蜜臀av国产精品网站| 成人欧美一区二区三区视频网页| 在线视频中文字幕一区二区| 青青国产91久久久久久| 国产日韩一级二级三级| 在线观看视频一区二区| 美女精品一区二区| 亚洲欧美综合在线精品| 欧美日韩国产电影| 国产乱色国产精品免费视频| 中文字幕一区二区三区在线播放| 欧美性大战久久| 精品一区二区三区在线视频| 亚洲三级小视频| 日韩一区二区电影在线| 成人国产免费视频| 免费欧美日韩国产三级电影| 国产精品无人区| 这里只有精品视频在线观看| 国产成人在线视频网址| 香蕉乱码成人久久天堂爱免费| 久久久99久久| 欧美乱妇一区二区三区不卡视频| 国产乱码字幕精品高清av| 香蕉久久一区二区不卡无毒影院| 久久久国际精品| 欧美久久高跟鞋激| 99久久久精品免费观看国产蜜| 美女一区二区在线观看| 亚洲裸体xxx| 久久久综合九色合综国产精品| 欧美日韩综合在线| 成人app网站| 国产一区欧美一区| 奇米影视一区二区三区| 亚洲激情校园春色| 欧美激情在线一区二区| 日韩午夜精品视频| 欧美精品自拍偷拍动漫精品| 91老师片黄在线观看| 福利视频网站一区二区三区| 另类专区欧美蜜桃臀第一页| 日韩激情视频在线观看| 亚洲一区二区三区视频在线 | 精品国产电影一区二区| 91国产免费看| 91麻豆国产福利在线观看| 国产成人免费xxxxxxxx| 国产一区二区视频在线| 免费成人在线播放| 婷婷激情综合网| 香蕉加勒比综合久久| 亚洲丰满少妇videoshd| 一区二区三区视频在线看| 国产精品理伦片| 国产视频一区二区三区在线观看| 精品捆绑美女sm三区| 欧美不卡一区二区三区四区| 日韩欧美卡一卡二| 欧美videossexotv100| 日韩视频免费观看高清完整版| 欧美日韩国产在线观看| 欧美日韩精品一二三区| 欧美精品高清视频| 777a∨成人精品桃花网| 在线电影欧美成精品| 制服丝袜中文字幕一区| 制服丝袜亚洲播放| 日韩视频永久免费| 2023国产精品| 国产精品色在线| 亚洲色图欧美激情| 亚洲成人自拍一区| 日韩国产欧美三级| 久久99蜜桃精品| 国产91在线观看丝袜| 成人avav影音| 欧美性一二三区| 日韩一级大片在线| 久久久一区二区| 国产精品久99| 亚洲444eee在线观看| 久久aⅴ国产欧美74aaa| 成人永久免费视频| 色老汉一区二区三区| 这里只有精品视频在线观看| 久久免费午夜影院| 亚洲欧美激情一区二区| 日韩—二三区免费观看av| 国产在线视频不卡二| 91在线你懂得| 91精品国产一区二区三区| 久久久久综合网| 一区av在线播放| 久久91精品国产91久久小草| 丁香五精品蜜臀久久久久99网站 | 五月激情丁香一区二区三区| 国产综合久久久久久鬼色| 99久久99久久免费精品蜜臀| 欧美喷潮久久久xxxxx| 日韩欧美视频一区| 亚洲美女视频在线| 国内精品国产成人| 欧美中文字幕久久| 久久新电视剧免费观看| 亚洲最色的网站| 国产精品69毛片高清亚洲| 欧美日韩国产一区| 亚洲欧美一区二区视频| 国产一区在线看| 69p69国产精品| 亚洲黄色性网站| 国产成人欧美日韩在线电影| 欧美一区欧美二区| 亚洲精品精品亚洲| 国产91在线|亚洲| 欧美一区二区三区小说| 伊人一区二区三区| 福利91精品一区二区三区| 这里是久久伊人| 亚洲国产精品自拍| 99久久久国产精品| 久久精品视频在线免费观看| 亚洲成人三级小说| 精品中文字幕一区二区| 福利视频网站一区二区三区| 91日韩一区二区三区| 26uuu国产日韩综合| 日av在线不卡| 在线国产电影不卡| 国产日韩欧美精品一区| 久久精品国产亚洲高清剧情介绍| 91免费视频观看| 精品福利视频一区二区三区| 亚洲免费观看视频| 国产乱人伦精品一区二区在线观看| 337p亚洲精品色噜噜狠狠| 亚洲精品自拍动漫在线| 国产白丝网站精品污在线入口| 666欧美在线视频| 日日骚欧美日韩| 色综合色综合色综合色综合色综合| 日韩亚洲欧美高清| 亚洲国产cao| 欧美日韩一区二区三区免费看| 亚洲国产激情av| 久久精品99国产精品日本| 欧美日韩精品欧美日韩精品一综合| 洋洋成人永久网站入口| 91欧美一区二区| 日韩免费视频一区二区| 亚洲成国产人片在线观看| 韩国精品主播一区二区在线观看| 欧美精品99久久久**| 一区二区三区四区在线播放 | 亚洲欧美偷拍另类a∨色屁股| 国产成人精品www牛牛影视| 日韩欧美中文字幕一区| 国产精品国产自产拍在线| 国产在线观看免费一区| 精品成a人在线观看| 精品一区二区精品| 久久综合色播五月| 极品美女销魂一区二区三区 | 日韩一区二区三区免费观看| 亚洲成人午夜影院| 日韩欧美国产电影| 精品中文字幕一区二区 | 555夜色666亚洲国产免| 日韩激情视频网站| 56国语精品自产拍在线观看| 亚洲成人自拍一区| 91精品一区二区三区在线观看| 蜜桃一区二区三区在线| 精品不卡在线视频| 国产成人精品免费视频网站| 国产精品国产三级国产aⅴ中文| 91国产福利在线| 偷拍亚洲欧洲综合| 91精品国产一区二区人妖| 日韩精品视频网站| 国产日韩欧美一区二区三区综合| 成人黄色在线看|