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
cfd280fd
Commit
cfd280fd
authored
Apr 23, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the tracing code in shader_vaddline().
parent
dd239829
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
38 deletions
+29
-38
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+6
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+9
-0
shader.c
dlls/wined3d/shader.c
+14
-36
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
cfd280fd
...
...
@@ -3262,6 +3262,12 @@ static BOOL shader_arb_compile(const struct wined3d_gl_info *gl_info, GLenum tar
const
char
*
ptr
,
*
line
;
GLint
native
,
pos
;
if
(
TRACE_ON
(
d3d_shader
))
{
ptr
=
src
;
while
((
line
=
get_line
(
&
ptr
)))
TRACE_
(
d3d_shader
)(
" %.*s"
,
(
int
)(
ptr
-
line
),
line
);
}
GL_EXTCALL
(
glProgramStringARB
(
target
,
GL_PROGRAM_FORMAT_ASCII_ARB
,
strlen
(
src
),
src
));
checkGLcall
(
"glProgramStringARB()"
);
...
...
dlls/wined3d/glsl_shader.c
View file @
cfd280fd
...
...
@@ -344,7 +344,16 @@ static void print_glsl_info_log(const struct wined3d_gl_info *gl_info, GLuint id
/* Context activation is done by the caller. */
static
void
shader_glsl_compile
(
const
struct
wined3d_gl_info
*
gl_info
,
GLuint
shader
,
const
char
*
src
)
{
const
char
*
ptr
,
*
line
;
TRACE
(
"Compiling shader object %u.
\n
"
,
shader
);
if
(
TRACE_ON
(
d3d_shader
))
{
ptr
=
src
;
while
((
line
=
get_info_log_line
(
&
ptr
)))
TRACE_
(
d3d_shader
)(
" %.*s"
,
(
int
)(
ptr
-
line
),
line
);
}
GL_EXTCALL
(
glShaderSource
(
shader
,
1
,
&
src
,
NULL
));
checkGLcall
(
"glShaderSource"
);
GL_EXTCALL
(
glCompileShader
(
shader
));
...
...
dlls/wined3d/shader.c
View file @
cfd280fd
...
...
@@ -249,8 +249,6 @@ void shader_buffer_clear(struct wined3d_shader_buffer *buffer)
{
buffer
->
buffer
[
0
]
=
'\0'
;
buffer
->
content_size
=
0
;
buffer
->
lineNo
=
0
;
buffer
->
newline
=
TRUE
;
}
BOOL
shader_buffer_init
(
struct
wined3d_shader_buffer
*
buffer
)
...
...
@@ -273,48 +271,28 @@ void shader_buffer_free(struct wined3d_shader_buffer *buffer)
int
shader_vaddline
(
struct
wined3d_shader_buffer
*
buffer
,
const
char
*
format
,
va_list
args
)
{
char
*
base
=
buffer
->
buffer
+
buffer
->
content_size
;
unsigned
int
rem
;
int
rc
;
char
*
new_buffer
;
while
(
1
)
for
(;;
)
{
rc
=
vsnprintf
(
base
,
buffer
->
buffer_size
-
buffer
->
content_size
,
format
,
args
);
if
(
rc
<
0
/* C89 */
||
(
unsigned
int
)
rc
>=
buffer
->
buffer_size
-
buffer
->
content_size
/* C99 */
)
{
new_buffer
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
buffer
->
buffer
,
buffer
->
buffer_size
*
2
);
if
(
!
new_buffer
)
{
ERR
(
"The buffer allocated for the shader program string is too small at %d bytes.
\n
"
,
buffer
->
buffer_size
);
buffer
->
content_size
=
buffer
->
buffer_size
-
1
;
return
-
1
;
}
buffer
->
buffer
=
new_buffer
;
buffer
->
buffer_size
=
buffer
->
buffer_size
*
2
;
base
=
buffer
->
buffer
+
buffer
->
content_size
;
}
else
{
rem
=
buffer
->
buffer_size
-
buffer
->
content_size
;
rc
=
vsnprintf
(
&
buffer
->
buffer
[
buffer
->
content_size
],
rem
,
format
,
args
);
if
(
rc
>=
0
/* C89 */
&&
(
unsigned
int
)
rc
<
rem
/* C99 */
)
break
;
}
}
if
(
buffer
->
newline
)
{
TRACE
(
"GL HW (%u, %u) : %s"
,
buffer
->
lineNo
+
1
,
buffer
->
content_size
,
base
);
buffer
->
newline
=
FALSE
;
}
else
{
TRACE
(
"%s"
,
base
)
;
if
(
!
(
new_buffer
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
buffer
->
buffer
,
buffer
->
buffer_size
*
2
))
)
{
ERR
(
"Failed to grow buffer.
\n
"
);
buffer
->
buffer
[
buffer
->
content_size
]
=
'\0'
;
return
-
1
;
}
buffer
->
buffer
=
new_buffer
;
buffer
->
buffer_size
=
buffer
->
buffer_size
*
2
;
}
buffer
->
content_size
+=
rc
;
if
(
buffer
->
buffer
[
buffer
->
content_size
-
1
]
==
'\n'
)
{
++
buffer
->
lineNo
;
buffer
->
newline
=
TRUE
;
}
return
0
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
cfd280fd
...
...
@@ -440,8 +440,6 @@ struct wined3d_shader_buffer
char
*
buffer
;
unsigned
int
buffer_size
;
unsigned
int
content_size
;
unsigned
int
lineNo
;
BOOL
newline
;
};
enum
WINED3D_SHADER_INSTRUCTION_HANDLER
...
...
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