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
aeb0e43e
Commit
aeb0e43e
authored
Feb 14, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Hardcode local constants in ARB shaders if possible.
parent
107e80a7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+0
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+1
-12
wined3d_private.h
dlls/wined3d/wined3d_private.h
+11
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
aeb0e43e
This diff is collapsed.
Click to expand it.
dlls/wined3d/glsl_shader.c
View file @
aeb0e43e
...
...
@@ -780,17 +780,6 @@ static void shader_glsl_gen_modifier (
}
}
static
BOOL
constant_is_local
(
IWineD3DBaseShaderImpl
*
This
,
DWORD
reg
)
{
local_constant
*
lconst
;
if
(
This
->
baseShader
.
load_local_constsF
)
return
FALSE
;
LIST_FOR_EACH_ENTRY
(
lconst
,
&
This
->
baseShader
.
constantsF
,
local_constant
,
entry
)
{
if
(
lconst
->
idx
==
reg
)
return
TRUE
;
}
return
FALSE
;
}
/** Writes the GLSL variable name that corresponds to the register that the
* DX opcode parameter is trying to access */
static
void
shader_glsl_get_register_name
(
...
...
@@ -877,7 +866,7 @@ static void shader_glsl_get_register_name(
}
}
else
{
if
(
constant_is_local
(
This
,
reg
))
{
if
(
shader_
constant_is_local
(
This
,
reg
))
{
sprintf
(
tmpStr
,
"LC%u"
,
reg
);
}
else
{
sprintf
(
tmpStr
,
"%s[%u]"
,
prefix
,
reg
);
...
...
dlls/wined3d/wined3d_private.h
View file @
aeb0e43e
...
...
@@ -2178,6 +2178,17 @@ static inline BOOL shader_is_scalar(DWORD param) {
}
}
static
inline
BOOL
shader_constant_is_local
(
IWineD3DBaseShaderImpl
*
This
,
DWORD
reg
)
{
local_constant
*
lconst
;
if
(
This
->
baseShader
.
load_local_constsF
)
return
FALSE
;
LIST_FOR_EACH_ENTRY
(
lconst
,
&
This
->
baseShader
.
constantsF
,
local_constant
,
entry
)
{
if
(
lconst
->
idx
==
reg
)
return
TRUE
;
}
return
FALSE
;
}
/* Internally used shader constants. Applications can use constants 0 to GL_LIMITS(vshader_constantsF) - 1,
* so upload them above that
*/
...
...
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