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
92a44884
Commit
92a44884
authored
Apr 18, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_set_compatible_renderbuffer().
parent
03dc612c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
15 deletions
+18
-15
context.c
dlls/wined3d/context.c
+1
-1
surface.c
dlls/wined3d/surface.c
+16
-13
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/context.c
View file @
92a44884
...
...
@@ -423,7 +423,7 @@ static void context_apply_fbo_entry(struct wined3d_context *context, struct fbo_
unsigned
int
w
=
((
IWineD3DSurfaceImpl
*
)
device
->
render_targets
[
0
])
->
pow2Width
;
unsigned
int
h
=
((
IWineD3DSurfaceImpl
*
)
device
->
render_targets
[
0
])
->
pow2Height
;
surface_set_compatible_renderbuffer
(
device
->
stencilBufferTarget
,
w
,
h
);
surface_set_compatible_renderbuffer
(
(
IWineD3DSurfaceImpl
*
)
device
->
stencilBufferTarget
,
w
,
h
);
}
context_attach_depth_stencil_fbo
(
context
,
GL_FRAMEBUFFER
,
(
IWineD3DSurfaceImpl
*
)
device
->
stencilBufferTarget
,
TRUE
);
...
...
dlls/wined3d/surface.c
View file @
92a44884
...
...
@@ -873,15 +873,15 @@ static void surface_allocate_surface(IWineD3DSurfaceImpl *This, const struct win
* render target dimensions. With FBOs, the dimensions have to be an exact match. */
/* TODO: We should synchronize the renderbuffer's content with the texture's content. */
/* GL locking is done by the caller */
void
surface_set_compatible_renderbuffer
(
IWineD3DSurface
*
iface
,
unsigned
int
width
,
unsigned
int
height
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
const
struct
wined3d_gl_info
*
gl_info
=
&
This
->
resource
.
device
->
adapter
->
gl_info
;
void
surface_set_compatible_renderbuffer
(
IWineD3DSurface
Impl
*
surface
,
unsigned
int
width
,
unsigned
int
height
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
surface
->
resource
.
device
->
adapter
->
gl_info
;
renderbuffer_entry_t
*
entry
;
GLuint
renderbuffer
=
0
;
unsigned
int
src_width
,
src_height
;
src_width
=
This
->
pow2Width
;
src_height
=
This
->
pow2Height
;
src_width
=
surface
->
pow2Width
;
src_height
=
surface
->
pow2Height
;
/* A depth stencil smaller than the render target is not valid */
if
(
width
>
src_width
||
height
>
src_height
)
return
;
...
...
@@ -890,32 +890,35 @@ void surface_set_compatible_renderbuffer(IWineD3DSurface *iface, unsigned int wi
if
(
gl_info
->
supported
[
ARB_FRAMEBUFFER_OBJECT
]
||
(
width
==
src_width
&&
height
==
src_height
))
{
This
->
current_renderbuffer
=
NULL
;
surface
->
current_renderbuffer
=
NULL
;
return
;
}
/* Look if we've already got a renderbuffer of the correct dimensions */
LIST_FOR_EACH_ENTRY
(
entry
,
&
This
->
renderbuffers
,
renderbuffer_entry_t
,
entry
)
{
if
(
entry
->
width
==
width
&&
entry
->
height
==
height
)
{
LIST_FOR_EACH_ENTRY
(
entry
,
&
surface
->
renderbuffers
,
renderbuffer_entry_t
,
entry
)
{
if
(
entry
->
width
==
width
&&
entry
->
height
==
height
)
{
renderbuffer
=
entry
->
id
;
This
->
current_renderbuffer
=
entry
;
surface
->
current_renderbuffer
=
entry
;
break
;
}
}
if
(
!
renderbuffer
)
{
if
(
!
renderbuffer
)
{
gl_info
->
fbo_ops
.
glGenRenderbuffers
(
1
,
&
renderbuffer
);
gl_info
->
fbo_ops
.
glBindRenderbuffer
(
GL_RENDERBUFFER
,
renderbuffer
);
gl_info
->
fbo_ops
.
glRenderbufferStorage
(
GL_RENDERBUFFER
,
This
->
resource
.
format_desc
->
glInternal
,
width
,
height
);
surface
->
resource
.
format_desc
->
glInternal
,
width
,
height
);
entry
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
renderbuffer_entry_t
));
entry
->
width
=
width
;
entry
->
height
=
height
;
entry
->
id
=
renderbuffer
;
list_add_head
(
&
This
->
renderbuffers
,
&
entry
->
entry
);
list_add_head
(
&
surface
->
renderbuffers
,
&
entry
->
entry
);
This
->
current_renderbuffer
=
entry
;
surface
->
current_renderbuffer
=
entry
;
}
checkGLcall
(
"set_compatible_renderbuffer"
);
...
...
dlls/wined3d/wined3d_private.h
View file @
92a44884
...
...
@@ -2680,7 +2680,7 @@ GLenum surface_get_gl_buffer(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
void
surface_load_ds_location
(
IWineD3DSurfaceImpl
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
surface_modify_ds_location
(
IWineD3DSurfaceImpl
*
surface
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
surface_set_compatible_renderbuffer
(
IWineD3DSurface
*
i
face
,
void
surface_set_compatible_renderbuffer
(
IWineD3DSurface
Impl
*
sur
face
,
unsigned
int
width
,
unsigned
int
height
)
DECLSPEC_HIDDEN
;
void
surface_set_texture_name
(
IWineD3DSurface
*
iface
,
GLuint
name
,
BOOL
srgb_name
)
DECLSPEC_HIDDEN
;
void
surface_set_texture_target
(
IWineD3DSurface
*
iface
,
GLenum
target
)
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