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
4c7bcb88
Commit
4c7bcb88
authored
Feb 04, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set the texture stage limit based on the fragment pipe caps.
parent
b59dd0e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
directx.c
dlls/wined3d/directx.c
+12
-15
state.c
dlls/wined3d/state.c
+1
-1
No files found.
dlls/wined3d/directx.c
View file @
4c7bcb88
...
...
@@ -1674,6 +1674,7 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
const
char
*
GL_Extensions
=
NULL
;
const
char
*
WGL_Extensions
=
NULL
;
const
char
*
gl_string
=
NULL
;
struct
fragment_caps
fragment_caps
;
enum
wined3d_pci_vendor
vendor
;
enum
wined3d_pci_device
device
;
GLint
gl_max
;
...
...
@@ -1739,7 +1740,6 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
memset
(
gl_info
->
supported
,
0
,
sizeof
(
gl_info
->
supported
));
gl_info
->
limits
.
buffers
=
1
;
gl_info
->
limits
.
textures
=
1
;
gl_info
->
limits
.
texture_stages
=
1
;
gl_info
->
limits
.
fragment_samplers
=
1
;
gl_info
->
limits
.
vertex_samplers
=
0
;
gl_info
->
limits
.
combined_samplers
=
gl_info
->
limits
.
fragment_samplers
+
gl_info
->
limits
.
vertex_samplers
;
...
...
@@ -1907,6 +1907,13 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
gl_info
->
supported
[
ATI_FRAGMENT_SHADER
]
=
FALSE
;
}
}
if
(
gl_info
->
supported
[
NV_REGISTER_COMBINERS
])
{
glGetIntegerv
(
GL_MAX_GENERAL_COMBINERS_NV
,
&
gl_max
);
gl_info
->
limits
.
general_combiners
=
gl_max
;
TRACE_
(
d3d_caps
)(
"Max general combiners: %d.
\n
"
,
gl_max
);
}
if
(
gl_info
->
supported
[
ARB_DRAW_BUFFERS
])
{
glGetIntegerv
(
GL_MAX_DRAW_BUFFERS_ARB
,
&
gl_max
);
...
...
@@ -1919,20 +1926,6 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
gl_info
->
limits
.
textures
=
min
(
MAX_TEXTURES
,
gl_max
);
TRACE_
(
d3d_caps
)(
"Max textures: %d.
\n
"
,
gl_info
->
limits
.
textures
);
if
(
gl_info
->
supported
[
NV_REGISTER_COMBINERS
])
{
GLint
tmp
;
glGetIntegerv
(
GL_MAX_GENERAL_COMBINERS_NV
,
&
tmp
);
gl_info
->
limits
.
general_combiners
=
tmp
;
gl_info
->
limits
.
texture_stages
=
min
(
MAX_TEXTURES
,
tmp
);
TRACE_
(
d3d_caps
)(
"Max general combiners: %d.
\n
"
,
tmp
);
}
else
{
gl_info
->
limits
.
texture_stages
=
min
(
MAX_TEXTURES
,
gl_max
);
}
TRACE_
(
d3d_caps
)(
"Max texture stages: %d.
\n
"
,
gl_info
->
limits
.
texture_stages
);
if
(
gl_info
->
supported
[
ARB_FRAGMENT_PROGRAM
])
{
GLint
tmp
;
...
...
@@ -2110,6 +2103,10 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
adapter
->
shader_backend
=
select_shader_backend
(
adapter
);
adapter
->
blitter
=
select_blit_implementation
(
adapter
);
adapter
->
fragment_pipe
->
get_caps
(
gl_info
,
&
fragment_caps
);
gl_info
->
limits
.
texture_stages
=
fragment_caps
.
MaxTextureBlendStages
;
TRACE_
(
d3d_caps
)(
"Max texture stages: %u.
\n
"
,
gl_info
->
limits
.
texture_stages
);
/* In some cases the number of texture stages can be larger than the number
* of samplers. The GF4 for example can use only 2 samplers (no fragment
* shaders), but 8 texture stages (register combiners). */
...
...
dlls/wined3d/state.c
View file @
4c7bcb88
...
...
@@ -5552,7 +5552,7 @@ static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
if
(
gl_info
->
supported
[
ARB_TEXTURE_ENV_DOT3
])
pCaps
->
TextureOpCaps
|=
WINED3DTEXOPCAPS_DOTPRODUCT3
;
pCaps
->
MaxTextureBlendStages
=
gl_info
->
limits
.
texture
_stage
s
;
pCaps
->
MaxTextureBlendStages
=
gl_info
->
limits
.
textures
;
pCaps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
textures
;
}
...
...
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