diff options
author | marha <marha@users.sourceforge.net> | 2011-08-29 14:48:31 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-08-29 14:48:31 +0200 |
commit | 924a6ffc82a7af0ca311af711ea2cf973dc6ff15 (patch) | |
tree | f5ee6d0aaf321029a4abb12c3c051c0434dde308 /mesalib/src/mesa/drivers/windows/gldirect/gldlame8.c | |
parent | 8e57a7fcbf736b8e437baf0bbccb93095d97617f (diff) | |
parent | 01df5d59e56a1b060568f8cad2e89f7eea22fc70 (diff) | |
download | vcxsrv-924a6ffc82a7af0ca311af711ea2cf973dc6ff15.tar.gz vcxsrv-924a6ffc82a7af0ca311af711ea2cf973dc6ff15.tar.bz2 vcxsrv-924a6ffc82a7af0ca311af711ea2cf973dc6ff15.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
apps/xwininfo/configure.ac
apps/xwininfo/xwininfo.c
libX11/configure.ac
libX11/specs/libX11/AppC.xml
libX11/specs/libX11/AppD.xml
libX11/specs/libX11/CH03.xml
libX11/specs/libX11/CH04.xml
libX11/specs/libX11/CH05.xml
libX11/specs/libX11/CH06.xml
libX11/specs/libX11/CH07.xml
libX11/specs/libX11/CH08.xml
libX11/specs/libX11/CH09.xml
libX11/specs/libX11/CH11.xml
libX11/specs/libX11/CH12.xml
libX11/specs/libX11/CH13.xml
libX11/specs/libX11/CH14.xml
libX11/specs/libX11/CH15.xml
libX11/specs/libX11/CH16.xml
libxcb/configure.ac
libxcb/src/c_client.py
libxcb/src/xcb_auth.c
libxcb/src/xcb_util.c
mesalib/common.py
mesalib/configs/linux-dri
mesalib/docs/GL3.txt
mesalib/docs/download.html
mesalib/docs/install.html
mesalib/include/GL/internal/dri_interface.h
mesalib/scons/custom.py
mesalib/scons/gallium.py
mesalib/src/gallium/auxiliary/util/u_math.h
mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c
mesalib/src/glsl/ast_function.cpp
mesalib/src/glsl/ast_to_hir.cpp
mesalib/src/glsl/glcpp/glcpp-parse.y
mesalib/src/glsl/glsl_parser_extras.cpp
mesalib/src/glsl/glsl_parser_extras.h
mesalib/src/glsl/ir.cpp
mesalib/src/glsl/ir.h
mesalib/src/glsl/ir_clone.cpp
mesalib/src/glsl/ir_print_visitor.cpp
mesalib/src/glsl/ir_validate.cpp
mesalib/src/glsl/linker.cpp
mesalib/src/glsl/main.cpp
mesalib/src/glsl/opt_tree_grafting.cpp
mesalib/src/mapi/glapi/gen/Makefile
mesalib/src/mapi/glapi/gen/gl_XML.py
mesalib/src/mapi/glapi/gen/gl_table.py
mesalib/src/mapi/glapi/glapi_mapi_tmp.h
mesalib/src/mapi/glapi/glapi_sparc.S
mesalib/src/mapi/glapi/glapi_x86-64.S
mesalib/src/mapi/glapi/glapi_x86.S
mesalib/src/mapi/glapi/glapitemp.h
mesalib/src/mapi/glapi/glprocs.h
mesalib/src/mapi/mapi/u_thread.c
mesalib/src/mapi/mapi/u_thread.h
mesalib/src/mesa/SConscript
mesalib/src/mesa/drivers/common/driverfuncs.c
mesalib/src/mesa/drivers/windows/gldirect/dglcontext.c
mesalib/src/mesa/main/api_arrayelt.c
mesalib/src/mesa/main/bufferobj.c
mesalib/src/mesa/main/compiler.h
mesalib/src/mesa/main/dd.h
mesalib/src/mesa/main/dlist.c
mesalib/src/mesa/main/enums.c
mesalib/src/mesa/main/es_generator.py
mesalib/src/mesa/main/fbobject.c
mesalib/src/mesa/main/imports.h
mesalib/src/mesa/main/mtypes.h
mesalib/src/mesa/main/pbo.c
mesalib/src/mesa/main/remap_helper.h
mesalib/src/mesa/main/shared.c
mesalib/src/mesa/main/texgetimage.c
mesalib/src/mesa/main/teximage.c
mesalib/src/mesa/main/uniforms.c
mesalib/src/mesa/program/ir_to_mesa.cpp
mesalib/src/mesa/program/prog_optimize.c
mesalib/src/mesa/program/register_allocate.c
mesalib/src/mesa/program/register_allocate.h
mesalib/src/mesa/sources.mak
mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c
mesalib/src/mesa/state_tracker/st_cb_texture.c
mesalib/src/mesa/state_tracker/st_texture.h
mesalib/src/mesa/swrast/s_context.c
mesalib/src/mesa/tnl/t_draw.c
mesalib/src/mesa/vbo/vbo_exec_array.c
mesalib/src/mesa/vbo/vbo_save_api.c
pixman/pixman/pixman-arm-common.h
pixman/pixman/pixman-fast-path.c
pixman/pixman/pixman-inlines.h
pixman/test/Makefile.am
pixman/test/utils.c
pixman/test/utils.h
xorg-server/configure.ac
xorg-server/fb/fbblt.c
xorg-server/hw/xquartz/darwin.c
xorg-server/xkeyboard-config/symbols/de
Diffstat (limited to 'mesalib/src/mesa/drivers/windows/gldirect/gldlame8.c')
-rw-r--r-- | mesalib/src/mesa/drivers/windows/gldirect/gldlame8.c | 181 |
1 files changed, 0 insertions, 181 deletions
diff --git a/mesalib/src/mesa/drivers/windows/gldirect/gldlame8.c b/mesalib/src/mesa/drivers/windows/gldirect/gldlame8.c deleted file mode 100644 index 5ac519c17..000000000 --- a/mesalib/src/mesa/drivers/windows/gldirect/gldlame8.c +++ /dev/null @@ -1,181 +0,0 @@ -/**************************************************************************** -* -* Mesa 3-D graphics library -* Direct3D Driver Interface -* -* ======================================================================== -* -* Copyright (C) 1991-2004 SciTech Software, Inc. 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 -* 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 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 NONINFRINGEMENT. IN NO EVENT SHALL -* SCITECH SOFTWARE INC 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. -* -* ====================================================================== -* -* Language: ANSI C -* Environment: Windows 9x (Win32) -* -* Description: GLDirect utility for determining lame boards/drivers. -* -****************************************************************************/ - -#define STRICT -#define WIN32_LEAN_AND_MEAN -#include <d3d8.h> - -/* -Ack. Broken out from gldlame.c because of broken D3D headers. KeithH -*/ - -/**************************************************************************** -REMARKS: -Scans list of DirectDraw devices for specific device IDs. -****************************************************************************/ - -#define VENDORID_ATI 0x1002 - -static DWORD devATIRagePro[] = { - 0x4742, // 3D RAGE PRO BGA AGP 1X/2X - 0x4744, // 3D RAGE PRO BGA AGP 1X only - 0x4749, // 3D RAGE PRO BGA PCI 33 MHz - 0x4750, // 3D RAGE PRO PQFP PCI 33 MHz - 0x4751, // 3D RAGE PRO PQFP PCI 33 MHz limited 3D - 0x4C42, // 3D RAGE LT PRO BGA-312 AGP 133 MHz - 0x4C44, // 3D RAGE LT PRO BGA-312 AGP 66 MHz - 0x4C49, // 3D RAGE LT PRO BGA-312 PCI 33 MHz - 0x4C50, // 3D RAGE LT PRO BGA-256 PCI 33 MHz - 0x4C51, // 3D RAGE LT PRO BGA-256 PCI 33 MHz limited 3D -}; - -static DWORD devATIRageIIplus[] = { - 0x4755, // 3D RAGE II+ - 0x4756, // 3D RAGE IIC PQFP PCI - 0x4757, // 3D RAGE IIC BGA AGP - 0x475A, // 3D RAGE IIC PQFP AGP - 0x4C47, // 3D RAGE LT-G -}; - -static __inline BOOL IsDevice( - DWORD *lpDeviceIdList, - DWORD dwDeviceId, - int count) -{ - int i; - - for (i=0; i<count; i++) - if (dwDeviceId == lpDeviceIdList[i]) - return TRUE; - - return FALSE; -} - -/**************************************************************************** -REMARKS: -Test the Direct3D8 device for "lameness" with respect to GLDirect. -This is done on per-chipset basis, as in GLD CAD driver (DGLCONTEXT.C). -If bTestForWHQL is set then the device is tested to see if it is -certified, and bIsWHQL is set to indicate TRUE or FALSE. Otherwise bIsWHQL -is not set. [WHQL = Windows Hardware Quality Labs] - -NOTE: There is a one- or two-second time penalty incurred in determining - the WHQL certification date. -****************************************************************************/ -BOOL IsThisD3D8Lame( - IDirect3D8 *pD3D, - DWORD dwAdapter, - BOOL bTestForWHQL, - BOOL *bIsWHQL) -{ - DWORD dwFlags = bTestForWHQL ? 0 : D3DENUM_NO_WHQL_LEVEL; - D3DADAPTER_IDENTIFIER8 d3dai; - HRESULT hr; - - hr = IDirect3D8_GetAdapterIdentifier(pD3D, dwAdapter, dwFlags, &d3dai); - if (FAILED(hr)) - return TRUE; // Definitely lame if adapter details can't be obtained! - - if (bTestForWHQL) { - *bIsWHQL = d3dai.WHQLLevel ? TRUE : FALSE; - } - - // Vendor 1: ATI - if (d3dai.VendorId == VENDORID_ATI) { - // Test A: ATI Rage PRO - if (IsDevice(devATIRagePro, d3dai.DeviceId, sizeof(devATIRagePro))) - return TRUE; // bad mipmapping - // Test B: ATI Rage II+ - if (IsDevice(devATIRageIIplus, d3dai.DeviceId, sizeof(devATIRageIIplus))) - return TRUE; // bad HW alpha testing - } - - return FALSE; -} - -/**************************************************************************** -REMARKS: -Test the Direct3DDevice8 device for "lameness" with respect to GLDirect. -This is done by querying for particular caps, as in GLD CPL (CPLMAIN.CPP). -****************************************************************************/ -BOOL IsThisD3D8DeviceLame( - IDirect3DDevice8 *pDev) -{ - D3DCAPS8 d3dCaps; - HRESULT hr; - - hr = IDirect3DDevice8_GetDeviceCaps(pDev, &d3dCaps); - if (FAILED(hr)) - return TRUE; - - // Test 1: Perspective-correct textures - // Any card that cannot do perspective-textures is *exceptionally* lame. - if (!(d3dCaps.TextureCaps & D3DPTEXTURECAPS_PERSPECTIVE)) { - return TRUE; // Lame! - } - - // Test 2: Bilinear filtering - if (!(d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MINFLINEAR)) { - return TRUE; // Lame! - } - - // Test 3: Mipmapping - if (!(d3dCaps.TextureCaps & D3DPTEXTURECAPS_MIPMAP)) { - return TRUE; // Lame! - } - - // Test 4: Depth-test modes (?) - - // Test 5: Blend Modes -- Based on DX7 D3DIM MTEXTURE.CPP caps test - - // Accept devices that can do multipass, alpha blending - if( !((d3dCaps.DestBlendCaps & D3DPBLENDCAPS_INVSRCALPHA) && - (d3dCaps.SrcBlendCaps & D3DPBLENDCAPS_SRCALPHA)) ) - return TRUE; - - // Accept devices that can do multipass, color blending - if( !((d3dCaps.DestBlendCaps & D3DPBLENDCAPS_SRCCOLOR) && - (d3dCaps.SrcBlendCaps & D3DPBLENDCAPS_ZERO)) ) - return TRUE; - - // Accept devices that really support multiple textures. - if( !((d3dCaps.MaxTextureBlendStages > 1 ) && - (d3dCaps.MaxSimultaneousTextures > 1 ) && - (d3dCaps.TextureOpCaps & D3DTEXOPCAPS_MODULATE )) ) - return TRUE; - - return FALSE; // Not lame -} |