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
2650ba4b
Commit
2650ba4b
authored
Jan 10, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DTEXTUREADDRESS typedef.
parent
b6431d94
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
28 deletions
+27
-28
directx.c
dlls/wined3d/directx.c
+5
-5
stateblock.c
dlls/wined3d/stateblock.c
+3
-3
texture.c
dlls/wined3d/texture.c
+10
-10
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
wined3d.h
include/wine/wined3d.h
+8
-9
No files found.
dlls/wined3d/directx.c
View file @
2650ba4b
...
...
@@ -2809,13 +2809,13 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
device
=
wined3d_guess_card
(
gl_info
,
gl_renderer_str
,
&
gl_vendor
,
&
card_vendor
);
TRACE_
(
d3d_caps
)(
"FOUND (fake) card: 0x%x (vendor id), 0x%x (device id)
\n
"
,
card_vendor
,
device
);
gl_info
->
wrap_lookup
[
WINED3D
TADDRESS_WRAP
-
WINED3D
TADDRESS_WRAP
]
=
GL_REPEAT
;
gl_info
->
wrap_lookup
[
WINED3D
TADDRESS_MIRROR
-
WINED3D
TADDRESS_WRAP
]
=
gl_info
->
wrap_lookup
[
WINED3D
_TADDRESS_WRAP
-
WINED3D_
TADDRESS_WRAP
]
=
GL_REPEAT
;
gl_info
->
wrap_lookup
[
WINED3D
_TADDRESS_MIRROR
-
WINED3D_
TADDRESS_WRAP
]
=
gl_info
->
supported
[
ARB_TEXTURE_MIRRORED_REPEAT
]
?
GL_MIRRORED_REPEAT_ARB
:
GL_REPEAT
;
gl_info
->
wrap_lookup
[
WINED3D
TADDRESS_CLAMP
-
WINED3D
TADDRESS_WRAP
]
=
GL_CLAMP_TO_EDGE
;
gl_info
->
wrap_lookup
[
WINED3D
TADDRESS_BORDER
-
WINED3D
TADDRESS_WRAP
]
=
gl_info
->
wrap_lookup
[
WINED3D
_TADDRESS_CLAMP
-
WINED3D_
TADDRESS_WRAP
]
=
GL_CLAMP_TO_EDGE
;
gl_info
->
wrap_lookup
[
WINED3D
_TADDRESS_BORDER
-
WINED3D_
TADDRESS_WRAP
]
=
gl_info
->
supported
[
ARB_TEXTURE_BORDER_CLAMP
]
?
GL_CLAMP_TO_BORDER_ARB
:
GL_REPEAT
;
gl_info
->
wrap_lookup
[
WINED3D
TADDRESS_MIRRORONCE
-
WINED3D
TADDRESS_WRAP
]
=
gl_info
->
wrap_lookup
[
WINED3D
_TADDRESS_MIRROR_ONCE
-
WINED3D_
TADDRESS_WRAP
]
=
gl_info
->
supported
[
ATI_TEXTURE_MIRROR_ONCE
]
?
GL_MIRROR_CLAMP_TO_EDGE_ATI
:
GL_REPEAT
;
/* Make sure there's an active HDC else the WGL extensions will fail */
...
...
dlls/wined3d/stateblock.c
View file @
2650ba4b
...
...
@@ -1278,9 +1278,9 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
for
(
i
=
0
;
i
<
MAX_COMBINED_SAMPLERS
;
++
i
)
{
TRACE
(
"Setting up default samplers states for sampler %u.
\n
"
,
i
);
state
->
sampler_states
[
i
][
WINED3D_SAMP_ADDRESS_U
]
=
WINED3DTADDRESS_WRAP
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_ADDRESS_V
]
=
WINED3DTADDRESS_WRAP
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_ADDRESS_W
]
=
WINED3DTADDRESS_WRAP
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_ADDRESS_U
]
=
WINED3D
_
TADDRESS_WRAP
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_ADDRESS_V
]
=
WINED3D
_
TADDRESS_WRAP
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_ADDRESS_W
]
=
WINED3D
_
TADDRESS_WRAP
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_BORDER_COLOR
]
=
0
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MAG_FILTER
]
=
WINED3DTEXF_POINT
;
state
->
sampler_states
[
i
][
WINED3D_SAMP_MIN_FILTER
]
=
WINED3DTEXF_POINT
;
...
...
dlls/wined3d/texture.c
View file @
2650ba4b
...
...
@@ -167,9 +167,9 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
}
/* Initialise the state of the texture object to the OpenGL defaults,
* not the D3D defaults. */
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSU
]
=
WINED3DTADDRESS_WRAP
;
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSV
]
=
WINED3DTADDRESS_WRAP
;
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSW
]
=
WINED3DTADDRESS_WRAP
;
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSU
]
=
WINED3D
_
TADDRESS_WRAP
;
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSV
]
=
WINED3D
_
TADDRESS_WRAP
;
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSW
]
=
WINED3D
_
TADDRESS_WRAP
;
gl_tex
->
states
[
WINED3DTEXSTA_BORDERCOLOR
]
=
0
;
gl_tex
->
states
[
WINED3DTEXSTA_MAGFILTER
]
=
WINED3DTEXF_LINEAR
;
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
=
WINED3DTEXF_POINT
;
/* GL_NEAREST_MIPMAP_LINEAR */
...
...
@@ -237,22 +237,22 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
/* GL locking is done by the caller */
static
void
apply_wrap
(
const
struct
wined3d_gl_info
*
gl_info
,
GLenum
target
,
WINED3DTEXTUREADDRESS
d3d_wrap
,
GLenum
param
,
BOOL
cond_np2
)
enum
wined3d_texture_address
d3d_wrap
,
GLenum
param
,
BOOL
cond_np2
)
{
GLint
gl_wrap
;
if
(
d3d_wrap
<
WINED3D
TADDRESS_WRAP
||
d3d_wrap
>
WINED3DTADDRESS_MIRROR
ONCE
)
if
(
d3d_wrap
<
WINED3D
_TADDRESS_WRAP
||
d3d_wrap
>
WINED3D_TADDRESS_MIRROR_
ONCE
)
{
FIXME
(
"Unrecognized or unsupported
WINED3DTEXTUREADDRESS
%#x.
\n
"
,
d3d_wrap
);
FIXME
(
"Unrecognized or unsupported
texture address mode
%#x.
\n
"
,
d3d_wrap
);
return
;
}
/* Cubemaps are always set to clamp, regardless of the sampler state. */
if
(
target
==
GL_TEXTURE_CUBE_MAP_ARB
||
(
cond_np2
&&
d3d_wrap
==
WINED3DTADDRESS_WRAP
))
||
(
cond_np2
&&
d3d_wrap
==
WINED3D
_
TADDRESS_WRAP
))
gl_wrap
=
GL_CLAMP_TO_EDGE
;
else
gl_wrap
=
gl_info
->
wrap_lookup
[
d3d_wrap
-
WINED3DTADDRESS_WRAP
];
gl_wrap
=
gl_info
->
wrap_lookup
[
d3d_wrap
-
WINED3D
_
TADDRESS_WRAP
];
TRACE
(
"Setting param %#x to %#x for target %#x.
\n
"
,
param
,
gl_wrap
,
target
);
glTexParameteri
(
target
,
param
,
gl_wrap
);
...
...
@@ -635,8 +635,8 @@ static HRESULT texture2d_bind(struct wined3d_texture *texture,
glTexParameteri
(
target
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
checkGLcall
(
"glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST)"
);
LEAVE_GL
();
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSU
]
=
WINED3D
TADDRESS_CLAMP
;
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSV
]
=
WINED3D
TADDRESS_CLAMP
;
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSU
]
=
WINED3D_
TADDRESS_CLAMP
;
gl_tex
->
states
[
WINED3DTEXSTA_ADDRESSV
]
=
WINED3D_
TADDRESS_CLAMP
;
gl_tex
->
states
[
WINED3DTEXSTA_MAGFILTER
]
=
WINED3DTEXF_POINT
;
gl_tex
->
states
[
WINED3DTEXSTA_MINFILTER
]
=
WINED3DTEXF_POINT
;
gl_tex
->
states
[
WINED3DTEXSTA_MIPFILTER
]
=
WINED3DTEXF_NONE
;
...
...
dlls/wined3d/wined3d_private.h
View file @
2650ba4b
...
...
@@ -1519,7 +1519,7 @@ struct wined3d_gl_info
DWORD
reserved_glsl_constants
;
DWORD
quirks
;
BOOL
supported
[
WINED3D_GL_EXT_COUNT
];
GLint
wrap_lookup
[
WINED3D
TADDRESS_MIRRORONCE
-
WINED3D
TADDRESS_WRAP
+
1
];
GLint
wrap_lookup
[
WINED3D
_TADDRESS_MIRROR_ONCE
-
WINED3D_
TADDRESS_WRAP
+
1
];
struct
wined3d_fbo_ops
fbo_ops
;
#define USE_GL_FUNC(type, pfn, ext, replace) type pfn;
...
...
include/wine/wined3d.h
View file @
2650ba4b
...
...
@@ -612,15 +612,14 @@ enum wined3d_texture_op
WINED3D_TOP_LERP
=
26
,
};
typedef
enum
_WINED3DTEXTUREADDRESS
{
WINED3DTADDRESS_WRAP
=
1
,
WINED3DTADDRESS_MIRROR
=
2
,
WINED3DTADDRESS_CLAMP
=
3
,
WINED3DTADDRESS_BORDER
=
4
,
WINED3DTADDRESS_MIRRORONCE
=
5
,
WINED3DTADDRESS_FORCE_DWORD
=
0x7fffffff
}
WINED3DTEXTUREADDRESS
;
enum
wined3d_texture_address
{
WINED3D_TADDRESS_WRAP
=
1
,
WINED3D_TADDRESS_MIRROR
=
2
,
WINED3D_TADDRESS_CLAMP
=
3
,
WINED3D_TADDRESS_BORDER
=
4
,
WINED3D_TADDRESS_MIRROR_ONCE
=
5
,
};
typedef
enum
_WINED3DTRANSFORMSTATETYPE
{
...
...
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