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
119c17e1
Commit
119c17e1
authored
Mar 19, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get resource info from the texture in surface_prepare_rb().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
576a74d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
surface.c
dlls/wined3d/surface.c
+8
-6
No files found.
dlls/wined3d/surface.c
View file @
119c17e1
...
@@ -2146,6 +2146,9 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct
...
@@ -2146,6 +2146,9 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct
static
void
surface_prepare_rb
(
struct
wined3d_surface
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
multisample
)
static
void
surface_prepare_rb
(
struct
wined3d_surface
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
multisample
)
{
{
struct
wined3d_texture
*
texture
=
surface
->
container
;
const
struct
wined3d_format
*
format
=
texture
->
resource
.
format
;
if
(
multisample
)
if
(
multisample
)
{
{
DWORD
samples
;
DWORD
samples
;
...
@@ -2162,16 +2165,15 @@ static void surface_prepare_rb(struct wined3d_surface *surface, const struct win
...
@@ -2162,16 +2165,15 @@ static void surface_prepare_rb(struct wined3d_surface *surface, const struct win
/* We advertise as many WINED3D_MULTISAMPLE_NON_MASKABLE quality levels
/* We advertise as many WINED3D_MULTISAMPLE_NON_MASKABLE quality levels
* as the count of advertised multisample types for the surface format. */
* as the count of advertised multisample types for the surface format. */
if
(
surfac
e
->
resource
.
multisample_type
==
WINED3D_MULTISAMPLE_NON_MASKABLE
)
if
(
textur
e
->
resource
.
multisample_type
==
WINED3D_MULTISAMPLE_NON_MASKABLE
)
{
{
const
struct
wined3d_format
*
format
=
surface
->
resource
.
format
;
unsigned
int
i
,
count
=
0
;
unsigned
int
i
,
count
=
0
;
for
(
i
=
0
;
i
<
sizeof
(
format
->
multisample_types
)
*
8
;
++
i
)
for
(
i
=
0
;
i
<
sizeof
(
format
->
multisample_types
)
*
8
;
++
i
)
{
{
if
(
format
->
multisample_types
&
1u
<<
i
)
if
(
format
->
multisample_types
&
1u
<<
i
)
{
{
if
(
surfac
e
->
resource
.
multisample_quality
==
count
++
)
if
(
textur
e
->
resource
.
multisample_quality
==
count
++
)
break
;
break
;
}
}
}
}
...
@@ -2179,13 +2181,13 @@ static void surface_prepare_rb(struct wined3d_surface *surface, const struct win
...
@@ -2179,13 +2181,13 @@ static void surface_prepare_rb(struct wined3d_surface *surface, const struct win
}
}
else
else
{
{
samples
=
surfac
e
->
resource
.
multisample_type
;
samples
=
textur
e
->
resource
.
multisample_type
;
}
}
gl_info
->
fbo_ops
.
glGenRenderbuffers
(
1
,
&
surface
->
rb_multisample
);
gl_info
->
fbo_ops
.
glGenRenderbuffers
(
1
,
&
surface
->
rb_multisample
);
gl_info
->
fbo_ops
.
glBindRenderbuffer
(
GL_RENDERBUFFER
,
surface
->
rb_multisample
);
gl_info
->
fbo_ops
.
glBindRenderbuffer
(
GL_RENDERBUFFER
,
surface
->
rb_multisample
);
gl_info
->
fbo_ops
.
glRenderbufferStorageMultisample
(
GL_RENDERBUFFER
,
samples
,
gl_info
->
fbo_ops
.
glRenderbufferStorageMultisample
(
GL_RENDERBUFFER
,
samples
,
surface
->
resource
.
format
->
glInternal
,
surface
->
pow2Width
,
surface
->
pow2Height
);
format
->
glInternal
,
surface
->
pow2Width
,
surface
->
pow2Height
);
checkGLcall
(
"glRenderbufferStorageMultisample()"
);
checkGLcall
(
"glRenderbufferStorageMultisample()"
);
TRACE
(
"Created multisample rb %u.
\n
"
,
surface
->
rb_multisample
);
TRACE
(
"Created multisample rb %u.
\n
"
,
surface
->
rb_multisample
);
}
}
...
@@ -2196,7 +2198,7 @@ static void surface_prepare_rb(struct wined3d_surface *surface, const struct win
...
@@ -2196,7 +2198,7 @@ static void surface_prepare_rb(struct wined3d_surface *surface, const struct win
gl_info
->
fbo_ops
.
glGenRenderbuffers
(
1
,
&
surface
->
rb_resolved
);
gl_info
->
fbo_ops
.
glGenRenderbuffers
(
1
,
&
surface
->
rb_resolved
);
gl_info
->
fbo_ops
.
glBindRenderbuffer
(
GL_RENDERBUFFER
,
surface
->
rb_resolved
);
gl_info
->
fbo_ops
.
glBindRenderbuffer
(
GL_RENDERBUFFER
,
surface
->
rb_resolved
);
gl_info
->
fbo_ops
.
glRenderbufferStorage
(
GL_RENDERBUFFER
,
surface
->
resource
.
format
->
glInternal
,
gl_info
->
fbo_ops
.
glRenderbufferStorage
(
GL_RENDERBUFFER
,
format
->
glInternal
,
surface
->
pow2Width
,
surface
->
pow2Height
);
surface
->
pow2Width
,
surface
->
pow2Height
);
checkGLcall
(
"glRenderbufferStorage()"
);
checkGLcall
(
"glRenderbufferStorage()"
);
TRACE
(
"Created resolved rb %u.
\n
"
,
surface
->
rb_resolved
);
TRACE
(
"Created resolved rb %u.
\n
"
,
surface
->
rb_resolved
);
...
...
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