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
e111acdf
Commit
e111acdf
authored
Mar 28, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Replace "cond_np2" in wined3d_texture with a flag.
parent
c5bf96c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
texture.c
dlls/wined3d/texture.c
+5
-5
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-1
No files found.
dlls/wined3d/texture.c
View file @
e111acdf
...
...
@@ -59,6 +59,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
texture
->
texture_srgb
.
dirty
=
TRUE
;
texture
->
is_srgb
=
FALSE
;
texture
->
pow2_matrix_identity
=
TRUE
;
texture
->
flags
=
0
;
if
(
texture
->
resource
.
format
->
flags
&
WINED3DFMT_FLAG_FILTERING
)
{
...
...
@@ -262,7 +263,7 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
const
DWORD
sampler_states
[
WINED3D_HIGHEST_SAMPLER_STATE
+
1
],
const
struct
wined3d_gl_info
*
gl_info
)
{
BOOL
cond_np2
=
texture
->
cond_np
2
;
BOOL
cond_np2
=
texture
->
flags
&
WINED3D_TEXTURE_COND_NP
2
;
GLenum
target
=
texture
->
target
;
struct
gl_texture
*
gl_tex
;
DWORD
state
;
...
...
@@ -666,7 +667,7 @@ static HRESULT texture2d_bind(struct wined3d_texture *texture,
* state. The same applies to filtering. Even if the texture has only
* one mip level, the default LINEAR_MIPMAP_LINEAR filter causes a SW
* fallback on macos. */
if
(
texture
->
cond_np
2
)
if
(
texture
->
flags
&
WINED3D_TEXTURE_COND_NP
2
)
{
GLenum
target
=
texture
->
target
;
...
...
@@ -1028,7 +1029,7 @@ HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT height, U
texture
->
pow2_matrix
[
10
]
=
1
.
0
f
;
texture
->
pow2_matrix
[
15
]
=
1
.
0
f
;
texture
->
target
=
GL_TEXTURE_2D
;
texture
->
cond_np2
=
TRUE
;
texture
->
flags
|=
WINED3D_TEXTURE_COND_NP2
;
texture
->
min_mip_lookup
=
minMipLookup_noFilter
;
}
else
if
(
gl_info
->
supported
[
ARB_TEXTURE_RECTANGLE
]
&&
(
width
!=
pow2_width
||
height
!=
pow2_height
)
...
...
@@ -1043,7 +1044,7 @@ HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT height, U
texture
->
pow2_matrix
[
10
]
=
1
.
0
f
;
texture
->
pow2_matrix
[
15
]
=
1
.
0
f
;
texture
->
target
=
GL_TEXTURE_RECTANGLE_ARB
;
texture
->
cond_np2
=
TRUE
;
texture
->
flags
|=
WINED3D_TEXTURE_COND_NP2
;
if
(
texture
->
resource
.
format
->
flags
&
WINED3DFMT_FLAG_FILTERING
)
texture
->
min_mip_lookup
=
minMipLookup_noMip
;
...
...
@@ -1067,7 +1068,6 @@ HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT height, U
texture
->
pow2_matrix
[
10
]
=
1
.
0
f
;
texture
->
pow2_matrix
[
15
]
=
1
.
0
f
;
texture
->
target
=
GL_TEXTURE_2D
;
texture
->
cond_np2
=
FALSE
;
}
TRACE
(
"xf(%f) yf(%f)
\n
"
,
texture
->
pow2_matrix
[
0
],
texture
->
pow2_matrix
[
5
]);
...
...
dlls/wined3d/wined3d_private.h
View file @
e111acdf
...
...
@@ -1888,6 +1888,8 @@ struct wined3d_texture_ops
void
(
*
texture_sub_resource_cleanup
)(
struct
wined3d_resource
*
sub_resource
);
};
#define WINED3D_TEXTURE_COND_NP2 0x1
struct
wined3d_texture
{
struct
wined3d_resource
resource
;
...
...
@@ -1902,8 +1904,8 @@ struct wined3d_texture
LONG
bind_count
;
DWORD
sampler
;
BOOL
is_srgb
;
DWORD
flags
;
BOOL
pow2_matrix_identity
;
BOOL
cond_np2
;
const
struct
min_lookup
*
min_mip_lookup
;
const
GLenum
*
mag_lookup
;
GLenum
target
;
...
...
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