⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gamma_macros.h

📁 Mesa is an open-source implementation of the OpenGL specification - a system for rendering interacti
💻 H
📖 第 1 页 / 共 2 页
字号:
/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h,v 1.5 2002/02/22 21:33:02 dawes Exp $ *//**************************************************************************Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.All Rights Reserved.Permission is hereby granted, free of charge, to any person obtaining acopy of this software and associated documentation files (the"Software"), to deal in the Software without restriction, includingwithout limitation the rights to use, copy, modify, merge, publish,distribute, sub license, and/or sell copies of the Software, and topermit persons to whom the Software is furnished to do so, subject tothe following conditions:The above copyright notice and this permission notice (including thenext paragraph) shall be included in all copies or substantial portionsof the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FORANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THESOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.**************************************************************************//* * Authors: *   Kevin E. Martin <kevin@precisioninsight.com> * */#ifndef _GAMMA_MACROS_H_#define _GAMMA_MACROS_H_#define DEBUG_DRMDMA#define DEBUG_ERRORS#define DEBUG_COMMANDS_NOT#define DEBUG_VERBOSE_NOT#define DEBUG_VERBOSE_EXTRA_NOT#define RANDOMIZE_COLORS_NOT#define TURN_OFF_CLEARS_NOT#define CULL_ALL_PRIMS_NOT#define TURN_OFF_DEPTH_NOT#define TURN_OFF_BLEND_NOT#define FAST_CLEAR_4_NOT#define FORCE_DEPTH32_NOT#define DONT_SEND_DMA_NOT#define TURN_OFF_FCP_NOT#define TURN_OFF_TEXTURES_NOT#define DO_VALIDATE#define GAMMA_DMA_BUFFER_SIZE 4096#if 0#define GAMMA_DMA_SEND_FLAGS    DRM_DMA_PRIORITY#define GAMMA_DMA_SEND_FLAGS    DRM_DMA_BLOCK#else/* MUST use non-blocking dma flags for drawable lock routines */#define GAMMA_DMA_SEND_FLAGS    0#endif#if 0#define GAMMA_DMA_GET_FLAGS     \    (DRM_DMA_SMALLER_OK | DRM_DMA_LARGER_OK | DRM_DMA_WAIT)#else#define GAMMA_DMA_GET_FLAGS     DRM_DMA_WAIT#endif#if defined(DEBUG_DRMDMA) || defined(DEBUG_COMMANDS) || defined(DEBUG_VERBOSE)#include <stdio.h>#endif/* Note: The argument to DEBUG_GLCMDS() _must_ be enclosed in parenthesis */#ifdef DEBUG_VERBOSE#define DEBUG_GLCMDS(s) printf s#else#define DEBUG_GLCMDS(s)#endif/* Note: The argument to DEBUG_DMACMDS() _must_ be enclosed in parenthesis */#ifdef DEBUG_DRMDMA#define DEBUG_DMACMDS(s) printf s#else#define DEBUG_DMACMDS(s)#endif/* Note: The argument to DEBUG_WRITE() _must_ be enclosed in parenthesis */#ifdef DEBUG_COMMANDS#define DEBUG_WRITE(s) printf s#else#define DEBUG_WRITE(s)#endif/* Note: The argument to DEBUG_ERROR() _must_ be enclosed in parenthesis */#ifdef DEBUG_ERRORS#define DEBUG_ERROR(s) printf s#else#define DEBUG_ERROR(s)#endif#define WRITEV(buf,val1,val2,val3,val4)                               \do {                                                                  \    buf++->i = 0x9C008300;                        \    buf++->f = val1;                                                   \    buf++->f = val2;                                                   \    buf++->f = val3;                                                   \    buf++->f = val4;                                                   \} while (0)#define WRITE(buf,reg,val)                                            \do {                                                                  \    buf++->i = Glint##reg##Tag;                                       \    buf++->i = val;                                                   \    DEBUG_WRITE(("WRITE(buf, %s, 0x%08x);\n", #reg, (int)val));       \} while (0)#define WRITEF(buf,reg,val)                                           \do {                                                                  \    buf++->i = Glint##reg##Tag;                                       \    buf++->f = val;                                                   \    DEBUG_WRITE(("WRITEF(buf, %s, %f);\n", #reg, (float)val));        \} while (0)#define CHECK_WC_DMA_BUFFER(gcp,n)                                    \do {                                                                  \    (gcp)->WCbufCount += (n<<1);                                      \} while (0)#define CHECK_DMA_BUFFER(gcp,n)                                   \do {                                                                  \    if ((gcp)->bufCount+(n<<1) >= (gcp)->bufSize)                     \	PROCESS_DMA_BUFFER(gcp);                                  \    (gcp)->bufCount += (n<<1);                                        \} while (0)#define CHECK_DMA_BUFFER2(gcp,n)                                   \do {                                                                  \    if ((gcp)->bufCount+n >= (gcp)->bufSize)                     \	PROCESS_DMA_BUFFER(gcp);                                  \    (gcp)->bufCount += n;                                        \} while (0)#define FLUSH_DMA_BUFFER(gcp)                                     \do {                                                                  \   if (gcp->bufCount)                                                \	PROCESS_DMA_BUFFER(gcp);                                  \} while (0)#ifdef DONT_SEND_DMA#define GET_DMA(fd, hHWCtx, n, idx, size)#define SEND_DMA(fd, hHWCtx,n, idx, cnt)#else#define GET_DMA(fd, hHWCtx, n, idx, size)                                  \do {                                                                       \    drmDMAReq dma;                                                         \    int retcode, i;                                                        \                                                                           \    dma.context       = (hHWCtx);                                          \    dma.send_count    = 0;                                                 \

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -