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
44b47779
Commit
44b47779
authored
Oct 11, 2005
by
Oliver Stieber
Committed by
Alexandre Julliard
Oct 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add checks for ARB_vertex_program before allowing vertex shaders to
use ARB_vertex_program.
parent
18517ca5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
16 deletions
+24
-16
drawprim.c
dlls/wined3d/drawprim.c
+7
-1
vertexshader.c
dlls/wined3d/vertexshader.c
+17
-15
No files found.
dlls/wined3d/drawprim.c
View file @
44b47779
...
...
@@ -1949,7 +1949,13 @@ void drawPrimitive(IWineD3DDevice *iface,
Direct3DVertexStridedData
dataLocations
;
int
useHW
=
FALSE
;
useVertexShaderFunction
=
This
->
stateBlock
->
vertexShader
!=
NULL
?
wined3d_settings
.
vs_mode
!=
VS_NONE
?
((
IWineD3DVertexShaderImpl
*
)
This
->
stateBlock
->
vertexShader
)
->
function
!=
NULL
?
TRUE
:
FALSE
:
FALSE
:
FALSE
;
if
(
This
->
stateBlock
->
vertexShader
!=
NULL
&&
wined3d_settings
.
vs_mode
!=
VS_NONE
&&
((
IWineD3DVertexShaderImpl
*
)
This
->
stateBlock
->
vertexShader
)
->
function
!=
NULL
&&
GL_SUPPORT
(
ARB_VERTEX_PROGRAM
))
{
useVertexShaderFunction
=
TRUE
;
}
else
{
useVertexShaderFunction
=
FALSE
;
}
if
(
This
->
stateBlock
->
vertexDecl
==
NULL
)
{
/* Work out what the FVF should look like */
...
...
dlls/wined3d/vertexshader.c
View file @
44b47779
...
...
@@ -1614,23 +1614,25 @@ inline static VOID IWineD3DVertexShaderImpl_GenerateProgramArbHW(IWineD3DVertexS
PNSTRCAT
(
pgmStr
,
tmpLine
);
}
/* finally null terminate the pgmStr*/
/* finally null terminate the pgmStr*/
pgmStr
[
pgmLength
]
=
0
;
/* Create the hw shader */
/* TODO: change to resource.glObjectHandel or something like that */
GL_EXTCALL
(
glGenProgramsARB
(
1
,
&
This
->
prgId
));
TRACE
(
"Creating a hw vertex shader, prg=%d
\n
"
,
This
->
prgId
);
GL_EXTCALL
(
glBindProgramARB
(
GL_VERTEX_PROGRAM_ARB
,
This
->
prgId
));
/* Create the program and check for errors */
GL_EXTCALL
(
glProgramStringARB
(
GL_VERTEX_PROGRAM_ARB
,
GL_PROGRAM_FORMAT_ASCII_ARB
,
strlen
(
pgmStr
)
/*pgmLength*/
,
pgmStr
));
if
(
glGetError
()
==
GL_INVALID_OPERATION
)
{
GLint
errPos
;
glGetIntegerv
(
GL_PROGRAM_ERROR_POSITION_ARB
,
&
errPos
);
FIXME
(
"HW VertexShader Error at position: %d
\n
%s
\n
"
,
errPos
,
glGetString
(
GL_PROGRAM_ERROR_STRING_ARB
));
This
->
prgId
=
-
1
;
/* Check that Vertex Shaders are supported */
if
(
GL_SUPPORT
(
ARB_VERTEX_PROGRAM
))
{
/* Create the hw shader */
/* TODO: change to resource.glObjectHandel or something like that */
GL_EXTCALL
(
glGenProgramsARB
(
1
,
&
This
->
prgId
));
TRACE
(
"Creating a hw vertex shader, prg=%d
\n
"
,
This
->
prgId
);
GL_EXTCALL
(
glBindProgramARB
(
GL_VERTEX_PROGRAM_ARB
,
This
->
prgId
));
/* Create the program and check for errors */
GL_EXTCALL
(
glProgramStringARB
(
GL_VERTEX_PROGRAM_ARB
,
GL_PROGRAM_FORMAT_ASCII_ARB
,
strlen
(
pgmStr
)
/*pgmLength*/
,
pgmStr
));
if
(
glGetError
()
==
GL_INVALID_OPERATION
)
{
GLint
errPos
;
glGetIntegerv
(
GL_PROGRAM_ERROR_POSITION_ARB
,
&
errPos
);
FIXME
(
"HW VertexShader Error at position: %d
\n
%s
\n
"
,
errPos
,
glGetString
(
GL_PROGRAM_ERROR_STRING_ARB
));
This
->
prgId
=
-
1
;
}
}
#if 1
/* if were using the data buffer of device then we don't need to free it */
HeapFree
(
GetProcessHeap
(),
0
,
pgmStr
);
...
...
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