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
9cb572cb
Commit
9cb572cb
authored
May 15, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
May 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_context_gl structure to context_set_draw_buffer().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
49889f72
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
12 deletions
+15
-12
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
context.c
dlls/wined3d/context.c
+8
-5
glsl_shader.c
dlls/wined3d/glsl_shader.c
+1
-1
surface.c
dlls/wined3d/surface.c
+4
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
9cb572cb
...
...
@@ -7899,7 +7899,7 @@ static DWORD arbfp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bl
}
wined3d_context_gl_apply_fbo_state_blit
(
context_gl
,
GL_DRAW_FRAMEBUFFER
,
&
dst_texture
->
resource
,
dst_sub_resource_idx
,
NULL
,
0
,
dst_location
);
context_set_draw_buffer
(
context
,
buffer
);
wined3d_context_gl_set_draw_buffer
(
context_gl
,
buffer
);
wined3d_context_gl_check_fbo_status
(
context_gl
,
GL_DRAW_FRAMEBUFFER
);
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
);
}
...
...
dlls/wined3d/context.c
View file @
9cb572cb
...
...
@@ -702,6 +702,7 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context,
/* Context activation is done by the caller. */
static
void
context_apply_fbo_entry
(
struct
wined3d_context
*
context
,
GLenum
target
,
struct
fbo_entry
*
entry
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
GLuint
read_binding
,
draw_binding
;
unsigned
int
i
;
...
...
@@ -739,7 +740,7 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ
/* Set valid read and draw buffer bindings to satisfy pedantic pre-ES2_compatibility
* GL contexts requirements. */
gl_info
->
gl_ops
.
gl
.
p_glReadBuffer
(
GL_NONE
);
context_set_draw_buffer
(
context
,
GL_NONE
);
wined3d_context_gl_set_draw_buffer
(
context_gl
,
GL_NONE
);
if
(
target
!=
GL_FRAMEBUFFER
)
{
if
(
target
==
GL_READ_FRAMEBUFFER
)
...
...
@@ -2504,12 +2505,14 @@ static void context_apply_draw_buffers(struct wined3d_context *context, DWORD rt
}
/* Context activation is done by the caller. */
void
context_set_draw_buffer
(
struct
wined3d_context
*
context
,
GLenum
buffer
)
void
wined3d_context_gl_set_draw_buffer
(
struct
wined3d_context_gl
*
context_gl
,
GLenum
buffer
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
DWORD
*
current_mask
=
context
->
current_fbo
?
&
context
->
current_fbo
->
rt_mask
:
&
context
->
draw_buffers_mask
;
DWORD
new_mask
=
context_generate_rt_mask
(
buffer
);
const
struct
wined3d_gl_info
*
gl_info
=
context_gl
->
c
.
gl_info
;
struct
fbo_entry
*
current_fbo
=
context_gl
->
c
.
current_fbo
;
uint32_t
new_mask
=
context_generate_rt_mask
(
buffer
);
uint32_t
*
current_mask
;
current_mask
=
current_fbo
?
&
current_fbo
->
rt_mask
:
&
context_gl
->
c
.
draw_buffers_mask
;
if
(
new_mask
==
*
current_mask
)
return
;
...
...
dlls/wined3d/glsl_shader.c
View file @
9cb572cb
...
...
@@ -13333,7 +13333,7 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli
}
wined3d_context_gl_apply_fbo_state_blit
(
context_gl
,
GL_DRAW_FRAMEBUFFER
,
&
dst_texture
->
resource
,
dst_sub_resource_idx
,
NULL
,
0
,
dst_location
);
context_set_draw_buffer
(
context
,
buffer
);
wined3d_context_gl_set_draw_buffer
(
context_gl
,
buffer
);
wined3d_context_gl_check_fbo_status
(
context_gl
,
GL_DRAW_FRAMEBUFFER
);
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
);
}
...
...
dlls/wined3d/surface.c
View file @
9cb572cb
...
...
@@ -110,7 +110,7 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device, struct
wined3d_context_gl_apply_fbo_state_blit
(
context_gl
,
GL_DRAW_FRAMEBUFFER
,
NULL
,
0
,
&
dst_texture
->
resource
,
dst_sub_resource_idx
,
dst_location
);
context_set_draw_buffer
(
context
,
GL_NONE
);
wined3d_context_gl_set_draw_buffer
(
context_gl
,
GL_NONE
);
wined3d_context_gl_check_fbo_status
(
context_gl
,
GL_DRAW_FRAMEBUFFER
);
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
);
...
...
@@ -270,7 +270,7 @@ static void texture2d_blt_fbo(const struct wined3d_device *device, struct wined3
wined3d_context_gl_apply_fbo_state_blit
(
context_gl
,
GL_DRAW_FRAMEBUFFER
,
&
dst_texture
->
resource
,
dst_sub_resource_idx
,
NULL
,
0
,
dst_location
);
context_set_draw_buffer
(
context
,
buffer
);
wined3d_context_gl_set_draw_buffer
(
context_gl
,
buffer
);
wined3d_context_gl_check_fbo_status
(
context_gl
,
GL_DRAW_FRAMEBUFFER
);
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
);
...
...
@@ -1183,7 +1183,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_texture_gl *dst_texture,
gl_info
->
gl_ops
.
gl
.
p_glTexParameteri
(
texture_target
,
GL_TEXTURE_WRAP_S
,
GL_CLAMP_TO_EDGE
);
gl_info
->
gl_ops
.
gl
.
p_glTexParameteri
(
texture_target
,
GL_TEXTURE_WRAP_T
,
GL_CLAMP_TO_EDGE
);
context_set_draw_buffer
(
context
,
drawBuffer
);
wined3d_context_gl_set_draw_buffer
(
context_gl
,
drawBuffer
);
gl_info
->
gl_ops
.
gl
.
p_glReadBuffer
(
drawBuffer
);
gl_info
->
gl_ops
.
gl
.
p_glBegin
(
GL_QUADS
);
...
...
@@ -2259,7 +2259,7 @@ static DWORD ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
}
wined3d_context_gl_apply_fbo_state_blit
(
context_gl
,
GL_DRAW_FRAMEBUFFER
,
dst_resource
,
dst_sub_resource_idx
,
NULL
,
0
,
dst_location
);
context_set_draw_buffer
(
context
,
buffer
);
wined3d_context_gl_set_draw_buffer
(
context_gl
,
buffer
);
wined3d_context_gl_check_fbo_status
(
context_gl
,
GL_DRAW_FRAMEBUFFER
);
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
9cb572cb
...
...
@@ -2087,6 +2087,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl,
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
void
wined3d_context_gl_load_tex_coords
(
const
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_stream_info
*
si
,
GLuint
*
current_bo
,
const
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
void
wined3d_context_gl_set_draw_buffer
(
struct
wined3d_context_gl
*
context_gl
,
GLenum
buffer
)
DECLSPEC_HIDDEN
;
void
wined3d_context_gl_update_stream_sources
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
...
...
@@ -2258,7 +2259,6 @@ void context_resource_released(const struct wined3d_device *device, struct wined
void
context_restore
(
struct
wined3d_context
*
context
,
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
)
DECLSPEC_HIDDEN
;
BOOL
context_set_current
(
struct
wined3d_context
*
ctx
)
DECLSPEC_HIDDEN
;
void
context_set_draw_buffer
(
struct
wined3d_context
*
context
,
GLenum
buffer
)
DECLSPEC_HIDDEN
;
void
context_set_tls_idx
(
DWORD
idx
)
DECLSPEC_HIDDEN
;
void
context_state_drawbuf
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
DECLSPEC_HIDDEN
;
...
...
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