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
18007122
Commit
18007122
authored
Oct 09, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Track texture coordinate normalization per-texture.
parent
c5459881
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
8 deletions
+6
-8
surface.c
dlls/wined3d/surface.c
+1
-3
swapchain.c
dlls/wined3d/swapchain.c
+1
-1
texture.c
dlls/wined3d/texture.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/surface.c
View file @
18007122
...
...
@@ -3299,7 +3299,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
bottom
=
src_surface
->
resource
.
height
-
src_rect
->
top
;
}
if
(
src_surface
->
flags
&
SFLAG_NORMCOORD
)
if
(
src_surface
->
container
->
flags
&
WINED3D_TEXTURE_NORMALIZED_COORDS
)
{
left
/=
src_surface
->
pow2Width
;
right
/=
src_surface
->
pow2Width
;
...
...
@@ -5547,8 +5547,6 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
list_init
(
&
surface
->
overlays
);
/* Flags */
if
(
target
!=
GL_TEXTURE_RECTANGLE_ARB
)
surface
->
flags
|=
SFLAG_NORMCOORD
;
if
(
flags
&
WINED3D_SURFACE_DISCARD
)
surface
->
flags
|=
SFLAG_DISCARD
;
if
(
lockable
||
desc
->
format
==
WINED3DFMT_D16_LOCKABLE
)
...
...
dlls/wined3d/swapchain.c
View file @
18007122
...
...
@@ -349,7 +349,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
context2
=
context_acquire
(
device
,
backbuffer
);
context_apply_blit_state
(
context2
,
device
);
if
(
backbuffer
->
flags
&
SFLAG_NORMCOORD
)
if
(
backbuffer
->
container
->
flags
&
WINED3D_TEXTURE_NORMALIZED_COORDS
)
{
tex_left
/=
src_w
;
tex_right
/=
src_w
;
...
...
dlls/wined3d/texture.c
View file @
18007122
...
...
@@ -81,7 +81,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
texture
->
level_count
=
level_count
;
texture
->
filter_type
=
(
desc
->
usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
?
WINED3D_TEXF_LINEAR
:
WINED3D_TEXF_NONE
;
texture
->
lod
=
0
;
texture
->
flags
=
WINED3D_TEXTURE_POW2_MAT_IDENT
;
texture
->
flags
=
WINED3D_TEXTURE_POW2_MAT_IDENT
|
WINED3D_TEXTURE_NORMALIZED_COORDS
;
if
(
surface_flags
&
WINED3D_SURFACE_PIN_SYSMEM
)
texture
->
flags
|=
WINED3D_TEXTURE_PIN_SYSMEM
;
...
...
@@ -1209,7 +1209,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
texture
->
pow2_matrix
[
15
]
=
1
.
0
f
;
texture
->
target
=
GL_TEXTURE_RECTANGLE_ARB
;
texture
->
flags
|=
WINED3D_TEXTURE_COND_NP2
;
texture
->
flags
&=
~
WINED3D_TEXTURE_POW2_MAT_IDENT
;
texture
->
flags
&=
~
(
WINED3D_TEXTURE_POW2_MAT_IDENT
|
WINED3D_TEXTURE_NORMALIZED_COORDS
)
;
if
(
texture
->
resource
.
format
->
flags
&
WINED3DFMT_FLAG_FILTERING
)
texture
->
min_mip_lookup
=
minMipLookup_noMip
;
...
...
dlls/wined3d/wined3d_private.h
View file @
18007122
...
...
@@ -2131,6 +2131,7 @@ struct wined3d_texture_ops
#define WINED3D_TEXTURE_CONVERTED 0x00000080
#define WINED3D_TEXTURE_PIN_SYSMEM 0x00000100
#define WINED3D_TEXTURE_DYNAMIC_MAP 0x00000200
#define WINED3D_TEXTURE_NORMALIZED_COORDS 0x00000400
struct
wined3d_texture
{
...
...
@@ -2351,11 +2352,10 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) D
#define SFLAG_DIBSECTION 0x00000001
/* Has a DIB section attached for GetDC. */
#define SFLAG_DISCARD 0x00000002
/* ??? */
#define SFLAG_NONPOW2 0x00000004
/* Surface sizes are not a power of 2 */
#define SFLAG_
NORMCOORD 0x00000008
/* Set if GL texture coordinates are normalized (non-texture rectangle)
. */
#define SFLAG_
LOST 0x00000008
/* Surface lost flag for ddraw
. */
#define SFLAG_GLCKEY 0x00000010
/* The GL texture was created with a color key. */
#define SFLAG_CLIENT 0x00000020
/* GL_APPLE_client_storage is used with this surface. */
#define SFLAG_DCINUSE 0x00000040
/* Set between GetDC and ReleaseDC calls. */
#define SFLAG_LOST 0x00000080
/* Surface lost flag for ddraw. */
struct
wined3d_sampler
{
...
...
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