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
197cdcc9
Commit
197cdcc9
authored
Apr 19, 2013
by
Matteo Bruni
Committed by
Alexandre Julliard
Apr 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use ARB_internalformat_query2 for the other texture format caps too.
parent
6fa87980
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
18 deletions
+49
-18
utils.c
dlls/wined3d/utils.c
+49
-18
No files found.
dlls/wined3d/utils.c
View file @
197cdcc9
...
...
@@ -1407,30 +1407,57 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win
format
->
height_scale
.
numerator
=
1
;
format
->
height_scale
.
denominator
=
1
;
if
(
!
gl_info
->
limits
.
vertex_samplers
)
format
->
flags
&=
~
WINED3DFMT_FLAG_VTF
;
if
(
!
(
gl_info
->
quirks
&
WINED3D_QUIRK_LIMITED_TEX_FILTERING
))
format
->
flags
|=
WINED3DFMT_FLAG_FILTERING
;
else
if
(
format
->
id
!=
WINED3DFMT_R32G32B32A32_FLOAT
&&
format
->
id
!=
WINED3DFMT_R32_FLOAT
)
format
->
flags
&=
~
WINED3DFMT_FLAG_VTF
;
if
(
format
->
glGammaInternal
!=
format
->
glInternal
)
if
(
gl_info
->
supported
[
ARB_INTERNALFORMAT_QUERY2
])
{
/* Filter sRGB capabilities if EXT_texture_sRGB is not supported. */
if
(
!
gl_info
->
supported
[
EXT_TEXTURE_SRGB
])
query_format_flag
(
gl_info
,
format
,
format
->
glInternal
,
GL_VERTEX_TEXTURE
,
WINED3DFMT_FLAG_VTF
,
"vertex texture usage"
);
query_format_flag
(
gl_info
,
format
,
format
->
glInternal
,
GL_FILTER
,
WINED3DFMT_FLAG_FILTERING
,
"filtering"
);
if
(
format
->
glGammaInternal
!=
format
->
glInternal
)
{
format
->
glGammaInternal
=
format
->
glInternal
;
format
->
flags
&=
~
(
WINED3DFMT_FLAG_SRGB_READ
|
WINED3DFMT_FLAG_SRGB_WRITE
);
query_format_flag
(
gl_info
,
format
,
format
->
glGammaInternal
,
GL_SRGB_READ
,
WINED3DFMT_FLAG_SRGB_READ
,
"sRGB read"
);
if
(
srgb_write
)
query_format_flag
(
gl_info
,
format
,
format
->
glGammaInternal
,
GL_SRGB_WRITE
,
WINED3DFMT_FLAG_SRGB_WRITE
,
"sRGB write"
);
else
format
->
flags
&=
~
WINED3DFMT_FLAG_SRGB_WRITE
;
if
(
!
(
format
->
flags
&
(
WINED3DFMT_FLAG_SRGB_READ
|
WINED3DFMT_FLAG_SRGB_WRITE
)))
format
->
glGammaInternal
=
format
->
glInternal
;
else
if
(
gl_info
->
supported
[
EXT_TEXTURE_SRGB_DECODE
])
format
->
glInternal
=
format
->
glGammaInternal
;
}
else
if
(
gl_info
->
supported
[
EXT_TEXTURE_SRGB_DECODE
])
}
else
{
if
(
!
gl_info
->
limits
.
vertex_samplers
)
format
->
flags
&=
~
WINED3DFMT_FLAG_VTF
;
if
(
!
(
gl_info
->
quirks
&
WINED3D_QUIRK_LIMITED_TEX_FILTERING
))
format
->
flags
|=
WINED3DFMT_FLAG_FILTERING
;
else
if
(
format
->
id
!=
WINED3DFMT_R32G32B32A32_FLOAT
&&
format
->
id
!=
WINED3DFMT_R32_FLOAT
)
format
->
flags
&=
~
WINED3DFMT_FLAG_VTF
;
if
(
format
->
glGammaInternal
!=
format
->
glInternal
)
{
format
->
glInternal
=
format
->
glGammaInternal
;
/* Filter sRGB capabilities if EXT_texture_sRGB is not supported. */
if
(
!
gl_info
->
supported
[
EXT_TEXTURE_SRGB
])
{
format
->
glGammaInternal
=
format
->
glInternal
;
format
->
flags
&=
~
(
WINED3DFMT_FLAG_SRGB_READ
|
WINED3DFMT_FLAG_SRGB_WRITE
);
}
else
if
(
gl_info
->
supported
[
EXT_TEXTURE_SRGB_DECODE
])
{
format
->
glInternal
=
format
->
glGammaInternal
;
}
}
}
if
((
format
->
flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
&&
!
srgb_write
)
format
->
flags
&=
~
WINED3DFMT_FLAG_SRGB_WRITE
;
if
((
format
->
flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
&&
!
srgb_write
)
format
->
flags
&=
~
WINED3DFMT_FLAG_SRGB_WRITE
;
}
/* Texture conversion stuff */
format
->
convert
=
format_texture_info
[
i
].
convert
;
...
...
@@ -1563,6 +1590,10 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3
};
BOOL
filtered
;
if
(
gl_info
->
supported
[
ARB_INTERNALFORMAT_QUERY2
])
/* This was already handled by init_format_texture_info(). */
return
;
if
(
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
)
{
WARN
(
"No FBO support, or no FBO ORM, guessing filter info from GL caps
\n
"
);
...
...
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