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
6c5e109a
Commit
6c5e109a
authored
Jul 08, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jul 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce quirk for proper RGBA16 support.
parent
309914f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
1 deletion
+50
-1
directx.c
dlls/wined3d/directx.c
+49
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/directx.c
View file @
6c5e109a
...
...
@@ -753,6 +753,36 @@ static BOOL match_fbo_tex_update(const struct wined3d_gl_info *gl_info, const ch
return
*
(
DWORD
*
)
data
==
0x11111111
;
}
/* Context activation is done by the caller. */
static
BOOL
match_broken_rgba16
(
const
struct
wined3d_gl_info
*
gl_info
,
const
char
*
gl_renderer
,
enum
wined3d_gl_vendor
gl_vendor
,
enum
wined3d_pci_vendor
card_vendor
,
enum
wined3d_pci_device
device
)
{
/* GL_RGBA16 uses GL_RGBA8 internally on Geforce 7 and older cards.
* This leads to graphical bugs in Half Life 2 and Unreal engine games. */
GLuint
tex
;
GLint
size
;
ENTER_GL
();
glGenTextures
(
1
,
&
tex
);
glBindTexture
(
GL_TEXTURE_2D
,
tex
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_RGBA16
,
4
,
4
,
0
,
GL_RGBA
,
GL_UNSIGNED_SHORT
,
NULL
);
checkGLcall
(
"glTexImage2D"
);
glGetTexLevelParameteriv
(
GL_TEXTURE_2D
,
0
,
GL_TEXTURE_RED_SIZE
,
&
size
);
checkGLcall
(
"glGetTexLevelParameteriv"
);
TRACE
(
"Real color depth is %d
\n
"
,
size
);
glBindTexture
(
GL_TEXTURE_2D
,
0
);
checkGLcall
(
"glBindTexture"
);
glDeleteTextures
(
1
,
&
tex
);
checkGLcall
(
"glDeleteTextures"
);
LEAVE_GL
();
return
size
<
16
;
}
static
void
quirk_arb_constants
(
struct
wined3d_gl_info
*
gl_info
)
{
TRACE_
(
d3d_caps
)(
"Using ARB vs constant limit(=%u) for GLSL.
\n
"
,
gl_info
->
limits
.
arb_vs_native_constants
);
...
...
@@ -886,6 +916,11 @@ static void quirk_fbo_tex_update(struct wined3d_gl_info *gl_info)
gl_info
->
quirks
|=
WINED3D_QUIRK_FBO_TEX_UPDATE
;
}
static
void
quirk_broken_rgba16
(
struct
wined3d_gl_info
*
gl_info
)
{
gl_info
->
quirks
|=
WINED3D_QUIRK_BROKEN_RGBA16
;
}
struct
driver_quirk
{
BOOL
(
*
match
)(
const
struct
wined3d_gl_info
*
gl_info
,
const
char
*
gl_renderer
,
...
...
@@ -970,6 +1005,11 @@ static const struct driver_quirk quirk_table[] =
quirk_fbo_tex_update
,
"FBO rebind for attachment updates"
},
{
match_broken_rgba16
,
quirk_broken_rgba16
,
"True RGBA16 is not available"
},
};
/* Certain applications (Steam) complain if we report an outdated driver version. In general,
...
...
@@ -3504,8 +3544,16 @@ static BOOL CheckTextureCapability(const struct wined3d_adapter *adapter, const
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
/* Not supported */
case
WINED3DFMT_R16G16B16A16_UNORM
:
if
(
gl_info
->
quirks
&
WINED3D_QUIRK_BROKEN_RGBA16
)
{
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
}
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
TRUE
;
/* Not supported */
case
WINED3DFMT_B2G3R3A8_UNORM
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
/* Enable when implemented */
return
FALSE
;
...
...
dlls/wined3d/wined3d_private.h
View file @
6c5e109a
...
...
@@ -51,6 +51,7 @@
#define WINED3D_QUIRK_ALLOWS_SPECULAR_ALPHA 0x00000008
#define WINED3D_QUIRK_NV_CLIP_BROKEN 0x00000010
#define WINED3D_QUIRK_FBO_TEX_UPDATE 0x00000020
#define WINED3D_QUIRK_BROKEN_RGBA16 0x00000040
/* Texture format fixups */
...
...
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