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
cb4b7574
Commit
cb4b7574
authored
Feb 23, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a texture and sub-resource index to surface_get_blt_info().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
34aae11c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
surface.c
dlls/wined3d/surface.c
+11
-8
No files found.
dlls/wined3d/surface.c
View file @
cb4b7574
...
...
@@ -60,10 +60,19 @@ static inline void cube_coords_float(const RECT *r, UINT w, UINT h, struct float
f
->
b
=
((
r
->
bottom
*
2
.
0
f
)
/
h
)
-
1
.
0
f
;
}
static
void
surface_get_blt_info
(
GLenum
target
,
const
RECT
*
rect
,
GLsizei
w
,
GLsizei
h
,
struct
blt_info
*
info
)
static
void
texture2d_get_blt_info
(
const
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
const
RECT
*
rect
,
struct
blt_info
*
info
)
{
struct
wined3d_vec3
*
coords
=
info
->
texcoords
;
struct
float_rect
f
;
unsigned
int
level
;
GLenum
target
;
GLsizei
w
,
h
;
level
=
sub_resource_idx
%
texture
->
level_count
;
w
=
wined3d_texture_get_level_pow2_width
(
texture
,
level
);
h
=
wined3d_texture_get_level_pow2_height
(
texture
,
level
);
target
=
wined3d_texture_get_sub_resource_target
(
texture
,
sub_resource_idx
);
switch
(
target
)
{
...
...
@@ -182,14 +191,8 @@ void draw_textured_quad(struct wined3d_texture *texture, unsigned int sub_resour
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
struct
blt_info
info
;
unsigned
int
level
;
GLenum
target
;
level
=
sub_resource_idx
%
texture
->
level_count
;
target
=
wined3d_texture_get_sub_resource_target
(
texture
,
sub_resource_idx
);
surface_get_blt_info
(
target
,
src_rect
,
wined3d_texture_get_level_pow2_width
(
texture
,
level
),
wined3d_texture_get_level_pow2_height
(
texture
,
level
),
&
info
);
texture2d_get_blt_info
(
texture
,
sub_resource_idx
,
src_rect
,
&
info
);
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
info
.
bind_target
);
checkGLcall
(
"glEnable(bind_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