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
4bd8b60b
Commit
4bd8b60b
authored
Jan 20, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Jan 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: A shader isn't guaranteed to have a vertex declaration, so
add a NULL check for that.
parent
360a4aff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
drawprim.c
dlls/wined3d/drawprim.c
+9
-5
No files found.
dlls/wined3d/drawprim.c
View file @
4bd8b60b
...
...
@@ -1777,6 +1777,7 @@ UINT numberOfvertices, UINT numberOfIndicies, GLenum glPrimType, const void *idx
if
(
useVertexShaderFunction
)
{
int
i
;
GLint
errPos
;
IWineD3DVertexDeclarationImpl
*
vertexDeclaration
;
FIXME
(
"Using vertex shader
\n
"
);
...
...
@@ -1790,11 +1791,14 @@ UINT numberOfvertices, UINT numberOfIndicies, GLenum glPrimType, const void *idx
TRACE_
(
d3d_shader
)(
"(%p) bound program %u and enabled vertex program ARB
\n
"
,
This
,
((
IWineD3DVertexShaderImpl
*
)
This
->
stateBlock
->
vertexShader
)
->
prgId
);
/* Vertex Shader 8 constants */
if
(((
IWineD3DVertexDeclarationImpl
*
)((
IWineD3DVertexShaderImpl
*
)
This
->
stateBlock
->
vertexShader
)
->
vertexDeclaration
)
->
constants
!=
NULL
)
{
float
*
constants
=
((
IWineD3DVertexDeclarationImpl
*
)((
IWineD3DVertexShaderImpl
*
)
This
->
stateBlock
->
vertexShader
)
->
vertexDeclaration
)
->
constants
;
for
(
i
=
0
;
i
<=
WINED3D_VSHADER_MAX_CONSTANTS
;
i
++
)
{
TRACE_
(
d3d_shader
)(
"Not Loading constants %u = %f %f %f %f
\n
"
,
i
,
constants
[
i
*
4
],
constants
[
i
*
4
+
1
],
constants
[
i
*
4
+
2
],
constants
[
i
*
4
+
3
]);
GL_EXTCALL
(
glProgramEnvParameter4fvARB
(
GL_VERTEX_PROGRAM_ARB
,
i
,
&
constants
[
i
*
4
]));
vertexDeclaration
=
(
IWineD3DVertexDeclarationImpl
*
)((
IWineD3DVertexShaderImpl
*
)
This
->
stateBlock
->
vertexShader
)
->
vertexDeclaration
;
if
(
vertexDeclaration
!=
NULL
)
{
float
*
constants
=
vertexDeclaration
->
constants
;
if
(
constants
!=
NULL
)
{
for
(
i
=
0
;
i
<=
WINED3D_VSHADER_MAX_CONSTANTS
;
i
++
)
{
TRACE_
(
d3d_shader
)(
"Not Loading constants %u = %f %f %f %f
\n
"
,
i
,
constants
[
i
*
4
],
constants
[
i
*
4
+
1
],
constants
[
i
*
4
+
2
],
constants
[
i
*
4
+
3
]);
GL_EXTCALL
(
glProgramEnvParameter4fvARB
(
GL_VERTEX_PROGRAM_ARB
,
i
,
&
constants
[
i
*
4
]));
}
}
}
...
...
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