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
883915fc
Commit
883915fc
authored
Nov 08, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix for MacOS'es incomplete glsl uniform truth.
parent
f79ca75d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
directx.c
dlls/wined3d/directx.c
+20
-2
No files found.
dlls/wined3d/directx.c
View file @
883915fc
...
@@ -2744,6 +2744,25 @@ static BOOL implementation_is_apple(WineD3D_GL_Info *gl_info) {
...
@@ -2744,6 +2744,25 @@ static BOOL implementation_is_apple(WineD3D_GL_Info *gl_info) {
}
}
}
}
static
void
fixup_extensions
(
WineD3D_GL_Info
*
gl_info
)
{
if
(
implementation_is_apple
(
gl_info
))
{
/* MacOS advertises more GLSL vertex shader uniforms than support on hardware, and if more are
* used it falls back to software. While the compiler can detect if the shader uses all declared
* uniforms, the optimization fails if the shader uses relative addressing. So any GLSL shader
* using relative addressing falls back to software.
*
* ARB vp gives the correct amount of uniforms, so use it instead of GLSL
*/
if
(
gl_info
->
vs_glsl_constantsF
<=
gl_info
->
vs_arb_constantsF
)
{
FIXME
(
"GLSL doesn't advertise more vertex shader uniforms than ARB. Driver fixup outdated?
\n
"
);
}
else
{
TRACE
(
"Driver claims %u GLSL vs uniforms, replacing with %u ARB vp uniforms
\n
"
,
gl_info
->
vs_glsl_constantsF
,
gl_info
->
vs_arb_constantsF
);
gl_info
->
vs_glsl_constantsF
=
gl_info
->
vs_arb_constantsF
;
}
}
}
#define PUSH1(att) attribs[nAttribs++] = (att);
#define PUSH1(att) attribs[nAttribs++] = (att);
#define GLINFO_LOCATION (Adapters[0].gl_info)
#define GLINFO_LOCATION (Adapters[0].gl_info)
BOOL
InitAdapters
(
void
)
{
BOOL
InitAdapters
(
void
)
{
...
@@ -2798,7 +2817,6 @@ BOOL InitAdapters(void) {
...
@@ -2798,7 +2817,6 @@ BOOL InitAdapters(void) {
int
attribute
;
int
attribute
;
DISPLAY_DEVICEW
DisplayDevice
;
DISPLAY_DEVICEW
DisplayDevice
;
HDC
hdc
;
HDC
hdc
;
BOOL
apple
;
TRACE
(
"Initializing default adapter
\n
"
);
TRACE
(
"Initializing default adapter
\n
"
);
Adapters
[
0
].
monitorPoint
.
x
=
-
1
;
Adapters
[
0
].
monitorPoint
.
x
=
-
1
;
...
@@ -2883,7 +2901,7 @@ BOOL InitAdapters(void) {
...
@@ -2883,7 +2901,7 @@ BOOL InitAdapters(void) {
}
}
WineD3D_ReleaseFakeGLContext
();
WineD3D_ReleaseFakeGLContext
();
apple
=
implementation_is_apple
(
&
Adapters
[
0
].
gl_info
);
fixup_extensions
(
&
Adapters
[
0
].
gl_info
);
select_shader_mode
(
&
Adapters
[
0
].
gl_info
,
WINED3DDEVTYPE_HAL
,
&
ps_selected_mode
,
&
vs_selected_mode
);
select_shader_mode
(
&
Adapters
[
0
].
gl_info
,
WINED3DDEVTYPE_HAL
,
&
ps_selected_mode
,
&
vs_selected_mode
);
select_shader_max_constants
(
ps_selected_mode
,
vs_selected_mode
,
&
Adapters
[
0
].
gl_info
);
select_shader_max_constants
(
ps_selected_mode
,
vs_selected_mode
,
&
Adapters
[
0
].
gl_info
);
...
...
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