Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d4159adb
Commit
d4159adb
authored
Aug 04, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Statically initialize the filter lookup tables.
Also add some comments.
parent
b30a31e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
31 deletions
+26
-31
directx.c
dlls/wined3d/directx.c
+24
-29
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/directx.c
View file @
d4159adb
...
...
@@ -168,19 +168,34 @@ const int maxLookup[MAX_LOOKUPS] =
DWORD
*
stateLookup
[
MAX_LOOKUPS
];
struct
min_lookup
minMipLookup
[
WINED3DTEXF_ANISOTROPIC
+
1
];
const
struct
min_lookup
minMipLookup_noFilter
[
WINED3DTEXF_ANISOTROPIC
+
1
]
=
const
struct
min_lookup
minMipLookup
[]
=
{
{{
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
}},
{{
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
}},
{{
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
}},
{{
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
}},
/* NONE POINT LINEAR */
{{
GL_LINEAR
,
GL_LINEAR
,
GL_LINEAR
}},
/* NONE */
{{
GL_NEAREST
,
GL_NEAREST_MIPMAP_NEAREST
,
GL_NEAREST_MIPMAP_LINEAR
}},
/* POINT*/
{{
GL_LINEAR
,
GL_LINEAR_MIPMAP_NEAREST
,
GL_LINEAR_MIPMAP_LINEAR
}},
/* LINEAR */
{{
GL_LINEAR
,
GL_LINEAR_MIPMAP_NEAREST
,
GL_LINEAR_MIPMAP_LINEAR
}},
/* ANISOTROPIC */
};
GLenum
magLookup
[
WINED3DTEXF_ANISOTROPIC
+
1
];
const
GLenum
magLookup_noFilter
[
WINED3DTEXF_ANISOTROPIC
+
1
]
=
const
struct
min_lookup
minMipLookup_noFilter
[]
=
{
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
/* NONE POINT LINEAR */
{{
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
}},
/* NONE */
{{
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
}},
/* POINT */
{{
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
}},
/* LINEAR */
{{
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
}},
/* ANISOTROPIC */
};
const
GLenum
magLookup
[]
=
{
/* NONE POINT LINEAR ANISOTROPIC */
GL_NEAREST
,
GL_NEAREST
,
GL_LINEAR
,
GL_LINEAR
,
};
const
GLenum
magLookup_noFilter
[]
=
{
/* NONE POINT LINEAR ANISOTROPIC */
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
,
GL_NEAREST
,
};
/* drawStridedSlow attributes */
...
...
@@ -1991,26 +2006,6 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_gl_info *gl_info)
stateLookup
[
WINELOOKUP_WARPPARAM
][
WINED3DTADDRESS_MIRRORONCE
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
gl_info
->
supported
[
ATI_TEXTURE_MIRROR_ONCE
]
?
GL_MIRROR_CLAMP_TO_EDGE_ATI
:
GL_REPEAT
;
magLookup
[
WINED3DTEXF_NONE
-
WINED3DTEXF_NONE
]
=
GL_NEAREST
;
magLookup
[
WINED3DTEXF_POINT
-
WINED3DTEXF_NONE
]
=
GL_NEAREST
;
magLookup
[
WINED3DTEXF_LINEAR
-
WINED3DTEXF_NONE
]
=
GL_LINEAR
;
magLookup
[
WINED3DTEXF_ANISOTROPIC
-
WINED3DTEXF_NONE
]
=
GL_LINEAR
;
minMipLookup
[
WINED3DTEXF_NONE
].
mip
[
WINED3DTEXF_NONE
]
=
GL_LINEAR
;
minMipLookup
[
WINED3DTEXF_NONE
].
mip
[
WINED3DTEXF_POINT
]
=
GL_LINEAR
;
minMipLookup
[
WINED3DTEXF_NONE
].
mip
[
WINED3DTEXF_LINEAR
]
=
GL_LINEAR
;
minMipLookup
[
WINED3DTEXF_POINT
].
mip
[
WINED3DTEXF_NONE
]
=
GL_NEAREST
;
minMipLookup
[
WINED3DTEXF_POINT
].
mip
[
WINED3DTEXF_POINT
]
=
GL_NEAREST_MIPMAP_NEAREST
;
minMipLookup
[
WINED3DTEXF_POINT
].
mip
[
WINED3DTEXF_LINEAR
]
=
GL_NEAREST_MIPMAP_LINEAR
;
minMipLookup
[
WINED3DTEXF_LINEAR
].
mip
[
WINED3DTEXF_NONE
]
=
GL_LINEAR
;
minMipLookup
[
WINED3DTEXF_LINEAR
].
mip
[
WINED3DTEXF_POINT
]
=
GL_LINEAR_MIPMAP_NEAREST
;
minMipLookup
[
WINED3DTEXF_LINEAR
].
mip
[
WINED3DTEXF_LINEAR
]
=
GL_LINEAR_MIPMAP_LINEAR
;
minMipLookup
[
WINED3DTEXF_ANISOTROPIC
].
mip
[
WINED3DTEXF_NONE
]
=
GL_LINEAR
;
minMipLookup
[
WINED3DTEXF_ANISOTROPIC
].
mip
[
WINED3DTEXF_POINT
]
=
GL_LINEAR_MIPMAP_NEAREST
;
minMipLookup
[
WINED3DTEXF_ANISOTROPIC
].
mip
[
WINED3DTEXF_LINEAR
]
=
GL_LINEAR_MIPMAP_LINEAR
;
/* TODO: config lookups */
/* Make sure there's an active HDC else the WGL extensions will fail */
hdc
=
pwglGetCurrentDC
();
if
(
hdc
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
d4159adb
...
...
@@ -176,9 +176,9 @@ struct min_lookup
GLenum
mip
[
WINED3DTEXF_LINEAR
+
1
];
};
struct
min_lookup
minMipLookup
[
WINED3DTEXF_ANISOTROPIC
+
1
];
const
struct
min_lookup
minMipLookup
[
WINED3DTEXF_ANISOTROPIC
+
1
];
const
struct
min_lookup
minMipLookup_noFilter
[
WINED3DTEXF_ANISOTROPIC
+
1
];
GLenum
magLookup
[
WINED3DTEXF_ANISOTROPIC
+
1
];
const
GLenum
magLookup
[
WINED3DTEXF_ANISOTROPIC
+
1
];
const
GLenum
magLookup_noFilter
[
WINED3DTEXF_ANISOTROPIC
+
1
];
extern
const
struct
filter_lookup
filter_lookup_nofilter
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment