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
4bb54a1a
Commit
4bb54a1a
authored
Apr 06, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make the min mip lookup type a texture property.
parent
98b56c3f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
basetexture.c
dlls/wined3d/basetexture.c
+2
-1
device.c
dlls/wined3d/device.c
+5
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-1
No files found.
dlls/wined3d/basetexture.c
View file @
4bb54a1a
...
...
@@ -463,7 +463,8 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface
This
->
baseTexture
.
states
[
WINED3DTEXSTA_MINFILTER
],
This
->
baseTexture
.
states
[
WINED3DTEXSTA_MIPFILTER
]);
}
glValue
=
minMipLookup
[
min
(
max
(
samplerStates
[
WINED3DSAMP_MINFILTER
],
WINED3DTEXF_NONE
),
WINED3DTEXF_ANISOTROPIC
)]
glValue
=
(
*
This
->
baseTexture
.
minMipLookup
)
[
min
(
max
(
samplerStates
[
WINED3DSAMP_MINFILTER
],
WINED3DTEXF_NONE
),
WINED3DTEXF_ANISOTROPIC
)]
[
min
(
max
(
samplerStates
[
WINED3DSAMP_MIPFILTER
],
WINED3DTEXF_NONE
),
WINED3DTEXF_LINEAR
)];
TRACE
(
"ValueMIN=%d, ValueMIP=%d, setting MINFILTER to %x
\n
"
,
...
...
dlls/wined3d/device.c
View file @
4bb54a1a
...
...
@@ -789,6 +789,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
D3DINITIALIZEBASETEXTURE
(
object
->
baseTexture
);
object
->
width
=
Width
;
object
->
height
=
Height
;
object
->
baseTexture
.
minMipLookup
=
&
minMipLookup
;
/** Non-power2 support **/
if
(
GL_SUPPORT
(
ARB_TEXTURE_NON_POWER_OF_TWO
))
{
...
...
@@ -934,6 +935,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
object
->
baseTexture
.
pow2Matrix
[
10
]
=
1
.
0
;
object
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
;
object
->
baseTexture
.
minMipLookup
=
&
minMipLookup
;
/* Calculate levels for mip mapping */
if
(
Usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
{
if
(
!
GL_SUPPORT
(
SGIS_GENERATE_MIPMAP
))
{
...
...
@@ -1081,6 +1084,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
object
->
baseTexture
.
pow2Matrix
[
10
]
=
((
float
)
EdgeLength
)
/
((
float
)
pow2EdgeLength
);
object
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
;
object
->
baseTexture
.
minMipLookup
=
&
minMipLookup
;
/* Calculate levels for mip mapping */
if
(
Usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
{
if
(
!
GL_SUPPORT
(
SGIS_GENERATE_MIPMAP
))
{
...
...
dlls/wined3d/wined3d_private.h
View file @
4bb54a1a
...
...
@@ -112,7 +112,8 @@ extern int minLookup[MAX_LOOKUPS];
extern
int
maxLookup
[
MAX_LOOKUPS
];
extern
DWORD
*
stateLookup
[
MAX_LOOKUPS
];
extern
DWORD
minMipLookup
[
WINED3DTEXF_ANISOTROPIC
+
1
][
WINED3DTEXF_LINEAR
+
1
];
typedef
DWORD
minMipLookup_t
[
WINED3DTEXF_ANISOTROPIC
+
1
][
WINED3DTEXF_LINEAR
+
1
];
extern
minMipLookup_t
minMipLookup
;
void
init_type_lookup
(
WineD3D_GL_Info
*
gl_info
);
#define WINED3D_ATR_TYPE(type) GLINFO_LOCATION.glTypeLookup[type].d3dType
...
...
@@ -1090,6 +1091,7 @@ typedef struct IWineD3DBaseTextureClass
UINT
srgb_mode_change_count
;
WINED3DFORMAT
shader_conversion_group
;
float
pow2Matrix
[
16
];
minMipLookup_t
*
minMipLookup
;
}
IWineD3DBaseTextureClass
;
typedef
struct
IWineD3DBaseTextureImpl
...
...
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