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
955fb95e
Commit
955fb95e
authored
Jan 17, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Jan 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Give shader constants their own debug channel.
parent
79c7aeab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+4
-3
glsl_shader.c
dlls/wined3d/glsl_shader.c
+8
-7
No files found.
dlls/wined3d/arb_program_shader.c
View file @
955fb95e
...
...
@@ -33,6 +33,7 @@
#include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_shader
);
WINE_DECLARE_DEBUG_CHANNEL
(
d3d_constants
);
#define GLINFO_LOCATION (*gl_info)
...
...
@@ -56,7 +57,7 @@ static void shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL_
if
(
!
constant_list
)
{
if
(
TRACE_ON
(
d3d_shader
))
{
for
(
i
=
0
;
i
<
max_constants
;
++
i
)
{
TRACE
(
"Loading constants %i: %f, %f, %f, %f
\n
"
,
i
,
TRACE
_
(
d3d_constants
)
(
"Loading constants %i: %f, %f, %f, %f
\n
"
,
i
,
constants
[
i
*
4
+
0
],
constants
[
i
*
4
+
1
],
constants
[
i
*
4
+
2
],
constants
[
i
*
4
+
3
]);
}
...
...
@@ -69,7 +70,7 @@ static void shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL_
if
(
TRACE_ON
(
d3d_shader
))
{
LIST_FOR_EACH_ENTRY
(
constant
,
constant_list
,
constant_entry
,
entry
)
{
i
=
constant
->
idx
;
TRACE
(
"Loading constants %i: %f, %f, %f, %f
\n
"
,
i
,
TRACE
_
(
d3d_constants
)
(
"Loading constants %i: %f, %f, %f, %f
\n
"
,
i
,
constants
[
i
*
4
+
0
],
constants
[
i
*
4
+
1
],
constants
[
i
*
4
+
2
],
constants
[
i
*
4
+
3
]);
}
...
...
@@ -85,7 +86,7 @@ static void shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL_
if
(
TRACE_ON
(
d3d_shader
))
{
LIST_FOR_EACH_ENTRY
(
lconst
,
&
This
->
baseShader
.
constantsF
,
local_constant
,
entry
)
{
GLfloat
*
values
=
(
GLfloat
*
)
lconst
->
value
;
TRACE
(
"Loading local constants %i: %f, %f, %f, %f
\n
"
,
lconst
->
idx
,
TRACE
_
(
d3d_constants
)
(
"Loading local constants %i: %f, %f, %f, %f
\n
"
,
lconst
->
idx
,
values
[
0
],
values
[
1
],
values
[
2
],
values
[
3
]);
}
}
...
...
dlls/wined3d/glsl_shader.c
View file @
955fb95e
...
...
@@ -32,6 +32,7 @@
#include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_shader
);
WINE_DECLARE_DEBUG_CHANNEL
(
d3d_constants
);
#define GLINFO_LOCATION (*gl_info)
...
...
@@ -113,7 +114,7 @@ static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL
for
(
i
=
0
;
i
<
max_constants
;
++
i
)
{
tmp_loc
=
constant_locations
[
i
];
if
(
tmp_loc
!=
-
1
)
{
TRACE
(
"Loading constants %i: %f, %f, %f, %f
\n
"
,
i
,
TRACE
_
(
d3d_constants
)
(
"Loading constants %i: %f, %f, %f, %f
\n
"
,
i
,
constants
[
i
*
4
+
0
],
constants
[
i
*
4
+
1
],
constants
[
i
*
4
+
2
],
constants
[
i
*
4
+
3
]);
}
...
...
@@ -134,7 +135,7 @@ static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL
i
=
constant
->
idx
;
tmp_loc
=
constant_locations
[
i
];
if
(
tmp_loc
!=
-
1
)
{
TRACE
(
"Loading constants %i: %f, %f, %f, %f
\n
"
,
i
,
TRACE
_
(
d3d_constants
)
(
"Loading constants %i: %f, %f, %f, %f
\n
"
,
i
,
constants
[
i
*
4
+
0
],
constants
[
i
*
4
+
1
],
constants
[
i
*
4
+
2
],
constants
[
i
*
4
+
3
]);
}
...
...
@@ -157,7 +158,7 @@ static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL
tmp_loc
=
constant_locations
[
lconst
->
idx
];
if
(
tmp_loc
!=
-
1
)
{
GLfloat
*
values
=
(
GLfloat
*
)
lconst
->
value
;
TRACE
(
"Loading local constants %i: %f, %f, %f, %f
\n
"
,
lconst
->
idx
,
TRACE
_
(
d3d_constants
)
(
"Loading local constants %i: %f, %f, %f, %f
\n
"
,
lconst
->
idx
,
values
[
0
],
values
[
1
],
values
[
2
],
values
[
3
]);
}
}
...
...
@@ -194,7 +195,7 @@ void shader_glsl_load_constantsI(
for
(
i
=
0
;
i
<
max_constants
;
++
i
)
{
if
(
NULL
==
constants_set
||
constants_set
[
i
])
{
TRACE
(
"Loading constants %i: %i, %i, %i, %i
\n
"
,
TRACE
_
(
d3d_constants
)
(
"Loading constants %i: %i, %i, %i, %i
\n
"
,
i
,
constants
[
i
*
4
],
constants
[
i
*
4
+
1
],
constants
[
i
*
4
+
2
],
constants
[
i
*
4
+
3
]);
/* TODO: Benchmark and see if it would be beneficial to store the
...
...
@@ -216,7 +217,7 @@ void shader_glsl_load_constantsI(
unsigned
int
idx
=
lconst
->
idx
;
GLint
*
values
=
(
GLint
*
)
lconst
->
value
;
TRACE
(
"Loading local constants %i: %i, %i, %i, %i
\n
"
,
idx
,
TRACE
_
(
d3d_constants
)
(
"Loading local constants %i: %i, %i, %i, %i
\n
"
,
idx
,
values
[
0
],
values
[
1
],
values
[
2
],
values
[
3
]);
snprintf
(
tmp_name
,
sizeof
(
tmp_name
),
"%s[%i]"
,
prefix
,
idx
);
...
...
@@ -252,7 +253,7 @@ void shader_glsl_load_constantsB(
for
(
i
=
0
;
i
<
max_constants
;
++
i
)
{
if
(
NULL
==
constants_set
||
constants_set
[
i
])
{
TRACE
(
"Loading constants %i: %i;
\n
"
,
i
,
constants
[
i
*
4
]);
TRACE
_
(
d3d_constants
)
(
"Loading constants %i: %i;
\n
"
,
i
,
constants
[
i
*
4
]);
/* TODO: Benchmark and see if it would be beneficial to store the
* locations of the constants to avoid looking up each time */
...
...
@@ -273,7 +274,7 @@ void shader_glsl_load_constantsB(
unsigned
int
idx
=
lconst
->
idx
;
GLint
*
values
=
(
GLint
*
)
lconst
->
value
;
TRACE
(
"Loading local constants %i: %i
\n
"
,
idx
,
values
[
0
]);
TRACE
_
(
d3d_constants
)
(
"Loading local constants %i: %i
\n
"
,
idx
,
values
[
0
]);
snprintf
(
tmp_name
,
sizeof
(
tmp_name
),
"%s[%i]"
,
prefix
,
idx
);
tmp_loc
=
GL_EXTCALL
(
glGetUniformLocationARB
(
programId
,
tmp_name
));
...
...
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