Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
351d6de8
Commit
351d6de8
authored
Aug 05, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add functions to lookup texture filters.
parent
0f161dc1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
9 deletions
+24
-9
basetexture.c
dlls/wined3d/basetexture.c
+7
-5
surface.c
dlls/wined3d/surface.c
+6
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+11
-0
No files found.
dlls/wined3d/basetexture.c
View file @
351d6de8
...
...
@@ -377,8 +377,10 @@ void basetexture_apply_state_changes(IWineD3DBaseTexture *iface,
state
=
samplerStates
[
WINED3DSAMP_MAGFILTER
];
if
(
state
>
WINED3DTEXF_ANISOTROPIC
)
{
FIXME
(
"Unrecognized or unsupported MAGFILTER* value %d
\n
"
,
state
);
}
else
{
glValue
=
This
->
baseTexture
.
magLookup
[
state
-
WINED3DTEXF_NONE
];
}
else
{
glValue
=
wined3d_gl_mag_filter
(
This
->
baseTexture
.
magLookup
,
state
);
TRACE
(
"ValueMAG=%d setting MAGFILTER to %x
\n
"
,
state
,
glValue
);
glTexParameteri
(
textureDimensions
,
GL_TEXTURE_MAG_FILTER
,
glValue
);
}
...
...
@@ -402,9 +404,9 @@ void basetexture_apply_state_changes(IWineD3DBaseTexture *iface,
states
[
WINED3DTEXSTA_MINFILTER
],
states
[
WINED3DTEXSTA_MIPFILTER
]);
}
glValue
=
This
->
baseTexture
.
minMipLookup
[
min
(
max
(
samplerStates
[
WINED3DSAMP_MINFILTER
],
WINED3DTEXF_NONE
),
WINED3DTEXF_ANISOTROPIC
)]
.
mip
[
min
(
max
(
samplerStates
[
WINED3DSAMP_MIPFILTER
],
WINED3DTEXF_NONE
),
WINED3DTEXF_LINEAR
)]
;
glValue
=
wined3d_gl_min_mip_filter
(
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
"
,
samplerStates
[
WINED3DSAMP_MINFILTER
],
...
...
dlls/wined3d/surface.c
View file @
351d6de8
...
...
@@ -3182,10 +3182,10 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
/* No issue with overriding these - the sampler is dirty due to blit usage */
glTexParameteri
(
texture_target
,
GL_TEXTURE_MAG_FILTER
,
magLookup
[
Filter
-
WINED3DTEXF_NONE
]
);
wined3d_gl_mag_filter
(
magLookup
,
Filter
)
);
checkGLcall
(
"glTexParameteri"
);
glTexParameteri
(
texture_target
,
GL_TEXTURE_MIN_FILTER
,
minMipLookup
[
Filter
].
mip
[
WINED3DTEXF_NONE
]
);
wined3d_gl_min_mip_filter
(
minMipLookup
,
Filter
,
WINED3DTEXF_NONE
)
);
checkGLcall
(
"glTexParameteri"
);
if
(
!
swapchain
||
(
IWineD3DSurface
*
)
Src
==
swapchain
->
backBuffer
[
0
])
{
...
...
@@ -3744,9 +3744,11 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
checkGLcall
(
"glBindTexture"
);
/* Filtering for StretchRect */
glTexParameteri
(
Src
->
texture_target
,
GL_TEXTURE_MAG_FILTER
,
magLookup
[
Filter
-
WINED3DTEXF_NONE
]);
glTexParameteri
(
Src
->
texture_target
,
GL_TEXTURE_MAG_FILTER
,
wined3d_gl_mag_filter
(
magLookup
,
Filter
));
checkGLcall
(
"glTexParameteri"
);
glTexParameteri
(
Src
->
texture_target
,
GL_TEXTURE_MIN_FILTER
,
minMipLookup
[
Filter
].
mip
[
WINED3DTEXF_NONE
]);
glTexParameteri
(
Src
->
texture_target
,
GL_TEXTURE_MIN_FILTER
,
wined3d_gl_min_mip_filter
(
minMipLookup
,
Filter
,
WINED3DTEXF_NONE
));
checkGLcall
(
"glTexParameteri"
);
glTexParameteri
(
Src
->
texture_target
,
GL_TEXTURE_WRAP_S
,
GL_CLAMP
);
glTexParameteri
(
Src
->
texture_target
,
GL_TEXTURE_WRAP_T
,
GL_CLAMP
);
...
...
dlls/wined3d/wined3d_private.h
View file @
351d6de8
...
...
@@ -181,6 +181,17 @@ const struct min_lookup minMipLookup_noFilter[WINED3DTEXF_ANISOTROPIC + 1];
const
GLenum
magLookup
[
WINED3DTEXF_ANISOTROPIC
+
1
];
const
GLenum
magLookup_noFilter
[
WINED3DTEXF_ANISOTROPIC
+
1
];
static
inline
GLenum
wined3d_gl_mag_filter
(
const
GLenum
mag_lookup
[],
WINED3DTEXTUREFILTERTYPE
mag_filter
)
{
return
mag_lookup
[
mag_filter
];
}
static
inline
GLenum
wined3d_gl_min_mip_filter
(
const
struct
min_lookup
min_mip_lookup
[],
WINED3DTEXTUREFILTERTYPE
min_filter
,
WINED3DTEXTUREFILTERTYPE
mip_filter
)
{
return
min_mip_lookup
[
min_filter
].
mip
[
mip_filter
];
}
/* float_16_to_32() and float_32_to_16() (see implementation in
* surface_base.c) convert 16 bit floats in the FLOAT16 data type
* to standard C floats and vice versa. They do not depend on the encoding
...
...
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