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
24c93d48
Commit
24c93d48
authored
Apr 15, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to context_attach_depth_stencil_fbo().
parent
95130a7d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
context.c
dlls/wined3d/context.c
+12
-13
surface.c
dlls/wined3d/surface.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/context.c
View file @
24c93d48
...
...
@@ -182,51 +182,50 @@ static void context_apply_attachment_filter_states(IWineD3DSurfaceImpl *surface)
/* GL locking is done by the caller */
void
context_attach_depth_stencil_fbo
(
struct
wined3d_context
*
context
,
GLenum
fbo_target
,
IWineD3DSurface
*
depth_stencil
,
BOOL
use_render_buffer
)
GLenum
fbo_target
,
IWineD3DSurface
Impl
*
depth_stencil
,
BOOL
use_render_buffer
)
{
IWineD3DSurfaceImpl
*
depth_stencil_impl
=
(
IWineD3DSurfaceImpl
*
)
depth_stencil
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
TRACE
(
"Attach depth stencil %p
\n
"
,
depth_stencil
);
if
(
depth_stencil
)
{
DWORD
format_flags
=
depth_stencil
_impl
->
resource
.
format_desc
->
Flags
;
DWORD
format_flags
=
depth_stencil
->
resource
.
format_desc
->
Flags
;
if
(
use_render_buffer
&&
depth_stencil
_impl
->
current_renderbuffer
)
if
(
use_render_buffer
&&
depth_stencil
->
current_renderbuffer
)
{
if
(
format_flags
&
WINED3DFMT_FLAG_DEPTH
)
{
gl_info
->
fbo_ops
.
glFramebufferRenderbuffer
(
fbo_target
,
GL_DEPTH_ATTACHMENT
,
GL_RENDERBUFFER
,
depth_stencil
_impl
->
current_renderbuffer
->
id
);
GL_RENDERBUFFER
,
depth_stencil
->
current_renderbuffer
->
id
);
checkGLcall
(
"glFramebufferRenderbuffer()"
);
}
if
(
format_flags
&
WINED3DFMT_FLAG_STENCIL
)
{
gl_info
->
fbo_ops
.
glFramebufferRenderbuffer
(
fbo_target
,
GL_STENCIL_ATTACHMENT
,
GL_RENDERBUFFER
,
depth_stencil
_impl
->
current_renderbuffer
->
id
);
GL_RENDERBUFFER
,
depth_stencil
->
current_renderbuffer
->
id
);
checkGLcall
(
"glFramebufferRenderbuffer()"
);
}
}
else
{
surface_prepare_texture
(
depth_stencil
_impl
,
gl_info
,
FALSE
);
context_apply_attachment_filter_states
(
depth_stencil
_impl
);
surface_prepare_texture
(
depth_stencil
,
gl_info
,
FALSE
);
context_apply_attachment_filter_states
(
depth_stencil
);
if
(
format_flags
&
WINED3DFMT_FLAG_DEPTH
)
{
gl_info
->
fbo_ops
.
glFramebufferTexture2D
(
fbo_target
,
GL_DEPTH_ATTACHMENT
,
depth_stencil
_impl
->
texture_target
,
depth_stencil_imp
l
->
texture_name
,
depth_stencil
_impl
->
texture_level
);
depth_stencil
->
texture_target
,
depth_stenci
l
->
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
_impl
->
texture_target
,
depth_stencil_imp
l
->
texture_name
,
depth_stencil
_impl
->
texture_level
);
depth_stencil
->
texture_target
,
depth_stenci
l
->
texture_name
,
depth_stencil
->
texture_level
);
checkGLcall
(
"glFramebufferTexture2D()"
);
}
}
...
...
@@ -426,7 +425,7 @@ static void context_apply_fbo_entry(struct wined3d_context *context, struct fbo_
surface_set_compatible_renderbuffer
(
device
->
stencilBufferTarget
,
w
,
h
);
}
context_attach_depth_stencil_fbo
(
context
,
GL_FRAMEBUFFER
,
device
->
stencilBufferTarget
,
TRUE
);
context_attach_depth_stencil_fbo
(
context
,
GL_FRAMEBUFFER
,
(
IWineD3DSurfaceImpl
*
)
device
->
stencilBufferTarget
,
TRUE
);
entry
->
attached
=
TRUE
;
}
...
...
dlls/wined3d/surface.c
View file @
24c93d48
...
...
@@ -4140,7 +4140,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, struct wined3d_context *co
gl_info
->
fbo_ops
.
glFramebufferRenderbuffer
(
GL_FRAMEBUFFER
,
GL_COLOR_ATTACHMENT0
,
GL_RENDERBUFFER
,
device
->
depth_blt_rb
);
checkGLcall
(
"glFramebufferRenderbufferEXT"
);
context_attach_depth_stencil_fbo
(
context
,
GL_FRAMEBUFFER
,
iface
,
FALSE
);
context_attach_depth_stencil_fbo
(
context
,
GL_FRAMEBUFFER
,
This
,
FALSE
);
/* Do the actual blit */
surface_depth_blt
(
This
,
gl_info
,
device
->
depth_blt_texture
,
...
...
dlls/wined3d/wined3d_private.h
View file @
24c93d48
...
...
@@ -1214,7 +1214,7 @@ void context_resource_released(IWineD3DDevice *iface,
IWineD3DResource
*
resource
,
WINED3DRESOURCETYPE
type
)
DECLSPEC_HIDDEN
;
void
context_bind_fbo
(
struct
wined3d_context
*
context
,
GLenum
target
,
GLuint
*
fbo
)
DECLSPEC_HIDDEN
;
void
context_attach_depth_stencil_fbo
(
struct
wined3d_context
*
context
,
GLenum
fbo_target
,
IWineD3DSurface
*
depth_stencil
,
BOOL
use_render_buffer
)
DECLSPEC_HIDDEN
;
GLenum
fbo_target
,
IWineD3DSurface
Impl
*
depth_stencil
,
BOOL
use_render_buffer
)
DECLSPEC_HIDDEN
;
void
context_attach_surface_fbo
(
const
struct
wined3d_context
*
context
,
GLenum
fbo_target
,
DWORD
idx
,
IWineD3DSurfaceImpl
*
surface
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context_create
(
IWineD3DSwapChainImpl
*
swapchain
,
IWineD3DSurfaceImpl
*
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