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
be76133b
Commit
be76133b
authored
Aug 25, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Explicitly specify the resource location to context_attach_depth_stencil_fbo().
parent
9aaf0a30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
16 deletions
+26
-16
context.c
dlls/wined3d/context.c
+26
-16
No files found.
dlls/wined3d/context.c
View file @
be76133b
...
...
@@ -113,7 +113,7 @@ static void context_destroy_fbo(struct wined3d_context *context, GLuint *fbo)
/* GL locking is done by the caller */
static
void
context_attach_depth_stencil_fbo
(
struct
wined3d_context
*
context
,
GLenum
fbo_target
,
struct
wined3d_surface
*
depth_stencil
)
GLenum
fbo_target
,
struct
wined3d_surface
*
depth_stencil
,
DWORD
location
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
...
...
@@ -141,22 +141,32 @@ static void context_attach_depth_stencil_fbo(struct wined3d_context *context,
}
else
{
surface_prepare_texture
(
depth_stencil
,
context
,
FALSE
);
if
(
format_flags
&
WINED3DFMT_FLAG_DEPTH
)
switch
(
location
)
{
gl_info
->
fbo_ops
.
glFramebufferTexture2D
(
fbo_target
,
GL_DEPTH_ATTACHMENT
,
depth_stencil
->
texture_target
,
depth_stencil
->
texture_name
,
depth_stencil
->
texture_level
);
checkGLcall
(
"glFramebufferTexture2D()"
);
}
case
SFLAG_INTEXTURE
:
case
SFLAG_INSRGBTEX
:
surface_prepare_texture
(
depth_stencil
,
context
,
FALSE
);
if
(
format_flags
&
WINED3DFMT_FLAG_DEPTH
)
{
gl_info
->
fbo_ops
.
glFramebufferTexture2D
(
fbo_target
,
GL_DEPTH_ATTACHMENT
,
depth_stencil
->
texture_target
,
depth_stencil
->
texture_name
,
depth_stencil
->
texture_level
);
checkGLcall
(
"glFramebufferTexture2D()"
);
}
if
(
format_flags
&
WINED3DFMT_FLAG_STENCIL
)
{
gl_info
->
fbo_ops
.
glFramebufferTexture2D
(
fbo_target
,
GL_STENCIL_ATTACHMENT
,
depth_stencil
->
texture_target
,
depth_stencil
->
texture_name
,
depth_stencil
->
texture_level
);
checkGLcall
(
"glFramebufferTexture2D()"
);
}
break
;
if
(
format_flags
&
WINED3DFMT_FLAG_STENCIL
)
{
gl_info
->
fbo_ops
.
glFramebufferTexture2D
(
fbo_target
,
GL_STENCIL_ATTACHMENT
,
depth_stencil
->
texture_target
,
depth_stencil
->
texture_name
,
depth_stencil
->
texture_level
);
checkGLcall
(
"glFramebufferTexture2D()"
);
default:
ERR
(
"Unsupported location %s (%#x).
\n
"
,
debug_surflocation
(
location
),
location
);
break
;
}
}
...
...
@@ -393,7 +403,7 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ
/* Apply depth targets */
if
(
entry
->
depth_stencil
)
surface_set_compatible_renderbuffer
(
entry
->
depth_stencil
,
entry
->
render_targets
[
0
]);
context_attach_depth_stencil_fbo
(
context
,
target
,
entry
->
depth_stencil
);
context_attach_depth_stencil_fbo
(
context
,
target
,
entry
->
depth_stencil
,
entry
->
location
);
entry
->
attached
=
TRUE
;
}
...
...
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