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
0a059aaf
Commit
0a059aaf
authored
Jun 04, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Check FBO compatibility after the fixups are applied.
parent
faaea935
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
23 deletions
+36
-23
utils.c
dlls/wined3d/utils.c
+36
-23
No files found.
dlls/wined3d/utils.c
View file @
0a059aaf
...
@@ -420,6 +420,40 @@ static BOOL check_fbo_compat(const WineD3D_GL_Info *gl_info, GLint internal_form
...
@@ -420,6 +420,40 @@ static BOOL check_fbo_compat(const WineD3D_GL_Info *gl_info, GLint internal_form
return
status
==
GL_FRAMEBUFFER_COMPLETE_EXT
;
return
status
==
GL_FRAMEBUFFER_COMPLETE_EXT
;
}
}
static
void
init_format_fbo_compat_info
(
WineD3D_GL_Info
*
gl_info
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
formats
)
/
sizeof
(
*
formats
);
++
i
)
{
struct
GlPixelFormatDesc
*
desc
=
&
gl_info
->
gl_formats
[
i
];
if
(
!
desc
->
glInternal
)
continue
;
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
&&
desc
->
rtInternal
)
{
/* Check if the default internal format is supported as a frame buffer target, otherwise
* fall back to the render target internal.
*
* Try to stick to the standard format if possible, this limits precision differences. */
if
(
check_fbo_compat
(
gl_info
,
desc
->
glInternal
))
{
TRACE
(
"Format %s is supported as fbo target
\n
"
,
debug_d3dformat
(
desc
->
format
));
desc
->
rtInternal
=
desc
->
glInternal
;
}
else
{
TRACE
(
"Internal format of %s not supported as FBO target, using render target internal instead
\n
"
,
debug_d3dformat
(
desc
->
format
));
}
}
else
{
desc
->
rtInternal
=
desc
->
glInternal
;
}
}
}
static
BOOL
init_format_texture_info
(
WineD3D_GL_Info
*
gl_info
)
static
BOOL
init_format_texture_info
(
WineD3D_GL_Info
*
gl_info
)
{
{
unsigned
int
i
;
unsigned
int
i
;
...
@@ -439,34 +473,12 @@ static BOOL init_format_texture_info(WineD3D_GL_Info *gl_info)
...
@@ -439,34 +473,12 @@ static BOOL init_format_texture_info(WineD3D_GL_Info *gl_info)
desc
=
&
gl_info
->
gl_formats
[
fmt_idx
];
desc
=
&
gl_info
->
gl_formats
[
fmt_idx
];
desc
->
glInternal
=
gl_formats_template
[
i
].
glInternal
;
desc
->
glInternal
=
gl_formats_template
[
i
].
glInternal
;
desc
->
glGammaInternal
=
gl_formats_template
[
i
].
glGammaInternal
;
desc
->
glGammaInternal
=
gl_formats_template
[
i
].
glGammaInternal
;
desc
->
rtInternal
=
gl_formats_template
[
i
].
rtInternal
;
desc
->
glFormat
=
gl_formats_template
[
i
].
glFormat
;
desc
->
glFormat
=
gl_formats_template
[
i
].
glFormat
;
desc
->
glType
=
gl_formats_template
[
i
].
glType
;
desc
->
glType
=
gl_formats_template
[
i
].
glType
;
desc
->
color_fixup
=
COLOR_FIXUP_IDENTITY
;
desc
->
color_fixup
=
COLOR_FIXUP_IDENTITY
;
desc
->
Flags
|=
gl_formats_template
[
i
].
Flags
;
desc
->
Flags
|=
gl_formats_template
[
i
].
Flags
;
desc
->
heightscale
=
1
.
0
;
desc
->
heightscale
=
1
.
0
;
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
&&
gl_formats_template
[
i
].
rtInternal
)
{
/* Check if the default internal format is supported as a frame buffer target, otherwise
* fall back to the render target internal.
*
* Try to stick to the standard format if possible, this limits precision differences */
if
(
!
check_fbo_compat
(
gl_info
,
gl_formats_template
[
i
].
glInternal
))
{
TRACE
(
"Internal format of %s not supported as FBO target, using render target internal instead
\n
"
,
debug_d3dformat
(
gl_formats_template
[
i
].
fmt
));
desc
->
rtInternal
=
gl_formats_template
[
i
].
rtInternal
;
}
else
{
TRACE
(
"Format %s is supported as fbo target
\n
"
,
debug_d3dformat
(
gl_formats_template
[
i
].
fmt
));
desc
->
rtInternal
=
gl_formats_template
[
i
].
glInternal
;
}
}
else
{
desc
->
rtInternal
=
gl_formats_template
[
i
].
glInternal
;
}
}
}
return
TRUE
;
return
TRUE
;
...
@@ -670,6 +682,7 @@ BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
...
@@ -670,6 +682,7 @@ BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
}
}
apply_format_fixups
(
gl_info
);
apply_format_fixups
(
gl_info
);
init_format_fbo_compat_info
(
gl_info
);
return
TRUE
;
return
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