wined3d: Make some lookup tables const.

This commit is contained in:
Henri Verbeet 2010-08-22 23:35:38 +02:00 committed by Alexandre Julliard
parent c3cdebcf44
commit 3fd66bc650
3 changed files with 9 additions and 5 deletions

View File

@ -1114,11 +1114,14 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
short redBits, greenBits, blueBits, alphaBits, colorBits;
short depthBits=0, stencilBits=0;
struct match_type {
static const struct
{
BOOL require_aux;
BOOL exact_alpha;
BOOL exact_color;
} matches[] = {
}
matches[] =
{
/* First, try without alpha match buffers. MacOS supports aux buffers only
* on A8R8G8B8, and we prefer better offscreen rendering over an alpha match.
* Then try without aux buffers - this is the most common cause for not

View File

@ -771,7 +771,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
if (surface_type == SURFACE_OPENGL)
{
WINED3DFORMAT formats[] =
static const WINED3DFORMAT formats[] =
{
WINED3DFMT_D24_UNORM_S8_UINT,
WINED3DFMT_D32_UNORM,

View File

@ -1192,8 +1192,8 @@ static BOOL color_match(DWORD c1, DWORD c2, BYTE max_diff)
/* A context is provided by the caller */
static BOOL check_filter(const struct wined3d_gl_info *gl_info, GLenum internal)
{
static const DWORD data[] = {0x00000000, 0xffffffff};
GLuint tex, fbo, buffer;
const DWORD data[] = {0x00000000, 0xffffffff};
DWORD readback[16 * 1];
BOOL ret = FALSE;
@ -1291,7 +1291,8 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3
{
struct wined3d_format_desc *desc;
unsigned int fmt_idx, i;
WINED3DFORMAT fmts16[] = {
static const WINED3DFORMAT fmts16[] =
{
WINED3DFMT_R16_FLOAT,
WINED3DFMT_R16G16_FLOAT,
WINED3DFMT_R16G16B16A16_FLOAT,