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
dd239829
Commit
dd239829
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: Simplify shader_arb_dump_program_source().
parent
9f2c668c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
26 deletions
+7
-26
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+7
-26
No files found.
dlls/wined3d/arb_program_shader.c
View file @
dd239829
...
...
@@ -50,10 +50,9 @@ static BOOL shader_is_vshader_version(enum wined3d_shader_type type)
return
type
==
WINED3D_SHADER_TYPE_VERTEX
;
}
/* Extract a line. Note that this modifies the source string. */
static
char
*
get_line
(
char
**
ptr
)
static
const
char
*
get_line
(
const
char
**
ptr
)
{
char
*
p
,
*
q
;
c
onst
c
har
*
p
,
*
q
;
p
=
*
ptr
;
if
(
!
(
q
=
strstr
(
p
,
"
\n
"
)))
...
...
@@ -62,33 +61,11 @@ static char *get_line(char **ptr)
*
ptr
+=
strlen
(
p
);
return
p
;
}
*
q
=
'\0'
;
*
ptr
=
q
+
1
;
return
p
;
}
static
void
shader_arb_dump_program_source
(
const
char
*
source
)
{
ULONG
source_size
;
char
*
ptr
,
*
line
,
*
tmp
;
source_size
=
strlen
(
source
)
+
1
;
tmp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
source_size
);
if
(
!
tmp
)
{
ERR
(
"Failed to allocate %u bytes for shader source.
\n
"
,
source_size
);
return
;
}
memcpy
(
tmp
,
source
,
source_size
);
ptr
=
tmp
;
while
((
line
=
get_line
(
&
ptr
)))
FIXME
(
" %s
\n
"
,
line
);
FIXME
(
"
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
tmp
);
}
enum
arb_helper_value
{
ARB_ZERO
,
...
...
@@ -3282,6 +3259,7 @@ static void shader_hw_call(const struct wined3d_shader_instruction *ins)
static
BOOL
shader_arb_compile
(
const
struct
wined3d_gl_info
*
gl_info
,
GLenum
target
,
const
char
*
src
)
{
const
char
*
ptr
,
*
line
;
GLint
native
,
pos
;
GL_EXTCALL
(
glProgramStringARB
(
target
,
GL_PROGRAM_FORMAT_ASCII_ARB
,
strlen
(
src
),
src
));
...
...
@@ -3294,7 +3272,10 @@ static BOOL shader_arb_compile(const struct wined3d_gl_info *gl_info, GLenum tar
{
FIXME_
(
d3d_shader
)(
"Program error at position %d: %s
\n\n
"
,
pos
,
debugstr_a
((
const
char
*
)
gl_info
->
gl_ops
.
gl
.
p_glGetString
(
GL_PROGRAM_ERROR_STRING_ARB
)));
shader_arb_dump_program_source
(
src
);
ptr
=
src
;
while
((
line
=
get_line
(
&
ptr
)))
FIXME_
(
d3d_shader
)(
" %.*s"
,
(
int
)(
ptr
-
line
),
line
);
FIXME_
(
d3d_shader
)(
"
\n
"
);
return
FALSE
;
}
}
...
...
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