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
1aa85c96
Commit
1aa85c96
authored
Jun 30, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename the rt mask generation functions.
parent
9752bf8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
context.c
dlls/wined3d/context.c
+13
-13
No files found.
dlls/wined3d/context.c
View file @
1aa85c96
...
@@ -1232,13 +1232,13 @@ static int WineD3D_ChoosePixelFormat(struct wined3d_device *device, HDC hdc,
...
@@ -1232,13 +1232,13 @@ static int WineD3D_ChoosePixelFormat(struct wined3d_device *device, HDC hdc,
return
iPixelFormat
;
return
iPixelFormat
;
}
}
static
inline
DWORD
generate_rt_mask
(
GLenum
buffer
)
static
inline
DWORD
context_
generate_rt_mask
(
GLenum
buffer
)
{
{
/* Should take care of all the GL_FRONT/GL_BACK/GL_AUXi/GL_NONE... cases */
/* Should take care of all the GL_FRONT/GL_BACK/GL_AUXi/GL_NONE... cases */
return
buffer
?
(
1
<<
31
)
|
buffer
:
0
;
return
buffer
?
(
1
<<
31
)
|
buffer
:
0
;
}
}
static
inline
DWORD
generate_rt_mask_from_surface
(
const
struct
wined3d_surface
*
target
)
static
inline
DWORD
context_
generate_rt_mask_from_surface
(
const
struct
wined3d_surface
*
target
)
{
{
return
(
1
<<
31
)
|
surface_get_gl_buffer
(
target
);
return
(
1
<<
31
)
|
surface_get_gl_buffer
(
target
);
}
}
...
@@ -1379,7 +1379,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
...
@@ -1379,7 +1379,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
ret
->
tid
=
GetCurrentThreadId
();
ret
->
tid
=
GetCurrentThreadId
();
ret
->
render_offscreen
=
surface_is_offscreen
(
target
);
ret
->
render_offscreen
=
surface_is_offscreen
(
target
);
ret
->
draw_buffers_mask
=
generate_rt_mask
(
GL_BACK
);
ret
->
draw_buffers_mask
=
context_
generate_rt_mask
(
GL_BACK
);
ret
->
valid
=
1
;
ret
->
valid
=
1
;
ret
->
glCtx
=
ctx
;
ret
->
glCtx
=
ctx
;
...
@@ -1948,7 +1948,7 @@ void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer)
...
@@ -1948,7 +1948,7 @@ void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer)
{
{
glDrawBuffer
(
buffer
);
glDrawBuffer
(
buffer
);
checkGLcall
(
"glDrawBuffer()"
);
checkGLcall
(
"glDrawBuffer()"
);
context
->
draw_buffers_mask
=
generate_rt_mask
(
buffer
);
context
->
draw_buffers_mask
=
context_
generate_rt_mask
(
buffer
);
}
}
static
inline
void
context_set_render_offscreen
(
struct
wined3d_context
*
context
,
const
struct
StateEntry
*
StateTable
,
static
inline
void
context_set_render_offscreen
(
struct
wined3d_context
*
context
,
const
struct
StateEntry
*
StateTable
,
...
@@ -2003,14 +2003,14 @@ static void context_validate_onscreen_formats(struct wined3d_device *device,
...
@@ -2003,14 +2003,14 @@ static void context_validate_onscreen_formats(struct wined3d_device *device,
context_set_render_offscreen
(
context
,
device
->
StateTable
,
TRUE
);
context_set_render_offscreen
(
context
,
device
->
StateTable
,
TRUE
);
}
}
static
DWORD
generate_rt_mask_no_fbo
(
const
struct
wined3d_device
*
device
,
const
struct
wined3d_surface
*
rt
)
static
DWORD
context_
generate_rt_mask_no_fbo
(
const
struct
wined3d_device
*
device
,
const
struct
wined3d_surface
*
rt
)
{
{
if
(
!
rt
||
rt
->
resource
.
format
->
id
==
WINED3DFMT_NULL
)
if
(
!
rt
||
rt
->
resource
.
format
->
id
==
WINED3DFMT_NULL
)
return
0
;
return
0
;
else
if
(
rt
->
container
.
type
==
WINED3D_CONTAINER_SWAPCHAIN
)
else
if
(
rt
->
container
.
type
==
WINED3D_CONTAINER_SWAPCHAIN
)
return
generate_rt_mask_from_surface
(
rt
);
return
context_
generate_rt_mask_from_surface
(
rt
);
else
else
return
generate_rt_mask
(
device
->
offscreenBuffer
);
return
context_
generate_rt_mask
(
device
->
offscreenBuffer
);
}
}
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
...
@@ -2039,12 +2039,12 @@ void context_apply_blit_state(struct wined3d_context *context, struct wined3d_de
...
@@ -2039,12 +2039,12 @@ void context_apply_blit_state(struct wined3d_context *context, struct wined3d_de
ENTER_GL
();
ENTER_GL
();
context_bind_fbo
(
context
,
GL_FRAMEBUFFER
,
NULL
);
context_bind_fbo
(
context
,
GL_FRAMEBUFFER
,
NULL
);
LEAVE_GL
();
LEAVE_GL
();
rt_mask
=
generate_rt_mask_from_surface
(
context
->
current_rt
);
rt_mask
=
context_
generate_rt_mask_from_surface
(
context
->
current_rt
);
}
}
}
}
else
else
{
{
rt_mask
=
generate_rt_mask_no_fbo
(
device
,
context
->
current_rt
);
rt_mask
=
context_
generate_rt_mask_no_fbo
(
device
,
context
->
current_rt
);
}
}
ENTER_GL
();
ENTER_GL
();
...
@@ -2118,14 +2118,14 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d
...
@@ -2118,14 +2118,14 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d
else
else
{
{
context_apply_fbo_state
(
context
,
GL_FRAMEBUFFER
,
NULL
,
NULL
,
SFLAG_INDRAWABLE
);
context_apply_fbo_state
(
context
,
GL_FRAMEBUFFER
,
NULL
,
NULL
,
SFLAG_INDRAWABLE
);
rt_mask
=
generate_rt_mask_from_surface
(
rts
[
0
]);
rt_mask
=
context_
generate_rt_mask_from_surface
(
rts
[
0
]);
}
}
LEAVE_GL
();
LEAVE_GL
();
}
}
else
else
{
{
rt_mask
=
generate_rt_mask_no_fbo
(
device
,
rts
[
0
]);
rt_mask
=
context_
generate_rt_mask_no_fbo
(
device
,
rts
[
0
]);
}
}
ENTER_GL
();
ENTER_GL
();
...
@@ -2190,7 +2190,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
...
@@ -2190,7 +2190,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
ENTER_GL
();
ENTER_GL
();
context_apply_fbo_state
(
context
,
GL_FRAMEBUFFER
,
NULL
,
NULL
,
SFLAG_INDRAWABLE
);
context_apply_fbo_state
(
context
,
GL_FRAMEBUFFER
,
NULL
,
NULL
,
SFLAG_INDRAWABLE
);
LEAVE_GL
();
LEAVE_GL
();
rt_mask
=
generate_rt_mask_from_surface
(
fb
->
render_targets
[
0
]);
rt_mask
=
context_
generate_rt_mask_from_surface
(
fb
->
render_targets
[
0
]);
}
}
else
else
{
{
...
@@ -2219,7 +2219,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
...
@@ -2219,7 +2219,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
}
}
else
else
{
{
rt_mask
=
generate_rt_mask_no_fbo
(
device
,
fb
->
render_targets
[
0
]);
rt_mask
=
context_
generate_rt_mask_no_fbo
(
device
,
fb
->
render_targets
[
0
]);
}
}
ENTER_GL
();
ENTER_GL
();
...
...
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