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
54945f04
Commit
54945f04
authored
May 09, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
May 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_context_gl structure to context_apply_blit_state().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
81f5f21a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
9 deletions
+15
-9
context.c
dlls/wined3d/context.c
+10
-5
glsl_shader.c
dlls/wined3d/glsl_shader.c
+1
-1
surface.c
dlls/wined3d/surface.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-1
No files found.
dlls/wined3d/context.c
View file @
54945f04
...
...
@@ -2749,16 +2749,20 @@ static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_context *conte
}
/* Context activation is done by the caller. */
void
context_apply_blit_state
(
struct
wined3d_context
*
context
,
const
struct
wined3d_device
*
device
)
void
wined3d_context_gl_apply_blit_state
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_device
*
device
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
struct
wined3d_texture
*
rt
=
context
->
current_rt
.
texture
;
struct
wined3d_context
*
context
=
&
context_gl
->
c
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_texture
*
rt
;
DWORD
rt_mask
,
*
cur_mask
;
unsigned
int
sampler
;
SIZE
rt_size
;
TRACE
(
"Setting up context %p for blitting.
\n
"
,
context
);
gl_info
=
context
->
gl_info
;
rt
=
context
->
current_rt
.
texture
;
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
)
{
if
(
context
->
render_offscreen
)
...
...
@@ -2906,6 +2910,7 @@ static void context_apply_blit_projection(const struct wined3d_context *context,
/* Context activation is done by the caller. */
void
context_apply_ffp_blit_state
(
struct
wined3d_context
*
context
,
const
struct
wined3d_device
*
device
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
unsigned
int
i
,
sampler
;
...
...
@@ -2919,14 +2924,14 @@ void context_apply_ffp_blit_state(struct wined3d_context *context, const struct
context_get_rt_size
(
context
,
&
rt_size
);
if
(
context
->
blit_w
!=
rt_size
.
cx
||
context
->
blit_h
!=
rt_size
.
cy
)
context_apply_blit_projection
(
context
,
rt_size
.
cx
,
rt_size
.
cy
);
context_apply_blit_state
(
context
,
device
);
wined3d_context_gl_apply_blit_state
(
context_gl
,
device
);
checkGLcall
(
"ffp blit state application"
);
return
;
}
context
->
last_was_ffp_blit
=
TRUE
;
context_apply_blit_state
(
context
,
device
);
wined3d_context_gl_apply_blit_state
(
context_gl
,
device
);
/* Disable all textures. The caller can then bind a texture it wants to blit
* from. */
...
...
dlls/wined3d/glsl_shader.c
View file @
54945f04
...
...
@@ -13307,7 +13307,7 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli
wined3d_texture_load
(
src_texture
,
context
,
FALSE
);
}
context_apply_blit_state
(
context
,
device
);
wined3d_context_gl_apply_blit_state
(
wined3d_context_gl
(
context
)
,
device
);
if
(
dst_location
==
WINED3D_LOCATION_DRAWABLE
)
{
...
...
dlls/wined3d/surface.c
View file @
54945f04
...
...
@@ -737,7 +737,7 @@ static void texture2d_read_from_framebuffer(struct wined3d_texture *texture, uns
}
else
{
context_apply_blit_state
(
context
,
device
);
wined3d_context_gl_apply_blit_state
(
wined3d_context_gl
(
context
)
,
device
);
}
/* Select the correct read buffer, and give some debug output.
...
...
@@ -908,7 +908,7 @@ static void fb_copy_to_texture_direct(struct wined3d_texture_gl *dst_texture, un
context
=
context_acquire
(
device
,
&
src_texture
->
t
,
src_sub_resource_idx
);
context_gl
=
wined3d_context_gl
(
context
);
gl_info
=
context
->
gl_info
;
context_apply_blit_state
(
context
,
device
);
wined3d_context_gl_apply_blit_state
(
context_gl
,
device
);
wined3d_texture_load
(
&
dst_texture
->
t
,
context
,
FALSE
);
/* Bind the target texture */
...
...
dlls/wined3d/wined3d_private.h
View file @
54945f04
...
...
@@ -2054,6 +2054,8 @@ static inline const struct wined3d_context_gl *wined3d_context_gl_const(const st
return
CONTAINING_RECORD
(
context
,
struct
wined3d_context_gl
,
c
);
}
void
wined3d_context_gl_apply_blit_state
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
void
wined3d_context_gl_bind_texture
(
struct
wined3d_context_gl
*
context_gl
,
GLenum
target
,
GLuint
name
)
DECLSPEC_HIDDEN
;
void
wined3d_context_gl_cleanup
(
struct
wined3d_context_gl
*
context_gl
)
DECLSPEC_HIDDEN
;
...
...
@@ -2207,7 +2209,6 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
void
context_alloc_fence
(
struct
wined3d_context
*
context
,
struct
wined3d_fence
*
fence
)
DECLSPEC_HIDDEN
;
void
context_alloc_occlusion_query
(
struct
wined3d_context
*
context
,
struct
wined3d_occlusion_query
*
query
)
DECLSPEC_HIDDEN
;
void
context_apply_blit_state
(
struct
wined3d_context
*
context
,
const
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
BOOL
context_apply_clear_state
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
UINT
rt_count
,
const
struct
wined3d_fb_state
*
fb
)
DECLSPEC_HIDDEN
;
void
context_apply_fbo_state_blit
(
struct
wined3d_context
*
context
,
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