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
4a1375bd
Commit
4a1375bd
authored
May 18, 2006
by
Jason Green
Committed by
Alexandre Julliard
May 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simplify generate_base_shader() when checking for USING_GLSL usage.
parent
683e5bfc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
21 deletions
+8
-21
baseshader.c
dlls/wined3d/baseshader.c
+8
-21
No files found.
dlls/wined3d/baseshader.c
View file @
4a1375bd
...
...
@@ -551,6 +551,7 @@ void generate_base_shader(
IWineD3DBaseShaderImpl
*
This
=
(
IWineD3DBaseShaderImpl
*
)
iface
;
const
DWORD
*
pToken
=
pFunction
;
const
SHADER_OPCODE
*
curOpcode
=
NULL
;
SHADER_HANDLER
hw_fct
=
NULL
;
DWORD
opcode_token
;
DWORD
i
;
...
...
@@ -568,10 +569,12 @@ void generate_base_shader(
*/
/* Pre-declare registers */
if
(
USING_GLSL
)
if
(
USING_GLSL
)
{
generate_glsl_declarations
(
iface
,
buffer
);
else
shader_addline
(
buffer
,
"void main() {
\n
"
);
}
else
{
generate_arb_declarations
(
iface
,
buffer
);
}
/* Second pass, process opcodes */
if
(
NULL
!=
pToken
)
{
...
...
@@ -595,28 +598,15 @@ void generate_base_shader(
/* Read opcode */
opcode_token
=
*
pToken
++
;
curOpcode
=
shader_get_opcode
(
iface
,
opcode_token
);
hw_fct
=
USING_GLSL
?
curOpcode
->
hw_glsl_fct
:
curOpcode
->
hw_fct
;
/* Unknown opcode and its parameters */
if
(
NULL
==
curOpcode
)
{
FIXME
(
"Unrecognized opcode: token=%08lX
\n
"
,
opcode_token
);
pToken
+=
shader_skip_unrecognized
(
iface
,
pToken
);
/* Using GLSL & no generator function exists */
}
else
if
(
USING_GLSL
&&
curOpcode
->
hw_glsl_fct
==
NULL
)
{
FIXME
(
"Token %s is not yet implemented with GLSL
\n
"
,
curOpcode
->
name
);
pToken
+=
shader_skip_opcode
(
This
,
curOpcode
,
opcode_token
);
/* Unhandled opcode in ARB */
}
else
if
(
!
USING_GLSL
&&
GLNAME_REQUIRE_GLSL
==
curOpcode
->
glname
)
{
FIXME
(
"Token %s requires greater functionality than "
"Vertex or Fragment_Program_ARB supports
\n
"
,
curOpcode
->
name
);
pToken
+=
shader_skip_opcode
(
This
,
curOpcode
,
opcode_token
);
/* If a generator function is set for current shader target, use it */
}
else
if
((
!
USING_GLSL
&&
curOpcode
->
hw_fct
!=
NULL
)
||
(
USING_GLSL
&&
curOpcode
->
hw_glsl_fct
!=
NULL
))
{
}
else
if
(
hw_fct
!=
NULL
)
{
SHADER_OPCODE_ARG
hw_arg
;
...
...
@@ -656,10 +646,7 @@ void generate_base_shader(
}
/* Call appropriate function for output target */
if
(
USING_GLSL
)
curOpcode
->
hw_glsl_fct
(
&
hw_arg
);
else
curOpcode
->
hw_fct
(
&
hw_arg
);
hw_fct
(
&
hw_arg
);
}
else
{
...
...
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