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
786408fb
Commit
786408fb
authored
Jun 05, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Check FBO compatibility on all formats with a GL format.
Instead of just the ones that have a fallback specified.
parent
b93c3b32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
utils.c
dlls/wined3d/utils.c
+19
-6
No files found.
dlls/wined3d/utils.c
View file @
786408fb
...
...
@@ -501,7 +501,7 @@ static BOOL init_format_base_info(WineD3D_GL_Info *gl_info)
#define GLINFO_LOCATION (*gl_info)
static
BOOL
check_fbo_compat
(
const
WineD3D_GL_Info
*
gl_info
,
GLint
internal_format
)
static
BOOL
check_fbo_compat
(
const
WineD3D_GL_Info
*
gl_info
,
GLint
internal_format
,
GLenum
format
,
GLenum
type
)
{
GLuint
tex
,
fb
;
GLenum
status
;
...
...
@@ -511,7 +511,7 @@ static BOOL check_fbo_compat(const WineD3D_GL_Info *gl_info, GLint internal_form
while
(
glGetError
());
glGenTextures
(
1
,
&
tex
);
glBindTexture
(
GL_TEXTURE_2D
,
tex
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
internal_format
,
16
,
16
,
0
,
GL_RGBA
,
GL_UNSIGNED_BYTE
,
NULL
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
internal_format
,
16
,
16
,
0
,
format
,
type
,
NULL
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MIN_FILTER
,
GL_NEAREST
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
...
...
@@ -540,21 +540,34 @@ static void init_format_fbo_compat_info(WineD3D_GL_Info *gl_info)
if
(
!
desc
->
glInternal
)
continue
;
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
&&
desc
->
rtInternal
)
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
)
{
/* 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
))
if
(
check_fbo_compat
(
gl_info
,
desc
->
glInternal
,
desc
->
glFormat
,
desc
->
glType
))
{
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
));
if
(
!
desc
->
rtInternal
)
{
if
(
desc
->
Flags
&
WINED3DFMT_FLAG_RENDERTARGET
)
{
FIXME
(
"Internal format of %s not supported as FBO target, and no fallback specified.
\n
"
,
debug_d3dformat
(
desc
->
format
));
desc
->
Flags
&=
~
WINED3DFMT_FLAG_RENDERTARGET
;
}
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
...
...
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