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

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

?? radeon_dri.c

?? x.org上有關ati系列顯卡最新驅動
?? 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一区二区三区免费野_久草精品视频
成人黄色av网站在线| 一区2区3区在线看| 久久国产乱子精品免费女| 欧美日韩一区二区三区免费看| 亚洲成人精品影院| 久久久久高清精品| 色综合天天综合色综合av| 婷婷成人综合网| 亚洲国产精品黑人久久久| 欧美日韩国产一区| 麻豆国产精品视频| 亚洲三级电影全部在线观看高清| 欧美精品第1页| 高清不卡一区二区在线| 天堂成人国产精品一区| 中文字幕av一区二区三区免费看| 欧美日本一区二区| 国产一区二区三区免费看| 一区二区视频在线看| 欧美精品一区二区三区高清aⅴ| 99精品桃花视频在线观看| 一区二区三区不卡视频| 久久久久一区二区三区四区| 欧美日韩不卡在线| 91在线云播放| 丁香婷婷综合激情五月色| 亚洲摸摸操操av| 久久久噜噜噜久久人人看| 94-欧美-setu| 国产伦精品一区二区三区免费 | 欧美午夜电影在线播放| 国产成人亚洲综合a∨猫咪| 天天综合天天综合色| 久久精品在线观看| 日韩三级视频中文字幕| 在线视频综合导航| 成人开心网精品视频| 亚洲r级在线视频| 亚洲欧美国产77777| 中文字幕乱码一区二区免费| 欧美日韩免费观看一区三区| 色成年激情久久综合| 成人伦理片在线| 看国产成人h片视频| 亚洲午夜精品在线| 亚洲欧洲av在线| 欧美一区二区日韩| 91免费国产视频网站| 成人h动漫精品| 成人美女在线观看| 国产伦精品一区二区三区免费| 久久精品国产秦先生| 亚洲一区二区在线观看视频| 自拍偷在线精品自拍偷无码专区| 国产农村妇女毛片精品久久麻豆 | 欧日韩精品视频| 91在线免费视频观看| 国产精品亚洲一区二区三区在线 | 日本va欧美va欧美va精品| 亚洲一区二区av在线| 欧美国产在线观看| 51久久夜色精品国产麻豆| 国产精品电影院| 欧美欧美午夜aⅴ在线观看| av在线不卡网| 99久久综合狠狠综合久久| 亚洲国产精品麻豆| 亚洲精品欧美专区| 亚洲三级电影全部在线观看高清| 国产精品福利影院| 欧美国产成人精品| 亚洲三级理论片| 亚洲国产wwwccc36天堂| 天天影视涩香欲综合网| 性欧美大战久久久久久久久| 亚洲成人av电影| 精品一区二区三区不卡| 国产一区二区久久| 不卡一区在线观看| 欧美色图第一页| 欧美在线观看视频在线| 欧美一区二区视频在线观看2020| 精品国产乱码久久久久久夜甘婷婷| 日韩欧美国产午夜精品| 欧美国产日韩精品免费观看| 一区二区三区中文字幕精品精品| 亚洲成人av中文| 麻豆视频一区二区| a美女胸又www黄视频久久| 91搞黄在线观看| 精品日韩欧美在线| 亚洲素人一区二区| 精品福利视频一区二区三区| 中文字幕欧美国产| 久久激情五月婷婷| 色哟哟欧美精品| 中文字幕av资源一区| 美女网站在线免费欧美精品| 日本高清无吗v一区| 2021国产精品久久精品| 亚洲一区二区视频在线观看| 国产精品18久久久久久久久久久久| 欧美三电影在线| 中文字幕一区视频| 国产精品2024| 亚洲精品一区二区三区蜜桃下载| 亚洲国产日韩精品| 色婷婷综合久久| 国产三级欧美三级日产三级99| 天堂精品中文字幕在线| 91在线精品一区二区三区| 久久久综合激的五月天| 秋霞电影一区二区| 欧美高清hd18日本| 亚洲午夜在线电影| 在线观看日韩av先锋影音电影院| 国产精品三级久久久久三级| 国产一区二区三区日韩| 欧美成人精品二区三区99精品| 亚洲成av人片在www色猫咪| 一本到不卡精品视频在线观看| 国产农村妇女毛片精品久久麻豆 | 欧美亚洲综合另类| 综合精品久久久| 国产精品一区二区无线| 26uuu另类欧美亚洲曰本| 六月婷婷色综合| 日韩西西人体444www| 美女一区二区久久| 欧美r级在线观看| 精品一区二区三区香蕉蜜桃 | 欧美三区免费完整视频在线观看| 成人免费在线播放视频| 成人av网址在线| 国产精品久久久久久久第一福利| 丁香激情综合国产| 国产精品无人区| 91亚洲男人天堂| 亚洲精品少妇30p| 欧美在线观看视频在线| 亚洲va欧美va天堂v国产综合| 欧美久久一区二区| 麻豆成人久久精品二区三区红| 欧美成人精品二区三区99精品| 看片网站欧美日韩| 精品福利一二区| 大桥未久av一区二区三区中文| 中文字幕亚洲视频| 欧美网站一区二区| 免费成人性网站| 精品嫩草影院久久| 粉嫩av一区二区三区粉嫩| 自拍偷拍亚洲综合| 欧美精品久久久久久久多人混战| 日韩福利电影在线| 久久久久久久国产精品影院| 成人黄色大片在线观看| 亚洲一区二区av电影| 日韩一本二本av| 丰满白嫩尤物一区二区| 一区二区三区四区不卡在线 | 国产精品一区二区免费不卡| 中文在线免费一区三区高中清不卡| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 国产成人在线免费| 亚洲色图.com| 日韩欧美一区二区视频| 丁香天五香天堂综合| 夜夜精品视频一区二区| 91精品国产综合久久小美女| 国产黄色精品视频| 亚洲一区二区中文在线| www成人在线观看| 91丨九色丨国产丨porny| 午夜免费久久看| 国产丝袜欧美中文另类| 色8久久精品久久久久久蜜| 日韩不卡一二三区| 亚洲国产高清在线观看视频| 在线观看日韩毛片| 国产一区二区精品久久99| 亚洲资源中文字幕| 久久蜜桃一区二区| 欧美三级在线看| 不卡影院免费观看| 久久精品国产一区二区三 | fc2成人免费人成在线观看播放| 日日夜夜一区二区| 中文字幕乱码久久午夜不卡 | 奇米色一区二区| 亚洲日本在线视频观看| www国产亚洲精品久久麻豆| 在线观看视频一区| 成人激情动漫在线观看| 美女视频黄频大全不卡视频在线播放| 国产精品初高中害羞小美女文| 日韩欧美一二三| 欧美午夜寂寞影院| 91香蕉视频黄| 成人激情免费视频|